Repository navigation
[http-client-csharp] Add bounded post-writing reduction for enclosing static qualifiers - #12751
Closed
Wei Hu (live1206) wants to merge 30 commits into
Closed
Wei Hu (live1206) wants to merge 30 commits into
Wei Hu (live1206) wants to merge 30 commits into
Conversation
…ests, and rewrite docs
…mport parity tests
…ed Roslyn parity limits
…lyn fallback" This reverts commit c168922.
… static qualifiers
commit: |
Contributor
|
No changes needing a change description found. |
Contributor
Author
|
Closing this draft PR based on - by copilot |
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.
Related to #12454 and #12711.
Summary
EnclosingStaticQualifierReductionRuleandSyntaxNodeBuckets.EnclosingStaticMemberCandidatesto remove redundant enclosing-type and base-class static qualifiers (Foo.Validate(id)andglobal::Ns.Foo.Validate(id)→Validate(id)), running beforeStaticMemberReceiverReductionRulesoglobal::Ns.Foo.Membercollapses directly in one pass.SemanticModel, with guards for:new static), and CS0135 invariant-meaning-in-blocks conflicts across the outermost enclosing declaration space (including nested lambdas and local functions).CandidateSymbols.Length == 1required), invoked delegate-typed members (C.nameof(x)), Color-Color member-access ambiguities,await-in-async, trivia/annotations, andSourceObservationSafety.GenericTypeArgumentReductionRuleviaBoundedPostReducer.ApplyEdit(C.Echo<global::Example.D>(v)→Echo<D>(v)).packages/http-client-csharp/docs/bounded-post-reduction.mdand add positive, retention, and native-vs-hybrid parity tests.Validation
BoundedPostReductionunit & workspace parity tests (EnclosingStaticQualifierReductionTests+BoundedPostReducerWorkspaceTests.EnclosingStaticQualifiersMatchNativeRoslyn): 121/121 passed.Generate.ps1+ re-verifiedSample-TypeSpecafter review fixes): 0 diffs across all generated test projects; generator test suites (Microsoft.TypeSpec.Generator.Tests,ClientModel.Tests,Input.Tests) passed.