https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112018-02-11T00:44:24ZRuby Issue Tracking SystemRuby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=702912018-02-11T00:44:24Zshevegen (Robert A. Heiler)shevegen@gmail.com
<ul></ul><p>I somewhat agree with the general notion of the suggestion. I am not<br>
entirely sure whether it should also be added to the ruby version<br>
string, but I also have no problem with it either, so I am fine either<br>
way.</p>
<p>For benchmarks, it may be useful to automatically add the information<br>
whether mjit is enabled or not, but to also provide means to disable<br>
that extra information when a ruby user wants to do so. Your suggestion<br>
to do so not by default but via -v is also fine (in this case it would<br>
mean that, if we omit "-v" there, we'd not get the information that<br>
mjit is used, in benchmarks; correct me if I am wrong please, I just<br>
want to define some of the behaviour).</p>
<p>Considering that mjit will be an important addition in 2018, the more<br>
information and documentation that exists with it, the better, in my<br>
opinion - perhaps even have a subsection on the official docs that<br>
refer specifically to mjit and what it is doing (does not have to be<br>
long, just a little page for people to get a headstart about mjit,<br>
when they never heard about it before; not everyone follows all<br>
changes or watches every video on ruby conferences :) ).</p> Ruby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=702922018-02-11T03:53:48Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<ul></ul><p>I assume that it helps to distinguish causes of bugs too, so I'm in favor of it.</p> Ruby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=702942018-02-11T12:54:02ZEregon (Benoit Daloze)
<ul></ul><p>I think this makes sense and makes it easier to distinguish for benchmarks/tests/bug reports/etc.</p>
<p>I think the +JIT should be part of RUBY_DESCRIPTION for consistency.<br>
But that seems a bit tricky, could you take a look at it, <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/10073">@k0kubun (Takashi Kokubun)</a>?</p> Ruby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=704602018-02-20T05:53:23Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>I agree with adding <code>+JIT</code>.</p>
<p>Matz.</p> Ruby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=704632018-02-20T06:18:28Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<ul><li><strong>Assignee</strong> set to <i>k0kubun (Takashi Kokubun)</i></li></ul> Ruby master - Feature #14462: MJIT enabled should be displayed in the version stringhttps://bugs.ruby-lang.org/issues/14462?journal_id=705982018-02-22T14:53:21Zk0kubun (Takashi Kokubun)takashikkbn@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r62530.</p>
<hr>
<p>version.c: show +JIT when --jit is passed</p>
<p>in version output.<br>
version.h: ditto<br>
ruby.c: propagate option for it<br>
common.mk: updated dependency for version.c</p>
<p>mjit.c: overwrites the RUBY_DESCRIPTION to have +JIT when --jit is passed</p>
<p>test/ruby/test_rubyoptions.rb: add test for them</p>
<p>Only <code>ruby --jit -v</code> will have "+JIT", but this is intentional.<br>
This may not be convenient for debugging by ticket with <code>ruby -v</code>,<br>
but it's convenient for benchmark tools that pass options (--jit)<br>
when showing it. At least such behavior is planned for benchmark_driver.gem<br>
and this behavior is designed for it. Other benchmark tools are<br>
recommended to follow the behavior too if they show version.<br>
RUBY_DESCRIPTION might be useful for it too.</p>
<p>The position of "+JIT" is changed from original proposal because other<br>
platforms like JRuby and TruffleRuby end it with archtecture.<br>
It's made similar to JRuby, but it's upper-cased because Matz made approval<br>
for "+JIT" in the ticket.</p>
<p>Example:<br>
$ ruby -v<br>
ruby 2.6.0dev (2018-02-22 trunk 62529) [x86_64-linux]<br>
$ ruby --jit -v<br>
ruby 2.6.0dev (2018-02-22 trunk 62529) +JIT [x86_64-linux]</p>
<p>After --jit is made default in the future, this output may be removed.<br>
So do not rely on this output if possible.</p>
<p>[Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: MJIT enabled should be displayed in the version string (Closed)" href="https://bugs.ruby-lang.org/issues/14462">#14462</a>]</p>