Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truffleruby-21.3 needs bundler < 2.4 #433

Closed
dentarg opened this issue Dec 29, 2022 · 6 comments
Closed

truffleruby-21.3 needs bundler < 2.4 #433

dentarg opened this issue Dec 29, 2022 · 6 comments
Assignees

Comments

@dentarg
Copy link

dentarg commented Dec 29, 2022

Going by the CI fail over at https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:13 when running bundle install

NameError: method `search_by_dependency' not defined in Bundler::Index
  /home/runner/.rubies/truffleruby-21.3.0/lib/patches/bundler/index.rb:5:in `remove_method'
  /home/runner/.rubies/truffleruby-21.3.0/lib/patches/bundler/index.rb:5:in `<class:Index>'
  /home/runner/.rubies/truffleruby-21.3.0/lib/patches/bundler/index.rb:4:in `<module:Bundler>'
  /home/runner/.rubies/truffleruby-21.3.0/lib/patches/bundler/index.rb:3:in `<top (required)>'
  <internal:core> core/kernel.rb:234:in `gem_original_require'
  /home/runner/.rubies/truffleruby-21.3.0/lib/mri/rubygems/core_ext/kernel_require.rb:83:in `require'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source/path.rb:172:in `load_spec_files'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source/path.rb:107:in `local_specs'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source/path.rb:115:in `specs'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source.rb:58:in `spec_names'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source_map.rb:21:in `block in all_requirements'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source_map.rb:20:in `map'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/source_map.rb:20:in `all_requirements'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/definition.rb:840:in `source_requirements'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/definition.rb:476:in `resolver'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/definition.rb:551:in `start_resolution'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/definition.rb:278:in `resolve'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/definition.rb:176:in `resolve_remotely!'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/installer.rb:261:in `resolve_if_needed'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/installer.rb:82:in `block in run'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/process_lock.rb:12:in `block in lock'
  <internal:core> core/io.rb:695:in `open'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/process_lock.rb:9:in `lock'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/installer.rb:71:in `run'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/installer.rb:23:in `install'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/cli/install.rb:62:in `run'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/cli.rb:260:in `block in install'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/settings.rb:[13](https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:14)1:in `temporary'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/cli.rb:259:in `install'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/cli.rb:34:in `dispatch'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/cli.rb:28:in `start'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/exe/bundle:45:in `block in <top (required)>'
  /home/runner/.rubies/truffleruby-21.3.0/lib/gems/gems/bundler-2.4.1/lib/bundler/friendly_errors.rb:1[17](https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:18):in `with_friendly_errors'
  /home/runner/.rubies/truffleruby-[21](https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:22).3.0/lib/gems/gems/bundler-2.4.1/exe/bundle:33:in `<top (required)>'
  <internal:core> core/kernel.rb:376:in `load'
  <internal:core> core/kernel.rb:376:in `load'
  /home/runner/.rubies/truffleruby-21.3.0/bin/bundle:[23](https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:24):in `<main>'

Environment

Bundler       2.4.1
  Platforms   ruby
Ruby          2.7.4p0 (2021-10-13 revision 3cb06d24147d0a1c8b00eec8237c926f1791e9b1) [x86_64-linux]
  Full Path   /home/runner/.rubies/truffleruby-21.3.0/bin/truffleruby
  Config Dir  /b/b/e/truffleruby/etc
RubyGems      3.1.6
  Gem Home    /home/runner/.rubies/truffleruby-21.3.0/lib/gems
  Gem Path    /home/runner/.gem/truffleruby/2.7.4.21.3.0.1:/home/runner/.rubies/truffleruby-21.3.0/lib/gems
  User Home   /home/runner
  User Path   /home/runner/.gem/truffleruby/2.7.4.21.3.0.1
  Bin Dir     /home/runner/.rubies/truffleruby-21.3.0/bin
OpenSSL       
  Compiled    OpenSSL 1.1.1f  31 Mar 2020
  Loaded      OpenSSL 1.1.1f  31 Mar 2020
  Cert File   /usr/lib/ssl/cert.pem
  Cert Dir    /usr/lib/ssl/certs
Tools         
  Git         2.38.2
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Bundler Build Metadata

Built At          2022-12-24
Git SHA           f31[75](https://github.com/sporkmonger/addressable/actions/runs/3798049493/jobs/6459474729#step:6:76)f033c
Released Version  true
@eregon
Copy link
Member

eregon commented Dec 29, 2022

TruffleRuby 21.3 is no longer supported, please use 22.3 instead or just truffleruby.

Potentially I'll use Bundler 2.3 for it, but really there is no reason to still use that old release.

@dentarg
Copy link
Author

dentarg commented Dec 29, 2022

Sure I can drop it from the CI matrix but thought it would make sense to keep it around to prevent regressions (like done for MRI with older Rubies). It's for Addressable sporkmonger/addressable#487 (comment)

@eregon
Copy link
Member

eregon commented Dec 29, 2022

For TruffleRuby, currently it's only really meaningful to test against the latest truffleruby release (with truffleruby), and against truffleruby-head (dev builds) if that's an option, no need to test older releases, because currently only the latest TruffleRuby release is supported.

@eregon
Copy link
Member

eregon commented Dec 30, 2022

It should be fixed now.
I still need to document which releases are supported: oracle/truffleruby#2816

dentarg added a commit to sporkmonger/addressable that referenced this issue Dec 30, 2022
@dentarg
Copy link
Author

dentarg commented Dec 30, 2022

It should be fixed now.

It is not: https://github.com/sporkmonger/addressable/actions/runs/3807648060/jobs/6477530991#step:6:14

If I read your change correctly it made truffleruby-21.3 report as 2.7 but that still uses bundler 2.4

setup-ruby/bundler.js

Lines 123 to 134 in ad718fa

const targetRubyVersion = common.targetRubyVersion(engine, rubyVersion)
// Use Bundler 2.3 when we use Ruby 2.3.2 - 2.5
// Use Bundler 2.4 when we use Ruby 2.6-2.7
if (bundlerVersion == '2') {
if (targetRubyVersion <= 2.5) { // < 2.3.2 already handled above
console.log('Ruby 2.3.2 - 2.5 only works with Bundler 2.3')
bundlerVersion = '2.3'
} else if (targetRubyVersion <= 2.7) {
console.log('Ruby 2.6-2.7 only works with Bundler 2.4')
bundlerVersion = '2.4'
}
}

@eregon
Copy link
Member

eregon commented Dec 30, 2022

Thank you for checking.
Right, it makes sense actually, 21.3 does target Ruby 2.7.4, and Bundler 2.4 requires Ruby 2.7+.
So it's a separate issue from #422.
Basically it's an old patch that doesn't work in TruffleRuby 21.3.

I don't want to workaround bugs of such an old TruffleRuby release in setup-ruby, please replace those old truffleruby versions with the latest truffleruby release in CI (or just remove it if latest is already tested).

@eregon eregon closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2022
dentarg added a commit to sporkmonger/addressable that referenced this issue Dec 30, 2022
It is not a supported release anymore, and it does not work with latest bundler (2.4): ruby/setup-ruby#433 (comment)

Close #489
dentarg added a commit to sporkmonger/addressable that referenced this issue Jan 3, 2023
It is not a supported release anymore, and it does not work with latest bundler (2.4): ruby/setup-ruby#433 (comment)

Close #489
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants