[2.0] Update the specs to pass under Bundler 2#5800
Conversation
17a1ebc to
a666ae4
Compare
|
☔ The latest upstream changes (presumably #5804) made this pull request unmergeable. Please resolve the merge conflicts. |
be4d8c9 to
df105d8
Compare
|
If this now passes, I'll restore all the other build matrix entries. Please review? |
|
Only thing failing on 2.0 are the real world specs 🎆 |
|
Blocked by #5788 |
|
☔ The latest upstream changes (presumably #5806) made this pull request unmergeable. Please resolve the merge conflicts. |
df105d8 to
fe6e03e
Compare
| - 2.3.4 | ||
| - 2.2.7 | ||
| - 2.1.10 | ||
| - 2.0.0 |
There was a problem hiding this comment.
This is the version that ships with Mac, would it make sense to keep this right now?
There was a problem hiding this comment.
Please see the PR description
Don't worry, I'll rebase out the deletion of all the build entries once this is ready to merge.
lib/bundler/definition.rb
Outdated
|
|
||
| @dependencies = dependencies | ||
| @dependencies = dependencies | ||
| @dependencies_by_name = dependencies.group_by(&:name) |
There was a problem hiding this comment.
I'm a little concerned if this would introduce a boot time regression. I can take a look in a bit and test it out
There was a problem hiding this comment.
Agree it's not ideal, but I can't think of how else to fix the only_update_to_newer_versions bug
There was a problem hiding this comment.
I guess I could move this to additional_base_requirements_for_resolve so that we don't hit it in Bundler.setup ?
lib/bundler/definition.rb
Outdated
| dep = Gem::Dependency.new(locked_spec.name, ">= #{locked_spec.version}") | ||
| requirements[locked_spec.name] = DepProxy.new(dep, locked_spec.platform) | ||
| name = locked_spec.name | ||
| next requirements if @locked_deps[name] != @dependencies_by_name[name] |
There was a problem hiding this comment.
next statements are my favourite statements, only superseded by break since these mean less work ;P
There was a problem hiding this comment.
but break here would have entirely different semantics, as this is a reduce
There was a problem hiding this comment.
@segiddins I was just making a statement that next statements are one of my favourite because they mean less work == often more boot time perf. Was a stupid joke :)
fe6e03e to
ca4b6f6
Compare
lib/bundler/definition.rb
Outdated
| @unlocking = unlock == true || !unlock.empty? | ||
|
|
||
| @dependencies = dependencies | ||
| @dependencies = dependencies |
There was a problem hiding this comment.
Can you fix the alignment here?
There was a problem hiding this comment.
ugh yeah, rubocop should've caught that :/ (came from reverting another change)
lib/bundler/source/git.rb
Outdated
| rescue GitError => e | ||
| raise unless Bundler.feature_flag.allow_offline_install? | ||
| Bundler.ui.warn "Using cached git data because of network errors" | ||
| Bundler.ui.warn "Using cached git data because of network errors\n#{e}" |
There was a problem hiding this comment.
Maybe add a colon after errors to suggest the exception error contains details.
| @out = Thread.new { stdout.read }.value.strip | ||
| @err = Thread.new { stderr.read }.value.strip | ||
| command_execution.exitstatus = wait_thr && wait_thr.value.exitstatus | ||
| command_execution.stdout = Thread.new { stdout.read }.value.strip |
There was a problem hiding this comment.
Don't we want to .join the threads here?
There was a problem hiding this comment.
value joins the thread
|
@bundlerbot r+ |
|
📌 Commit 63359d7 has been approved by |
[2.0] Update the specs to pass under Bundler 2 I'm opening this up as a WIP because I want travis to run. Don't worry, I'll rebase out the deletion of all the build entries once this is ready to merge.
|
@andremedeiros I haven't addressed your comments yet... (It's also failing on 1.8.7 because it doesn't seem to support |
|
💔 Test failed - status-travis |
|
@segiddins my bad. Sorry 😢 |
…ore that example is run
|
Rebased, added a PR description. |
63359d7 to
717d194
Compare
|
No worries, just paranoid about pegging our travis VMs (earlier last week stuff was taking half a day to run) |
|
Its. 🍏. 🎆 @bundlerbot r+ |
|
📌 Commit 717d194 has been approved by |
[2.0] Update the specs to pass under Bundler 2 ### What was the end-user problem that led to this PR? The problem was we have all these _amazing_ Bundler 2.0 features hidden behind feature flags. But we weren't testing all of bundler in that 2.0 mode. ### Was was your diagnosis of the problem? My diagnosis was we needed to get the bundler 2 specs running, and passing! ### What is your fix for the problem, implemented in this PR? My fix is to add a travis build entry to change `version.rb` to a 2.0 version and run the tests! ### Why did you choose this fix out of the possible options? I chose this fix because it will completely imitate what happens once we change the version on `master`, and by keeping the test suite passing on both 1.0 and 2.0 modes, we'll be in a position to release a 1.16 to which we'll be able to (relatively easily) backport fixes that land after master switches to completely target 2.0.
|
☀️ Test successful - status-travis |
What was the end-user problem that led to this PR?
The problem was we have all these amazing Bundler 2.0 features hidden behind feature flags. But we weren't testing all of bundler in that 2.0 mode.
Was was your diagnosis of the problem?
My diagnosis was we needed to get the bundler 2 specs running, and passing!
What is your fix for the problem, implemented in this PR?
My fix is to add a travis build entry to change
version.rbto a 2.0 version and run the tests!Why did you choose this fix out of the possible options?
I chose this fix because it will completely imitate what happens once we change the version on
master, and by keeping the test suite passing on both 1.0 and 2.0 modes, we'll be in a position to release a 1.16 to which we'll be able to (relatively easily) backport fixes that land after master switches to completely target 2.0.