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

Bundler attempts to install gems specified with platforms: :mri on TruffleRuby (and maybe jruby too) #6333

Open
rickhull opened this issue Feb 1, 2023 · 1 comment
Labels

Comments

@rickhull
Copy link

rickhull commented Feb 1, 2023

Describe the problem as clearly as you can

Gemfile has:

gem 'fiber_scheduler', platforms: :mri

On TruffleRuby (RUBY_VERSION 3.0.3), bundler 2.4.6 attempts to install fiber_scheduler gem. Ultimately this fails, as fiber_scheduler requires RUBY_VERSION >= 3.1.0

However, bundler should not even attempt to install a gem specified with platforms: :mri on TruffleRuby. Per https://bundler.io/v2.4/man/gemfile.5.html#PLATFORMS

See here: https://github.com/rickhull/miner_mover/actions/runs/4067260405/jobs/7004396321#step:6:9

Run bundle install
  bundle install
  shell: /usr/bin/bash -e {0}
Fetching gem metadata from https://rubygems.org/.......
Resolving dependencies...
Could not find compatible versions

Because every version of fiber_scheduler depends on Ruby >= 3.1.0
  and Gemfile depends on fiber_scheduler >= 0,
  Ruby >= 3.1.0 is required.
So, because current Ruby version is = 3.0.3,
  version solving has failed.
Error: Process completed with exit code 6.

Did you try upgrading rubygems & bundler?

Yes. See here: https://github.com/rickhull/miner_mover/actions/runs/4067260405/jobs/7004396321#step:5:10

Post steps to reproduce the problem

Create Gemfile:

source 'https://rubygems.org/'
gem 'fiber_scheduler', platforms: :mri

On TruffleRuby 3.0.3, after updating RubyGems and Bundler, run: bundle install

Which command did you run?

bundle install

What were you expecting to happen?

gem install fiber_scheduler should not be attempted

What actually happened?

bundler attempted to install fiber_scheduler gem on TruffleRuby

@eregon
Copy link
Contributor

eregon commented Feb 6, 2023

@deivid-rodriguez Could you triage this issue?

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

No branches or pull requests

2 participants