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

Don't fully require rubygems from rubygems/package to prevent some circular require warnings when using Bundler #7612

Merged
merged 1 commit into from Apr 29, 2024

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Apr 26, 2024

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

Since bbe4da0, cached gems are considered more frequently, and considering cached gems uses Gem::Package because it extracts specs from cached packages.

This introduced a circular dependency because due to the feature introduced by 963cb65, a bundle exec invocation will require bundler/setup at the end of rubygems require, and that (due to the above change) will require rubygems/package, which since 73c199b requires "rubygems" again, causing the circularity.

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

My fix is to not require rubygems from rubygems/package. Apparently it's not necessary.

Fixes #7611

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/circular-require branch 2 times, most recently from 55c00f8 to 973a2bc Compare April 26, 2024 09:38
@flavorjones
Copy link
Contributor

Just confirming that the change to lib/rubygems/package.rb does address the concerns raised in #7611

@simi simi merged commit 0ecd098 into master Apr 29, 2024
83 checks passed
@simi simi deleted the deivid-rodriguez/circular-require branch April 29, 2024 09:04
deivid-rodriguez pushed a commit that referenced this pull request Apr 30, 2024
Fix circular require warning

(cherry picked from commit 0ecd098)
@deivid-rodriguez deivid-rodriguez changed the title Fix circular require warning Don't fully require rubygems from rubygems/package to prevent some circular require warnings when using Bundler Apr 30, 2024
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.

"circular require" warning emitted when using a bundler cache
3 participants