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

report nice error message when dotnet is not installed #5477

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

chunyu3
Copy link
Contributor

@chunyu3 chunyu3 commented Jan 3, 2025

Fix #5364

  • add dependency-runtime-missing diagnostic
  • When dotnet is not installed, the generation will fail, emitter report dependency-runtime-missing diagnostic error

@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 Jan 3, 2025
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

@typespec/http-client-csharp

} catch (error: any) {
if (error && "code" in (error as {}) && error["code"] === "ENOENT") {
reportDiagnostic(sdkContext.program, {
code: "dependency-runtime-missing",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think runtime-dependency-missing makes more sense.
Has this code been reviewed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to runtime-dependency-missing. The code is for csharp-emitter only. if needed, we can review by .net arch.

@chunyu3 chunyu3 requested a review from ArcturusZhang January 3, 2025 06:50
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.

[Bug]: C# emitter should explain simply that .NET needs to be installed
4 participants