Figure out why we need to override Gem::NameTuple.new#7229
Figure out why we need to override Gem::NameTuple.new#7229deivid-rodriguez wants to merge 3 commits intomasterfrom
Gem::NameTuple.new#7229Conversation
c257d53 to
2db870a
Compare
|
For old rubygems that don't to_s their platform arg (which we can't easily test here). |
martinemde
left a comment
There was a problem hiding this comment.
Breaks old rubygems where name tuples are not equivalent even when NameTuple#to_s is equal.
|
Ok, I have a few more minutes to look at this. Original PR is #7081. Useful to know: Gem::Platform also overrides If we didn't override new, we'd need to override initialize (which I had a lot of problems with when I first time, but we could try again) or override a few of the other instance methods. We could also be better about removing the patch when it's not necessary. I'll test that approach by pushing to this branch. |
Yes, that's the approach we normally follow, feature detect if RubyGems is missing the feature/fix that needs patching (or hardcode the RubyGems version that first introduces it) and only apply it when necessary. I feel that also makes it easier to remember cleaning up when dropping support for old versions. Also I think removing these patches should make some test fail? We test Bundler with old rubygems so some matrix entry should catch the issue? |
|
Even if there's no end to end test that catches it, this is needed, so closing! |
What was the end-user or developer problem that led to this PR?
Just trying to figure out why this is needed because it's very non standard.
What is your fix for the problem, implemented in this PR?
Make sure the following tasks are checked