microsoft / microsoft/typespec

Report execute result for each emitter in compiler

Open
#7,161 2 comments 0 reactions 0 assignees View on GitHub
compiler:core design:needed triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

When compiling, the compiler will report the execute result for each emitter in log, as following:

![Image](https://github.com/user-attachments/assets/f9460153-fabd-4222-a833-90e35d436866)

In VSCode extension, we want to record the result of each emitter and send telemetry, It is not be able to parse out those information form the log.

Can compiler report the execute result and set it in program as following?
```
export interface EmitResult {
emitterName: string;
result: "fail"|"success"|"skipped";
error?: string;
}
export interface Program {
......
emits: EmitResult[];
}
```

vscode extension will use LSP to emit code instead of cmd-line. extension can get those information and send telemetry.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.