Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Issue 775413002: Restrict the version constraints on exported dependencies. (Closed)

Created:
6 years ago by nweiz
Modified:
6 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Restrict the version constraints on exported dependencies. This avoids a versioning issue where an exported dependency adds a feature and the exporting package's users' version constraints become invalidated. For example, suppose unittest 1.0.0 and matcher 1.0.0 exist. unittest has the constraint "matcher: '>=1.0.0 <2.0.0'" and exports matcher. Then matcher 1.1.0 is released with a new feature, and a user writes a new package, mypkg, which uses that feature. As per common practice, this package has the version constraint "unittest: '>=1.0.0 <2.0.0'" and no constraint on matcher. This constraint allows matcher 1.0.0, which doesn't support the new feature; this is a problem. Under the new scheme, unittest would have the constraint "matcher: '>=1.0.0 <1.1.0'". Then when matcher 1.1.0 is released, unittest 1.1.0 would be released as well with the constraint "marcher: '>=1.1.0 <1.2.0'". The tight lower bound ensures that the constraint "unittest: '>=1.1.0 <2.0.0'" properly selects only versions of matcher that have features available in the version the user is testing against. The tight upper bound ensures that new features in a new version of matcher won't become available in unittest without a version upgrade. R=jmesserly@google.com, rnystrom@google.com Committed: https://code.google.com/p/dart/source/detail?r=42223

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -6 lines) Patch
M pkg/polymer/CHANGELOG.md View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/polymer/pubspec.yaml View 3 chunks +6 lines, -2 lines 1 comment Download
M pkg/scheduled_test/CHANGELOG.md View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/scheduled_test/pubspec.yaml View 2 chunks +6 lines, -2 lines 0 comments Download
M pkg/unittest/CHANGELOG.md View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/unittest/pubspec.yaml View 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
nweiz
6 years ago (2014-12-04 22:46:57 UTC) #2
Jennifer Messerly
polymer LGTM https://codereview.chromium.org/775413002/diff/1/pkg/polymer/pubspec.yaml File pkg/polymer/pubspec.yaml (right): https://codereview.chromium.org/775413002/diff/1/pkg/polymer/pubspec.yaml#newcode29 pkg/polymer/pubspec.yaml:29: observe: '>=0.12.2 <0.12.3' Nice solution. Thanks so ...
6 years ago (2014-12-04 23:05:20 UTC) #4
Siggi Cherem (dart-lang)
On 2014/12/04 23:05:20, John Messerly wrote: > polymer LGTM > > https://codereview.chromium.org/775413002/diff/1/pkg/polymer/pubspec.yaml > File pkg/polymer/pubspec.yaml ...
6 years ago (2014-12-04 23:26:28 UTC) #5
Bob Nystrom
scheduled_test and unittest changes LGTM!
6 years ago (2014-12-05 18:09:26 UTC) #6
nweiz
6 years ago (2014-12-09 21:35:33 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 42223 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698