Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named analyzers and better error handling #16

Merged
merged 3 commits into from
Mar 8, 2020
Merged

Named analyzers and better error handling #16

merged 3 commits into from
Mar 8, 2020

Conversation

Zaid-Ajaj
Copy link
Contributor

When the SDK runs analyzers, it swallows all errors making it impossible for FSAC to know which analyzer is problematic and makes troubleshooting harder. This PR addresses this issue by allowing the analyzers to be (optionally) named via the attribute like this [<Analuzer "AnalyzerName">]. I added a new function to run the analyzers of this signature:

val runAnalyzersSafely : Context -> AnalysisResult list

Where each AnalysisResult is the result of each registered analyzer and is defined as follows:

type AnalysisResult = {
  AnalyzerName : string
  Output : Result<Message list, exn>
}

This way, we will be able to identify which analyzer wasn't able to run successfully and why (cc @baronfel)

This is also preparation for fixing #8 which required the analyzers to be named.

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit fa2ae99 into ionide:master Mar 8, 2020
@Krzysztof-Cieslak
Copy link
Member

Thanks.

@Zaid-Ajaj Zaid-Ajaj deleted the named-analyzers-better-error-handling branch March 8, 2020 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants