Skip to content

Update collect_references to use Prism::LexResult #3590

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

Merged
merged 1 commit into from
Jun 6, 2025
Merged

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jun 6, 2025

Motivation

In #3252, RubyDocument#parse_result becomes Prism::ParseLexResult, which's value is an array instead of a single node. And we forgot to update collect_references to account for this change because the codepath was not covered in the test.

So this commit adds a test for the codepath and updates collect_references to use Prism::LexResult.

Implementation

Automated Tests

Manual Tests

In #3252, `RubyDocument#parse_result` becomes `Prism::ParseLexResult`,
which's `value` is an array instead of a single node.
And we forgot to update `collect_references` to account for this change
because the codepath was not covered in the test.

So this commit adds a test for the codepath and updates `collect_references`
to use `Prism::LexResult`.
@st0012 st0012 requested a review from a team as a code owner June 6, 2025 20:54
@st0012 st0012 added the bugfix This PR will fix an existing bug label Jun 6, 2025
Copy link

graphite-app bot commented Jun 6, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@st0012 st0012 added the server This pull request should be included in the server gem's release notes label Jun 6, 2025
Copy link
Contributor

@alexcrocha alexcrocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

@st0012 st0012 merged commit 4538672 into main Jun 6, 2025
81 of 87 checks passed
@st0012 st0012 deleted the followup-on-3252 branch June 6, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants