-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-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-uxA user experience or user interface related issueA user experience or user interface related issue
Description
In the SDK, I found a deprecated library which had a similar case to the following:
@Deprecated('Deprecated library')
library;
class MyDeprecatedClass {}
It was then exported by another library, like (consider it other.dart
):
// ignore: deprecated_member_use_from_same_package
export 'deprecated.dart';
And when I had the last library already imported, no diagnostic was shown but I could still see the strokes on the completion:

IRL, the files were:
- Deprecated
pkg/analyzer/lib/src/error/codes.g.dart
- Exporter
pkg/analyzer/lib/src/error/codes.dart
- Importer
pkg/analysis_server/lib/src/services/correction/fix_internal.dart
The deprecated library had this under deprecated:
// This library is deprecated to prevent it from being accidentally imported
// It should only be imported by the corresponding non-code-generated library
// (which suppresses the deprecation warning using an "ignore" comment).
'Use package:analyzer/src/error/codes.dart instead',
But as you can see, it still feels a bit weird if you look at the completion.
My question would be if we should stop showing deprecated
for completions because the declaring library is deprecated?
Metadata
Metadata
Assignees
Labels
area-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-uxA user experience or user interface related issueA user experience or user interface related issue