Skip to content

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Jun 19, 2024

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

The ruby core team consider to stop to increase RUBY_PATCHLEVEL each commits on stable branch like ruby_3_3.

It means comparison feature of patchlevel and show patchlevel are meaningless in lockfile of Bundler. We already hide patchlevel with ruby -v from Ruby 3.2.

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

I also removed patchlevel from lockfile and comparison condition of patchlevel. It's good time to remove that at this year because Ruby 3.1 will be EOL at next year.

Make sure the following tasks are checked

@deivid-rodriguez
Copy link
Contributor

How will old versions of Bundler deal with lockfiles without patchlevel?

@hsbt
Copy link
Member Author

hsbt commented Jun 20, 2024

In my understanding, lockfile of non patchlevel version is only available Bundler 2.6.x or later because auto-switching feature enable it.

@deivid-rodriguez
Copy link
Contributor

Yeah, however, recent experience has proven that this is not always the case in real life. For example, Heroku uses a fixed version of Bundler that's usually older than what's in lockfile's "BUNDLED WITH". Dependabot too will also start creating lockfiles without patchlevel without changing the "BUNDLED WITH" section. Also, users may disable the auto-switching feature, or just bugs like #7719 or #7778 may prevent the switch.

Ideally we would apply this only to new lockfiles, and warn old lockfiles with some command to explicitly remove the patchlevel. But maybe this is not necessary and old versions deal with this fine, we should try.

That said, if we hold releasing this to Bundler 2.6.x and tag it as a small breaking change, then we may not take as many precautions.

@hsbt
Copy link
Member Author

hsbt commented Jun 20, 2024

I have no idea that good way for that yet. Should we backport to Bundler 2.4 and 2.5 and release them?

@deivid-rodriguez
Copy link
Contributor

I would hold on releasing this until we find answers to these questions. I can dig in more next week.

@hsbt hsbt force-pushed the hide-patchlevel branch from 8aa7151 to f4c1a86 Compare April 10, 2025 07:03
@hsbt hsbt force-pushed the hide-patchlevel branch from f4c1a86 to accaa0a Compare June 27, 2025 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants