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
Dart Editor should warn when two identical files are imported from two URIs #4405
Comments
See also http://www.textuality.com/tag/uri-comp-2.html and http://en.wikipedia.org/wiki/URL_normalization and http://tools.ietf.org/html/rfc3986#section-6 for info on normalizing URIs. |
Removed Type-Defect label. |
Issue #7121 has been merged into this issue. |
Removed the owner. |
You're supposed to get a warning because you import two different libraries (the URIs are different) with the same name -- even when the name is empty. |
Additional note: importing a library that imports another library with a local uri and the main library imports with package uri. There's no warning in the editor and the program fails in fantastic ways. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
I believe that analyzer is now correctly using URI's to represent identity and that the required warnings are being produced. Added AssumedStale label. |
Dart libraries are identified by URIs. Two distinct URIs might identify the same resource. Libraries are identified by their URIs, so importing the same library twice from two different URIs actually creates two different namespaces in a Dart program.
Suggesting that the Dart Editor warn if a single Dart program imports the same library more than once, by identifying when two exact files (perhaps by SHA1) are imported from different URIs.
The text was updated successfully, but these errors were encountered: