Skip to content

Unhelpful error message if you omit --sdkdir when using sdk: and Pub #3715

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
sethladd opened this issue Jun 18, 2012 · 6 comments
Closed

Unhelpful error message if you omit --sdkdir when using sdk: and Pub #3715

sethladd opened this issue Jun 18, 2012 · 6 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@sethladd
Copy link
Contributor

Pubspec.yaml:

dependencies:
  unittest:
    sdk: unittest

When run with:

pub install

Will generate:

~/tmp/pubsdk > pub install
Entry null is not a supported type.

It should say instead:

You specified that unittest is in the SDK, but you did not specify where to find the SDK. Use --sdkdir to specify the directory of the SDK and please try again.

@munificent
Copy link
Member

The --sdkdir argument is a temporary hack right now. The integration tests for pub need to tell it where to find the (fake) SDK directory and until recently dart:io didn't have support for working with environment variables.

Now that it does, this argument will likely go away completely at some point. Until then... pretend it doesn't exist. :)

Leaving this bug open for now in case others run into this, but it will get closed out when --sdkdir is removed.

@sethladd
Copy link
Contributor Author

Hi Bob,

Thanks for the info. How does one use pub to pull in the unittest lib?

@munificent
Copy link
Member

Right now, I don't think there is a good answer for that. What I'm hoping is that when pub.dartlang.org is up and running, we can put unittest there, but I admit I haven't had a chance to put a lot of thought into this yet.

@sethladd
Copy link
Contributor Author

You might want to print out "I see you're using the sdk: source. This is a temporary hack, and will be removed. We suggest ..."

Bob, perhaps in the meantime you can support a file: source that will eventually be replaced by pub.dartlang.org. This keeps package: in the source and lets the developer use file: today and later, pub: or whatever it becomes.

@sethladd
Copy link
Contributor Author

--sdkdir is now deprecated. Use environment variable DART_SDK


Added WontFix label.

@DartBot
Copy link

DartBot commented Jun 5, 2015

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

@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix 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
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

4 participants