Skip to content

Conversation

koic
Copy link
Member

@koic koic commented Jun 6, 2025

This PR fixes an error when using Parser gem with prism_result. https://github.com/rubocop/rubocop/actions/runs/15497886582/job/43638843391?pr=14251

Since Ruby LSP 0.24 or later, prism_result is now passed as a Prism::ParseLexResult. As a result, the following build error occurs in RuboCop for the Ruby LSP add-on.

The processing that uses prism_result assumes Prism and cannot be performed when using the Parser gem.

This PR fixes an error when using Parser gem with `prism_result`.
https://github.com/rubocop/rubocop/actions/runs/15497886582/job/43638843391?pr=14251

Since Ruby LSP 0.24 or later, `prism_result` is now passed as a `Prism::ParseLexResult`.
As a result, the following build error occurs in RuboCop for the Ruby LSP add-on.

The processing that uses `prism_result` assumes Prism and cannot be performed when using the Parser gem.
koic added a commit to koic/rubocop that referenced this pull request Jun 6, 2025
… 0.24

This PR is a workaround to avoid the following build error in the Ruby LSP add-on test with Ruby LSP 0.24.
https://github.com/rubocop/rubocop/actions/runs/15497886582/job/43638843391?pr=14251

The build error will be resolved in rubocop/rubocop-ast#382.
@marcandre marcandre merged commit 8cf49c7 into rubocop:master Jun 8, 2025
22 checks passed
@koic koic deleted the fix_an_error_when_using_parser_gem_with_prism_result branch June 8, 2025 16:28
@marcandre
Copy link
Contributor

Thanks! Released as 1.45.1

koic added a commit to koic/rubocop that referenced this pull request Jun 12, 2025
Follow-up to rubocop/rubocop-ast#382.

This PR fixes the following build error on when using Parser gem with `prism_result` and Ruby LSP >= 0.24.
https://github.com/rubocop/rubocop/actions/runs/15497886582/job/43638843391?pr=14251
bbatsov pushed a commit to rubocop/rubocop that referenced this pull request Jun 12, 2025
Follow-up to rubocop/rubocop-ast#382.

This PR fixes the following build error on when using Parser gem with `prism_result` and Ruby LSP >= 0.24.
https://github.com/rubocop/rubocop/actions/runs/15497886582/job/43638843391?pr=14251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants