relay icon indicating copy to clipboard operation
relay copied to clipboard

Make schema validation report using diagnostics

Open captbaritone opened this issue 2 months ago • 1 comments

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:

  1. Error reporting is improved for CLI output for the existing validation tool, with file locations and inline context, and related locations all being reported
  2. 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 avatar Apr 24 '24 22:04 captbaritone

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

facebook-github-bot avatar Apr 24 '24 23:04 facebook-github-bot