Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Mar 5, 2025

Token combination now creates a new token instead of mutating the last token in the group of combined tokens.

This was causing problems because the combined token would be reflected back to the original list of "raw tokens" returned by DelphiFile::getTokens, resulting in overlapping tokens being reported to the sonar API.

The mutability of the raw tokens is a point of brittleness that we could address, but it would have significant performance implications because it would involve constructing a copy of every token in every file.

Token combination now creates a new token instead of mutating the last
token in the group of combined tokens.

This was causing problems because the combined token would be reflected
back to the original list of "raw tokens" returned by
`DelphiFile::getTokens`, resulting in overlapping tokens being reported
to the sonar API.

The mutability of the raw tokens is a point of brittleness that we could
address, but it would have significant performance implications because
it would involve constructing a copy of every token in every file.
@cirras cirras requested a review from fourls March 5, 2025 02:00
@fourls
Copy link
Collaborator

fourls commented Mar 5, 2025

Stretching my terminal window to its limits...
image

Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good! Confirmed that this fixes the errors and that a test scan looks back to normal.

@fourls fourls merged commit 702c9d2 into master Mar 5, 2025
3 checks passed
@fourls fourls deleted the when_i_was_a_child_a_gte_token_broke_into_my_house_and_stole_my_gameboy_and_i_have_held_a_grudge_ever_since branch March 5, 2025 03:25
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.

3 participants