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

Prevent Tactics hover provider from blocking at startup #2306

Merged
merged 1 commit into from
Oct 31, 2021

Commits on Oct 31, 2021

  1. Prevent Tactics hover provider from blocking at startup

    There's been a lot of work done on making hover and getDefinition immediately responsive at startup by using persisted data.
    
    Unfortunately we didn't install tests to preserve this fragile property. We should add those tests to the func-test testsuite.
    
    The problem here is that Tactics installs a hover handler that depends on the TypeCheck rule. Since there is no persistent provider for this rule, it blocks until the file can be typechecked. Since HLS does not implement partial responses (and neither do most LSP clients anyway), this blocks all the other hover providers.
    
    The solution is to install a new build rule GetMetaprograms that depends on TypeCheck, install a persistent provider for it that returns the empty list of meta programs, and switch the hover provider to useWithStaleFast.
    
    The downsides of doing this are negligible - the hover provider won't show any metaprogram specific info if used at startup, but it will work finely on a second attempt.
    pepeiborra committed Oct 31, 2021
    Configuration menu
    Copy the full SHA
    91dab7f View commit details
    Browse the repository at this point in the history