Repository navigation
Write the closing quote when appending a synthesized license field - #319
Merged
Merged
Conversation
devtechedge
added a commit
to devtechedge/oss-contributions
that referenced
this pull request
Sep 16, 2026
synthesize_manifest appended license = "<expression> without the closing quote, so the synthesized manifest was not valid TOML. Fixes #315
Jake-Shadle
force-pushed
the
synth-license-quote
branch
from
September 18, 2026 09:25
cfb2ac2 to
2fa45d3
Compare
Jake-Shadle
approved these changes
Sep 18, 2026
Contributor
Author
|
Appreciate the merge, @Jake-Shadle. This one was a small lesson in how the append path through synthesize_manifest differs from the whole-manifest branch, and why that missing closing quote broke the TOML. Happy the first unit test module in resolution.rs could lock it in. Thanks for keeping cargo-about in such good shape. |
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.
Fixes #315.
synthesize_manifesttakes the append path when a[package]table runs to the end of the manifest, with no blank line and no following table to insert before.That path wrote
license = "followed by the expression but never wrote the closing quote, so the synthesized manifest containedlicense = "MITand was not valid TOML.This writes the closing quote, matching the sibling branch that synthesizes an entire manifest, which already terminates the value.
The expression offset is unchanged, so diagnostics still point at the start of the expression.
src/licenses/resolution.rshad no unit tests, so this adds one covering the append path.It fails before the change with
license = "MITand passes after.Verified locally with
cargo test --features cliandcargo fmt --check.cargo clippy --all-targets --features cliis clean apart from one pre-existingcollapsible_ifinis_powershell_parent, which this change does not touch.