Skip to content

CFE: Remove error for library name clash #42700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eernstg opened this issue Jul 15, 2020 · 5 comments
Closed

CFE: Remove error for library name clash #42700

eernstg opened this issue Jul 15, 2020 · 5 comments
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@eernstg
Copy link
Member

eernstg commented Jul 15, 2020

The CFE reports a warning in the following situation:

// Library 'lib1.dart'.
library clashing.nonempty.name;

// Library 'lib2.dart'.
library clashing.nonempty.name;

// Library 'main.dart'.
import 'lib1.dart';
import 'lib2.dart';

void main() {}

The response with dart from commit a48bebe is as follows:

tests/language_2/import/name_clash_test.dart:7:1: Warning: A library with name 'clashing.nonempty.name' is imported more than once.
import "name_clash_lib1.dart";
^
tests/language_2/import/name_clash_test.dart:8:1: Context: 'clashing.nonempty.name' is also imported here.
import "name_clash_lib2.dart";
^

This warning was removed from the language specification in dart-lang/language#1083, so the CFE should no more report this warning, with or without null-safety.

@eernstg eernstg added the legacy-area-front-end Legacy: Use area-dart-model instead. label Jul 15, 2020
@johnniwinther
Copy link
Member

What about export of libraries with library name clashes?

@eernstg
Copy link
Member Author

eernstg commented Jul 15, 2020

Good catch!

@eernstg
Copy link
Member Author

eernstg commented Jul 15, 2020

Cf. dart-lang/language#1096.

@eernstg
Copy link
Member Author

eernstg commented Jul 15, 2020

dart-lang/language#1096 has now been landed, so the error for library name clashes in exports should also be eliminated.

@eernstg
Copy link
Member Author

eernstg commented Jul 23, 2020

'name_clash_test' with/without null safety updated here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

2 participants