Skip to content
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

Fix Ruby 3.4 #739

Merged
merged 8 commits into from
Jan 18, 2025
Merged

Fix Ruby 3.4 #739

merged 8 commits into from
Jan 18, 2025

Conversation

castwide
Copy link
Owner

This PR addresses several issues that arose in Ruby 3.4, including #738.

Smaller changes:

  • CoreMap includes the stdlib (the source of the stringio error)
  • RbsMap correctly handles the UntypedFunction type
  • Miscellaneous changes to accommodate incompatible changes to the RubyVM AST (which kind of don't matter anymore; see below)

The big change is that the parser stops using RubyVM::AbstractSyntaxTree altogether.

Solargraph originally started using the RubyVM parser for performance reasons. The "legacy" whitequark parser remained as a fallback for earlier Ruby versions. Supporting both in perpetuity was likely to be untenable for a variety of reasons, and the instability of RubyVM (which is still marked experimental) makes whitequark the more practical choice.

For now, the RubyVM version of Solargraph::Parser is still in the codebase, but I expect to remove it and its related cruft in the near future.

@castwide castwide self-assigned this Jan 15, 2025
@castwide castwide merged commit eb60776 into master Jan 18, 2025
6 checks passed
lekemula added a commit to lekemula/solargraph-rspec that referenced this pull request Jan 26, 2025
castwide/solargraph#739 disables RubyVM parser
due to ruby 3.4 changes.

Hence we need to reparse spec files. This mitigates the issue however
seems like long term solution will be replacing it with parser gem
altogether.
lekemula added a commit to lekemula/solargraph-rspec that referenced this pull request Jan 26, 2025
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.

1 participant