Treat empty encoded flags as a zero-flag override. - #68
Merged
Merged
Conversation
taiki-e
requested changes
Jul 27, 2026
taiki-e
left a comment
Owner
There was a problem hiding this comment.
Thanks! The implementation looks good to me. Could you resolve merge conflicts and CI failure?
Comment on lines
+298
to
+299
| ("\x1fflag\x1f", ["", "flag", ""].into()), | ||
| ("one\x1ftwo", ["one", "two"].into()), |
Owner
There was a problem hiding this comment.
From the failed CI log (https://github.com/taiki-e/cargo-config2/actions/runs/30216009160/job/89830232190?pr=68):
tests/test.rs:298 - Unknown word (fflag)
tests/test.rs:299 - Unknown word (ftwo)
We can use something like:
Suggested change
| ("\x1fflag\x1f", ["", "flag", ""].into()), | |
| ("one\x1ftwo", ["one", "two"].into()), | |
| ("\x1fa\x1f", ["", "a", ""].into()), | |
| ("a\x1fb", ["a", "b"].into()), |
Cargo special-cases a wholly empty `CARGO_ENCODED_RUSTFLAGS` or `CARGO_ENCODED_RUSTDOCFLAGS` value as an override containing zero flags, rather than one containing a single empty flag. Adjust `cargo-config2`'s implementation to match.
obi1kenobi
force-pushed
the
empty-encoded-flags
branch
from
July 30, 2026 01:04
aeb0556 to
1b3b1c6
Compare
Contributor
Author
|
Rebased and updated as proposed. Thanks again! |
taiki-e
approved these changes
Jul 30, 2026
Owner
|
Published in 0.1.45. |
Contributor
Author
|
Wonderful, thank you so much! |
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.
Cargo special-cases a wholly empty
CARGO_ENCODED_RUSTFLAGSorCARGO_ENCODED_RUSTDOCFLAGSvalue as an override containing zero flags, rather than one containing a single empty flag.Adjust
cargo-config2's implementation to match.