Skip to content

flutter analyze doesn't work well with nested (and different) .packages files #10015

@goderbauer

Description

@goderbauer

If you run flutter analyze on https://github.com/flutter/plugins/tree/master/packages/firebase_auth you get the following output:

Analyzing /Users/goderbauer/dev/plugins/packages/firebase_auth...
    error • Target of URI doesn't exist: 'package:google_sign_in/google_sign_in.dart' at example/lib/main.dart:10:8 • uri_does_not_exist
    error • Undefined class 'GoogleSignIn' at example/lib/main.dart:13:7 • undefined_class
    error • Undefined class 'GoogleSignIn' at example/lib/main.dart:13:39 • undefined_class
    error • Undefined class 'GoogleSignInAccount' at example/lib/main.dart:63:5 • undefined_class
    error • Undefined class 'GoogleSignInAuthentication' at example/lib/main.dart:64:5 • undefined_class
5 issues found.

All those issues are bogus. Apparently, flutter analyze can't deal with the fact that plugins have an example sub-package.

/cc @mit-mit

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions