Skip to content
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

Closed
sethladd opened this issue Aug 7, 2012 · 16 comments
Closed
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

sethladd commented Aug 7, 2012

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.

@sethladd
Copy link
Contributor Author

sethladd commented Aug 7, 2012

@clayberg
Copy link

clayberg commented Aug 8, 2012

Removed Type-Defect label.
Added Type-Enhancement label.

@clayberg
Copy link

Set owner to @keertip.
Added this to the Later milestone.

@keertip
Copy link
Contributor

keertip commented Aug 30, 2012

Removed this from the Later milestone.
Added this to the M2 milestone.

@keertip
Copy link
Contributor

keertip commented Oct 24, 2012

Removed this from the M2 milestone.
Added this to the M3 milestone.

@keertip
Copy link
Contributor

keertip commented Dec 3, 2012

Issue #7121 has been merged into this issue.

@danrubel
Copy link

Removed this from the M3 milestone.
Added this to the Later milestone.

@sethladd
Copy link
Contributor Author

Removed the owner.
Removed this from the Later milestone.
Added this to the M6 milestone.
Removed Area-Editor label.
Added Area-Analyzer label.

@bwilkerson
Copy link
Member

Removed this from the M6 milestone.
Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Sep 19, 2013

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.

@jtmcdole
Copy link
Contributor

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.

@jwren
Copy link
Member

jwren commented Sep 19, 2013

M7 -> M8


Removed this from the M7 milestone.
Added this to the M8 milestone.

@bwilkerson
Copy link
Member

Removed this from the M8 milestone.
Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@bwilkerson
Copy link
Member

I believe that analyzer is now correctly using URI's to represent identity and that the required warnings are being produced.


Added AssumedStale label.

@sethladd sethladd added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant labels Mar 6, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. closed-obsolete Closed as the reported issue is no longer relevant type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

9 participants