Repository navigation
feat: standardize boolean literals to lowercase true/false everywhere - #82
Merged
Merged
Conversation
added 2 commits
October 11, 2026 22:09
Three independent "boolean" surfaces disagreed with each other: .ids settings values required capitalized True/False, .idp package config required lowercase true/false, and .ids annotation/expression values (@deprecated = true, validator keyword args, field defaults) had no dedicated bool type at all - just an unconstrained Identifier, guessed at downstream by inconsistent string comparisons. - BoolLiteral's leaf text is now "true"/"false" (still two literal leaves, not a combined regex - that's what keeps it unambiguous with Identifier). - Expression gained a Bool(BoolLiteral) variant, reusing the exact same type as SettingValue::Bool, so a boolean is spelled and typed identically in settings blocks and in annotation/expression values. - .idp's own BooleanLiteral converted from a single combined-regex leaf to the same two-literal-leaf shape - it had a live, only defensively-patched ambiguity with Identifier (freezing.rs matched both Value::Boolean and Value::Identifier for "true"/"false" because nobody was sure which one the parser actually produced); now that it's unambiguous, the defensive Identifier arms are gone. - value_category's dual-case leniency (accepting both true/false and True/False) is dropped - only lowercase can occur from a conforming parse now.
2 tasks done
4 tasks done
8 tasks
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
.idssettings values required capitalizedTrue/False,.idppackage config required lowercasetrue/false, and.idsannotation/expression values (@deprecated = true, validator keyword args, field defaults) had no dedicated bool type at all — just an unconstrainedIdentifier, guessed at downstream by inconsistent string comparisons.BoolLiteral's leaf text is now"true"/"false"(still two literal leaves, not a combined regex — that's what keeps it unambiguous withIdentifier).Expressiongained aBool(BoolLiteral)variant, reusing the exact same type asSettingValue::Bool, so a boolean is spelled and typed identically in settings blocks and in annotation/expression values..idp's ownBooleanLiteralconverted from a single combined-regex leaf to the same two-literal-leaf shape — it had a live, only defensively-patched ambiguity withIdentifierinfreezing.rs(matched bothValue::BooleanandValue::Identifierfor"true"/"false"because nobody was sure which one the parser actually produced); now that it's unambiguous, the defensiveIdentifierarms are gone.value_category's dual-case leniency (accepting bothtrue/falseandTrue/False) is dropped — only lowercase can occur from a conforming parse now..idssyntax: any schema withTrue/Falsein asettings {}block now needs lowercase.Test plan
cargo testclean (341 + 188 + others, 0 failed)cargo clippy --all-targetsclean (no new warnings)comlineCLI (via a temporary local[patch], reverted after): capitalizedTruein a.allowedsetting now fails with an accuratesettings::malformed-valueerror ("a settings '.allowed' key only accepts 'true' or 'false'"— previously that message was wrong for.ids); lowercasetruepasses cleanly;@deprecated = truestill warns as a bare marker (confirmed it now parses throughExpression::Bool, notIdentifier)