-
Notifications
You must be signed in to change notification settings - Fork 3
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
ParseError with Ruby 3.3.x #81
Comments
Actually seems to be an upstream issue with Ruby 3.3.x and ❯ rbenv shell 3.2.4
❯ stree ast -e 'yield'
(program (statements ((yield nil))))
❯ rbenv shell 3.3.0
❯ stree ast -e 'yield'
Error: Invalid yield
> 1 | yield
| ^ |
Hmmm. Seems like it's actually upstream of
|
Aha! It's a known bug https://bugs.ruby-lang.org/issues/20186 See also ruby-formatter/rufo#319 |
Just realized I had notifications off, I just merge a version were I put a placeholder in place when parsing + formatting. Also discussed it with Jean Boussier from Shopify and created an issue with syntax_tree: |
This is similar to davidwessman/syntax_tree-erb#81 but for RuboCop The parser gem doesn't support these types of checks, see https://github.com/whitequark/parser?tab=readme-ov-file#syntax-check-of-block-exits While this is technically a bug in the parser gem, it does increase compatibility and allows prism to be used when linting erb or haml with a RuboCop extension.
This is similar to davidwessman/syntax_tree-erb#81 but for RuboCop The parser gem doesn't support these types of checks, see https://github.com/whitequark/parser?tab=readme-ov-file#syntax-check-of-block-exits While this is technically a bug in the parser gem, it does increase compatibility and allows prism to be used when linting erb or haml with a RuboCop extension. ruby/prism@6c59ae6a00
FYI |
Nice 🙂 |
Noticed that tests are failing with Ruby v3.3.0 and v3.3.1
Here is there error I get
I did a little digging and
syntax_tree-erb
v0.10.2 doesn't have the ParseError with Ruby 3.3.1 (but the layout test still fails for a difference in formatting). v0.10.3 through v0.11.0 all have the ParseErrorThe text was updated successfully, but these errors were encountered: