-
Notifications
You must be signed in to change notification settings - Fork 32
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
Skip debase extconf.rb on non-CRuby #106
Conversation
* Otherwise: ruby-debug-ide-VERSION/lib/ruby-debug-ide.rb:10:in `<top (required)>': uninitialized constant Debugger (NameError)
Ping, I'd like to merge this. |
@@ -1,5 +1,10 @@ | |||
if defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE | |||
require 'debase/rbx' | |||
elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This backend is not supposed to run with truffleruby
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's why this code is skipping it.
It's still valuable that the gem installs, otherwise e.g. ruby-debug-ide cannot be installed either and it leads to more workarounds in Gemfiles (and it's not always possible, e.g., if a gem depends on ruby-debug-ide
and that gem is in the Gemfile, and it cannot be skipped because it has other dependencies, which we found in some apps).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the changes in this file are problematic, I can remove them or redo them differently.
The most critical part is that the debase C extensions are not attempted to be compiled on non-CRuby (because that would just fail).
@hurricup Could you merge this? |
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. |
To let the gem install fine on truffleruby, so there is no need to tweak the Gemfile. 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 |
elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby' | ||
require "debase/version" | ||
|
||
Debugger = Module.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this is explained in the commit message: 06bdb3c
But maybe it's the wrong place to do this and instead we should change lib/ruby-debug-ide.rb to noop earlier.
Related: ruby-debug/ruby-debug-ide#240