Repository navigation
fix(scripts): preserve literal hashes in metadata - #962
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
Preserve literal
#characters inside custom-script TOML metadata.ScriptFile::newcurrently removes every hash from each metadata line, changing a tag such asC#intoCand removing URL fragments or literal arguments fromcall_format.Remove only the leading comment marker and surrounding whitespace. The existing TOML parser continues to interpret the resulting metadata.
Verification
The maintained test invokes the actual script metadata parser on a temporary text fixture. It fails on the original parser and passes with this change, checking both the tag and the complete command-format string. It never executes the fixture, scans ports, resolves a hostname or launches an external command.
Full native checks passed: 69 library tests, 6 binary tests, 2 integration tests and 8 doctests; one existing doctest is ignored. Both clippy checks with denied warnings, formatting and the documented documentation build pass. Tested on macOS arm64/Rust 1.90 with scoped Xcode SDK 26.4 after correcting a host SDK linker mismatch. Hosted CI is pending.
Checked all 642 historical/current PRs and refreshed the seven current open PRs; no overlapping parser correction was found. Prepared with AI assistance under the account owner's direction and independently reviewed. No merge or deployment performed.