reason icon indicating copy to clipboard operation
reason copied to clipboard

Error formatting: weird indentation on complex type error

Open MoOx opened this issue 6 years ago • 2 comments

(Following this thread https://twitter.com/MoOx/status/1068970511173074944)

I would like to report something that would need to be improved to help complex types debugging

When playing with graphql (with graphql_ppx), we end up having generated types. If we make a mistake when using graphql response, we will have error that might produce errors with a very unusual formatting

dtw_auexgaalbl3 jpg-large

I think the situation should be improved by offernig a more simple indentation, or even better a diff (with colors/font-weight!). Diff would make sense if type to output is more than one line I guess.

Repro

git clone https://github.com/MoOx/dame.bio
cd dame.bio
git checkout issue-reason-error-formatting
yarn

yarn prepare step should trigger a bs compilation and should output the error.

MoOx avatar Dec 02 '18 14:12 MoOx