ruby-debug / debase

BSD 2-Clause "Simplified" License
209 stars 32 forks source link

Skip debase extconf.rb on non-CRuby #106

Closed eregon closed 8 months ago

eregon commented 11 months ago

Related: https://github.com/ruby-debug/ruby-debug-ide/pull/240

eregon commented 9 months ago

Ping, I'd like to merge this.

eregon commented 8 months ago

@hurricup Could you merge this? See for instance https://github.com/oracle/truffleruby/issues/3359, that needs both ruby-debug-ide and debase to no-op on TruffleRuby and other non-CRuby.

hurricup commented 8 months ago

I'm sorry, I still don't understand what are you trying to achieve? This gem is not intended to be used with truffleruby as well as ruby-debug-ide.

eregon commented 8 months ago

what are you trying to achieve?

To let the gem install fine on truffleruby, so there is no need to tweak the Gemfile. In some cases it is (AFAIK) not possible to tweak the Gemfile, we had such a case internally at Oracle: Suppose there is a gem my-dev-tools that depend on ruby-debug-ide (but not only, also other gems which do work on truffleruby) and that's part of the Gemfile. There is no solution there, because removing my-dev-tools would remove too much and break the app/tests. Using something like gem 'debase', platforms: :mri does not work. The only solution is to let ruby-debug-ide (and its dependencies as known by RubyGems, so that's debase) install fine on TruffleRuby and noop at runtime.

It's a fairly common practice to let gems install on TruffleRuby/JRuby/etc even when they are not supported, so at least they don't break bundle install. Some examples are stackprof, bootsnap, etc.