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

Remove old rubygems compatibility code#7043

Merged
8 commits merged intomasterfrom
remove_old_rubygems_compatibility_code
Apr 14, 2019
Merged

Remove old rubygems compatibility code#7043
8 commits merged intomasterfrom
remove_old_rubygems_compatibility_code

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

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

The problem was that I was unsure where I needed to add the compatibility layer to #6963, and it took me a bit to scan through the compatibility file and figure it out.

What was your diagnosis of the problem?

My diagnosis was that all this compatibility code is unused but makes this file harder to understand and scan through.

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

My fix is to remove the code.

Why did you choose this fix out of the possible options?

I chose this fix because we can do it, I think.

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Diff best seen with whitespace removed: https://github.com/bundler/bundler/pull/7043/files?w=1.

@deivid-rodriguez deivid-rodriguez force-pushed the remove_old_rubygems_compatibility_code branch from 078d1f7 to 35ec699 Compare April 5, 2019 11:38
else # RubyGems 1.3.6 and 1.3.7
RubygemsIntegration::Ancient.new
end
@rubygems ||= RubygemsIntegration.new
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a good summary of this PR. Since currently bundler only supports rubygems 2.5 or higher, we can stick to the MoreFuture interface, which I unified in the RubygemsIntegration class.

@deivid-rodriguez deivid-rodriguez force-pushed the remove_old_rubygems_compatibility_code branch from 35ec699 to 405f25a Compare April 9, 2019 08:56
@deivid-rodriguez deivid-rodriguez force-pushed the remove_old_rubygems_compatibility_code branch from 405f25a to 1eab861 Compare April 9, 2019 09:54
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

This PR might be hard to review if you look at the final diff, but if you go commit per commit, it should be straightforward I think.

The `source` method has been there since rubygems 2.1.
The `full_gem_path` writer has been there since rubygems 2.2
@deivid-rodriguez deivid-rodriguez force-pushed the remove_old_rubygems_compatibility_code branch from 1eab861 to 57b06c0 Compare April 9, 2019 09:56
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Can we get this in? Every time I need to read through this file I'm like 🙈

@bronzdoc
Copy link
Copy Markdown
Member

Sorry for taking too long @deivid-rodriguez!

@bundlerbot r+

ghost pushed a commit that referenced this pull request Apr 14, 2019
7043: Remove old rubygems compatibility code r=bronzdoc a=deivid-rodriguez

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

The problem was that I was unsure where I needed to add the compatibility layer to #6963, and it took me a bit to scan through the compatibility file and figure it out.

### What was your diagnosis of the problem?

My diagnosis was that all this compatibility code is unused but makes this file harder to understand and scan through.

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

My fix is to remove the code.

### Why did you choose this fix out of the possible options?

I chose this fix because we can do it, I think.

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

ghost commented Apr 14, 2019

Build succeeded

@ghost ghost merged commit 57b06c0 into master Apr 14, 2019
@ghost ghost deleted the remove_old_rubygems_compatibility_code branch April 14, 2019 14:39
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.

2 participants