Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 182a866

Browse files
alex-statsigfacebook-github-bot
authored andcommitted
Fix missing space in diagnostic location print (#4573)
Summary: Fix missing space in diagnostic location print A space was missing between the error message and location in Diagnostic.print_without_source, which made it harder to open the file from terminal output with tools like vscode. See #4571 Pull Request resolved: #4573 Test Plan: Confirmed that now the path is outputted in a format that vscode can parse out: ``` [ERROR] Compilation failed. [ERROR] Unable to run relay compiler. Error details: Failed to build: - Validation errors: - The type `Company` has no field `metric`. Did you mean `metrics`? See https://relay.dev/docs/error-reference/unknown-field/: client/components/console/pulse/details_dialog/PulseMetricDetailsDialog.tsx:465:471 ``` Note that the line range is still incorrect (it is using the character span instead of linenumber:character), but this seems much trickier to fix. Reviewed By: monicatang Differential Revision: D52635842 Pulled By: captbaritone fbshipit-source-id: fabc0aadb1b72deac2da377a44dd46afed46be60
1 parent 40fe615 commit 182a866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/crates/common/src/diagnostic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl Diagnostic {
225225
let mut result = String::new();
226226
writeln!(
227227
result,
228-
"{message}:{location:?}",
228+
"{message}: {location:?}",
229229
message = &self.0.message,
230230
location = self.0.location
231231
)

0 commit comments

Comments
 (0)