Repository navigation
Extend constructor/member association to leading acronyms - #556
Closed
eiriktsarpalis wants to merge 1 commit into
Closed
eiriktsarpalis wants to merge 1 commit into
eiriktsarpalis wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
=======================================
Coverage 94.47% 94.47%
=======================================
Files 299 299
Lines 19637 19650 +13
Branches 3836 3842 +6
=======================================
+ Hits 18552 18565 +13
Misses 796 796
Partials 289 289 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Explore acronym-aware constructor/member association using the shared
CamelCaseInvariantComparer, so reflection and source generation recognizeilDeltaas corresponding toILDelta.iLDelta/ILDelta; also supporturl/URL,urlValue/URLValue, and acronyms before digits.ildelta/ILDeltaandmyUrl/MyURLremain distinct. Non-letter prefixes such as_do not enable acronym matching.Compatibility considerations
This is an intentional behavioral change, not a compatibility-neutral patch. Newly associated members can change constructor selection, parameter logical names and property-derived requiredness, and which member initializers remain in the constructor shape. Keeping this PR in draft makes that policy change explicit for review.
No new ambiguity policy is introduced: the first matching member supplies property-derived naming and requiredness, without preferring exact spelling. Existing provider-specific initializer-deduplication algorithms are unchanged. Existing first-letter equivalences are preserved.
Validation
make testpassed on macOS ARM64, including the complete CLR suite with coverage (297,313 passed, 68 skipped) and all 46 Native AOT smoke tests. The new positive association regressions failed against the original comparer before the implementation change.No MessagePack dependency or integration test is added; this draft exercises the PolyType constructor-shape behavior directly through public APIs.