No warning shown when a class is imported but not specified in exports field
Closed this issue · 1 comments
Deleted user commented
pubspec.yaml:
name: analysis_exports_error
description:
version: 0.0.1
environment:
sdk: ">=2.0.0 <3.0.0"
dependencies:
angular: any
dev_dependencies:
build_runner: any
build_web_compilers: any
analysis_options.yaml:
analyzer:
exclude:
plugins:
angular:
enabled: true
lib/a.dart:
class A{
static const b='hi';
}
lib/comp.dart:
import 'package:angular/angular.dart';
import 'package:analysis_exports_error/a.dart';
@Component(
selector: 'comp',
template: '''
{{A.b}}
''',
directives: [],
)
class Comp {}
In above code, class A
is imported but it is not added to exports
property of component comp
, but still we don't see any warnings.
As soon as 2nd line import 'package:analysis_exports_error/a.dart';
is commented out, we start to see warnings.
MichaelRFairhurst commented
Looks like this was fixed (on accident) during a recent refactoring that just got published, #655.
You should just have to restart your analysis services to get the update, though the old (lack of an) error may be cached at the beginning.