Actually consider development dependencies (v2)#5971
Merged
deivid-rodriguez merged 1 commit intomainfrom Oct 25, 2022
Merged
Conversation
I think this is an issue in Bundler, but let's add a workaround for it. Currently, if you add a development dependency to a Gemfile through a gemspec, with the `gemspec` DSL, and later on in the Gemfile you explicitly add it again, Bundler will silently prefer the latter specification even if the former is more restrictive. I think Bundler should either warn, or prefer the most restrictive one, but to avoid this issue we can remove the duplicated dependency specification.
jurre
approved these changes
Oct 25, 2022
Contributor
Author
|
It did they right thing now. From omnibus job logs: |
Member
|
Is this something that we should permanently leave out, or should we put this back (with a version pin) once Bundler starts warning if there's drift between two specified versions? |
Contributor
Author
|
I think it should be permanently left out. I don't think the duplication buys us anything. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As can be seen in CI logs:
#5969 did not fix the issue since it's still installing the latest RuboCop.
I think this is an issue in Bundler, but let's add a workaround for it.
Currently, if you add a development dependency to a Gemfile through a gemspec, with the
gemspecDSL, and later on in the Gemfile you explicitly add it again, Bundler will silently prefer the latter specification even if the former is more restrictive.I think Bundler should either warn, or prefer the most restrictive one, but to avoid this issue we can remove the duplicated dependency specification.