Repository navigation
build(labels): bump demangle to 0.6.0, take #383 review nits - #387
Merged
danielplohmann merged 3 commits intoOct 14, 2026
Merged
Conversation
… nits 0.6.0 keeps entry points behind load_plugins() and returns the same output as 0.5.1 for all 20,430 names the test suite passes it. The pin comment notes that a host calling load_plugins() or register_language() itself can still replace a scheme. The CHANGELOG entry names the four modules again, restores the native-build baseline for the cost figure and links danielplohmann#379 and danielplohmann#383.
danielplohmann
requested changes
Oct 14, 2026
danielplohmann
left a comment
Owner
There was a problem hiding this comment.
The bump itself is fine. I diffed the 0.5.1, 0.5.2 and 0.6.0 wheels. Entry points are still read only in load_plugins(). There are no new dependencies and no subprocess or network calls. On smda's inputs:
- Fixtures: 8,282 function labels from 46 analysed fixtures, 0 changed.
- Replay: all 22,321 distinct (scheme, name) pairs from two suite runs plus the fixtures give the same result on both versions.
- Fuzzing: about 8,950 mutated and pathological names, with no crash or timeout. The slowest name drops from 0.22 s to 0.033 s.
What needs changing is how the bump is described, because 0.6.0 does change labels, just not on our fixtures:
- Itanium and Swift (0.5.2): source-name lengths count UTF-8 bytes instead of characters.
_ZN4main5caféEnow reads asmain::caféwhere it was refused,_Z4cafévis now refused, and$s4main5caféV1fyyFreads asmain.café.f() -> ()instead of garbage. That's correct, since GCC/Clang mangle byte lengths, but non-ASCII C++/Swift names get new labels. - MSVC ARM64e
__ptrauth(0.6.0): new grammar; these names used to be refused. - Swift
~Deinitableis now rendered by name. - Rust: bounds checks and a faster path for oversized lengths, with no output difference found.
- MSVC
operator<=>: no change._DOUBLE_UNDERSCORE_OPERATORSis identical in 0.5.1 and 0.6.0, so please drop that from the description.
So:
- CHANGELOG: please restore #379's bullet (pin aside) and give this bump its own
(labels)bullet, under Changed or Compatibility since labels move on binaries with non-ASCII or ARM64e names. Name the changes above and the measurement: "8,282 fixture labels, 0 changed, reproduced by reviewer; no fixture name is non-ASCII". As written, #379's "every Itanium, MSVC and Rust label is unchanged" was measured on 0.5.0 and no longer holds. Please also drop the 20,430: Hypothesis draws new names every run (19,014 and 19,015 on two runs, 15,709 shared), so the count can't be reproduced. Then link(#387). - Pin comment (
pyproject.toml): a replacing plugin that parses would silently change labels, not leave them mangled. Something like "can replace a built-in scheme and change or drop Itanium, MSVC and Swift labels without an error".
Upstream nits, not for this PR: __ptrauth data symbols render without a space before the name (int *__ptrauth(2, 3, 1)p), and ptrauthNumber accepts any number of nibbles and wraps at 64 bits.
With the CHANGELOG fixed, this can go into 4.10.0.
0.6.0 moves labels on non-ASCII Itanium and Swift names and on ARM64e MSVC names, none of which the fixtures contain. The danielplohmann#379 entry goes back to describing the 0.5.1 pin it was measured on, and the bump gets its own bullet naming those changes. The pin comment now says a replacing plugin can change labels, not only leave them mangled.
danielplohmann
approved these changes
Oct 14, 2026
danielplohmann
left a comment
Owner
There was a problem hiding this comment.
Changelog, pin comment and the separate 0.6.0 entry all read right now. Approving for 4.10.0.
Merged
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.
Follow-up to #383, which merged before these were pushed.
Before: smda pins
demangle==0.5.1. The pin comment does not say what a host application in the same process can still do, and the #379 CHANGELOG entry has no PR links, a vaguer module reference and a cost figure without its baseline.After: smda pins
demangle==0.6.0. The pin comment notes that a host callingload_plugins()orregister_language()can still replace a built-in scheme, leaving Itanium, MSVC and Swift names mangled without an error. The CHANGELOG entry links(#379, #383), names the four modules, and states the cost against the native build, marked as measured on 0.5.0.0.6.0 does change
schemes/(MSVCoperator<=>, ARM64e qualifiers, Swift~Deinitable, and the 0.5.2 bounds fixes for oversized Rust lengths and non-ASCII Swift identifiers). Every name the test suite passes to demangle, 20,430 of them, gives the same output and the same exceptions on 0.5.1 and 0.6.0. Entry points are still read only inload_plugins(),testDemangleSchemespasses, and there are no new dependencies.Full suite: 2,244 passed, 2 skipped. ruff, ruff format and ty are clean.