haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Set the XDG_CACHE_HOME for tests

Open fendor opened this issue 8 months ago • 2 comments

This makes sure each test run is independent.

Makes the tests

  • iface-error-test-1
  • iface-th-test

less flaky locally. On my machine, these tests were consistently failing after the first successful execution (due to caching the hiedb afaict.) Should not have any effect on the CI flakiness issue.

fendor avatar Apr 27 '25 13:04 fendor

https://github.com/haskell/haskell-language-server/blob/master/.github/workflows/test.yml#L51

Outdated skip in CI. Gonna fix that!

fendor avatar Apr 27 '25 15:04 fendor

Test failures all look genuine, so more investigation is required.

fendor avatar Apr 27 '25 18:04 fendor

Is it blocking by the long path issue for windows? Can we shrink the test cache dir path?

soulomoon avatar Aug 19 '25 06:08 soulomoon

@soulomoon Yes, it is blocking :(

I have no idea how to further shrink down the test cache dir path, without either reimplementing createTemporaryDirectory, or mangling test-case names. I am further confused why this even is an issue, as the CI runners allegedly enable long file paths.

fendor avatar Aug 19 '25 07:08 fendor

That seems to be ghc's issue ? see https://gitlab.haskell.org/ghc/ghc/-/issues/13373 @fendor

So to workaround this, we might have to customize our createTemporaryDirectory ?

soulomoon avatar Aug 21 '25 07:08 soulomoon

I am not sure if the issue is still relevant

fendor avatar Aug 21 '25 08:08 fendor

The lazy solution to set a shorter test directory on windows seems to be working. Finally!

@guibou, @soulomoon perhaps a final review? Otherwise, Ill just merge it.

fendor avatar Oct 28 '25 11:10 fendor