-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Extensions don't trigger library import for their names only #59723
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
Comments
Here is the CL https://dart-review.googlesource.com/c/sdk/+/401040 |
This still makes one test fail. I'm on my lunch break now, when I get to my computer I'll add a comment on the CL asking for what I should do in that case. |
Note that the use of I can see wanting this behavior for the doc comment case, though, but for that case it should probably create a doc-import. |
Yeah, I noticed later. I originally detected this by making a doc. Thanks! |
Currently the Adding a call for the Unfortunately, this is only accessible if that lint is enabled and it is off by default. Why is that? I'd expect more care for the docs from everyone and this being on would help with that. |
Updated this CL to the above. |
One reason is because the lint was written before there were doc imports. If we required users to add a normal import for every reference in a doc comment then the dependency graph would have far more edges than necessary in order to run the program, and that isn't good for users. As I said elsewhere, we need to look at the lints/warnings for doc imports from a holistic perspective and figure out what the right UX is. It's possible that we'll convert the lint into a warning now that we have doc imports. |
Repro:
extension.dart
main.dart:
Neither
Ext
will trigger the quick-fix for the importing ofextension.dart
. If you add a lineExt;
insidef
it does.I volunteer to help with this.
The text was updated successfully, but these errors were encountered: