Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate spec groups #3965

Merged
merged 2 commits into from Oct 3, 2020
Merged

Deduplicate spec groups #3965

merged 2 commits into from Oct 3, 2020

Conversation

deivid-rodriguez
Copy link
Member

Description:

While debugging resolver issues, I noticed that in the recent bundler versions, spec groups show up as duplicated, like this:

(...)
BUNDLER: Starting resolution (2020-09-25 22:03:05 +0200)
BUNDLER: User-requested dependencies: [#<Bundler::DepProxy:0x000055f2f02cbf80 @dep=<Bundler::Dependency type=:runtime name="rails" requirements="~> 4.2.7.1">, @__platform="ruby">, #<Bundler::DepProxy:0x000055f2f02cbd50 @dep=<Bundler::Dependency type=:runtime name="paperclip" requirements="~> 5.1.0">, @__platform="ruby">, #<Bundler::DepProxy:0x000055f2f02cbb48 @dep=<Bundler::Dependency type=:runtime name="Ruby\u0000" requirements=">= 0">, @__platform="ruby">, #<Bundler::DepProxy:0x000055f2f02cb940 @dep=<Bundler::Dependency type=:runtime name="RubyGems\u0000" requirements="= 3.2.0.rc.1" prerelease=ok>, @__platform="ruby">]
Resolving dependencies...
BUNDLER: Creating possibility state for Ruby (1 remaining)
BUNDLER:   Attempting to activate [Ruby (2.7.1.83) (ruby), Ruby (2.7.1.83) (ruby)]
BUNDLER:   Activated Ruby at [Ruby (2.7.1.83) (ruby), Ruby (2.7.1.83) (ruby)]
BUNDLER:   Requiring nested dependencies ()
BUNDLER:   Creating possibility state for RubyGems (= 3.2.0.rc.1) (1 remaining)
BUNDLER:     Attempting to activate [RubyGems (3.2.0.rc.1) (ruby), RubyGems (3.2.0.rc.1) (ruby)]
BUNDLER:     Activated RubyGems at [RubyGems (3.2.0.rc.1) (ruby), RubyGems (3.2.0.rc.1) (ruby)]
BUNDLER:     Requiring nested dependencies ()
BUNDLER:     Creating possibility state for rails (~> 4.2.7.1) (1 remaining)
BUNDLER:       Attempting to activate [rails (4.2.7.1) (ruby), rails (4.2.7.1) (ruby)]
BUNDLER:       Activated rails at [rails (4.2.7.1) (ruby), rails (4.2.7.1) (ruby)]
BUNDLER:       Requiring nested dependencies (activesupport (= 4.2.7.1), actionpack (= 4.2.7.1), actionview (= 4.2.7.1), activemodel (= 4.2.7.1), activerecord (= 4.2.7.1), actionmailer (= 4.2.7.1), activejob (= 4.2.7.1), railties (= 4.2.7.1), bundler (>= 1.3.0, < 2.0), sprockets-rails)
BUNDLER:       Creating possibility state for paperclip (~> 5.1.0) (1 remaining)
BUNDLER:         Attempting to activate [paperclip (5.1.0) (ruby), paperclip (5.1.0) (ruby)]
BUNDLER:         Activated paperclip at [paperclip (5.1.0) (ruby), paperclip (5.1.0) (ruby)]
BUNDLER:         Requiring nested dependencies (activemodel (>= 4.2.0), activesupport (>= 4.2.0), cocaine (~> 0.5.5), mime-types, mimemagic (~> 0.3.0))
BUNDLER:         Creating possibility state for bundler (>= 1.3.0, < 2.0) (0 remaining)
BUNDLER:           Unwinding for conflict: bundler (>= 1.3.0, < 2.0) to -1

BUNDLER: Finished resolution (5 steps) (Took 0.040514367 seconds) (2020-09-25 22:03:05 +0200)
(...)

Not sure if this has any influence in the resolution process, but it's certainly inconvenient for debugging and it didn't happen in previous versions.

With these changes, we get deduplicated groups again:

BUNDLER: Starting resolution (2020-09-25 22:04:23 +0200)
BUNDLER: User-requested dependencies: [#<Bundler::DepProxy:0x00005633db9d2ed8 @dep=<Bundler::Dependency type=:runtime name="rails" requirements="~> 4.2.7.1">, @__platform="ruby">, #<Bundler::DepProxy:0x00005633db9d2d98 @dep=<Bundler::Dependency type=:runtime name="paperclip" requirements="~> 5.1.0">, @__platform="ruby">, #<Bundler::DepProxy:0x00005633db9d2c58 @dep=<Bundler::Dependency type=:runtime name="Ruby\u0000" requirements=">= 0">, @__platform="ruby">, #<Bundler::DepProxy:0x00005633db9d2b18 @dep=<Bundler::Dependency type=:runtime name="RubyGems\u0000" requirements="= 3.2.0.rc.1" prerelease=ok>, @__platform="ruby">]
Resolving dependencies...
BUNDLER: Creating possibility state for Ruby (1 remaining)
BUNDLER:   Attempting to activate [Ruby (2.7.1.83) (ruby)]
BUNDLER:   Activated Ruby at [Ruby (2.7.1.83) (ruby)]
BUNDLER:   Requiring nested dependencies ()
BUNDLER:   Creating possibility state for RubyGems (= 3.2.0.rc.1) (1 remaining)
BUNDLER:     Attempting to activate [RubyGems (3.2.0.rc.1) (ruby)]
BUNDLER:     Activated RubyGems at [RubyGems (3.2.0.rc.1) (ruby)]
BUNDLER:     Requiring nested dependencies ()
BUNDLER:     Creating possibility state for rails (~> 4.2.7.1) (1 remaining)
BUNDLER:       Attempting to activate [rails (4.2.7.1) (ruby)]
BUNDLER:       Activated rails at [rails (4.2.7.1) (ruby)]
BUNDLER:       Requiring nested dependencies (activesupport (= 4.2.7.1), actionpack (= 4.2.7.1), actionview (= 4.2.7.1), activemodel (= 4.2.7.1), activerecord (= 4.2.7.1), actionmailer (= 4.2.7.1), activejob (= 4.2.7.1), railties (= 4.2.7.1), bundler (>= 1.3.0, < 2.0), sprockets-rails)
BUNDLER:       Creating possibility state for paperclip (~> 5.1.0) (1 remaining)
BUNDLER:         Attempting to activate [paperclip (5.1.0) (ruby)]
BUNDLER:         Activated paperclip at [paperclip (5.1.0) (ruby)]
BUNDLER:         Requiring nested dependencies (activemodel (>= 4.2.0), activesupport (>= 4.2.0), cocaine (~> 0.5.5), mime-types, mimemagic (~> 0.3.0))
BUNDLER:         Creating possibility state for bundler (>= 1.3.0, < 2.0) (0 remaining)
BUNDLER:           Unwinding for conflict: bundler (>= 1.3.0, < 2.0) to -1

BUNDLER: Finished resolution (5 steps) (Took 0.036523214 seconds) (2020-09-25 22:04:23 +0200)

Tasks:

  • Describe the problem / feature
  • Write tests
  • Write code to solve the problem
  • Get code review from coworkers / friends

I will abide by the code of conduct.

@deivid-rodriguez deivid-rodriguez force-pushed the duplicated_spec_groups branch 2 times, most recently from 8a9d58a to 610e9aa Compare September 28, 2020 16:43
@deivid-rodriguez
Copy link
Member Author

@kou Would you mind having a look at this PR? Do you think it makes sense? I noticed all the duplicated spec groups which made debugging output much more verbose than it should (I think).

Copy link
Contributor

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

It makes sense. Sorry for this duplication!

@deivid-rodriguez
Copy link
Member Author

No problem at all. Thanks for having a look at this and also for making bundler actually work with multiple platforms 😃.

@deivid-rodriguez deivid-rodriguez merged commit b403496 into master Oct 3, 2020
@deivid-rodriguez deivid-rodriguez deleted the duplicated_spec_groups branch October 3, 2020 08:35
deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
deivid-rodriguez added a commit that referenced this pull request Oct 5, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
deivid-rodriguez added a commit that referenced this pull request Oct 6, 2020
Deduplicate spec groups

(cherry picked from commit b403496)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants