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

app named web_ui can't use web_ui package #12300

Closed
kwalrath opened this issue Aug 7, 2013 · 5 comments
Closed

app named web_ui can't use web_ui package #12300

kwalrath opened this issue Aug 7, 2013 · 5 comments
Assignees

Comments

@kwalrath
Copy link
Contributor

kwalrath commented Aug 7, 2013

OK, this seems obvious in hindsight, but I should've seen a better error/warning.

In Dart Editor I created a little app to test web_ui, named the app web_ui (duh!), and then (not editing the boilerplate code a bit) got this error message:

Unable to open file: /Users/kathyw/dart/web_ui/packages/web_ui/component_build.dart'file:///Users/kathyw/dart/web_ui/build.dart': Error: line 2 pos 1: library handler failed
import 'package:web_ui/component_build.dart';
^

Looking in packages, I saw browser, js, and meta, but not web_ui. I tried pub install on the command line, and it happily executed without a single error message or warning.

Apparently, pub install can't/doesn't get web_ui if your app is named web_ui. I assume this is true for any package that has the same name as the app.

Pub install (and/or the editor) should give you a warning about this. If this behavior is technically correct, the message could just be something like: Didn't download web_ui package because this app is named web_ui.

@munificent
Copy link
Member

Set owner to @munificent.
Added Started label.

@munificent
Copy link
Member

With:

https://codereview.chromium.org/22825024/

You'll get an error if you try to add a dependency on a package with the same name as your own package. That should help you avoid this confusing situation. You can still end up in a confusing (but intentionally supported state) if you have an indirect dependency on yourself, but we need that use case to work.

@munificent
Copy link
Member

Added Duplicate label.
Marked as being merged into #11046.

@munificent
Copy link
Member

Added Fixed label.
Marked as being merged into #.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/pub#611.

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

No branches or pull requests

4 participants