Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[http-client-csharp] spector case project http/special-words cannot compile #5568

Open
ArcturusZhang opened this issue Jan 10, 2025 · 2 comments
Labels
emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@ArcturusZhang
Copy link
Member

ArcturusZhang commented Jan 10, 2025

In the spector test cases, we are generating code with some xml doc issues:

        /// <summary> withCancellationToken. </summary>
        /// <param name="cancellationToken"></param>
        /// <param name="cancellationToken"> The cancellation token that can be used to cancel the operation. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="cancellationToken"/> is null. </exception>
        /// <exception cref="ClientResultException"> Service returned a non-success status code. </exception>
        public virtual ClientResult WithCancellationToken(string cancellationToken, CancellationToken cancellationToken0 = default)

We have two cancellationToken in the xml doc.

How to reproduce:

  1. cd into packages/http-client-csharp directory
  2. Run script ./eng/scripts/Generate.ps1 special-words -Stubbed $false
  3. Run dotnet build ./generator/TestProjects/CadlRanch/http/special-words/SpecialWords.sln and you would see this cannot build.
@ArcturusZhang ArcturusZhang added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jan 10, 2025
@jsquire
Copy link
Member

jsquire commented Jan 13, 2025

@ArcturusZhang / @ArthurMa1978: This needs additional context. What's the scenario that would introduce this case? What's the TypeSpec look like? How would someone who was going to work on this repro what you're seeing?

@ArcturusZhang
Copy link
Member Author

ArcturusZhang commented Jan 14, 2025

@ArcturusZhang / @ArthurMa1978: This needs additional context. What's the scenario that would introduce this case? What's the TypeSpec look like? How would someone who was going to work on this repro what you're seeing?

let me add some more details in this issue (and some similar others)

@ArcturusZhang ArcturusZhang changed the title [http-client-csharp] http/special-words cannot compile [http-client-csharp] spector case project http/special-words cannot compile Jan 14, 2025
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

No branches or pull requests

2 participants