Skip to content

Add tool to verify YAMLSerializer can load gemspecs of popular gems and their dependencies#9398

Closed
hsbt wants to merge 2 commits intomasterfrom
verify-gemspec
Closed

Add tool to verify YAMLSerializer can load gemspecs of popular gems and their dependencies#9398
hsbt wants to merge 2 commits intomasterfrom
verify-gemspec

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Mar 16, 2026

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

from #9352 (comment)

I've tested to load gemspec of popular gems and their dependencies with YAMLSerializer.

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

This scripts download and load 773 gems from 300 top downloads. YAMLSerializer could load them.

You can test that with:

$ ruby --yjit -Ilib --disable-gems tool/test_yaml_serializer_with_popular_gems.rb 300

I'm not sure how much testing is needed before it becomes practical, but I want to continue testing.

Make sure the following tasks are checked

Copilot AI review requested due to automatic review settings March 16, 2026 06:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new RubyGems tooling script to sanity-check that Gem::YAMLSerializer can parse real-world gemspec YAML by downloading gem files for a set of popular gems and their transitive runtime dependencies.

Changes:

  • Introduce tool/test_yaml_serializer_with_popular_gems.rb to fetch top-N gems, resolve runtime dependency closure, download .gem files, and run Gem::YAMLSerializer.load on their gemspec metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

hsbt and others added 2 commits March 16, 2026 20:00
…nd their dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tool

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hsbt
Copy link
Member Author

hsbt commented Mar 16, 2026

I verified Top 1000 download gems and 404 transitive dependencies. The only gem whose gemspec could not be parsed was the escape gem.

I fixed that at #9399

@hsbt
Copy link
Member Author

hsbt commented Mar 17, 2026

After thinking about it overnight, this script doesn't need to be included in the repository. So I'm closing this.

@hsbt hsbt closed this Mar 17, 2026
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