Skip to content

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

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
DartBot opened this issue Jun 5, 2015 · 5 comments
Closed
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="96" height="96"hspace="10"> Issue by sethladd
Originally opened as dart-lang/sdk#3715


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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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.

@DartBot DartBot added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) wontfix labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Hi Bob,

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

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


--sdkdir is now deprecated. Use environment variable DART_SDK


Added WontFix label.

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 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants