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

Skip did_you_mean and delegate failures on MRI 2.7 #7477

Merged
1 commit merged into from Dec 13, 2019

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Dec 13, 2019

What was the end-user problem that led to this PR?

ruby-head build is broken again.

What was your diagnosis of the problem?

Ruby 2.7 will turn did_you_mean into a default gem. That means that bundler tests that make sure that an arbritary version of default gems can be specified in the Gemfile will now run against did_you_mean. And this doesn't work because did_you_mean is activated in ruby's prelude.rb, way before bundler/setup is required, so the latest version will always be activated, regardless of what the user specifies. If these versions are not the same, a gem activation conflict error will happen.

Note that this problem is not specific to ruby 2.7, it simply gets triggered by the change of making it a default gem, but it would also happen on older versions if the user did_you_mean version specified in the Gemfile does not match the latest version installed on her system.

As a consequence of this, we also get activation trouble because did_you_mean depends on delegate which is also a default gem on ruby 2.7. This problem is specific to ruby 2.7 because delegate was not gemified before that, but can probably be workarounded by removing the delegate dependendcy from did_you_mean.

What is your fix for the problem, implemented in this PR?

My "fix" allow these failures, because there's not much we can do about this at the moment. However, I'd like to ping @yuki24 and ask how difficult would be to remove the dependency on delegate from did_you_mean, because that would fix the issue with the delegate gem.

Ruby 2.7 will turn `did_you_mean` into a default gem. That means that
bundler tests that make sure that an arbritary version of default gems
can be specified in the `Gemfile` will now run against `did_you_mean`.
And this doesn't work because `did_you_mean` is activated in ruby's
`prelude.rb`, way before `bundler/setup` is required, so the latest
version will always be activated, regardless of what the user specifies.
If these versions are not the same, a gem activation conflict error will
happen.

Note that this problem is not specific to ruby 2.7, it simply gets
triggered by the change of making it a default gem, but it would also
happen on older versions if the user `did_you_mean` version specified in
the `Gemfile` does not match the latest version installed on her system.

As a consequence of this, we also get activation trouble because
`did_you_mean` depends on `delegate` which is also a default gem on ruby
2.7. This problem _is_ specific to ruby 2.7 because `delegate` was not
gemified before that, but can probably be workarounded by removing the
`delegate` dependendcy from `did_you_mean`.
@yuki24
Copy link

yuki24 commented Dec 13, 2019

Removing delegate makes sense to me. It should be possible. Just give me a few days and I’ll report back one it’s done.

@deivid-rodriguez
Copy link
Member Author

Great @yuki24, thank you so much!

@deivid-rodriguez
Copy link
Member Author

I'll merge this for now to get CI against ruby-head green. Will remove delegate from the exemptions later.

@bundlerbot merge

ghost pushed a commit that referenced this pull request Dec 13, 2019
7477: Skip `did_you_mean` and `delegate` failures on MRI 2.7 r=deivid-rodriguez a=deivid-rodriguez

# What was the end-user problem that led to this PR?

`ruby-head` build [is broken again](https://travis-ci.org/bundler/bundler/jobs/624581155).

### What was your diagnosis of the problem?

Ruby 2.7 will turn `did_you_mean` into a default gem. That means that bundler tests that make sure that an arbritary version of default gems can be specified in the `Gemfile` will now run against `did_you_mean`. And this doesn't work because `did_you_mean` is activated in ruby's `prelude.rb`, way before `bundler/setup` is required, so the latest version will always be activated, regardless of what the user specifies. If these versions are not the same, a gem activation conflict error will happen.

Note that this problem is not specific to ruby 2.7, it simply gets triggered by the change of making it a default gem, but it would also happen on older versions if the user `did_you_mean` version specified in the `Gemfile` does not match the latest version installed on her system.

As a consequence of this, we also get activation trouble because `did_you_mean` depends on `delegate` which is also a default gem on ruby 2.7. This problem _is_ specific to ruby 2.7 because `delegate` was not gemified before that, but can probably be workarounded by removing the `delegate` dependendcy from `did_you_mean`.

### What is your fix for the problem, implemented in this PR?

My "fix" allow these failures, because there's not much we can do about this at the moment. However, I'd like to ping @yuki24 and ask how difficult would be to remove the dependency on `delegate` from `did_you_mean`, because that would fix the issue with the `delegate` gem.


Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
@ghost
Copy link

ghost commented Dec 13, 2019

Build succeeded

@ghost ghost merged commit 7e56688 into master Dec 13, 2019
@ghost ghost deleted the skip_did_you_mean_on_2_7 branch December 13, 2019 17:15
@deivid-rodriguez deivid-rodriguez added this to the 2.1.0 milestone Dec 13, 2019
deivid-rodriguez pushed a commit that referenced this pull request Dec 13, 2019
7477: Skip `did_you_mean` and `delegate` failures on MRI 2.7 r=deivid-rodriguez a=deivid-rodriguez

# What was the end-user problem that led to this PR?

`ruby-head` build [is broken again](https://travis-ci.org/bundler/bundler/jobs/624581155).

### What was your diagnosis of the problem?

Ruby 2.7 will turn `did_you_mean` into a default gem. That means that bundler tests that make sure that an arbritary version of default gems can be specified in the `Gemfile` will now run against `did_you_mean`. And this doesn't work because `did_you_mean` is activated in ruby's `prelude.rb`, way before `bundler/setup` is required, so the latest version will always be activated, regardless of what the user specifies. If these versions are not the same, a gem activation conflict error will happen.

Note that this problem is not specific to ruby 2.7, it simply gets triggered by the change of making it a default gem, but it would also happen on older versions if the user `did_you_mean` version specified in the `Gemfile` does not match the latest version installed on her system.

As a consequence of this, we also get activation trouble because `did_you_mean` depends on `delegate` which is also a default gem on ruby 2.7. This problem _is_ specific to ruby 2.7 because `delegate` was not gemified before that, but can probably be workarounded by removing the `delegate` dependendcy from `did_you_mean`.

### What is your fix for the problem, implemented in this PR?

My "fix" allow these failures, because there's not much we can do about this at the moment. However, I'd like to ping @yuki24 and ask how difficult would be to remove the dependency on `delegate` from `did_you_mean`, because that would fix the issue with the `delegate` gem.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
(cherry picked from commit 3bd06e7)
@yuki24
Copy link

yuki24 commented Dec 14, 2019

@deivid-rodriguez ruby/ruby@e270806 is in and now you should be able to test delegate as well.

@deivid-rodriguez
Copy link
Member Author

Nice, thanks so much!

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

Successfully merging this pull request may close these issues.

None yet

2 participants