Project

General

Profile

Actions

バグ #1606

closed

YJITが有効になっていないRubyでmikutterが起動しない

Added by Akira Ouchi about 1 year ago. Updated about 1 month ago.

Status:
終了
Priority:
通常
Assignee:
Target version:
プラグイン名:
ブランチ:
クラッシュする:
No

Description

YJITが有効になっていないRubyでは、以下の行でエラーとなってmikutterが起動できなくなります。
Rust環境がないPCで、rbenv等を使用してビルドされたRuby環境がおもに該当します。

--- a/mikutter.rb
+++ b/mikutter.rb
@@ -61,7 +61,7 @@ Plugin.call(:boot, nil)
 # _profile_ がtrueなら、プロファイリングした結果を一時ディレクトリに保存する
 def boot!(profile)
   begin
-    RubyVM::YJIT.enable if RUBY_VERSION.split('.') >= %w[3 3]
+    #RubyVM::YJIT.enable if RUBY_VERSION.split('.') >= %w[3 3]
     if profile
       require 'ruby-prof'
       begin

以下はしばふの解析です。

https://ertona.net/@shibafu528/114242983598722984
https://ertona.net/@shibafu528/114242985389869403
https://ertona.net/@shibafu528/114242988422991960


Files

Actions #1

Updated by Izumi Tsutsui about 1 month ago

https://x.com/ebijun/status/2036635798108504254

NetBSD/earmv7hf mikutter rubyのYJIT 定義があったらenableするようにすると起動する。

pkgsrc-2026Q1 でやっと Ruby 3.3 がデフォルトになって NetBSD/i386 でも同じ現象で自分でも試しましたが
添付のパッチ 0001-Ruby-YJIT-YJIT.enable-refs-1606.patch で起動はしました。
ebijun さんの diff に対してなんとなく Ruby バージョンのチェックを先にしています。

Actions #2

Updated by toshi_a 初音 about 1 month ago

  • Status changed from パッチ適用待ち to レビュー待ち
  • Assignee set to Izumi Tsutsui
  • ブランチ set to topic/1606-yjit

修正しました。
ただし、YJIT定数が前のRubyバージョンでは定義されてるはずがないこと、mikutter 5.2でRuby3.3未満のサポートを切ることからバージョン判定は取り除いています

Actions #3

Updated by Izumi Tsutsui about 1 month ago

  • Status changed from レビュー待ち to マージ待ち
  • 再現手順 updated (diff)
Actions #4

Updated by Izumi Tsutsui about 1 month ago

  • 再現手順 updated (diff)

記入する場所を間違えるておくれになった……

超アバウトに NetBSD/i386 11.0_RC3 + pkgsrc-2026Q1 (なので bundler は無し)で
mikutter develop + topic/1290-pango-emoji-height + topic/1606-yjit + topic/1609-ruby4 + addressable 2.9.0 + ruby-gnome 4.3.6
という全部入りで起動テストしてOKです

Actions #5

Updated by toshi_a 初音 about 1 month ago

  • Status changed from マージ待ち to 終了

merged

Actions

Also available in: Atom PDF