pivotal / LicenseFinder

Find licenses for your project's dependencies.
MIT License
1.73k stars 340 forks source link

fix: For Ruby 3.3 compatibility, specify racc dependency in gemspec #1013

Closed faisal closed 10 months ago

faisal commented 10 months ago

This PR adds racc to the gemspec, because Ruby 3.3 changes mean that without it we get:

~/test (+main) $ cat Gemfile 
# frozen_string_literal: true

source "https://rubygems.org"
~/test (+main) $ license_finder
<internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require': cannot load such file -- racc/parser.rb (LoadError)
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/tomlrb-2.0.3/lib/tomlrb/generated_parser.rb:7:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/tomlrb-2.0.3/lib/tomlrb/parser.rb:1:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/tomlrb-2.0.3/lib/tomlrb.rb:9:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/license_finder-7.1.0/lib/license_finder/package_managers/dep.rb:3:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/license_finder-7.1.0/lib/license_finder/package_manager.rb:175:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/license_finder-7.1.0/lib/license_finder/core.rb:9:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/license_finder-7.1.0/lib/license_finder.rb:13:in `<top (required)>'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from <internal:/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
    from /opt/homebrew/lib/ruby/gems/3.3.0/gems/license_finder-7.1.0/bin/license_finder:4:in `<top (required)>'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/license_finder:25:in `load'
    from /opt/homebrew/lib/ruby/gems/3.3.0/bin/license_finder:25:in `<main>'
~/test (+main) $ 

@pivotal-cla This is an Obvious Fix

pivotal-cla commented 10 months ago

@faisal Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

cf-gitbot commented 10 months ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

pivotal-cla commented 10 months ago

@faisal This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

benlangfeld commented 10 months ago

I think this should actually be fixed in tomlrb: https://github.com/fbernier/tomlrb/pull/50

itchyny commented 10 months ago

@benlangfeld I'm confused by the tomlrb PR was merged without any fixes about the dependencies.

benlangfeld commented 10 months ago

@benlangfeld I'm confused by the tomlrb PR was merged without any fixes about the dependencies.

The test suite passes on ruby 3.3.

xtreme-shane-lattanzio commented 10 months ago

@faisal Ill add 3.3.x support to the pipeline. There are a few things missing from this so Ill make sure pipelines are added and they pass

itchyny commented 9 months ago

@xtreme-shane-lattanzio Thanks for maintenance, would you release a new version for Ruby 3.3 support?