https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112022-04-22T01:51:16ZRuby Issue Tracking SystemRuby master - Feature #18642: Named ripper fieldshttps://bugs.ruby-lang.org/issues/18642?journal_id=973882022-04-22T01:51:16Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>We discussed this ticket at the dev meeting, but no conclusion has been reached. Here is a list of comments:</p>
<ul>
<li>It is a pure Ruby library. Why not gem? We need a good reason to merge it to the package.</li>
<li>It is huge and therefore difficult to maintain. Can't we (semi-)automatically generate the code from parse.y?</li>
<li>We don't guarantee the compatibility of AST between Ruby versions. This library could mislead users into thinking it guarantees comatibility.</li>
</ul> Ruby master - Feature #18642: Named ripper fieldshttps://bugs.ruby-lang.org/issues/18642?journal_id=975682022-05-12T13:37:41Zkddnewton (Kevin Newton)kddnewton@gmail.com
<ul></ul><p>To respond to your points <a class="user active user-mention" href="https://bugs.ruby-lang.org/users/18">@mame (Yusuke Endoh)</a>:</p>
<ul>
<li>It can live in a gem, and it is in <a href="https://github.com/ruby-syntax-tree/syntax_tree" class="external">https://github.com/ruby-syntax-tree/syntax_tree</a>. The issue is, it's hard to maintain completely outside the ruby/ruby repository because if things change it's hard to catch. I believe this was the same reason ripper got merged in in the first place, to keep up with upstream.</li>
<li>I think maintaining code generation from parse.y is a lot harder than maintaining these classes. The classes themselves are basically just structs. Code generation is error-prone and would be very hard to debug. I tried many times to generate it from parse.y, and there were always so many edge cases.</li>
<li>It's totally fine to not guarantee compatibility of the AST. That's the nice thing about these objects, is that they can wrap up incompatibility. For example, recently when block forwarding got merged, it was simply a matter of changing how the <code>Params</code> class was being built. By having this object layer in front, we don't have to worry about incompatibility so much.</li>
</ul> Ruby master - Feature #18642: Named ripper fieldshttps://bugs.ruby-lang.org/issues/18642?journal_id=1041182023-08-09T13:19:57Zkddnewton (Kevin Newton)kddnewton@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul>