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

ghcide test IfaceTests, we should remove interface cache dir before we run the test, or the diganostic simply gone #4200

Open
Tracked by #4193
soulomoon opened this issue May 1, 2024 · 5 comments

Comments

@soulomoon
Copy link
Collaborator

soulomoon commented May 1, 2024

This can happened in the second round doing the test.

Reproduce

Run this consectively

LSP_TEST_LOG_MESSAGES=1 LSP_TEST_LOG_STDERR=1  TASTY_PATTERN="iface-error-test-1" cabal test ghcide-tests

we are seeing

Debug | SUCCEEDED LOADING HIE FILE FOR /Users/ares/.cache/ghcide/main-67f5d3e80e9a5dab967334c225648bdcd080465f-67f5d3e80e9a5dab967334c225648bdcd080465f/P.hie

The test past again if we remove the cache dir entirely

@soulomoon
Copy link
Collaborator Author

soulomoon commented May 1, 2024

A possible solution to this would be to remove the .cache dir in setupTestEnvironment, after we migrate this test to hls-test-utils.
But I need to see how much it is slowing down the test.

@komikat
Copy link

komikat commented May 31, 2024

The test seems to time out on re-runs.

Exception: Timed out waiting to receive a message from the server.
Last message received:
{
    "jsonrpc": "2.0",
    "method": "$/progress",
    "params": {
        "token": "11",
        "value": {
            "kind": "end",
            "message": "Finished indexing 3 files"
        }
    }
}

@soulomoon
Copy link
Collaborator Author

soulomoon commented May 31, 2024

@komikat Yes, since if we have the cache, we won't compile it again and hence the diganostic is not genereated

@komikat
Copy link

komikat commented May 31, 2024

@soulomoon so expected behaviour should be to not wait for a diagnosis? or delete the specific component being cached before the test is run?

@soulomoon
Copy link
Collaborator Author

soulomoon commented May 31, 2024

@komikat The point of the test is to assert wether the diganostic would arrive. So may be the latter.

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

No branches or pull requests

2 participants