Repository navigation
fix(native): preserve final demangled symbol whitespace - #681
Closed
rudycelekli wants to merge 1 commit into
Closed
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: RudyCelekli <[email protected]>
morluto
approved these changes
Oct 6, 2026
morluto
left a comment
Owner
There was a problem hiding this comment.
Approve: strip only the final line terminator instead of trimEnd so trailing space/tab on the final demangled symbol is preserved; strict count check retained. Co-located tests cover trailing space/tab/lone-space + CRLF ordering. Checks green.
Owner
|
Superseded by #705, which cherry-picks this change (plus 13 sibling fixes) onto current main with conflict resolution and regenerated catalogs. Closing to keep one reviewable merge unit. |
Owner
|
Thanks, @rudycelekli, for your work on “fix(native): preserve final demangled symbol whitespace.” I appreciate your contribution to REA. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Swift demangler parser calls
trimEnd()on the whole utility output before splitting rows. This removes legitimate trailing spaces or tabs from the final unchanged symbol. A final symbol consisting of a space loses its row entirely and the native operation fails with an output-count mismatch.Change
Remove only the utility's final line terminator, preserving each symbol's content and input ordering. Retain CRLF support and existing invalid/unchanged classifications.
Verification
xcrun swift-demangle --compactpreserves the ordinary trailing space, tab and single-space symbols. The publicNativeMacOSProviderdemangle operation fails with the count mismatch before the fix and returns all four ordered rows after it, including the genuine Swift mangled control.npm run checktasks pass using Node 24.18.0 and locked dependencies.This proves the Swift utility/parser boundary on this host. It does not claim target execution, Ghidra or Hopper verification.
AI assistance was used for investigation, implementation, tests and this description. The patch was independently reviewed, tested and submitted by the contributor; native proof and limitations are stated above.