-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
I had reports of code completion missing some classes that were valid in the current scope, for example Provider here:
It turned out that the provider package was listed in dev_dependencies and it seems like these should not be used in the lib folder:
sdk/pkg/analyzer/lib/src/services/available_declarations.dart
Lines 176 to 178 in 5b18fa0
| /// With `Pub`, files below the `pubspec.yaml` file can access libraries | |
| /// of packages listed as `dependencies`, and files in the `test` directory | |
| /// can in addition access libraries of packages listed as `dev_dependencies`. |
However, typing these classes manually does not generate any warnings/errors, and as far as I can tell there is no lint for this.
If it's not valid to import dev_dependencies into lib, it seems like an error/warning should be generated? If it is, then it seems like they should be included in completion?
Sov3rain
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
