Skip to content

[vscode] Typespec Compiler features enhancement needed for multiple generation in one tsp compile #5973

Description

@chunyu3

E2E VSCode extension which will allow customer to select multiple emitters to generate multiple codes at one time.

Now we meet some problem:

Problem:

  1. The logs and errors belongs to different emitters are in one log. We cannot identify which emitter the log or code. We cannot identify which emitter succeed, which emitters are failed.
  2. When crash in one emitter, the compile process will exit, the following emitters will not be called.

Possible solution:

For #1. Compiler define a way to separate logs and errors for emitters, e.g Put emitter name in the log and error, so that we can filter out logs and errors for each emitter
For #2. Don't throw exception to exit whole process when one emitter crash. Log error or report Diagnostic

await emitter.emitFunction(context);

throw new ExternalError({ kind: "emitter", metadata: emitter.metadata, error });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions