From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2022-12-21T21:18:55+00:00 Subject: [ruby-core:111369] [Ruby master Misc#19250] The require path of MJIT Issue #19250 has been reported by k0kubun (Takashi Kokubun). ---------------------------------------- Misc #19250: The require path of MJIT https://bugs.ruby-lang.org/issues/19250 * Author: k0kubun (Takashi Kokubun) * Status: Open * Priority: Normal ---------------------------------------- ## Background Since Ruby 3.2, MJIT is written in Ruby [Misc #18968]. We made it a `require`-able library instead of a builtin/prebuilt ISeq so that it will never be an extra overhead when MJIT is disabled. It's loaded with `require "mjit/compiler"` on prelude when --mjit is given. However, while it's technically a "standard library", we don't mean to maintain its backward compatibility. To make it clear, it's implemented as `RubyVM::MJIT::Compiler`, implying that it's CRuby-specific by prefixing `RubyVM::`, and make every constant under `RubyVM::MJIT` a private constant. Even if users manually require it, the interface is private. ## Discussion For consistency with the constant name `RubyVM::MJIT::Compiler` and to make it even clearer that we don't guarantee backward compatibility, @ko1 suggested to change `require "mjit/compiler"` to `require "ruby_vm/mjit/compiler"`. I'm fine with both ways, so I'll do so after confirming that with @matz. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/