Korny Sietsma
2013-04-05 02:20:30 UTC
Hi folks. I'm generally loving Leiningen, but I am finding it a bit
annoying that you end up having to lock all your dependencies to a specific
version - it's a pity it can't work a bit more like ruby's Bundler system.
For those unfamiliar with it, Bundler uses not only a list of project
dependencies (stored in a file called Gemfile) but also a list of the
actual versions of libraries used locally, stored in a file called
Gemfile.lock. The first time you run "bundle install" it works out your
dependencies based on your Gemfile, installs them, and creates a
Gemfile.lock with the current library versions. Thereafter, "bundle
install" uses the versions in your lock file instead of looking on the net,
where possible. You have to run "bundle update" explicitly if you want to
update to the newest valid versions.
This means you can use version ranges far more easily - most of the
problems listed at
https://github.com/technomancy/leiningen/wiki/Repeatability are resolved by
checking in your lock file. This defines which library versions are valid
and tested for a particular revision of your code; CI servers and the like
can know precisely which version to use; but a developer can easily run
"bundle update" and update all the minor changes, bug fixes, etc. that are
out there, and then re-run their test suite to make sure nothing breaks.
I don't know if there is some way to duplicate this with Leiningen. I've
seen a tool to tell you which jars are out of date in your project, but
that isn't really the same, as it doesn't let you say "I depend on version
2.3.* but I don't want version 2.4 or later"
Thoughts? Obvious things I'm missing? :-)
- Korny
annoying that you end up having to lock all your dependencies to a specific
version - it's a pity it can't work a bit more like ruby's Bundler system.
For those unfamiliar with it, Bundler uses not only a list of project
dependencies (stored in a file called Gemfile) but also a list of the
actual versions of libraries used locally, stored in a file called
Gemfile.lock. The first time you run "bundle install" it works out your
dependencies based on your Gemfile, installs them, and creates a
Gemfile.lock with the current library versions. Thereafter, "bundle
install" uses the versions in your lock file instead of looking on the net,
where possible. You have to run "bundle update" explicitly if you want to
update to the newest valid versions.
This means you can use version ranges far more easily - most of the
problems listed at
https://github.com/technomancy/leiningen/wiki/Repeatability are resolved by
checking in your lock file. This defines which library versions are valid
and tested for a particular revision of your code; CI servers and the like
can know precisely which version to use; but a developer can easily run
"bundle update" and update all the minor changes, bug fixes, etc. that are
out there, and then re-run their test suite to make sure nothing breaks.
I don't know if there is some way to duplicate this with Leiningen. I've
seen a tool to tell you which jars are out of date in your project, but
that isn't really the same, as it doesn't let you say "I depend on version
2.3.* but I don't want version 2.4 or later"
Thoughts? Obvious things I'm missing? :-)
- Korny