From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2024-02-14T01:56:46+00:00 Subject: [ruby-core:116723] [Ruby master Misc#20238] Use prism for mk_builtin_loader.rb Issue #20238 has been updated by k0kubun (Takashi Kokubun). > install a couple extra packages for rubyci.org machines Note that RubyCI doesn't have this problem. On RubyCI servers, which are provisioned by [ruby-infra-recipe](https://github.com/ruby/ruby-infra-recipe), we build Ruby 3.2.3 using ruby-build (from a tarball) and use it as a BASERUBY. > Using prism in source code > Another idea is making small C tool using prism It looks like we're converging on using Prism in the source code instead of installing one from rubygems.org, whether we use it as prism.gem or C code. It would obviate Bundler and allow using the latest syntax without releasing prism.gem, so there's a benefit in doing so. I think the question is: Do CRuby developers (want to) use a BASERUBY that _cannot_ build a C extension? If the answer is yes, we'd be forced to use Prism as a C library, serializing Ruby AST using C code. If not, it leaves an option to use prism.gem built from the source code. ---------------------------------------- Misc #20238: Use prism for mk_builtin_loader.rb https://bugs.ruby-lang.org/issues/20238#change-106740 * Author: kddnewton (Kevin Newton) * Status: Open * Priority: Normal ---------------------------------------- I would like to propose that we use prism for mk_builtin_loader.rb. Right now the Ruby syntax that you can use in builtin classes is restricted to the base Ruby version (2.7). This means you can't use a lot of the nicer syntax that Ruby has shipped in the last couple of years. If we switch to using prism to parse the builtin files instead of using ripper, then we can always use the latest version of Ruby syntax. A pull request for this is here: https://github.com/kddnewton/ruby/pull/65. The approach for the PR is taken from how RJIT bindgen works. -- 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/