Comments (8)
In Bundler, if the version of a gem is changed in the Gemfile, a bundle install
would update the version of that gem without requiring a bundle update
, unless it requires changing the version of other gems.
In other words, install
always feel more "safe" in terms of not changing what's not needed. And I just use update
to get the latest version of one or more gems still matching the versions specified in the Gemfile.
Don't you think we should mimic that behaviour? I guess it would require saving the version specification in the shard.lock too, so install
could figure out which versions were changed in the shard.yml.
from shards.
I don't recall such a behaviour in Bundler. I always have to run bundle update
when I change a dependency version —maybe because they will update other dependencies.
I think I prefer to have install
to always install the locked versions, and then have update
to update the locked versions of one or many dependencies, with maybe a flag to avoid resolving recursively.
from shards.
Yeah, bundle install
installs only new added dependencies and all currently locked ones. bundle update
updates all dependencies. And bundle update <NAME>
updates only specific dependency.
from shards.
I think the rationale is: if you change the version in the Gemfile, the version is now unlocked. That's why bundle install
will update the version without asking for update
.
@waterlink: bundle update <NAME>
also updates the version of the recursive dependencies. If you have a stable project, you want to change as little as possible. That's why I think the behaviour of bundle install
should be available, either with a flag in update
or copying the Bundler's install
.
I cannot make my mind with this yet, because I like the @ysbaddaden statement, of making install
not changing locked versions, but after many years of Ruby development I always try to use update
with care, only when needed.
from shards.
@waj Wouldn't the behavior of bundle install
when changing version in Gemfile
, update its dependencies too? (at least, if the requirements of the gem itself have changed in the newer version).
from shards.
@waterlink: if the change in the Gemfile requires to update other gems stated in the Gemfile too, then you're forced to update.
It seems Bundler will unlock the gem changed in the Gemfile and other dependencies of that gem (not in the Gemfile) and will try to update with that. If the dependencies cannot be satisfied, then you're forced to update.
from shards.
Yeah, that is exactly how it works
from shards.
from shards.
Related Issues (20)
- Concurrent installs fail with "Failed to clone" HOT 1
- shards build --mcpu causes lookup of CPU arch as a target incorrectly HOT 3
- Add Pijul resolver HOT 2
- [Website] Could statistics be added? HOT 2
- Windows: A required privilege is not held by the client HOT 3
- Shards installs wrong version of lucky HOT 6
- branch master not satisfy condition >= HOT 5
- Tell why upgrading more
- Inconsistency in `~> x.y.z` requirement with pre-release HOT 1
- Unable to resolve dependency with pre-release version HOT 5
- Refactor resolver code
- `shards remove` command
- Prune command fails to remove symlink HOT 1
- Notify users of deprecated/outdated package HOT 8
- Different behavior between `shards run` and `crystal run` HOT 3
- Installed version in `lib` does not match version in `shard.lock` HOT 3
- verbose option should output also out and err from postinstall script
- `--local` flag doesn't respect CRYSTAL_PATH HOT 3
- FR: Option for out-of-source builds HOT 4
- Equivalent of "go mod vendor"? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shards.