Skip to content

Conversation

@komikat
Copy link
Contributor

@komikat komikat commented Jun 21, 2024

expectNoMoreDiagnostics 1 waits for 1 second to establish that no diagnostics have been created, it has been replaced with waitForTypecheck and waitForAction "gethieast" for Haskell and cabal files respectively, shaving off 1 second each time. I'm not sure if I should wait for some other action for cabal files.

@komikat komikat requested a review from fendor as a code owner June 21, 2024 16:31
@soulomoon
Copy link
Collaborator

soulomoon commented Jun 21, 2024

you might also need to consider the debouncer delay

But in fact if you want to reliably replace it. You might need to consider a lot of internal working in hls. See #4300

@komikat
Copy link
Contributor Author

komikat commented Jun 21, 2024

looking into it, thanks!

@komikat komikat marked this pull request as draft June 23, 2024 16:59
@komikat komikat changed the title replace expectNoMoreDiagnostics with waitForAction's, saving 1s making hls-cabal and hls-hlint faster Jun 23, 2024
_ <- waitForTypecheck hsDoc
cabalDoc <- openDoc "simple-cabal.cabal" "cabal"
expectNoMoreDiagnostics 1 cabalDoc "parsing"
_ <- waitForAction "gethieast" cabalDoc
Copy link
Collaborator

@fendor fendor Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot imagine this works, cabal files don't run this action, right?

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.

3 participants