You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When .NET client library generation failed because of missing .NET SDK. The messages of root cause were printed as "[info]" (highlight in bold below) with verbose diagnostics. Suggest inprovements:
the root cause error should be [error]
the diagnostics should be folded into trace file, instead of printing in the terminal.
===================================
2025-03-24 13:07:44.625 [info] error @typespec/http-client-csharp/invalid-dotnet-sdk-dependency: The dotnet command was not found in the PATH. Please install the .NET SDK version 8 or above. Guidance for installing the .NET SDK can be found at https://dotnet.microsoft.com/.
2025-03-24 13:07:44.626 [info] Found 1 error, 8 warnings.
2025-03-24 13:07:44.651 [error] Emitting client code for .NET...Failed. TypeSpec compiler v0.67.1
Diagnostics were reported during compilation:
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:190:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Pets.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:270:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:294:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:69:24 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:398:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.PetCheckups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:72:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.PetInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:75:32 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.ToyInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:86:32 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:135:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Checkups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:89:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:190:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Owners.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:270:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:294:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:92:26 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:398:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.OwnerCheckups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:95:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.OwnerInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:98:34 - occurred while instantiating template
error @typespec/http-client-csharp/invalid-dotnet-sdk-dependency: The dotnet command was not found in the PATH. Please install the .NET SDK version 8 or above. Guidance for installing the .NET SDK can be found at https://dotnet.microsoft.com/.
TypeSpec compiler will send diagnostic (warning and error) to stdout. Now we don't have an easy way to distinguish out diagnostic from other output, so we log them as info for all logs from stdout.
and cannot distinguish out error diagnostic and warning diagnostic, either.
We will discuss with typespec/compiler to give out rules about those logs (which sent to stdout, which sent to stderr, how to identify error or warning diagnostic, and so on), so that Vscode extension can correct route those logs.
josefree
changed the title
[vs code extension] improving
[vs code extension] improving messages in the terminal
Mar 24, 2025
We are having much trouble using the Output window for showing the output from compiler. I think we can try to use vscode task or terminal instead to resolve all the problem there. @chunyu3 , could you help to do some investigation there? thanks.
When .NET client library generation failed because of missing .NET SDK. The messages of root cause were printed as "[info]" (highlight in bold below) with verbose diagnostics. Suggest inprovements:
===================================
2025-03-24 13:07:44.625 [info] error @typespec/http-client-csharp/invalid-dotnet-sdk-dependency: The dotnet command was not found in the PATH. Please install the .NET SDK version 8 or above. Guidance for installing the .NET SDK can be found at https://dotnet.microsoft.com/.
2025-03-24 13:07:44.626 [info] Found 1 error, 8 warnings.
2025-03-24 13:07:44.651 [error] Emitting client code for .NET...Failed. TypeSpec compiler v0.67.1
Diagnostics were reported during compilation:
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:190:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Pets.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:270:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:294:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:69:24 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:398:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.PetCheckups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:72:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.PetInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:75:32 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.ToyInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:86:32 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:135:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Checkups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:89:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:190:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.Owners.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:270:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:294:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:92:26 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:398:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.OwnerCheckups.createOrUpdate.
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:95:11 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:340:3 - warning @typespec/http-client-csharp/unsupported-patch-convenience-method: Convenience method is not supported for PATCH method, it will be turned off. Please set the '@convenientAPI' to false for operation TypeSpec.Rest.Resource.OwnerInsurance.update.
../xxxx/typespec-e2e-demo/petstore/spec/node_modules/@typespec/rest/lib/resource.tsp:357:5 - occurred while instantiating template
../xxxx/typespec-e2e-demo/petstore/spec/main.tsp:98:34 - occurred while instantiating template
error @typespec/http-client-csharp/invalid-dotnet-sdk-dependency: The dotnet command was not found in the PATH. Please install the .NET SDK version 8 or above. Guidance for installing the .NET SDK can be found at https://dotnet.microsoft.com/.
Found 1 error, 8 warnings.
✔ Compiling
× @typespec/http-client-csharp ../outputs/clients/dotnet/
node C:\Users\yiqiu\GitHub\typespec-e2e-demo\petstore\spec\node_modules@typespec\compiler\cmd\tsp.js compile xxxx/typespec-e2e-demo/petstore/spec/main.tsp --emit @typespec/http-client-csharp --pretty false failed with exit code 1
The text was updated successfully, but these errors were encountered: