New error message for depend_on_referenced_packages
quick-fix
#55985
Labels
analyzer-quick-fix
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
I have a use case for a change in
depend_on_referenced_packages
quick-fix error message.In my company we create some local packages. They sometimes depend on each other.
Just now I was editing a package, let's call it
a
, that has a dependency in a second packageb
which ultimately depends onc
.When I wrote down some code that needed package
c
and then added the import line, I got a this lint:The imported package 'c' isn't a dependency of the importing package.
But when trying to use the assist I got an error.
But (I believe) the analysis server knows that my
b
package depends on ac
package from path.I dont't think the analyzer should be able to figure out the path from both packages to solve where
c
is at in my machine, but shouldn't it at least show me that the dependency is not from pub.dev?I have not tested but it got me guessing about dependencies that rely on GitHub repository links or similar. What then? If I need something that is not in release yet I'll need to manually change there anyway so the quick-fix would not be actually helping but IMO it would be generating doubts.
The text was updated successfully, but these errors were encountered: