Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

  • Understand the problem: Visitors that transform method parameters (e.g., merging IfMatch/IfNoneMatch into MatchConditions) run AFTER EnsureBuilt(), but EnsureBuilt() triggers Methods lazy init which applies customization filtering prematurely, removing methods before visitors can transform them
  • Revert the incorrect generic type argument fix from IsNameMatch
  • Remove incorrect generic type test and test data
  • Fix: Change EnsureBuilt() to build members without applying customization filtering, deferring it to CSharpGen.ExecuteAsync after visitors run
  • Add test MethodIsNotFilteredWhenVisitorChangesSignature that verifies a method matching custom code is preserved through EnsureBuilt() so visitors can transform it
  • Verify the test fails without the fix and passes with it
  • Run all existing tests to ensure no regressions (1237 Generator + 1073 ClientModel tests pass)
  • Run code review (minor style comments, consistent with existing patterns)
  • Address review feedback: Removed MethodsOverride from TestTypeProvider and replaced with a local MutableMethodsTypeProvider class private to the test file
  • Address review feedback: Renamed Methods_ to MethodProviders following existing convention from ClientCustomizationTests
  • Synced from main

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… method suppression

Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Feb 10, 2026
Copilot AI changed the title [WIP] Fix bug in CreateOrUpdate method parameter merging Fix IsNameMatch to compare generic type arguments when matching custom methods Feb 10, 2026
Copilot AI requested a review from ArthurMa1978 February 10, 2026 04:27
…ansformations

Co-authored-by: ArthurMa1978 <20514459+ArthurMa1978@users.noreply.github.com>
Copilot AI changed the title Fix IsNameMatch to compare generic type arguments when matching custom methods Defer customization filtering in EnsureBuilt to allow visitor transformations Feb 10, 2026
…modifying TestTypeProvider

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
…ntion

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
@JoshLove-msft
Copy link
Contributor

@copilot sync from main

Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot sync from main

Done — merged from main with no conflicts. Commit: 54f5d77

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 056a8e4 Feb 11, 2026
23 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/fix-create-or-update-method branch February 11, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants