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

When dart2js reports a duplicate library it should say where it's referenced from #7133

Closed
alan-knight opened this issue Dec 4, 2012 · 11 comments
Assignees

Comments

@alan-knight
Copy link
Contributor

It's possible to create duplicates of the same library by referring to it by two different paths. In particular, if you reference it via package: from one place and via a direct path reference from another. This can lead to very confusing symptoms.

dart2js can report these if the --verbose flag is specified. However, the warning that you get tells you that there is a duplicated library definition and gives the point where the library is declared. It would be much more useful if it also told you where the library is referenced from, possibly transitively.

@peter-ahe-google
Copy link
Contributor

One could argue that we might want to do a second path on the library graph just to give better error messages. As Alan suggests, any library that transitively has a reference to the duplicated library might be the one that needs fixing, and the longer (measured in import statements) this file is from the duplicated library the worse.

Also, our users might benefit from a way to diagnose that a file URI is being used to reference a library that would be accessible through a package:-import. I think this can be done relatively easily by traversing the package root once a duplicated library has been found.

@peter-ahe-google
Copy link
Contributor

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

@peter-ahe-google
Copy link
Contributor

And by "second path" I meant "second pass".

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@danschultz
Copy link

Any updates? We're using Web UI on our project, and its compiler rewrites a lot of the imports to use relative paths. It makes it hard to discern what is important and what is not when compiling to dart2js.

@johnniwinther
Copy link
Member

Added Started label.

@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.

@sigmundch
Copy link
Member

it seems this was fixed in r33476


Added Fixed label.

@karlklose
Copy link
Contributor

Issue #13295 has been merged into this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants