Skip to content

Fix compatibility with bundler 4.x#934

Merged
MikeMcQuaid merged 18 commits into
licensee:mainfrom
mnin:main
Feb 22, 2026
Merged

Fix compatibility with bundler 4.x#934
MikeMcQuaid merged 18 commits into
licensee:mainfrom
mnin:main

Conversation

@mnin

@mnin mnin commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

We want to fix the compatibility with bundler 4.x here because we got this exception (for e.g. pg or google-protobuf or grpc gems.

Caching dependency records for project
  bundler
  * 0 bundler dependencies
bundler: failed to load command: licensed (/home/runner/work/project/project/vendor/bundle/ruby/4.0.0/bin/licensed)
/opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/materialization.rb:32:in 'Bundler::Materialization#dependencies': undefined method 'runtime_dependencies' for an instance of Licensed::Bundler::MissingSpecification (NoMethodError)

      (materialized_spec || specs.first).runtime_dependencies.map {|d| [d, platform] }
                                        ^^^^^^^^^^^^^^^^^^^^^
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/spec_set.rb:260:in 'block in Bundler::SpecSet#materialize_dependencies'
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/spec_set.rb:246:in 'Kernel#loop'
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/spec_set.rb:246:in 'Bundler::SpecSet#materialize_dependencies'
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/spec_set.rb:126:in 'Bundler::SpecSet#materialize'
	from /home/runner/work/project/project/vendor/bundle/ruby/4.0.0/bundler/gems/licensed-c4a2115b42ee/lib/licensed/sources/bundler/definition.rb:17:in 'Licensed::Bundler::DefinitionExtensions#specs'
	from /home/runner/work/project/project/vendor/bundle/ruby/4.0.0/bundler/gems/licensed-c4a2115b42ee/lib/licensed/sources/bundler.rb:54:in 'block in Licensed::Sources::Bundler#enumerate_dependencies'
	from /home/runner/work/project/project/vendor/bundle/ruby/4.0.0/bundler/gems/licensed-c4a2115b42ee/lib/licensed/sources/bundler.rb:110:in 'block in Licensed::Sources::Bundler#with_application_environment'
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/ui/shell.rb:177:in 'Bundler::UI::Shell#with_level'
	from /opt/hostedtoolcache/Ruby/4.0.0/x64/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/lib/bundler/ui/shell.rb:122:in 'Bundler::UI::Shell#silence'
	from /home/runner/work/project/project/vendor/bundle/ruby/4.0.0/bundler/gems/licensed-c4a2115b42ee/lib/licensed/sources/bundler.rb:98:in 'Licensed::Sources::Bundler#with_application_environment'

@MikeMcQuaid

Copy link
Copy Markdown
Contributor

@mnin A bunch of tests failing here. Should also add a new CI configuration for testing this on Bundler 4.

@mnin

mnin commented Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

@MikeMcQuaid yes, thanks, not done yet with this PR.

@mnin mnin marked this pull request as draft January 15, 2026 21:03
@dgmstuart

Copy link
Copy Markdown

@mnin thanks for your progress on this - looks like it's taken some effort to address! 🙏

Comment thread .ruby-version Outdated
@mnin mnin marked this pull request as ready for review February 18, 2026 14:00
@mnin

mnin commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @MikeMcQuaid please have a look again.

@mnin mnin requested a review from MikeMcQuaid February 19, 2026 11:18
@MikeMcQuaid

Copy link
Copy Markdown
Contributor

@mnin on holiday will look when I’m back

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, nice work @mnin!

Let me know if you're interested in helping maintain licensed.

@MikeMcQuaid MikeMcQuaid merged commit e238457 into licensee:main Feb 22, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants