puppetlabs / puppet

Server automation framework and application
https://puppet.com/open-source/#osp
Apache License 2.0
7.46k stars 2.19k forks source link

Canrequire puppet gem in Ruby 3.3 #9486

Closed joshcooper closed 1 month ago

joshcooper commented 1 month ago

Describe the Bug

A gem that depends on puppet fails on Ruby 3.3 because racc is not a runtime dependency of puppet

Expected Behavior

Installing a gem that depends on puppet should include racc as a transitive dependency.

Steps to Reproduce

❯ cat test.rb   
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'puppet'
end

puts 'Gems installed and loaded!'

❯ ruby --version
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]

❯ ruby test.rb  
/home/josh/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/puppet-8.9.0/lib/puppet/util/feature.rb:116: warning: syslog was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add syslog to your Gemfile or gemspec. Also contact author of puppet-8.9.0 to add syslog into its gemspec.
/home/josh/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/puppet-8.9.0/lib/puppet/pops/types/p_binary_type.rb:3: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of puppet-8.9.0 to add base64 into its gemspec.
/home/josh/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- racc/parser.rb (LoadError)
    from /home/josh/.rbenv/versions/3.3.4/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
    from /home/josh/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/puppet-8.9.0/lib/puppet/pops/parser/eparser.rb:7:in `<top (required)>'

Environment

Additional Context

We added racc to the test bundler group in https://github.com/puppetlabs/puppet/pull/9303, but more work is needed

joshcooper commented 1 month ago

dup of https://github.com/puppetlabs/puppet/issues/9487