in a build.sbt we can declare a range for a dependency; for example:
libraryDependencies += groupID %% "mylib" % "[2.0,)"
There are (in my case) multiple packages that fall within this range (I have 2.0.2, 2.0.3, 2.0.4 and even some more exotic versions like 2.0.1.dev and 2.0.3-dev of mylib available in my repository).
When I try to build this project, sbt
consequently chooses version 2.0.2 for no apparent reason. I would expect him to take the biggest number within the range, but he never does. Here are the requirements I tried and the version he selected (so only when specifying an exact version number does he select a more recent version):
revision range | version selected
-----------------------------------------
[2.0,) | 2.0.2
[2.0.0,) | 2.0.2
]2.0,) | 2.0.2
2.0.+ | 2.0.2
latest.integration | 2.0.2
2.0.3 | 2.0.3
2.0.4 | 2.0.4
I have already tried the following workarounds:
- removing the local ~/.sbt and ~/.ivy2 directories
- running
sbt -no-share -sbt-dir /tmp/sbt -ivy-dir /tmp/ivy
to avoid any caching effect - searching my home directory for any file containing mylib in the name; only found ind ~/.ivy2
- I have run most of my tests with sbt 0.13.16, but I have tried with 0.13.15 and 0.13.17
- Note that all my builds run each time in a clean clone of my git repository; so no target directory remains.
- the versions 2.0.2, 2.0.3 and 2.0.4 of mylib contain the same code and dependencies (I republished them for testing purposes)