rescript-lang/rescript-vscode

parseCompilerLogOutput crashes when first error is graphql deprecation warning

Offen

#386 geöffnet am 07.04.2022

 (12 Kommentare) (0 Reaktionen) (1 zugewiesene Person)ReScript (63 Forks)github user discovery
buggood first issuehelp wanted

Repository-Metriken

Stars
 (350 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi Folks. Found a case here. given a codebase using rescript-apollo, with a deprecated field warning, the parser will fail its "File " branch based on the next line not being Warning, and end up in its last case where it attempts to push a follow up line to an empty parsedDiagnostics array.

I can see some pushback on the apollo output here maybe, but would it be better to make the "File " branch more permissive, or allow a new parsed diagnostic to be created there in that non-empty-line case?

Thanks Alex

File "/Users/alexmouton/Documents/code/noble/web/src/packs/reactor/PackCapabilityRunSweepUpdateHf.res", line 45, characters 8-26:
45 | ........entDataRecordId
45 |   .....
Warning 22 [preprocessor]: Field "parentDataRecordId" has been deprecated. Reason: Prefer parent_data_record
File "/Users/alexmouton/Documents/code/noble/web/src/packs/reactor/PackCapabilityRunSweepUpdateHf.res", line 42, characters 40-53:
42 | ........................................ectedInput
42 |   .......

Contributor Guide