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

Issue 10383203: Add base Version class to start support versioning in pub. (Closed)

Created:
8 years, 7 months ago by Bob Nystrom
Modified:
8 years, 7 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add base Version class to start support versioning in pub. Committed: https://code.google.com/p/dart/source/detail?r=7701

Patch Set 1 #

Total comments: 31

Patch Set 2 : Respond to review. #

Patch Set 3 : Fix ==. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+418 lines, -2 lines) Patch
A utils/pub/version.dart View 1 2 1 chunk +212 lines, -0 lines 6 comments Download
M utils/tests/pub/test_pub.dart View 1 chunk +3 lines, -2 lines 0 comments Download
A utils/tests/pub/version_test.dart View 1 1 chunk +203 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Bob Nystrom
Starting to hack on versioning going bottom-up.
8 years, 7 months ago (2012-05-15 22:12:12 UTC) #1
nweiz
https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart#newcode10 utils/pub/version.dart:10: #library('pub_version'); Why is this a separate library? Are you ...
8 years, 7 months ago (2012-05-15 23:12:19 UTC) #2
Bob Nystrom
'Tanks! https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart#newcode10 utils/pub/version.dart:10: #library('pub_version'); On 2012/05/15 23:12:19, nweiz wrote: > Why ...
8 years, 7 months ago (2012-05-16 00:27:27 UTC) #3
nweiz
https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart#newcode10 utils/pub/version.dart:10: #library('pub_version'); On 2012/05/16 00:27:27, Bob Nystrom wrote: > On ...
8 years, 7 months ago (2012-05-16 18:28:05 UTC) #4
Bob Nystrom
Thanks! https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart#newcode10 utils/pub/version.dart:10: #library('pub_version'); On 2012/05/16 18:28:05, nweiz wrote: > On ...
8 years, 7 months ago (2012-05-16 18:39:52 UTC) #5
nweiz
lgtm https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/1/utils/pub/version.dart#newcode10 utils/pub/version.dart:10: #library('pub_version'); On 2012/05/16 18:39:52, Bob Nystrom wrote: > ...
8 years, 7 months ago (2012-05-16 21:02:07 UTC) #6
Sean Eagan
https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version.dart File utils/pub/version.dart (right): https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version.dart#newcode176 utils/pub/version.dart:176: interface VersionConstraint { couldn't this just be: typedef bool ...
8 years, 7 months ago (2012-05-17 15:35:39 UTC) #7
Bob Nystrom
8 years, 7 months ago (2012-05-17 16:48:30 UTC) #8
Thanks for the feedback. This stuff is still a work-in-progress. Versioning is a
big chunk of work and I'm trying to break it into smaller patches. Hopefully
some of this stuff will make more sense once more patches are in.

https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version....
File utils/pub/version.dart (right):

https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version....
utils/pub/version.dart:176: interface VersionConstraint {
On 2012/05/17 15:35:39, seaneagan1 wrote:
> couldn't this just be:
> 
> typedef bool VersionConstraint(Version version);

It could be right now, but later patches will be adding methods to this
interface.

https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version....
utils/pub/version.dart:186: class VersionRange implements VersionConstraint {
On 2012/05/17 15:35:39, seaneagan1 wrote:
> There should be a generic interface for intervals of Comparables somewhere
> somewhere in a core library, see:
> 
> https://gist.github.com/2719638

I like this idea, but sometimes I think you can be *too* generic. VersionRange
will likely have operations in later patches that are more specific to versions
and would have trouble cramming that in a generic Interval class.

Also, at least right now, making changes to corelib is a slow painful process.

https://chromiumcodereview.appspot.com/10383203/diff/10001/utils/pub/version....
utils/pub/version.dart:190: VersionRange([this.min, this.max]) {
On 2012/05/17 15:35:39, seaneagan1 wrote:
> As in the above linked gist, you can determine the min and max in the
> constructor, instead of requiring the caller to specify them in the correct
> order.

At least in the use case of versions, my hunch is that an out-of-order
VersionRange constructor call is a sign of a bug, and I'd like to catch that
early.

Powered by Google App Engine
This is Rietveld 408576698