Skip to content
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

Fix missing space in diagnostic location print #4573

Closed
wants to merge 1 commit into from

Conversation

alex-statsig
Copy link
Contributor

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

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.

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 facebook#4571

# 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.
@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@captbaritone merged this pull request in 182a866.

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

Successfully merging this pull request may close these issues.

2 participants