ionide / FSharp.Analyzers.SDK

Library for building custom analyzers for F# / FSAC
http://ionide.io/FSharp.Analyzers.SDK/
MIT License
74 stars 21 forks source link

Fail the tool when analyzers fail to load #198

Closed Smaug123 closed 7 months ago

Smaug123 commented 7 months ago

The tool currently silently swallows this sort of error.

This change is backward incompatible. Is that OK?

dawedawe commented 7 months ago

@Smaug123 One thing: Could you add a changelog entry, please.

Smaug123 commented 7 months ago

This was motivated by https://github.com/Smaug123/fsharp-prattparser and specifically https://github.com/Smaug123/fsharp-prattparser/actions/runs/7618965411/job/20751163083 :

info: Running in verbose mode
info: Treat as Hints: []
info: Treat as Info: []
info: Treat as Warning: []
info: Treat as Error: [GRA-IMMUTABLECOLLECTIONEQUALITY-001, GRA-INTERPOLATED-001, GRA-JSONOPTS-001, GRA-LOGARGFUNCFULLAPP-001, GRA-STRING-001, GRA-STRING-002, GRA-STRING-003, GRA-TYPE-ANNOTATE-001, GRA-UNIONCASE-001, GRA-VIRTUALCALL-001]
info: Exclude Files: []
info: Include Files: []
info: Loading analyzers from /home/runner/work/fsharp-prattparser/fsharp-prattparser/.analyzerpackages/g-research.fsharp.analyzers/0.6.0/
error: Trying to load /home/runner/work/fsharp-prattparser/fsharp-prattparser/.analyzerpackages/g-research.fsharp.analyzers/0.6.0/analyzers/dotnet/fs/G-Research.FSharp.Analyzers.dll which was built using SDK version 0.22.0.0. Expect 0.23.0.0 instead. Assembly will be skipped.
info: Registered 0 analyzers from 0 dlls
info: No messages found from the analyzer(s)