This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Don't mutate original error trees when determining version_conflict_message #6650
Merged
bundlerbot
merged 1 commit into
rubygems:master
from
greysteil:dont-mutate-original-trees
Aug 15, 2018
Merged
Don't mutate original error trees when determining version_conflict_message #6650
bundlerbot
merged 1 commit into
rubygems:master
from
greysteil:dont-mutate-original-trees
Aug 15, 2018
Conversation
This file contains 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
👍🏻 |
☔ The latest upstream changes (presumably #6647) made this pull request unmergeable. Please resolve the merge conflicts. |
@deivid-rodriguez - I wrote this so wont merge it myself, but would be great to have it in 1.16.4. |
@bundlerbot r+ |
📌 Commit 750012c has been approved by |
bundlerbot
added a commit
that referenced
this pull request
Aug 15, 2018
Don't mutate original error trees when determining version_conflict_message *I know I'm messing with private APIs here, so have no right to expect this PR merged!* Currently, when Bundler generates its error message for a version conflict, it mutates the `requirement_trees` array on the underlying `Molinillo::VersionConflict` error. I would really like it if it didn't. Dependabot taps into that error to understand what went wrong with resolution and unlock any dependencies that are blocking resolution. The code where we do so is [here](https://github.com/dependabot/dependabot-core/blob/9abcb85ba69b408b11b56572dd13ab89d0c55b8c/lib/dependabot/file_updaters/ruby/bundler/lockfile_updater.rb#L142-L167). I don't think that there's any downside to not mutating here. Resolution has finished (and failed) at this stage, so trying to reduce memory usage doesn't really matter. 🙏
☀️ Test successful - status-travis |
colby-swandale
pushed a commit
that referenced
this pull request
Aug 16, 2018
Don't mutate original error trees when determining version_conflict_message *I know I'm messing with private APIs here, so have no right to expect this PR merged!* Currently, when Bundler generates its error message for a version conflict, it mutates the `requirement_trees` array on the underlying `Molinillo::VersionConflict` error. I would really like it if it didn't. Dependabot taps into that error to understand what went wrong with resolution and unlock any dependencies that are blocking resolution. The code where we do so is [here](https://github.com/dependabot/dependabot-core/blob/9abcb85ba69b408b11b56572dd13ab89d0c55b8c/lib/dependabot/file_updaters/ruby/bundler/lockfile_updater.rb#L142-L167). I don't think that there's any downside to not mutating here. Resolution has finished (and failed) at this stage, so trying to reduce memory usage doesn't really matter. 🙏 (cherry picked from commit fc60fe4)
colby-swandale
added a commit
that referenced
this pull request
Aug 22, 2018
* 1-16-stable: Version 1.16.4 with changelog Auto merge of #6668 - eregon:fix-encoding-spec-from-6661, r=deivid-rodriguez Add encoding magic comment to gemfile spec Auto merge of #6662 - bundler:indirect/update-authors, r=colby-swandale Auto merge of #6650 - greysteil:dont-mutate-original-trees, r=segiddins Auto merge of #6661 - eregon:consistent-encoding-for-reading-files, r=deivid-rodriguez Auto merge of #6652 - bundler:seg-molinillo-0.6.6, r=segiddins Auto merge of #6645 - bundler:colby/require-etc, r=colby-swandale Auto merge of #6636 - ojab:1-16-stable, r=indirect Auto merge of #6624 - bundler:no-document, r=colby-swandale Auto merge of #6621 - ralphbolo:patch-1, r=segiddins Auto merge of #6613 - kemitchell:mention-show-sorts-in-doc, r=colby-swandale Auto merge of #6570 - akihiro17:prerelease-dependency, r=segiddins Auto merge of #6568 - greysteil:conservative-groups, r=segiddins
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I know I'm messing with private APIs here, so have no right to expect this PR merged!
Currently, when Bundler generates its error message for a version conflict, it mutates the
requirement_trees
array on the underlyingMolinillo::VersionConflict
error.I would really like it if it didn't. Dependabot taps into that error to understand what went wrong with resolution and unlock any dependencies that are blocking resolution. The code where we do so is here.
I don't think that there's any downside to not mutating here. Resolution has finished (and failed) at this stage, so trying to reduce memory usage doesn't really matter.
🙏