You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is part of the spec or not, so I'm not sure if this is area-language or area-analyzer or something else. Please adjust as needed.
Library names are anyways not used for anything semantic and we encourage users to either drop them or use them only for documentation purposes. However, we complain about duplicate names when we find them, for example:
$ dartanalyzer a.dart
error • The imported libraries 'b.dart' and 'c.dart' can't have the same name 'x' at a.dart:2:1 • import_duplicated_library_named
1 error found.
The text was updated successfully, but these errors were encountered:
sigmundch
added
the
area-language
Dart language related items (some items might be better tracked at github.com/dart-lang/language).
label
Oct 3, 2018
This issue has been solved? I ask it because in Dart 2.12 the above example is no longer reported to me as erroneous, but also the related issue document that library directives should be unique is still open.
If duplicate library name are now allowed, I assume the specific library name is now totally irrelevant (dartdoc aside) to compile-time and runtime, i.e. it is only used in part-of directive with library name, which can be avoided by using part-of directives with library URI.
I ask this question because having to insert and mantain the library directives (necessary for the doc and the annotations at the library level) takes time, and I would like to understand how important the specific name is, in the hope of being able to do without it altogether when also #1073 Allow library declarations with no name is closed.
I'm not sure if this is part of the spec or not, so I'm not sure if this is area-language or area-analyzer or something else. Please adjust as needed.
Library names are anyways not used for anything semantic and we encourage users to either drop them or use them only for documentation purposes. However, we complain about duplicate names when we find them, for example:
for a.dart:
b.dart
c.dart
The text was updated successfully, but these errors were encountered: