I'm going to start adding support for SDK version constraints to pub. If you talk to the web-ui folks or follow the mailing list, you'll know this has been a huge source of pain since we started making breaking changes to the core library. Here's my rough plan, in case you're curious:
1. Packages will be able to specify the range of SDK versions that they work with. This will use a normal semantic version constraint. We'll massage Dart's SDK version to fit that format.
2. When resolving dependencies, pub will take into account the current SDK version (specifically, the version of the SDK that pub itself is running from). When requesting packages, it will pass in the SDK version and only packages whose SDK constraint match will be allowed.
The end result is that you won't erroneously get a version of some package that's too new for your version of the SDK, which is where the pain is coming from.
This means the SDK is handled a bit specially by pub, which I'm not crazy about, but it seems like the SDK is a little special so that's probably a worthwhile trade-off.
This is what Siggy initially suggested when we discussed this, I'm just sold on the idea now and ready to start coding. Holler if you have any thoughts.
Cheers!
- bob