Add Ruby 4.0 / Puppet 9 lane to ci/nightly - #20
Merged
Conversation
With the arrival of Puppetcore 9, we need to ensure our tools are compatible with Ruby 4. Adds a ruby_version: 4.0 / puppet_version: ~> 9.0 lane to both ci.yml and nightly.yml's spec job. No Gemfile change needed - this gem has no dependency on puppet itself (only molinillo/semantic_puppet), so there's no puppetcore gem source to add.
Ruby 4.0 unbundled benchmark from the standard library. rubocop 1.50.2 still requires it directly at its exe/rubocop entrypoint, so the Ruby 4.0 lane failed immediately with "cannot load such file -- benchmark" on both ubuntu-latest and windows-latest.
rubocop 1.50.2 also requires base64 (html_formatter.rb) and tsort (parallel_assignment.rb) directly. base64 was unbundled since Ruby 3.4.0, causing the same LoadError as benchmark on the 4.0 lane; tsort is unbundled starting Ruby 4.1.0 (currently just a warning) - adding it now too to avoid another round-trip when that lands.
Found by installing Ruby 4.0.2 locally and iterating directly instead of round-tripping through CI: ostruct (required by rubocop's HTML formatter) and logger (required directly by gclone_spec.rb). Verified clean on both Ruby 3.2 and real Ruby 4.0.2 - full spec suite and rubocop, no further stdlib-unbundling surprises.
tsort's stdlib-unbundling warning is forward-looking ("will no longer
be part of the default gems starting from Ruby 4.1.0") - on Ruby
4.0.2 it's still just a warning, not a LoadError. Keeping this PR
scoped to what's actually broken today; verified clean on both Ruby
3.2 and real Ruby 4.0.2 without it.
gavindidrichsen
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the arrival of Puppetcore 9, we need to ensure our tools are compatible with Ruby 4.
Adds a
ruby_version: 4.0/puppet_version: ~> 9.0lane to bothci.ymlandnightly.yml'sspecjob.No Gemfile change needed — this gem has no dependency on
puppetitself (onlymolinillo/semantic_puppet), so there's no puppetcore gem source to add here, unlike our module/tool repos.Verified locally: full spec suite passes (128 examples, 0 failures, 1 pre-existing pending), rubocop clean.
Checklist