-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce IPC between ts part and C# part to report diagnostics and write logs #5917
base: main
Are you sure you want to change the base?
introduce IPC between ts part and C# part to report diagnostics and write logs #5917
Conversation
API change check APIView has identified API level changes in this PR and created following API reviews. |
...ges/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Providers/ModelProvider.cs
Outdated
Show resolved
Hide resolved
9d1b66a
to
25cf9b5
Compare
This reverts commit 25cf9b5.
@JoshLove-msft this should also contribute to this change despite it has merged: #5904 |
@@ -61,10 +61,6 @@ public static InputEnumType CreateEnumType(ref Utf8JsonReader reader, string? id | |||
} | |||
|
|||
name = name ?? throw new JsonException("Enum must have name"); | |||
if (summary is null && doc is null) | |||
{ | |||
Console.Error.WriteLine($"[Warn]: Enum '{name}' must have either a summary or doc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we intend to not replace this?
|
||
public void Debug(string message) | ||
{ | ||
SendNotification("trace", new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use constant for "trace"
{ | ||
if (targetCrossLanguageDefinitionId != null) | ||
{ | ||
SendNotification("diagnostic", new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use const
|
||
private void Dispose(bool disposing) | ||
{ | ||
if (!_disposedValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: _disposed
@@ -5,6 +5,7 @@ | |||
using System.Collections.Generic; | |||
using System.IO; | |||
using System.Linq; | |||
using Microsoft.TypeSpec.Generator.EmitterRpc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
@@ -30,9 +31,10 @@ public static async Task<int> Main(string[] args) | |||
|
|||
private static async Task<int> Run(CommandLineOptions options, GeneratorRunner runner) | |||
{ | |||
var emitter = Emitter.Instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use using
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we introduce a minimal E2E test?
Fixes #5920