feat: validate and lower properties by language - #162
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
adamcavendish
force-pushed
the
adamcavendish/property-capability-lowering
branch
from
August 23, 2026 07:55
9343a22 to
685e68a
Compare
- add semantic property capabilities and owner-aware complete lowering - keep accessor and computed-property grammar in target language adapters - validate intrinsic operands, required semantics, visibility, and identifiers - reject bodyful property specs in unsupported contract and declaration contexts - validate exact property duplicates and PHP-derived member-name collisions - preserve TypeName and annotation imports through structured CodeBlock output - retain valid 0.6.8 external adapters through a frozen compatibility lowerer - deprecate legacy property grammar hooks with migration guidance - cover matrices, owner-wide validation, preambles, imports, and renderer parity - document property ownership, compatibility boundaries, and language-author rules
adamcavendish
force-pushed
the
adamcavendish/property-capability-lowering
branch
from
August 23, 2026 14:24
685e68a to
82580f5
Compare
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
Add semantic property capability profiles and complete language-local property
lowering. Property declarations now validate before lowering, preserve
structured types and metadata, and fail closed when a target cannot represent
the requested behavior. A validation-only owner view also covers relationships
between properties and explicit members without introducing shared grammar.
Problem
PropertySpecpreviously selected a shared accessor-versus-field grammar andassembled target syntax from general configuration hooks. That allowed
unsupported contexts and invalid language forms to reach plausible-looking
output, kept property preamble ownership in the generic spec layer, and left
target-derived cross-member name collisions unchecked.
Behavior
Compatibility
PropertyStyle,CodeLang::property_style(), andCodeLang::property_getter_keyword()remain available but are deprecated.External adapters that rely on the 0.6.8 defaults retain frozen compatibility
lowering, including valid split-member placement and preamble behavior.
Built-in adapters use strict property profiles and complete local lowerers.
Invalid legacy output may now be rejected.
TypeMembersIntentis a validation-only view with no lowering counterpart.It carries semantic fields, computed properties, and explicit methods for one
owner; it does not contain placement or target grammar.
Validation
just checkjust coverage-nextestjust bookjust book-testRUSTDOCFLAGS=-Dwarnings cargo doc --workspace --no-depscargo semver-checks check-release --baseline-rev origin/maingit diff --checkNormal nextest passed 2,341 tests. Coverage nextest passed 2,191 tests. The new
owner-wide validation modules have 100% line and function coverage. The semver
comparison against
origin/mainpassed all 196 applicable checks.