Semantic versioning + improved version resolution #263

Closed
wants to merge 13 commits into
from

Projects

None yet

5 participants

@thijsterlouw

Initial support for Semantic Versioning for dependencies. Details are discussed in issue #258 .
Major improvements:

  • allow user to specify detailed version requirements using http://semver.org/
  • show project that caused version mismatch (so it can be rectified)
  • don't cause version mismatches immediately on the first error (but verify the whole chain of version constraints and try to download highest requested and allowed version)
@Motiejus Motiejus and 1 other commented on an outdated diff Jul 4, 2012
src/rebar_version.erl
+ MinorA < MinorB ->
+ -1;
+ MinorA =:= MinorB ->
+ if
+ PatchA < PatchB ->
+ -1;
+ true ->
+ 1
+ end;
+ true ->
+ 1
+ end;
+ true ->
+ 1
+ end
+ end.
@Motiejus
Motiejus Jul 4, 2012

How about a shorter version?

compare(A, B) when A > B -> 1;
compare(A, B) when A < B -> -1;
compare(_, _) -> 0.
@thijsterlouw
thijsterlouw Jul 4, 2012

good idea, I didn't know that you can compare tuples like that!

@markusn
markusn commented Dec 19, 2012

Is this going to be pulled?

@thijsterlouw

Hi Markus, thanks for the interest! Currently it is on hold as Dizzy is working on the next release of Rebar. He did say he is still interested in it:

http://lists.basho.com/pipermail/rebar_lists.basho.com/2012-November/001809.html

@yfyf yfyf referenced this pull request in rebar/rebar Aug 16, 2013
Closed

Support for versioned shared dependencies #123

@jaredmorrow

@thijsterlouw ping. We abandoned basho/rebar when rebar/rebar was created. We (basho) are now back to using basho/rebar, is this PR something you'd still like to see? Has it already been merged into rebar/rebar?

@nickelization
Collaborator

Since we never got a reply from Jared's comment, I'm going to assume this PR will never be merged, especially since this is basho/rebar, which has been superseded by rebar/rebar, which has been superseded by erlang/rebar3. It also looks like the conclusion in rebar/rebar#240 was that semver alone is not sufficient for version specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment