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
We need to empower our customers both internal and external to easily trouble shooting and fix spec issues that would block the CodeGen.
If certain TypeSpec features or patterns are not supported by CodeGen, we should clearly point it out and suggest them to update the spec with the features we supported for CodeGen.
Today, JS CodeGen just returned a big call-stack like below which have no value for self-service resolving the problem.
I suggest we improve the following areas:
Leverage TypeSpec diagnostics APIs to report the errors and provide more context so that users could easily identify the TypeSpec source that cause the error..
Provide a clear message for the unsupported scenarios and ideally provide some suggestions on how to fix.
The error reported today:
Emitter "@azure-tools/typespec-ts" crashed! This is a bug.
Please file an issue at https://github.com/Azure/autorest.typescript/issues
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at getNameAndPropertyMap (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/transform/transformResponses.js:113:39)
at transformIsDefaultSupersetOfOthers (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/transform/transformResponses.js:98:60)
at transformToResponseTypesForRoute (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/transform/transformResponses.js:74:13)
at transformToResponseTypes (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/transform/transformResponses.js:31:13)
at transformRLCModel (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/transform/transform.js:31:23)
at buildRLCCodeModels (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/index.js:134:37)
at Object.$onEmit [as emitFunction] (file:///D:/work/typespec-example-speakeasy/node_modules/@azure-tools/typespec-ts/dist/src/index.js:82:11)
at async runEmitter (file:///D:/work/typespec-example-speakeasy/node_modules/@typespec/compiler/dist/src/core/program.js:366:13)
at async compile (file:///D:/work/typespec-example-speakeasy/node_modules/@typespec/compiler/dist/src/core/program.js:123:9)
The text was updated successfully, but these errors were encountered:
We need to empower our customers both internal and external to easily trouble shooting and fix spec issues that would block the CodeGen.
If certain TypeSpec features or patterns are not supported by CodeGen, we should clearly point it out and suggest them to update the spec with the features we supported for CodeGen.
Today, JS CodeGen just returned a big call-stack like below which have no value for self-service resolving the problem.
I suggest we improve the following areas:
The error reported today:
The text was updated successfully, but these errors were encountered: