-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint for unused package defined in pubspec #57174
Comments
There may be false positives with dependencies solely depended on for their barback input assets. |
|
I would prefer to see this as a hint (we are now analyzing pubspec files). It's analogous to the dead code hints and I think it should be treated the same way. |
@bwilkerson : shall I move this to the SDK repo? |
More important is to have a lint to warn about used packages that are
unreferenced in the pubspec. This can cause real problems.
Be careful, about the other way around. Folks can reference resources in
packages via package URI or (for things like build_runner and
build_web_compilers) have good reason for a dependency without referencing
it in code!
…On Sat, May 19, 2018 at 3:39 PM Phil Quitslund ***@***.***> wrote:
@bwilkerson <https://github.com/bwilkerson> : shall I move this to the
SDK repo?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#57174>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCirYIvJqQ22T2-peNXwvH3aiIu6Lzks5t0J87gaJpZM4Dgjli>
.
|
CC @nex3, who has thought about this a bit... |
We definitely shouldn't warn people for packages that are in their pubspec but aren't imported. We want users to declare explicit dependencies on packages whose assets they use, whose executables they invoke, that they load dynamically via isolates, and so on. |
It sounds like the request for this lint has been withdrawn. A request for a hint for imports of packages that are not explicitly listed in the pubspec should be opened in the sdk repo (if it isn't there already), but this issue should be closed. |
No description provided.
The text was updated successfully, but these errors were encountered: