relay
relay copied to clipboard
Make schema validation report using diagnostics
This PR updates our schema validation crate (which was previously not actually used directly by Relay) to report errors using Diagnostics rather than using its bespoke error reporting approach. This has a few effects:
- Error reporting is improved for CLI output for the existing validation tool, with file locations and inline context, and related locations all being reported
- As we look to adopt schema validation in Relay proper the errors will be compatible with the LSP meaning they will surface as red underlines in the correct locations.
@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.