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-java, report TCGC diagnostics #4382

Conversation

weidongxu-microsoft
Copy link
Contributor

@weidongxu-microsoft weidongxu-microsoft commented Sep 10, 2024

link Azure/typespec-azure#1487

tested with

Union U {
  null;
};

after this PR, we will see

C:/github/typespec/packages/http-client-java/generator/http-client-generator-test/main.tsp:15:7 - error @azure-tools/typespec-client-generator-core/union-null: Cannot have a union containing only null types.
> 15 | union U {
     |       ^

and codegen fails (as this is an error).

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Sep 10, 2024
@azure-sdk
Copy link
Collaborator

No changes needing a change description found.

@weidongxu-microsoft weidongxu-microsoft force-pushed the http-client-java_report-tcgc-diagnostic branch from ef95eb0 to b1ab16a Compare September 10, 2024 09:06
@weidongxu-microsoft weidongxu-microsoft changed the title http-client-java, report TCGC diagnostic http-client-java, report TCGC diagnostics Sep 10, 2024
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

@weidongxu-microsoft

This comment was marked as outdated.

@weidongxu-microsoft weidongxu-microsoft added this pull request to the merge queue Oct 11, 2024
Merged via the queue into microsoft:main with commit 3b21ce9 Oct 11, 2024
25 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the http-client-java_report-tcgc-diagnostic branch October 11, 2024 13:12
@weidongxu-microsoft
Copy link
Contributor Author

Currently reverted due to Azure/typespec-azure#1675

swatkatz pushed a commit to swatkatz/typespec that referenced this pull request Nov 5, 2024
link Azure/typespec-azure#1487

tested with

```
Union U {
  null;
};
```

after this PR, we will see
```
C:/github/typespec/packages/http-client-java/generator/http-client-generator-test/main.tsp:15:7 - error @azure-tools/typespec-client-generator-core/union-null: Cannot have a union containing only null types.
> 15 | union U {
     |       ^
```
and codegen fails (as this is an error).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants