Skip to content

Commit 033e9aa

Browse files
remove diagnostics field from the root response of JSON output.
The `diagnostics` field was duplicated, it should be retrived by calling only .builer_result.diagnostics
1 parent 0014ecd commit 033e9aa

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

internal/cli/compile/compile.go

+7-9
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
355355
UpdatedUploadPort: result.NewPort(uploadRes.GetUpdatedUploadPort()),
356356
},
357357
ProfileOut: profileOut,
358-
Diagnostics: result.NewCompileDiagnostics(builderRes.GetDiagnostics()),
359358
Success: compileError == nil,
360359
showPropertiesMode: showProperties,
361360
hideStats: preprocess,
@@ -399,14 +398,13 @@ type updatedUploadPortResult struct {
399398
}
400399

401400
type compileResult struct {
402-
CompilerOut string `json:"compiler_out"`
403-
CompilerErr string `json:"compiler_err"`
404-
BuilderResult *result.BuilderResult `json:"builder_result"`
405-
UploadResult updatedUploadPortResult `json:"upload_result"`
406-
Success bool `json:"success"`
407-
ProfileOut string `json:"profile_out,omitempty"`
408-
Error string `json:"error,omitempty"`
409-
Diagnostics []*result.CompileDiagnostic `json:"diagnostics,omitempty"`
401+
CompilerOut string `json:"compiler_out"`
402+
CompilerErr string `json:"compiler_err"`
403+
BuilderResult *result.BuilderResult `json:"builder_result"`
404+
UploadResult updatedUploadPortResult `json:"upload_result"`
405+
Success bool `json:"success"`
406+
ProfileOut string `json:"profile_out,omitempty"`
407+
Error string `json:"error,omitempty"`
410408
showPropertiesMode arguments.ShowPropertiesMode
411409
hideStats bool
412410
}

0 commit comments

Comments
 (0)