Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Changing gemspec unlocks all dependencies #6746

Closed
deivid-rodriguez opened this issue Oct 17, 2018 · 6 comments
Closed

Changing gemspec unlocks all dependencies #6746

deivid-rodriguez opened this issue Oct 17, 2018 · 6 comments

Comments

@deivid-rodriguez
Copy link
Member

I've seen this issue a lot of times but I was always lazy to report it. The issue is that on the decidim repo, when I change a gemspec requirement and run bundle install, every dependency seem to be unlocked and the command effectively works as bundle update.

In order to reproduce:

Every gem seems to be updated, and not just rectify and its dependencies.

@segiddins
Copy link
Member

Is it possible it’s only transitive dependencies of the gemspec being unlocked?

@deivid-rodriguez
Copy link
Member Author

Yes, that's very likely, actually, since that gemspec has a bunch of dependencies: https://github.com/decidim/decidim/blob/15a0112c911c00f9215eff947eff6beabbab9ff9/decidim-core/decidim-core.gemspec#L21-L66.

@Ferdy89
Copy link

Ferdy89 commented Oct 19, 2018

I ran through @deivid-rodriguez's steps and got the same result. One of the dependencies updated is valid_email2, which is not a transitive dependency, it's only required from that same gemspec

@deivid-rodriguez
Copy link
Member Author

@Ferdy89 Yeah, I think that's what @segiddins meant by "transitive dependencies of the gemspec", and I think it's unexpected (even if the updated dependencies come from the same gemspec).

@ElenaKalinin
Copy link

ElenaKalinin commented Nov 6, 2018

I ran into the very similar issue today - only I don't even need to change the .gemspec file.
Pretend I have in the .gemspec:
spec.add_runtime_dependency 'my-wonder-gem', '~> 6.0', '>= 6.0.19'
(i ran my own stickler server to keep proprietary gems there)
then bundle install and I see:
$ gem list | grep my-wonder-gem
my-wonder-gem (6.1.1)
$
Problem is that I'd like to follow major/minor/patch version increments for breaking/potentially breaking/non breaking changes. So I created and pushed to stickler the potentially breaking version 6.1.1 which jumped to all dependent gems that were subscribed to 6.0.x making a havoc and creating grief.
Any suggestions what can be done to workaround the problem? - I don't feel confident enough to try to fix bundler L-:
Tried bundler 1.16.x and 1.17.x.

@deivid-rodriguez
Copy link
Member Author

Closing in favor of #6967!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants