ionide / ionide/FsAutoComplete

F# diagnostics reported to clients should only contain a help link if that link actually resolves to a live URL

Open
#1,437 2 comments 2 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
F#
Stars
486
Forks
169
Avg merge
2d 8h
Merged PRs (30d)
5

Description

### Details

Today we always [generate a clickable link](https://github.com/ionide/FsAutoComplete/blob/2c2e497fd9e5e8c25d399a5deba071e47b56a3cf/src/FsAutoComplete/LspHelpers.fs#L110-L133) for F# compiler diagnostics that have a code - even when there is no matching page for the diagnostic.

FSAC should instead only create such a link if the link exists and is resolvable. To determine this, FSAC should build a one-per-process cache that checks the generate link for a given diagnostic code by sending an httpclient request (following redirects, etc) and verifying if that result returns a 2xx-level status code.

For super bonus points, this cache would be persistable and shareable across sessions (perhaps via some kind of FSAC workspace-based cache - VSCode for example gives each extension a workspace-specific cache directory that could be passed in as a command-line argument to provide a safe cache location, defaulting to some workspace-root-local or user-local location?).

### Checklist

- [x] I have looked through existing issues to make sure that this feature has not been requested before
- [x] I have provided a descriptive title for this issue
- [x] I am aware that even valid feature requests may be rejected if they do not align with the project's goals
- [x] I or my company would be willing to contribute this feature

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.