'Natalie Weizenbaum' via Dart Misc
2017-07-12 22:53:19 UTC
Hey Dartisans,
Work is ramping up on Dart 2.0.0, and thatâs raised some questions about
packagesâ SDK constraints. Many packages currently have an SDK constraint
that ends with <2.0.0, disallowing all Dart 2.0.0 SDKs. Some have no SDK
constraint at all, although this will be interpreted as a default
constraint in Dart 2 <https://github.com/dart-lang/pub/issues/1657>. This
means that if Dart 2.0.0-dev.1 were released today, it wouldnât see any
packages at all. We need a plan to make packages available, so we can get
real-world code running on the 2.0.0 dev SDKs.
There are breaking changes planned for Dart 2.0.0, so some existing
packages probably wonât be compatible with the eventual 2.0.0 stable
release. Whatâs more, breaking changes may happen throughout the 2.0.0 dev
cycle as features evolve and user feedback is taken into account, so
thereâs no way to know for sure whether a package will work with the next
2.0.0-dev release.
The most conservative option would be to assume every 2.0.0-dev release is
breaking when choosing SDK constraints. So if my package were compatible
with the current release, letâs say 2.0.0-dev.3, its SDK constraint would
be >=1.0.0 <2.0.0-dev.4. But this means weâd need to release a new version
of every package for every single 2.0.0-dev release. Not only would that be
a huge burden for package maintainers, it would mean users of the dev
branch would experience weekly version lock until every package they used
updated.
So instead, the plan is to use an upper bound of <2.0.0-dev.infinity for
all packagesâ SDK constraints. This declares compatibility with every dev
release of Dart 2.0.0, but not with the eventual stable release. Users may
run into package versions that are incompatible with their SDK in practice,
but only if theyâve opted into using the unstable 2.0.0-dev SDK. In return,
in the common case where a release doesnât break packages, those packages
will be immediately available.
If youâre a package author, you should update your packagesâ SDK
constraints to <2.0.0-dev.infinity and publish a patch release sooner than
laterâ2.0.0-dev.1 is on the horizon. You should also keep an eye on this
mailing list for breaking changes that affect your package, so you can
update it when they land and keep your users from breaking.
If youâre a package user, you donât need to take any immediate action. Just
be aware that using a 2.0.0-dev release will mean that SDK constraints are
squishier than usual, and youâll probably need to run pub upgrade more
often to make sure your dependencies are compatible with the latest and
greatest Dart has to offer.
- Natalie
Work is ramping up on Dart 2.0.0, and thatâs raised some questions about
packagesâ SDK constraints. Many packages currently have an SDK constraint
that ends with <2.0.0, disallowing all Dart 2.0.0 SDKs. Some have no SDK
constraint at all, although this will be interpreted as a default
constraint in Dart 2 <https://github.com/dart-lang/pub/issues/1657>. This
means that if Dart 2.0.0-dev.1 were released today, it wouldnât see any
packages at all. We need a plan to make packages available, so we can get
real-world code running on the 2.0.0 dev SDKs.
There are breaking changes planned for Dart 2.0.0, so some existing
packages probably wonât be compatible with the eventual 2.0.0 stable
release. Whatâs more, breaking changes may happen throughout the 2.0.0 dev
cycle as features evolve and user feedback is taken into account, so
thereâs no way to know for sure whether a package will work with the next
2.0.0-dev release.
The most conservative option would be to assume every 2.0.0-dev release is
breaking when choosing SDK constraints. So if my package were compatible
with the current release, letâs say 2.0.0-dev.3, its SDK constraint would
be >=1.0.0 <2.0.0-dev.4. But this means weâd need to release a new version
of every package for every single 2.0.0-dev release. Not only would that be
a huge burden for package maintainers, it would mean users of the dev
branch would experience weekly version lock until every package they used
updated.
So instead, the plan is to use an upper bound of <2.0.0-dev.infinity for
all packagesâ SDK constraints. This declares compatibility with every dev
release of Dart 2.0.0, but not with the eventual stable release. Users may
run into package versions that are incompatible with their SDK in practice,
but only if theyâve opted into using the unstable 2.0.0-dev SDK. In return,
in the common case where a release doesnât break packages, those packages
will be immediately available.
If youâre a package author, you should update your packagesâ SDK
constraints to <2.0.0-dev.infinity and publish a patch release sooner than
laterâ2.0.0-dev.1 is on the horizon. You should also keep an eye on this
mailing list for breaking changes that affect your package, so you can
update it when they land and keep your users from breaking.
If youâre a package user, you donât need to take any immediate action. Just
be aware that using a 2.0.0-dev release will mean that SDK constraints are
squishier than usual, and youâll probably need to run pub upgrade more
often to make sure your dependencies are compatible with the latest and
greatest Dart has to offer.
- Natalie
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.