Attempt to fix the hls eval plugin test suite #2299
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The test suite often fails with interactive eval errors like the one below:
What does this error mean?
The GHC Session contains a mutable interactive context. During the Evaluate command, we first install a special "evalPrint" closure and then kick off the evaluation. These two steps are not atomic, and I think the error above means that the interactive context has been mutated in between those two steps.
What actions can mutate this interactive context? I'm not sure.
Who is mutating the GHC session? Since the GHC session is shared across the entire component, it could be any other build target.
But most tests only work with one module. Sure, but every test in this test suite reuses the
test.cabal
project with >20 modules. ghcide typechecks all the project modules at startup, and I don't think the tests wait for this initial typechecking to complete.Result: the tests run the Eval command concurrently with the initial typechecking.
This PR disables the initial typechecking in this test suite, with the hope that the test suite will become less flaky.