You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Could you include [Feature #19741] in the message of one (or all) of the commits? We could squash them and add it there, but I assume you prefer keeping the commit history.
This PR accomplishes the following
In terms of features added to CRuby, are the following features what this PR is adding?
yarp standard library (not gemified)
yarp.rb: for require "yarp", YARP's Ruby API
yarp.so: for require "yarp.so", the actual parser implementation used by yarp.rb internally
Are the both files upgradable by installing yarp.gem? My general understanding is that it would require the standard library to be gemified, but I wonder there's any trick that you used inside ruby_init_ext or somewhere.
Also, since it's not clarified in https://bugs.ruby-lang.org/issues/19741, could we clarify the next steps that you're going to work on before Ruby 3.3 release? In particular, I'm interested in whether you plan to do the following stuff or not:
Auto-generate files in the Ruby build process instead of on sync_default_gems
Add a way to optionally switch the parser of the interpreter from parse.y to YARP
Provide C API in the interpreter that can be used by other C extension gems
Or is YARP supposed to be used as a C code in third-party extensions?
(I'm not requesting them for 3.3 but just curious about the timeline)
The default gems sync script now includes YARP, found in the
ruby/yarp repo. This script primarily syncs over the src, test, lib
directories. It also migrates all encoding files to be prefixed
with `yp_` in order to deconflict from existing encoding files.
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:
* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp
In terms of features added to CRuby, are the following features what this PR is adding?
yarp standard library (not gemified)
yarp.rb: for require "yarp", YARP's Ruby API
yarp.so: for require "yarp.so", the actual parser implementation used by yarp.rb internally
Yes!
Are the both files upgradable by installing yarp.gem? My general understanding is that it would require the standard library to be gemified, but I wonder there's any trick that you used inside ruby_init_ext or somewhere.
We haven't looked into this in detail yet, but we'd like to enable upgrading of yarp.gem independent of the Ruby release schedule. We will figure this out before the Ruby 3.3 release.
Also, since it's not clarified in https://bugs.ruby-lang.org/issues/19741, could we clarify the next steps that you're going to work on before Ruby 3.3 release? In particular, I'm interested in whether you plan to do the following stuff or not:
Auto-generate files in the Ruby build process instead of on sync_default_gems
Yes, we will do this after merging this PR!
Add a way to optionally switch the parser of the interpreter from parse.y to YARP
Yes, this will require more work to integrate YARP's AST with the compiler. I plan to work on this after merging this PR.
Provide C API in the interpreter that can be used by other C extension gems
Or is YARP supposed to be used as a C code in third-party extensions?
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR accomplishes the following:
tool/sync_default_gems.rb
sync script