-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-completionIssues with the analysis server's code completion featureIssues with the analysis server's code completion featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Dart SDK version: 3.3.0-48.0.dev (dev) (Fri Oct 20 09:02:07 2023 -0700) on "windows_x64"
Steps to reproduce:
- Create a new dart project
- Replace the contents of
analysis_options.yaml
with
linter:
rules:
prefer_relative_imports: false
avoid_relative_lib_imports: true # Probably redundant
always_use_package_imports: true # Probably redundant
- Create a new file
lib/foo.dart
with contentsconst hello = 'world';
- Create a new file
lib/bar.dart
with contentsconst greeting = hello;
- Open the project in IntelliJ and enable Dart support (I haven't tested this in any other editor)
- Navigate to
lib/bar.dart
, place the cursor onhello
, and generate suggestions with alt+enter - Expected:
Import library 'package:import_bug/foo.dart'
is the first (and ideally, only) suggestion - Actual:
This function seems to suggest the order depends on the value of prefer_relative_imports
, but changing this value doesn't change the order.
Might be related to #32916 where support for relative imports was added?
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-completionIssues with the analysis server's code completion featureIssues with the analysis server's code completion featuretype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug