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

Renaming the module from RubyVM::DebugInspector to DebugInspector (required for TruffleRuby support) #36

Closed
eregon opened this issue Jun 11, 2022 · 0 comments · Fixed by #37

Comments

@eregon
Copy link
Collaborator

eregon commented Jun 11, 2022

TruffleRuby implements the debug_inspector C API since a few releases.
So it should be easy to get this gem working on TruffleRuby.

However, there is one big issue, this gem defines RubyVM::DebugInspector and not DebugInspector.
RubyVM should really never be defined on any Ruby but CRuby, otherwise various other gems fail as they assume that if RubyVM is defined then CRuby-specific APIs under RubyVM are defined too:
https://github.com/search?q=defined%3F%28RubyVM%29&type=code
https://cs.github.com/?q=defined%3F%28RubyVM%29
For example, there is lots of code like this:

    if defined?(RubyVM)
      RubyVM::InstructionSequence...

From #35

So, could this gem define top-level DebugInspector?
It could still define RubyVM::DebugInspector on CRuby (or if defined?(RubyVM)) for compatibility.
I think it's be best to use deprecate_constant though so usages of RubyVM::DebugInspector get replaced by DebugInspector.

cc @bjfish

eregon added a commit to eregon/debug_inspector that referenced this issue Jan 24, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Jan 24, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Jan 24, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Jan 24, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Jan 24, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Dec 4, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Dec 4, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Dec 4, 2023
eregon added a commit to eregon/debug_inspector that referenced this issue Dec 4, 2023
@eregon eregon closed this as completed in #37 Dec 4, 2023
eregon added a commit that referenced this issue Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant