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 internal customer to easily trouble shooting and fix spec issues that would block the CodeGen.
This will also be helpful for external customer in the future
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, Go CodeGen just returned a big call-stack like below which will be difficult 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.
Note that this particular issue isn't really self-serviceable, it's a bug in the emitter.
TypeError: Cannot read properties of undefined (reading 'flatMap')
In this case, the instructions to Please file an issue at https://github.com/Azure/autorest.go/issues is really all a customer can do.
@jhendrixMSFT, I am suggesting each emitter could have a more robust way of error handling so when customer face this error, they could know the source of the typespec and they could try to mitigate the problem instead of being blocked.
Emitter crashes are going to fall into three buckets.
tsp that the emitter doesn't handle
bugs in the emitter
bugs in the emitter's dependencies
I agree that for the first case the source of the problem should be clear in case customers want to modify their tsp.
For the second case, the tsp source might have already been "consumed" so there's no source to point to. e.g. if the tcgc code model has already been converted to the Go code model, and the emitter crashes during codegen, any context WRT the tsp will have been lost.
The third case will have to be handled by the dependency.
We need to empower our internal customer to easily trouble shooting and fix spec issues that would block the CodeGen.
This will also be helpful for external customer in the future
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, Go CodeGen just returned a big call-stack like below which will be difficult for self-service resolving the problem.
I suggest we improve the following areas:
The error reported today: (copied from #1465 (comment))
The text was updated successfully, but these errors were encountered: