You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Oleg Gusakov <ol...@gmail.com> on 2008/08/13 02:51:17 UTC
Mercury Version Ranges
Working on Mercury I faced the necessity to use some standard definition
of a "version range", so I took OSGi definition: OSGi core specs 4.1,
page 39 in April-2007 PDF available on OSGi site - http://osgi.org.
Some interesting ramifications for Maven users:
1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
1.2.3 <= X. We are used to a soft version of that in Maven builds -
version can be replaced by a more applicable dependency. But spec states
ANY version: i.e. found in any scanned repository.
2). I strongly feel that failing any explicit ranges, containing
snapshots is a good thing. For instance, dependency declaration
1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
[1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
2.1-alpha-1, etc
Please comment if this does not sound natural or breaks some
well-established usage patterns.
Thanks,
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: Mercury Version Ranges
Posted by "Clark, Gil W." <Gi...@intuit.com>.
Woops, sorry all. I meant to send this just to Oleg.
Still good work though.
-----Original Message-----
From: Clark, Gil W. [mailto:Gil_Clark@intuit.com]
Sent: Monday, August 18, 2008 10:22 AM
To: Maven Developers List
Subject: RE: Mercury Version Ranges
Hi Oleg,
This is great stuff. I've wanted quality ranges for a long time. What's the best way to jump on to the thread here? Respond to the dev list or add a comment to the codehaus discussion?
BTW, are you still at Linked In?
Thanks,
Gil
-----Original Message-----
From: Oleg Gusakov [mailto:oleg.subscriptions@gmail.com]
Sent: Monday, August 18, 2008 10:02 AM
To: Maven Developers List
Subject: Re: Mercury Version Ranges
I've implemented the solution to the problem - please see "Solution to
the above problem - Quality Range" in the http://docs.codehaus.org/x/twDPBQ
The solution turned to be a very nice feature to also use in the
Repository, I am exploring that option, please keep an eye on
http://docs.codehaus.org/x/4wDPBQ - this is where I track the Repository
stuff.
Thanks,
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: Mercury Version Ranges
Posted by "Clark, Gil W." <Gi...@intuit.com>.
Hi Oleg,
This is great stuff. I've wanted quality ranges for a long time. What's the best way to jump on to the thread here? Respond to the dev list or add a comment to the codehaus discussion?
BTW, are you still at Linked In?
Thanks,
Gil
-----Original Message-----
From: Oleg Gusakov [mailto:oleg.subscriptions@gmail.com]
Sent: Monday, August 18, 2008 10:02 AM
To: Maven Developers List
Subject: Re: Mercury Version Ranges
I've implemented the solution to the problem - please see "Solution to
the above problem - Quality Range" in the http://docs.codehaus.org/x/twDPBQ
The solution turned to be a very nice feature to also use in the
Repository, I am exploring that option, please keep an eye on
http://docs.codehaus.org/x/4wDPBQ - this is where I track the Repository
stuff.
Thanks,
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
I've implemented the solution to the problem - please see "Solution to
the above problem - Quality Range" in the http://docs.codehaus.org/x/twDPBQ
The solution turned to be a very nice feature to also use in the
Repository, I am exploring that option, please keep an eye on
http://docs.codehaus.org/x/4wDPBQ - this is where I track the Repository
stuff.
Thanks,
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Brett Porter <br...@apache.org>.
On 15/08/2008, at 12:56 AM, Oleg Gusakov wrote:
>
>
> Jason van Zyl wrote:
>> I think Oleg's suggestion here of putting the spec in the wiki
>> makes the most sense. I've followed the thread and I think we need
>> to comment on proposed behavior in one page so we can all see them.
>> I've already lost track in the mail thread.
> Guys, please use the page: http://docs.codehaus.org/x/twDPBQ to
> comment on design and add use cases you'd like to see addressed.
I agree it's a good place to track use cases and document decisions,
but not very functional for tracking changes or discussing/asking
questions (it's also susceptible to deletion or history loss at some
point in the future). I hope we'll continue to use the list for that
in between bursts to the doc to make it easiest to follow on.
Thanks,
Brett
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Jason van Zyl wrote:
> I think Oleg's suggestion here of putting the spec in the wiki makes
> the most sense. I've followed the thread and I think we need to
> comment on proposed behavior in one page so we can all see them. I've
> already lost track in the mail thread.
Guys, please use the page: http://docs.codehaus.org/x/twDPBQ to comment
on design and add use cases you'd like to see addressed.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Jason van Zyl <ja...@maven.org>.
I think Oleg's suggestion here of putting the spec in the wiki makes
the most sense. I've followed the thread and I think we need to
comment on proposed behavior in one page so we can all see them. I've
already lost track in the mail thread.
On 14-Aug-08, at 2:19 AM, Mark Hobson wrote:
> 2008/8/13 Michael McCallum <gh...@apache.org>:
>> I wish you would stop pointing that out ;-).
>
> Hehe, forgive me if I'm repeating myself, I'm sure you're more than
> aware that this discussion has been going on for quite some time in
> many shapes and forms :)
>
>> I only use snapshots in local and
>> never deploy them... if someone wants trunk then they should build it
>> themselves... if they want to try out the latest development then
>> take the
>> next major version of the project which most like is alpha/beta...
>>
>> Every approach that i have taken is engineered towards allowing
>> rapid stable,
>> reproducible change to the deliverables without too much overhead
>> to the
>> developers...
>>
>> I don't use deployed snapshots for the simple reasons that its too
>> hard to
>> back track... i want to very easily find out whats changed and
>> whether
>> rolling back or forward is the cheapest option... without tags aka
>> releases
>> there is just no easy way to do it...
>
> I guess we just use different practices. I use the common scenario of
> CI building snapshots for others to digest, since we have so many
> components this is a huge benefit. Hopefully Mercury will be able to
> satisfy both of our use cases.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
A language that doesn’t affect the way you think about programming is
not worth knowing.
-— Alan Perlis
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Mark Hobson <ma...@gmail.com>.
2008/8/13 Michael McCallum <gh...@apache.org>:
> I wish you would stop pointing that out ;-).
Hehe, forgive me if I'm repeating myself, I'm sure you're more than
aware that this discussion has been going on for quite some time in
many shapes and forms :)
> I only use snapshots in local and
> never deploy them... if someone wants trunk then they should build it
> themselves... if they want to try out the latest development then take the
> next major version of the project which most like is alpha/beta...
>
> Every approach that i have taken is engineered towards allowing rapid stable,
> reproducible change to the deliverables without too much overhead to the
> developers...
>
> I don't use deployed snapshots for the simple reasons that its too hard to
> back track... i want to very easily find out whats changed and whether
> rolling back or forward is the cheapest option... without tags aka releases
> there is just no easy way to do it...
I guess we just use different practices. I use the common scenario of
CI building snapshots for others to digest, since we have so many
components this is a huge benefit. Hopefully Mercury will be able to
satisfy both of our use cases.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Wed, 13 Aug 2008 20:52:31 Mark Hobson wrote:
> For example, say I need to fix a bug in Project A 3.0 that depends on
> Project B 2.0, amongst many other dependencies. I take A 3.0 and
> determine that the bug is in B 2.0, so I want to update the dependency
> of B in A to 2.1-SNAPSHOT. Assuming that this range was initially
> declared as B[2.0,3.0), using the repository approach I would just
> enable snapshot repositories for the range to resolve to my new
> work-in-progress B 2.1-SNAPSHOT. This works, but it would also open
> the gates for all other ranged dependencies to resolve to snapshots
> too, which I certainly don't want. Whereas if ranges behaved as I've
> described, then we would just update B to [2.0,2.1-SNAPSHOT) during
> development and then reinstate [2.0,3.0) once the fixed B 2.1 has been
> released.
>
I wish you would stop pointing that out ;-). I only use snapshots in local and
never deploy them... if someone wants trunk then they should build it
themselves... if they want to try out the latest development then take the
next major version of the project which most like is alpha/beta...
Every approach that i have taken is engineered towards allowing rapid stable,
reproducible change to the deliverables without too much overhead to the
developers...
I don't use deployed snapshots for the simple reasons that its too hard to
back track... i want to very easily find out whats changed and whether
rolling back or forward is the cheapest option... without tags aka releases
there is just no easy way to do it...
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Thu, 14 Aug 2008 02:03:36 Mark Hobson wrote:
> 2008/8/13 Oleg Gusakov <ol...@gmail.com>:
> > Mark - this is the same if one excludes repositories and lives within
> > pre-existing version set: like Maven having only local repo and OSGi
> > having one OBR file.
> >
> > If we add a variable - repositories that constantly change, then we start
> > wondering what to do and OSGi joins this discussion as soon as they add
> > this feature.
>
> I'm not quite sure that I understand the scenario you're describing
> here? Aren't the repositories defined with the pom and so are
> constant?
I define NO repositories in the pom... thats just a bit too chicken and egg...
I define all my repositories in settings.xml
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Mark Hobson wrote:
> 2008/8/13 Oleg Gusakov <ol...@gmail.com>:
>
>> Mark - this is the same if one excludes repositories and lives within
>> pre-existing version set: like Maven having only local repo and OSGi having
>> one OBR file.
>>
>> If we add a variable - repositories that constantly change, then we start
>> wondering what to do and OSGi joins this discussion as soon as they add this
>> feature.
>>
>
> I'm not quite sure that I understand the scenario you're describing
> here? Aren't the repositories defined with the pom and so are
> constant?
>
Repositories are [pseudo]constant, their contents are not. So today I
may resolve to a-1.1.jar, tomorrow it might already resolve to
a-2.0.jar. In this regard OSGi is a little more restrictive as it has a
definite set of bundles to resolve from, but this set may also change
and various OSGi implementations deal with this differently. So in
general - they face the same issue.
Pseudo constant - if tomorrow a build engineer decides to add two more
repos to you parent's parent POM, you suddenly have to deal with a
broader spectrum of possible candidates.
I will start a page on version ranges, where I'll try to capture the
version range design and issues around it - it's empty, but not for
long: http://docs.codehaus.org/x/twDPBQ .
I am convinced we can bake something decent !
Oleg
Re: Mercury Version Ranges
Posted by Mark Hobson <ma...@gmail.com>.
2008/8/13 Oleg Gusakov <ol...@gmail.com>:
> Mark - this is the same if one excludes repositories and lives within
> pre-existing version set: like Maven having only local repo and OSGi having
> one OBR file.
>
> If we add a variable - repositories that constantly change, then we start
> wondering what to do and OSGi joins this discussion as soon as they add this
> feature.
I'm not quite sure that I understand the scenario you're describing
here? Aren't the repositories defined with the pom and so are
constant?
> I agree, and it's also too demanding an approach; it requires users to know
> a lot of details. In my opinion - build system should be more transparent
> and less intrusive.
>
>> For example, say I need to fix a bug in Project A 3.0 that depends on
>> Project B 2.0, amongst many other dependencies. I take A 3.0 and
>> determine that the bug is in B 2.0, so I want to update the dependency
>> of B in A to 2.1-SNAPSHOT. Assuming that this range was initially
>> declared as B[2.0,3.0), using the repository approach I would just
>> enable snapshot repositories for the range to resolve to my new
>> work-in-progress B 2.1-SNAPSHOT. This works, but it would also open
>> the gates for all other ranged dependencies to resolve to snapshots
>> too, which I certainly don't want. Whereas if ranges behaved as I've
>> described, then we would just update B to [2.0,2.1-SNAPSHOT) during
>> development and then reinstate [2.0,3.0) once the fixed B 2.1 has been
>> released.
>
> Why not using 2.1-SNAPSHOT directly? Including it into the range is messier
> solution if you ask me. In both cases you have to change the pom, so there
> is not distinct advantage in either .
Sure, that's an option too. I was keeping the lower bound so that it
wasn't temporarily lost when moving to a snapshot, but then I guess
that requiring a snapshot also means that you're moving the lower
bound anyway. So yes, 2.1-SNAPSHOT would be better :)
> BTW - thanks for the references!
No worries, shout if you need any more info. I delved into using
version ranges with Maven a while ago but unfortunately I found too
many issues to realistically be able to use them.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Mark Hobson wrote:
> Hi Oleg,
>
> 2008/8/13 Oleg Gusakov <ol...@gmail.com>:
>
>> Working on Mercury I faced the necessity to use some standard definition of
>> a "version range", so I took OSGi definition: OSGi core specs 4.1, page 39
>> in April-2007 PDF available on OSGi site - http://osgi.org.
>>
>> Some interesting ramifications for Maven users:
>>
>> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3: 1.2.3
>> <= X. We are used to a soft version of that in Maven builds - version can be
>> replaced by a more applicable dependency. But spec states ANY version: i.e.
>> found in any scanned repository.
>>
>
> Isn't this essentially what we have now with Maven? A soft dependency
> of 1.2.3 can be replaced by any other version as determined by the
> conflict resolution mechanism (currently nearest-wins). If OSGi
> mandates that soft versions can only be resolved to versions greater
> or equal to the suggested version then this seems more robust than
> what we currently have.
>
Mark - this is the same if one excludes repositories and lives within
pre-existing version set: like Maven having only local repo and OSGi
having one OBR file.
If we add a variable - repositories that constantly change, then we
start wondering what to do and OSGi joins this discussion as soon as
they add this feature.
>
>> 2). I strongly feel that failing any explicit ranges, containing snapshots
>> is a good thing. For instance, dependency declaration 1.2-SNAPSHOT is a
>> range by definition, so I'd rather fail anything like [1.2-SNAPSHOT,2.0) or
>> [1.0,1.2-SNAPSHOT)
>>
>
> Are you referring to failing at release time here? I agree that a
> project containing dependencies with version ranges that contain
> snapshots should not be allowed to be released.
>
>
>> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
>> 2.1-alpha-1, etc
>>
>
> Welcome to the debate :) I say that a version range should only
> resolve to a snapshot if it is included as an explicit boundary. See
> http://jira.codehaus.org/browse/MNG-3092
>
> You may also be interested in the other issues on my hit list for
> being able to use version ranges in Maven:
> http://jira.codehaus.org/browse/MNG-2994
> http://jira.codehaus.org/browse/MRELEASE-262
> http://jira.codehaus.org/browse/MRELEASE-318
>
> Regarding Michael's suggestion of using repositories to control
> whether ranges resolve to snapshots or not: the problem with this is
> that it's an all or nothing approach.
>
I agree, and it's also too demanding an approach; it requires users to
know a lot of details. In my opinion - build system should be more
transparent and less intrusive.
> For example, say I need to fix a bug in Project A 3.0 that depends on
> Project B 2.0, amongst many other dependencies. I take A 3.0 and
> determine that the bug is in B 2.0, so I want to update the dependency
> of B in A to 2.1-SNAPSHOT. Assuming that this range was initially
> declared as B[2.0,3.0), using the repository approach I would just
> enable snapshot repositories for the range to resolve to my new
> work-in-progress B 2.1-SNAPSHOT. This works, but it would also open
> the gates for all other ranged dependencies to resolve to snapshots
> too, which I certainly don't want. Whereas if ranges behaved as I've
> described, then we would just update B to [2.0,2.1-SNAPSHOT) during
> development and then reinstate [2.0,3.0) once the fixed B 2.1 has been
> released.
>
>
Why not using 2.1-SNAPSHOT directly? Including it into the range is
messier solution if you ask me. In both cases you have to change the
pom, so there is not distinct advantage in either .
BTW - thanks for the references!
Oleg
Re: Mercury Version Ranges
Posted by Mark Hobson <ma...@gmail.com>.
Hi Oleg,
2008/8/13 Oleg Gusakov <ol...@gmail.com>:
> Working on Mercury I faced the necessity to use some standard definition of
> a "version range", so I took OSGi definition: OSGi core specs 4.1, page 39
> in April-2007 PDF available on OSGi site - http://osgi.org.
>
> Some interesting ramifications for Maven users:
>
> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3: 1.2.3
> <= X. We are used to a soft version of that in Maven builds - version can be
> replaced by a more applicable dependency. But spec states ANY version: i.e.
> found in any scanned repository.
Isn't this essentially what we have now with Maven? A soft dependency
of 1.2.3 can be replaced by any other version as determined by the
conflict resolution mechanism (currently nearest-wins). If OSGi
mandates that soft versions can only be resolved to versions greater
or equal to the suggested version then this seems more robust than
what we currently have.
> 2). I strongly feel that failing any explicit ranges, containing snapshots
> is a good thing. For instance, dependency declaration 1.2-SNAPSHOT is a
> range by definition, so I'd rather fail anything like [1.2-SNAPSHOT,2.0) or
> [1.0,1.2-SNAPSHOT)
Are you referring to failing at release time here? I agree that a
project containing dependencies with version ranges that contain
snapshots should not be allowed to be released.
> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
> 2.1-alpha-1, etc
Welcome to the debate :) I say that a version range should only
resolve to a snapshot if it is included as an explicit boundary. See
http://jira.codehaus.org/browse/MNG-3092
You may also be interested in the other issues on my hit list for
being able to use version ranges in Maven:
http://jira.codehaus.org/browse/MNG-2994
http://jira.codehaus.org/browse/MRELEASE-262
http://jira.codehaus.org/browse/MRELEASE-318
Regarding Michael's suggestion of using repositories to control
whether ranges resolve to snapshots or not: the problem with this is
that it's an all or nothing approach.
For example, say I need to fix a bug in Project A 3.0 that depends on
Project B 2.0, amongst many other dependencies. I take A 3.0 and
determine that the bug is in B 2.0, so I want to update the dependency
of B in A to 2.1-SNAPSHOT. Assuming that this range was initially
declared as B[2.0,3.0), using the repository approach I would just
enable snapshot repositories for the range to resolve to my new
work-in-progress B 2.1-SNAPSHOT. This works, but it would also open
the gates for all other ranged dependencies to resolve to snapshots
too, which I certainly don't want. Whereas if ranges behaved as I've
described, then we would just update B to [2.0,2.1-SNAPSHOT) during
development and then reinstate [2.0,3.0) once the fixed B 2.1 has been
released.
> Please comment if this does not sound natural or breaks some
> well-established usage patterns.
Cheers,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Brett Porter <br...@apache.org>.
On 13/08/2008, at 10:51 AM, Oleg Gusakov wrote:
> Working on Mercury I faced the necessity to use some standard
> definition of a "version range", so I took OSGi definition: OSGi
> core specs 4.1, page 39 in April-2007 PDF available on OSGi site - http://osgi.org
> .
>
> Some interesting ramifications for Maven users:
>
> 1). Declaration 1.2.3 means any version X, greater or equal to
> 1.2.3: 1.2.3 <= X. We are used to a soft version of that in Maven
> builds - version can be replaced by a more applicable dependency.
> But spec states ANY version: i.e. found in any scanned repository.
This one seems the most unintuitive. OSGi apps work in a different
context, where you constrain the search set to things you've already
chosen, not the repository of all available versions.
We put this into an early alpha/beta of m2 and there was a revolt :)
However, a lot of that could have been attributed to a mostly m1-built
repo and a non-transitive m1-mindset.
I think it makes sense in a transitive situation, but if you have a
specific version in the source POM it's a bit confusing. What I would
see happening in this situation is that we'd have to stop recommending
using this type of specification and ask for explicit ranges to be used.
The only place we've always differed from OSGi was the qualifier -
since the qualifier goes in the other direction from the release than
we expect. I assume from your comment below we retain that behaviour?
>
>
> 2). I strongly feel that failing any explicit ranges, containing
> snapshots is a good thing. For instance, dependency declaration 1.2-
> SNAPSHOT is a range by definition, so I'd rather fail anything like
> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>
> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
> 2.1-alpha-1, etc
+1
Just to be sure I understood - if you use a snapshot, you always get
that snapshot. If you don't, you never get a snapshot?
Thanks,
Brett
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
> >
> > I have to disagree here: developers should not care what repositories
> > they have, or what dependency plugin shows them. They should, instead,
> > simply say what they want - and get it. That is why, imho, the core,
> > including dependency resolution, should be smarter :)
thats like saying i don't care what gas i put in my car it should just work...
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Michael McCallum wrote:
> On Thu, 14 Aug 2008 00:09:59 Brian E. Fox wrote:
>
>>> I have to disagree here: developers should not care what repositories
>>> they have, or what dependency plugin shows them. They should, instead,
>>> simply say what they want - and get it. That is why, imho, the core,
>>> including dependency resolution, should be smarter :)
>>>
>> I agree. The problem with excluding repos to try and influence your
>> dependency resolution is that snapshots may already be in your local repo.
>> Since it hits the local first, you can't effectively disable the snapshots
>> at that point.
>>
>
> the local repos should not be the cache of remote repos thats a design flaw...
>
> the local repo should be treated like all others...
>
Michael - good point! In Mercury I am replacing dumb repository, that
only knows pathOf(GAV) with an active repository that has strictly GAV
interface and deals with storage details inside. And I allow as many as
you wish "local" repos - it's a matter of configuration. Local repos
have isLocal() set to true and they are searched first.
This allows, for instance, having "local releases" and "local snaphots"
repos, while still supporting good old "local cache" paradigm. But that
is another discussion.. - please see children of
http://docs.codehaus.org/x/D4CnBQ
Oleg
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Thu, 14 Aug 2008 00:09:59 Brian E. Fox wrote:
> >I have to disagree here: developers should not care what repositories
> >they have, or what dependency plugin shows them. They should, instead,
> >simply say what they want - and get it. That is why, imho, the core,
> >including dependency resolution, should be smarter :)
>
> I agree. The problem with excluding repos to try and influence your
> dependency resolution is that snapshots may already be in your local repo.
> Since it hits the local first, you can't effectively disable the snapshots
> at that point.
the local repos should not be the cache of remote repos thats a design flaw...
the local repo should be treated like all others...
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Stephen Connolly wrote:
> A slightly unrelated question:
>
> Will there be support for version ranges with many parts (not just the three
> parts that maven currently has) so that
>
> [1.0.0.0.22,) will not pick up 1.0.0.0.9
>
I picked up the VersionRange code from maven-artifact for now. Whatever
is theye stays and nobody says it should not be enhanced. I will cover
your use case on http://docs.codehaus.org/x/twDPBQ
Thanks,
Oleg
> -Stephen "working for a company that insists on 5 number version numbers"
> Connolly
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Stephen - please see you use case addressed on
http://docs.codehaus.org/display/MAVEN/Mercury+Version+Ranges
Stephen Connolly wrote:
> A slightly unrelated question:
>
> Will there be support for version ranges with many parts (not just the three
> parts that maven currently has) so that
>
> [1.0.0.0.22,) will not pick up 1.0.0.0.9
>
> -Stephen "working for a company that insists on 5 number version numbers"
> Connolly
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Stephen Connolly <st...@gmail.com>.
A slightly unrelated question:
Will there be support for version ranges with many parts (not just the three
parts that maven currently has) so that
[1.0.0.0.22,) will not pick up 1.0.0.0.9
-Stephen "working for a company that insists on 5 number version numbers"
Connolly
On Wed, Aug 13, 2008 at 1:09 PM, Brian E. Fox <br...@reply.infinity.nu>wrote:
>
> >I have to disagree here: developers should not care what repositories
> >they have, or what dependency plugin shows them. They should, instead,
> >simply say what they want - and get it. That is why, imho, the core,
> >including dependency resolution, should be smarter :)
>
> I agree. The problem with excluding repos to try and influence your
> dependency resolution is that snapshots may already be in your local repo.
> Since it hits the local first, you can't effectively disable the snapshots
> at that point.
>
RE: Mercury Version Ranges
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
>I have to disagree here: developers should not care what repositories
>they have, or what dependency plugin shows them. They should, instead,
>simply say what they want - and get it. That is why, imho, the core,
>including dependency resolution, should be smarter :)
I agree. The problem with excluding repos to try and influence your dependency resolution is that snapshots may already be in your local repo. Since it hits the local first, you can't effectively disable the snapshots at that point.
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Milos Kleint wrote:
>> no tool can substitute people and people should be in power.
This does not cast any doubt in me as well. Power to people. But people
interested to be in power.
>> Will
>> there be ways to override the "smartness" of the tool?
>>
Tools have to have configurable behavior and default one should meet
majority of use cases. I think we all agree here.
Oleg
>> Milos
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Milos Kleint <mk...@gmail.com>.
On Wed, Aug 13, 2008 at 7:34 AM, Oleg Gusakov
<ol...@gmail.com> wrote:
>
>
> Michael McCallum wrote:
>>
>> On Wed, 13 Aug 2008 16:58:37 Oleg Gusakov wrote:
>>
>>
>>>>>
>>>>> 2). I strongly feel that failing any explicit ranges, containing
>>>>> snapshots is a good thing. For instance, dependency declaration
>>>>> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
>>>>> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>>>>>
>>>>
>>>> if you don't allow 1.2-SNAPSHOT how do you actually include them
>>>> lets assume that 1-SNAPSHOT < 1-alpha < 1-beta < 1 < 1.1 < 1.1.1
>>>> and i say [1,2) then -SNAPSHOT, alpha and beta will not match
>>>>
>>>
>>> alpha and beta will match, sn will not, because proposal is to treat
>>> them differently. alpha and beta are real releases, while sn is still
>>> wip.
>>>
>>>
>>
>> agreed they are real releases but how am i supposed to do automated
>> integration testing trunk to trunk if I can't build a snapshot and push into
>> a local repository and match it?... i would have to actually release the
>> project in order to see if it breaks other things, and if it does its
>> counter productive because i just broke everybody else
>>
>> whether or not i end up with snapshots should not be governed by the
>> resolution mechanism but instead by what repositories i provide to it... if
>> I don't want snapshots then there should be no snapshot repositories in the
>> list to resolve from... and perhaps some form of enforcement...
>>
>> for example i use the enforcer plugin to make sure that no snapshots get
>> into a project that is being released... i expect developers to use
>> dependency:tree and dependency:resolve to know/check themselves first just
>> in case enforce it with a tool
>>
>
> I have to disagree here: developers should not care what repositories they
> have, or what dependency plugin shows them. They should, instead, simply say
> what they want - and get it. That is why, imho, the core, including
> dependency resolution, should be smarter :)
>
no tool can substitute people and people should be in power. Will
there be ways to override the "smartness" of the tool?
Milos
> Thanks,
> Oleg
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Michael McCallum wrote:
> On Wed, 13 Aug 2008 16:58:37 Oleg Gusakov wrote:
>
>
>>>> 2). I strongly feel that failing any explicit ranges, containing
>>>> snapshots is a good thing. For instance, dependency declaration
>>>> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
>>>> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>>>>
>>> if you don't allow 1.2-SNAPSHOT how do you actually include them
>>> lets assume that 1-SNAPSHOT < 1-alpha < 1-beta < 1 < 1.1 < 1.1.1
>>> and i say [1,2) then -SNAPSHOT, alpha and beta will not match
>>>
>> alpha and beta will match, sn will not, because proposal is to treat
>> them differently. alpha and beta are real releases, while sn is still wip.
>>
>>
>
> agreed they are real releases but how am i supposed to do automated
> integration testing trunk to trunk if I can't build a snapshot and push into
> a local repository and match it?... i would have to actually release the
> project in order to see if it breaks other things, and if it does its counter
> productive because i just broke everybody else
>
> whether or not i end up with snapshots should not be governed by the
> resolution mechanism but instead by what repositories i provide to it... if I
> don't want snapshots then there should be no snapshot repositories in the
> list to resolve from... and perhaps some form of enforcement...
>
> for example i use the enforcer plugin to make sure that no snapshots get into
> a project that is being released... i expect developers to use
> dependency:tree and dependency:resolve to know/check themselves first just in
> case enforce it with a tool
>
I have to disagree here: developers should not care what repositories
they have, or what dependency plugin shows them. They should, instead,
simply say what they want - and get it. That is why, imho, the core,
including dependency resolution, should be smarter :)
Thanks,
Oleg
>
>
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Wed, 13 Aug 2008 16:58:37 Oleg Gusakov wrote:
> >> 2). I strongly feel that failing any explicit ranges, containing
> >> snapshots is a good thing. For instance, dependency declaration
> >> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
> >> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
> >
> > if you don't allow 1.2-SNAPSHOT how do you actually include them
> > lets assume that 1-SNAPSHOT < 1-alpha < 1-beta < 1 < 1.1 < 1.1.1
> > and i say [1,2) then -SNAPSHOT, alpha and beta will not match
>
> alpha and beta will match, sn will not, because proposal is to treat
> them differently. alpha and beta are real releases, while sn is still wip.
>
agreed they are real releases but how am i supposed to do automated
integration testing trunk to trunk if I can't build a snapshot and push into
a local repository and match it?... i would have to actually release the
project in order to see if it breaks other things, and if it does its counter
productive because i just broke everybody else
whether or not i end up with snapshots should not be governed by the
resolution mechanism but instead by what repositories i provide to it... if I
don't want snapshots then there should be no snapshot repositories in the
list to resolve from... and perhaps some form of enforcement...
for example i use the enforcer plugin to make sure that no snapshots get into
a project that is being released... i expect developers to use
dependency:tree and dependency:resolve to know/check themselves first just in
case enforce it with a tool
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Michael McCallum wrote:
>> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
>> 2.1-alpha-1, etc
>>
> Should most definitely not inlude 2.1-alpha-1 consider this scenario...
>
> module Z released as 2.X
> a dependent module Y specifies X [2,3)
> you now make a breaking change and release the alpha version of Z 3.0-alpha-1
> and BAM module Y is using it when it explicitly said I only want major
> version 2
>
Michael - makes sense, I agree. Range should respect major/minor
inclusions. So in case [2,3) none of 3.* should sneak in.
>
> On Wed, 13 Aug 2008 12:51:17 Oleg Gusakov wrote:
>
>> Working on Mercury I faced the necessity to use some standard definition
>> of a "version range", so I took OSGi definition: OSGi core specs 4.1,
>> page 39 in April-2007 PDF available on OSGi site - http://osgi.org.
>>
>> Some interesting ramifications for Maven users:
>>
>> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
>> 1.2.3 <= X. We are used to a soft version of that in Maven builds -
>> version can be replaced by a more applicable dependency. But spec states
>> ANY version: i.e. found in any scanned repository.
>>
> i always use ranges to do otherwise IMO is just asking for trouble ;-)
>
nicely stated ..
>
>> 2). I strongly feel that failing any explicit ranges, containing
>> snapshots is a good thing. For instance, dependency declaration
>> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
>> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>>
> if you don't allow 1.2-SNAPSHOT how do you actually include them
> lets assume that 1-SNAPSHOT < 1-alpha < 1-beta < 1 < 1.1 < 1.1.1
> and i say [1,2) then -SNAPSHOT, alpha and beta will not match
>
alpha and beta will match, sn will not, because proposal is to treat
them differently. alpha and beta are real releases, while sn is still wip.
> I always start my versions at 1.1, 2.1, 3.1 for the lower bound... otherwise
> you end up with not being able to use the first snapshot of a new major
> version in a range
>
interesting, something to think about
Thanks,
Oleg
> And I use the -! syntax for the upper bound which stops the next major
> versions first snapshot from creeping into a range for the previous major
> version
>
>> Please comment if this does not sound natural or breaks some
>> well-established usage patterns.
>>
>> Thanks,
>> Oleg
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
>
>
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
> 2.1-alpha-1, etc
Should most definitely not inlude 2.1-alpha-1 consider this scenario...
module Z released as 2.X
a dependent module Y specifies X [2,3)
you now make a breaking change and release the alpha version of Z 3.0-alpha-1
and BAM module Y is using it when it explicitly said I only want major
version 2
On Wed, 13 Aug 2008 12:51:17 Oleg Gusakov wrote:
> Working on Mercury I faced the necessity to use some standard definition
> of a "version range", so I took OSGi definition: OSGi core specs 4.1,
> page 39 in April-2007 PDF available on OSGi site - http://osgi.org.
>
> Some interesting ramifications for Maven users:
>
> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
> 1.2.3 <= X. We are used to a soft version of that in Maven builds -
> version can be replaced by a more applicable dependency. But spec states
> ANY version: i.e. found in any scanned repository.
i always use ranges to do otherwise IMO is just asking for trouble ;-)
>
> 2). I strongly feel that failing any explicit ranges, containing
> snapshots is a good thing. For instance, dependency declaration
> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
if you don't allow 1.2-SNAPSHOT how do you actually include them
lets assume that 1-SNAPSHOT < 1-alpha < 1-beta < 1 < 1.1 < 1.1.1
and i say [1,2) then -SNAPSHOT, alpha and beta will not match
I always start my versions at 1.1, 2.1, 3.1 for the lower bound... otherwise
you end up with not being able to use the first snapshot of a new major
version in a range
And I use the -! syntax for the upper bound which stops the next major
versions first snapshot from creeping into a range for the previous major
version
>
>
> Please comment if this does not sound natural or breaks some
> well-established usage patterns.
>
> Thanks,
> Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Brett Porter <br...@apache.org>.
On 13/08/2008, at 12:31 PM, Oleg Gusakov wrote:
> Current implementation (let's call it 2.0) is promiscuous inside the
> "dirty" dependency tree - all possible versions before conflict
> resolution. But for plugins - the first plugin found wins. I would
> say - we should be consistent and *treat plugins the same as
> dependencies*.
Agreed they should be the same. I assume by dirty you mean the one
with ranges - but once resolved this can actually be made concrete -
for both deps and plugins - so that releases will be reproducible.
- Brett
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Ralph Goers <Ra...@dslextreme.com>.
Oleg Gusakov wrote:
>
>
> Ralph Goers wrote:
>>
>>
>> Oleg Gusakov wrote:
>>>
>>>
>>> What do you think about snapshots in ranges? Or - better -
>>> prohibiting snapshot in ranges.
>>>
>>>
>> I don't know. In a dev environment you might want the "latest",
>> whatever that is.
> For me there is a code quality boundary between release and snapshot,
> and I'd rather ask user to specify which one should be used.
>
> For instance: how should I treat the following:
>
> a->b
> a->c
> b->d-5-snapshot
> c->d-4
>
> What should be selected in this case : d-4 or d-5-snapshot (suppose -
> nothing else in repo's)? Currently - d-5-snapshot will be selected,
> but should this behavior be configurable?
>
>
If I am using Nexus I'd have a separate snapshot repository. For a dev
build snapshots might be included while for a production build they
would not. This might be exactly the desired behavior. Controlling it
through repository management makes more sense to me than trying to have
a versioning scheme that tries to solve the worlds problems.
But see my other reply. d-5-snapshot should be excluded if it doesn't
declare that it provides what a,b & c need.
The other option, which you didn't even mention, is that the build
should fail. If what b requires is what d-5 provides but d-5 isn't
compatible with d-4 then this build should fail.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Ralph Goers wrote:
>
>
> Oleg Gusakov wrote:
>>
>>
>> What do you think about snapshots in ranges? Or - better -
>> prohibiting snapshot in ranges.
>>
>>
> I don't know. In a dev environment you might want the "latest",
> whatever that is.
For me there is a code quality boundary between release and snapshot,
and I'd rather ask user to specify which one should be used.
For instance: how should I treat the following:
a->b
a->c
b->d-5-snapshot
c->d-4
What should be selected in this case : d-4 or d-5-snapshot (suppose -
nothing else in repo's)? Currently - d-5-snapshot will be selected, but
should this behavior be configurable?
Oleg
>
> Ralph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Ralph Goers <Ra...@dslextreme.com>.
Oleg Gusakov wrote:
>
>
> What do you think about snapshots in ranges? Or - better - prohibiting
> snapshot in ranges.
>
>
I don't know. In a dev environment you might want the "latest", whatever
that is.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Igor Fedorenko wrote:
> Oleg Gusakov wrote:
>> Working on Mercury I faced the necessity to use some standard
>> definition of a "version range", so I took OSGi definition: OSGi core
>> specs 4.1, page 39 in April-2007 PDF available on OSGi site -
>> http://osgi.org.
>>
>> Some interesting ramifications for Maven users:
>>
>> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
>> 1.2.3 <= X. We are used to a soft version of that in Maven builds -
>> version can be replaced by a more applicable dependency. But spec
>> states ANY version: i.e. found in any scanned repository.
>
> Few comments.
>
> First, are you talking about dependencies versions only or the same
> rules will be used everywhere, i.e. when looking up plugins and in
> dependency/pluginManagement? I would certainly be surprised if maven
> started to pick up arbitrary plugin versions. But then again, I would
> be surprised if plugin versions were treated differently than
> dependency versions.
Current implementation (let's call it 2.0) is promiscuous inside the
"dirty" dependency tree - all possible versions before conflict
resolution. But for plugins - the first plugin found wins. I would say -
we should be consistent and *treat plugins the same as dependencies*.
> Also, does not this require introduction of something similar to OSGi
> RequiredExecutionEnvironment? I.e. if build is running on Java 5,
> anything that can only be handled by Java 6 or newer should be excluded.
This is a nice optional feature that is a topic for a different
discussion. Now I'd like to narrow this to just "how to declare and
interpret dependency versions"
>
> Also, have you considered performance implications of this proposal?
> Today, maven needs to hit remote repository at most two times, to get
> the pom and the artifact itself. Proposed logic seems to require
> periodic listing of all versions starting with specified.
>
All enhancements require more of something, like HD just asking for a
bigger TV :) This could be mitigated by:
- intelligent repository manager that does version interpretation by
client's request
- making "OSGi compliant" behavior optional, so that users have an
option to curb the bandwidth appetite of the client
>>
>> 2). I strongly feel that failing any explicit ranges, containing
>> snapshots is a good thing. For instance, dependency declaration
>> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything
>> like [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>>
>> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
>> 2.1-alpha-1, etc
>>
>> Please comment if this does not sound natural or breaks some
>> well-established usage patterns.
>>
>
What do you think about snapshots in ranges? Or - better - prohibiting
snapshot in ranges.
Oleg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: Mercury Version Ranges
Posted by Igor Fedorenko <ig...@ifedorenko.com>.
Oleg Gusakov wrote:
> Working on Mercury I faced the necessity to use some standard definition
> of a "version range", so I took OSGi definition: OSGi core specs 4.1,
> page 39 in April-2007 PDF available on OSGi site - http://osgi.org.
>
> Some interesting ramifications for Maven users:
>
> 1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
> 1.2.3 <= X. We are used to a soft version of that in Maven builds -
> version can be replaced by a more applicable dependency. But spec states
> ANY version: i.e. found in any scanned repository.
Few comments.
First, are you talking about dependencies versions only or the same
rules will be used everywhere, i.e. when looking up plugins and in
dependency/pluginManagement? I would certainly be surprised if maven
started to pick up arbitrary plugin versions. But then again, I would be
surprised if plugin versions were treated differently than dependency
versions.
Also, does not this require introduction of something similar to OSGi
RequiredExecutionEnvironment? I.e. if build is running on Java 5,
anything that can only be handled by Java 6 or newer should be excluded.
Also, have you considered performance implications of this proposal?
Today, maven needs to hit remote repository at most two times, to get
the pom and the artifact itself. Proposed logic seems to require
periodic listing of all versions starting with specified.
>
> 2). I strongly feel that failing any explicit ranges, containing
> snapshots is a good thing. For instance, dependency declaration
> 1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
> [1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
>
> 3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
> 2.1-alpha-1, etc
>
> Please comment if this does not sound natural or breaks some
> well-established usage patterns.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: Mercury Version Ranges
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
>1). Declaration 1.2.3 means any version X, greater or equal to 1.2.3:
>1.2.3 <= X. We are used to a soft version of that in Maven builds -
>version can be replaced by a more applicable dependency. But spec states
>ANY version: i.e. found in any scanned repository.
I'm not sure about this one. It's completely incompatible with maven 2.0.
>2). I strongly feel that failing any explicit ranges, containing
>snapshots is a good thing. For instance, dependency declaration
>1.2-SNAPSHOT is a range by definition, so I'd rather fail anything like
>[1.2-SNAPSHOT,2.0) or [1.0,1.2-SNAPSHOT)
I think we should allow the user to specify it if they wish and obide by it. However...
>3). Declaration [2.0, 2.1) should exclude 2.1-SNAPSHOT, but include
>2.1-alpha-1, etc
If they don't specify it, exclude snapshots. Identifying qualifiers for inclusion/exclusion is difficult. I think alpha-1 could be included although others could make a case for not doing this.
Re: Mercury Version Ranges
Posted by Ralph Goers <Ra...@dslextreme.com>.
Michael McCallum wrote:
> On Wed, 13 Aug 2008 17:42:17 Ralph Goers wrote:
>
>> To be honest, even with this I'd still probably not use version ranges.
>> But I sure would like for Maven to be able to fail the build because two
>> artifacts need incompatible versions of the same thing.
>>
> it does if you use version ranges....
>
> and that is exactly why i use ranges...
>
>
I sort of buy that, except it doesn't result in a repeatable build at
any time in the future. Specifying a specific version in
dependencyManagement along with provides and requires would achieve both.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Wed, 13 Aug 2008 17:42:17 Ralph Goers wrote:
>
> To be honest, even with this I'd still probably not use version ranges.
> But I sure would like for Maven to be able to fail the build because two
> artifacts need incompatible versions of the same thing.
it does if you use version ranges....
and that is exactly why i use ranges...
>
> Ralph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Ralph Goers <Ra...@dslextreme.com>.
Michael McCallum wrote:
> On Wed, 13 Aug 2008 16:35:38 Ralph Goers wrote:
>
>> Michael McCallum wrote:
>>
>>> To be well rounded we should consider other approaches to dependencies
>>>
>>> its worth having a look at how gentoo does versioning with ranges and
>>> slots... http://www.gentoo.org/
>>> http://devmanual.gentoo.org/general-concepts/dependencies/index.html
>>> http://devmanual.gentoo.org/general-concepts/slotting/index.html
>>>
>> Yes, but... What has really made Linux package management work is more
>> than just versioning.
>>
> not sure why you said but... i agree with everything you are saying...
>
>
>> In your previous email you wrote -
>>
>> module Z released as 2.X
>> a dependent module Y specifies X [2,3)
>> you now make a breaking change and release the alpha version of Z
>> 3.0-alpha-1 and BAM module Y is using it when it explicitly said I only
>> want major version 2
>>
>>
>> This is exactly where I have a problem with the whole thing. You
>> probably specified [2,3] under the assumption that all version 2
>> releases would be compatible. You probably also are assuming the version
>> 3 isn't compatible with version 2. Either or both of these assumptions
>> could be invalid.
>>
> agreed, i have cooked my own slotting/provides by introducing my own packages
> that i depend upon which then transition to builds that are known to be
> compatible...
>
> you don't HAVE to have slots or requires/provides
>
> so i define but it could just as easily be the package maintainer that does an
> composite artifact... lets take spring as an example
>
> i know that there are three groups of compatible springs 1.2.X, [2.0, 2.5) and
> [2.5, 2.6)
>
> so i have three spring artifacts my.artifact.composite.spring-1.2.Y,
> my.artifact.composite.spring-2.0.Y and my.artifact.composite.spring-2.5.Y
> where Y is an incrementing revision number not related upstream
> each of these defines a specific range e.g. spring-core-[2.5,2.5.1] that
> fullfil the contract
>
> where i have projects that use the spring 2.5 compatible code they depend
> upon my.artifact.composite.spring-[2.5,2.6-!)... i can upgrade that composite
> to include a new spring release if I think its compatible... if spring were
> to release a 2.6 and i found it not compatible i would make a new
> composite....
>
> now obviously there is overhead to this... and each company would need to make
> its own call...but i've found the overhead of extra artifacts with just dep
> lists very low... it can even include units tests with assumptions about the
> composed libraries to help with validating compatibility...
>
> hope that all makes sense.... i'm doing a presentation at a JUG in a few weeks
> so should have some pretty slides and examples of this soon...
>
Yes, this works in a fashion. But the problem is pretty much taken right
out of what you've stated. You know there are 3 groups of compatible
Springs, presumably because you investigated. What about Xerces, Xalan,
httpclient, commons-lang and on and on. This has to be repeated in every
company. The silly part is that every one of these projects will know
which versions are incompatible and could make everyone's life easier by
just declaring it. Yes, people will still make mistakes. But people
tend to fix them when enough people complain.
To be honest, even with this I'd still probably not use version ranges.
But I sure would like for Maven to be able to fail the build because two
artifacts need incompatible versions of the same thing.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
On Wed, 13 Aug 2008 16:35:38 Ralph Goers wrote:
> Michael McCallum wrote:
> > To be well rounded we should consider other approaches to dependencies
> >
> > its worth having a look at how gentoo does versioning with ranges and
> > slots... http://www.gentoo.org/
> > http://devmanual.gentoo.org/general-concepts/dependencies/index.html
> > http://devmanual.gentoo.org/general-concepts/slotting/index.html
>
> Yes, but... What has really made Linux package management work is more
> than just versioning.
not sure why you said but... i agree with everything you are saying...
>
> In your previous email you wrote -
>
> module Z released as 2.X
> a dependent module Y specifies X [2,3)
> you now make a breaking change and release the alpha version of Z
> 3.0-alpha-1 and BAM module Y is using it when it explicitly said I only
> want major version 2
>
>
> This is exactly where I have a problem with the whole thing. You
> probably specified [2,3] under the assumption that all version 2
> releases would be compatible. You probably also are assuming the version
> 3 isn't compatible with version 2. Either or both of these assumptions
> could be invalid.
agreed, i have cooked my own slotting/provides by introducing my own packages
that i depend upon which then transition to builds that are known to be
compatible...
you don't HAVE to have slots or requires/provides
so i define but it could just as easily be the package maintainer that does an
composite artifact... lets take spring as an example
i know that there are three groups of compatible springs 1.2.X, [2.0, 2.5) and
[2.5, 2.6)
so i have three spring artifacts my.artifact.composite.spring-1.2.Y,
my.artifact.composite.spring-2.0.Y and my.artifact.composite.spring-2.5.Y
where Y is an incrementing revision number not related upstream
each of these defines a specific range e.g. spring-core-[2.5,2.5.1] that
fullfil the contract
where i have projects that use the spring 2.5 compatible code they depend
upon my.artifact.composite.spring-[2.5,2.6-!)... i can upgrade that composite
to include a new spring release if I think its compatible... if spring were
to release a 2.6 and i found it not compatible i would make a new
composite....
now obviously there is overhead to this... and each company would need to make
its own call...but i've found the overhead of extra artifacts with just dep
lists very low... it can even include units tests with assumptions about the
composed libraries to help with validating compatibility...
hope that all makes sense.... i'm doing a presentation at a JUG in a few weeks
so should have some pretty slides and examples of this soon...
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Oleg Gusakov <ol...@gmail.com>.
Ralph Goers wrote:
>
>
> Michael McCallum wrote:
>> To be well rounded we should consider other approaches to dependencies
>>
>> its worth having a look at how gentoo does versioning with ranges and
>> slots...
>> http://www.gentoo.org/
>> http://devmanual.gentoo.org/general-concepts/dependencies/index.html
>> http://devmanual.gentoo.org/general-concepts/slotting/index.html
>>
>>
> Yes, but... What has really made Linux package management work is more
> than just versioning.
>
> In your previous email you wrote -
>
> module Z released as 2.X a dependent module Y specifies X [2,3)
> you now make a breaking change and release the alpha version of Z
> 3.0-alpha-1 and BAM module Y is using it when it explicitly said I
> only want major version 2
>
>
> This is exactly where I have a problem with the whole thing. You
> probably specified [2,3] under the assumption that all version 2
> releases would be compatible. You probably also are assuming the
> version 3 isn't compatible with version 2. Either or both of these
> assumptions could be invalid.
>
> The real problem here, at least as I see it, is that Y incorporated Z
> at some release of 2.x. In reality it really shouldn't care if it is
> using version 2.x, 3.x, 4.x, etc. as long as the behavior of what it
> is using is still the same. The various flavors of Unix have been
> successfully dealing with this for years. If you look at an RPM you
> will see that it not only has a "requires" element, which is
> equivalent to Maven's depdencies, but it also has a "provides"
> element, which Maven has no equivalent of. Without that you can have
> all the fancy version schemes you want but they will never be
> reliable. Interestingly, whatever is provided is not allowed to have a
> version associated with it - but if you look at how it is typically
> used it will be something like libc.so.1 or libx.so.3 - which, of
> course, has a version in its name.
>
> So what I would really prefer is the ability to do
>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-lang</artifactId>
> <requires>commons-lang-api-2</requires>
> </dependency>
>
> Then commons-lang would be declared as
>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> <version>3.0</version>
> <provides>commons-lang-api-2,commons-lang-api-3</provides>
>
> This would then declare that version 3.0 is indeed compatible at the
> api level with version 2.
Ralph - even if we go this way - it's still in people's hands, i.e.
depends on a particular person to set it right or wrong. Better but
slower approach might be via declaring the API explicitly , like in OSGi
one "exports" packages and those become "official" API of a bundle. Then
we can check binary compatibility. But this also requires artificial
restrictions and different kind of developer discipline :(, may not be
applicable to general case.
So this is no different from using the same principles in versioning
your binaries - it's yet another (I agree - convenient) string.
*nixes have quite a share of problems with those "manual" declarations
as well: I saw some cases where you cannot upgrade because somebody
forgot to change the declaration, and vice versa ...
Oleg
>
> Ralph
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Ralph Goers <Ra...@dslextreme.com>.
Michael McCallum wrote:
> To be well rounded we should consider other approaches to dependencies
>
> its worth having a look at how gentoo does versioning with ranges and slots...
> http://www.gentoo.org/
> http://devmanual.gentoo.org/general-concepts/dependencies/index.html
> http://devmanual.gentoo.org/general-concepts/slotting/index.html
>
>
Yes, but... What has really made Linux package management work is more
than just versioning.
In your previous email you wrote -
module Z released as 2.X
a dependent module Y specifies X [2,3)
you now make a breaking change and release the alpha version of Z 3.0-alpha-1
and BAM module Y is using it when it explicitly said I only want major
version 2
This is exactly where I have a problem with the whole thing. You
probably specified [2,3] under the assumption that all version 2
releases would be compatible. You probably also are assuming the version
3 isn't compatible with version 2. Either or both of these assumptions
could be invalid.
The real problem here, at least as I see it, is that Y incorporated Z at
some release of 2.x. In reality it really shouldn't care if it is using
version 2.x, 3.x, 4.x, etc. as long as the behavior of what it is using
is still the same. The various flavors of Unix have been successfully
dealing with this for years. If you look at an RPM you will see that it
not only has a "requires" element, which is equivalent to Maven's
depdencies, but it also has a "provides" element, which Maven has no
equivalent of. Without that you can have all the fancy version schemes
you want but they will never be reliable. Interestingly, whatever is
provided is not allowed to have a version associated with it - but if
you look at how it is typically used it will be something like libc.so.1
or libx.so.3 - which, of course, has a version in its name.
So what I would really prefer is the ability to do
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang</artifactId>
<requires>commons-lang-api-2</requires>
</dependency>
Then commons-lang would be declared as
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>3.0</version>
<provides>commons-lang-api-2,commons-lang-api-3</provides>
This would then declare that version 3.0 is indeed compatible at the api level with version 2.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Mercury Version Ranges
Posted by Michael McCallum <gh...@apache.org>.
To be well rounded we should consider other approaches to dependencies
its worth having a look at how gentoo does versioning with ranges and slots...
http://www.gentoo.org/
http://devmanual.gentoo.org/general-concepts/dependencies/index.html
http://devmanual.gentoo.org/general-concepts/slotting/index.html
--
Michael McCallum
Enterprise Engineer
mailto:gholam@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org