-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import tests for ruby27 parser and add a few features #3226
Conversation
@@ -52,7 +52,7 @@ unique_ptr<Node> Parser::run(sorbet::core::GlobalState &gs, core::FileRef file, | |||
std::vector<std::string> initialLocals) { | |||
Builder builder(gs, file); | |||
auto source = file.data(gs).source(); | |||
ruby_parser::typedruby25 driver(string(source.begin(), source.end()), Builder::interface); | |||
ruby_parser::typedruby27 driver(string(source.begin(), source.end()), Builder::interface); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5c09eb3
to
83aedfe
Compare
@@ -14,8 +14,8 @@ | |||
set -euo pipefail | |||
set -x | |||
|
|||
REF=2a705681cfe339261b69b03593d008cb2c4eff35 | |||
TARGET_RUBY_VERSION="2.6" | |||
REF=b328d5f4d38e5347feb91aa9e55157c858b07cc6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might change again later if more tests are added regarding 2.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I didn't commit all the tests imported right away. I'll add them in subsequent pull-requests for each new feature.
@@ -52,6 +52,7 @@ bundle exec racc --superclass=Parser::Base lib/parser/ruby24.y -o lib/parser/rub | |||
bundle exec racc --superclass=Parser::Base lib/parser/ruby25.y -o lib/parser/ruby25.rb --no-line-convert | |||
bundle exec racc --superclass=Parser::Base lib/parser/ruby26.y -o lib/parser/ruby26.rb --no-line-convert | |||
bundle exec racc --superclass=Parser::Base lib/parser/ruby27.y -o lib/parser/ruby27.rb --no-line-convert | |||
bundle exec racc --superclass=Parser::Base lib/parser/ruby28.y -o lib/parser/ruby28.rb --no-line-convert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like ruby27 was needed to build ruby26, we need to add ruby28.
0466adc
to
e04d912
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, need to test on our repo before landing
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build result here: |
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
This commit tracks upstream commit ruby/ruby@9cbb4dd. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
This commit tracks upstream commit ruby/ruby@7006fde. Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
e04d912
to
e59bc5c
Compare
We have a policy of testing changes to Sorbet against Stripe's codebase before Stripe employees can see the build result here: |
I had to rebase in top of master, but this now successfully passed Sorbet's and Stripe's builds |
Thank you both! Excited to have this land |
This pull-request prepares the work for the 2.7 update and also add a few independent features.
import_whitequark
script to 2.7dsym
as a string (no changes to the output)This PR may be read commit by commit for an easier review.
I'll submit subsequent PRs with each feature and the related tests imported with the script.
Test plan
See included automated tests.