good way to specify SDK constraint for any version of 1.6, including dev?

55 views
Skip to first unread message

Seth Ladd

unread,
Jul 28, 2014, 1:36:00 PM7/28/14
to General Dart Discussion
Hi,

Can anyone recommend a good way to add a SDK constraints that says "any version of 1.6, even if it's dev" ?

I have this:

environment:
  sdk: ">=1.6.0"

But I get this error:

sethladd:~/Code/simple_http_server (master)$ pub global activate simple_http_server
Downloading simple_http_server 0.1.0+2...
Resolving dependencies... 
Package simple_http_server requires SDK version >=1.6.0 but the current SDK is 1.6.0-dev.4.0.

I tried added .dev at the end of my sdk constraint, but that didn't work. I checked https://www.dartlang.org/tools/pub/dependencies.html#version-constraints but I missed any reference to .dev.

Thanks for any tips!
Seth

Alan Knight

unread,
Jul 28, 2014, 1:43:54 PM7/28/14
to General Dart Discussion
I think having "-dev" rather than ".dev" at the end of the constraint should work. Or possibly -dev.1.0 or something similar. The minus is actually significant as a +/- thing, so 1.6.0 means the released version, and 1.6.0-something means with a version lower than 1.6.0.


--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

Seth Ladd

unread,
Jul 28, 2014, 4:39:05 PM7/28/14
to General Dart Discussion
Nice, thanks Alan! That did the trick:

environment:
  sdk: ">=1.6.0-dev"

Natalie Weizenbaum

unread,
Jul 28, 2014, 5:28:37 PM7/28/14
to General Dart Discussion
In general, it's a good idea to specify a particular prerelease version that you know to work. If 1.5.0 doesn't have the feature you're using, it's likely that early dev releases don't either, so you don't want to include them in your constraint.

Jiakui Wang

unread,
Jul 28, 2014, 6:09:16 PM7/28/14
to mi...@dartlang.org
What's new in SDK 1.6.0?

Thanks!


Seth Ladd

unread,
Jul 28, 2014, 7:11:27 PM7/28/14
to General Dart Discussion
On Mon, Jul 28, 2014 at 2:28 PM, 'Natalie Weizenbaum' via Dart Misc <mi...@dartlang.org> wrote:
In general, it's a good idea to specify a particular prerelease version that you know to work. If 1.5.0 doesn't have the feature you're using, it's likely that early dev releases don't either, so you don't want to include them in your constraint.

Good point. I should specify the exact dev version that I have.
Reply all
Reply to author
Forward
0 new messages