Le vendredi 28 septembre 2012 09:52:50 Jesse Long a écrit :
> My point is really about exclusive upper bounds.
ok, now I'm starting to see the precise idea and believe it can avoid breaking 
subtle logic
[1.7,1.8) could exclude anything "starting with" 1.8: betas, alphas, alphas-
alphas, snapshots (but this one is a consequence of excluding alphas since 
alpha < snapshot)
it's still a mathematical range, just the meaning of the upper bound is 
different and intended as more natural

Changing this behaviour would need good documentation and communication, but 
seems feasible without wrecking havoc

You'll need to create a Jira issue, perhaps have a vote on the list to check 
that nobody finds big issues with this change (or see the benefit of breaking 
past-compatibility)

> 
> I expect that [1.7,1.8] should contains 1.7.0 and above (no snapshots
> and prerelease for 1.7.0) and 1.8.* release versions.
ouch, 1.8.* release versions in [1.7,1.8]?
Service packs (1.8-sp1), why not, even if not immediately natural
but 1.8.1, no, sorry :)

> Having said that,
> I dont really care too much about this use case and have not thought
> much about it. I have thought about exclusive upper bounds, and I think
> my proposal is the best solution.
> 
> [1.7,1.8-beta): Like I said, there is no sense in that at all. Why would
> a developer want to include 1.8-alpha, but not 1.8-beta? Indeed, why
> would he want 1.8.0-alpha4 and not 1.8.0? I think we should not make the
> majority of use cases, where the exclusive upper bound defines a
> compatibility break according to semver, to suffer because some users
> will do weird things like [1.7,1.8-beta).
> 
> [1.7,1.8-beta) is a valid input however, so we should make a plan for
> it.
+1

> We could just say that if the upper bound has a qualifier, compare
> as per usual. If the exclusive upper bound has no qualifier, then ignore
> the qualifier of the version being compared to the upper bound. So, in
> [1.7.0,1.8.0), 1.8.0 is outside the range and so is 1.8.0-alpha1. In
> [1.7.0,1.8.0-beta) 1.8.0 is outside the range, 1.8.0-beta3 is outside
> the range and 1.8.0-alpha4 is inside the range.
I don't think we need special handling: with "exclude anything starting with" 
semantics and the version comparison algorithm, IMHO, we have the rule that 
can be applied to any form of upper bound and stays completely logic and 
previsible
The more I dig into this semantic, the more I like it :)

A new question: what about exclusive lower bound? would this semantic apply 
too? (I'm tired for the moment, just throwing the question without having 
really thought about consequences)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to