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

Ensure that loading multiple gemspecs with legacy YAML class references does not warn #6889

Merged
merged 3 commits into from Aug 20, 2023

Conversation

segiddins
Copy link
Member

Before this, you would get constant redefinition warnings on Psych::DefaultKey

Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes

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

I was getting many constant redefinition warnings when attempting to load every gemspec on RubyGems.org in a single process

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

Check for constants before defining them

Make sure the following tasks are checked

…es does not warn

Before this, you would get constant redefinition warnings on Psych::DefaultKey

Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Make sense!

You must've dug really deep to find these things! 💪

lib/rubygems/specification.rb Outdated Show resolved Hide resolved
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
@indirect indirect merged commit ee65a1d into master Aug 20, 2023
83 checks passed
@indirect indirect deleted the segiddins/gem-specification-no-yaml-warnings branch August 20, 2023 09:05
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…-yaml-warnings

Ensure that loading multiple gemspecs with legacy YAML class references does not warn

(cherry picked from commit ee65a1d)
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…-yaml-warnings

Ensure that loading multiple gemspecs with legacy YAML class references does not warn

(cherry picked from commit ee65a1d)
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.

None yet

3 participants