Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Set the XDG_CACHE_HOME for tests #4572

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

Open
fendor wants to merge 7 commits into haskell:master
base: master
Choose a base branch
Loading
from fendor:fix/tests-xdg-cache-home

Conversation

Copy link
Collaborator

@fendor fendor commented Apr 27, 2025
edited
Loading

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.

soulomoon reacted with thumbs up emoji
@fendor fendor force-pushed the fix/tests-xdg-cache-home branch from 1a34302 to 7df2e36 Compare April 27, 2025 13:54
@fendor fendor requested review from soulomoon and jhrcek April 27, 2025 14:26
Copy link
Collaborator

@soulomoon soulomoon left a comment

Choose a reason for hiding this comment

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

LGTM. But ghcide test is not running for this PR, do you know why it is skipped

Copy link
Collaborator Author

fendor commented Apr 27, 2025

@fendor fendor requested a review from michaelpj as a code owner April 27, 2025 15:13
Copy link
Collaborator Author

fendor commented Apr 27, 2025

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

@fendor fendor requested a review from wz1000 as a code owner May 5, 2025 16:33
@fendor fendor force-pushed the fix/tests-xdg-cache-home branch from 3be9351 to 8dcd861 Compare May 7, 2025 16:53
then mkHomeModLocation dflags (pathToModuleName fp) fp
then mkHomeModLocation dflags mod fp
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This seems to be causing long-path issues on windows.
I am unsure how relevant this still is... Anybody an idea?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In a test cabal project, it seems we always create separate .hi/.hie files

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But not, if there are multiple "main" scripts:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is unfortunately a case we have to support, so this change can't be applied as is.

@fendor fendor force-pushed the fix/tests-xdg-cache-home branch 5 times, most recently from 7729e73 to a7ad2c6 Compare May 14, 2025 15:40
fendor and others added 6 commits June 9, 2025 17:57
This makes sure each test run is independent.
Makes the tests
* iface-error-test-1
* iface-th-test
less flaky locally.
Should not have any effect on the CI flakiness issue.
---
Fix test cases to work with the temporary `XDG_CACHE_HOME`
Some tests were launching additional HLS instances for the tests.
Fixed, which should make the test slightly faster.
Ghcide test infrastructure was refactored to depend on `hls-test-utils`.
@fendor fendor force-pushed the fix/tests-xdg-cache-home branch from bb55dd7 to b27f3d2 Compare June 9, 2025 15:57
Copy link
Collaborator

soulomoon commented Aug 19, 2025
edited
Loading

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

Copy link
Collaborator Author

fendor commented Aug 19, 2025
edited
Loading

@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.

Copy link
Collaborator

soulomoon commented Aug 21, 2025
edited
Loading

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 ?

Copy link
Collaborator Author

fendor commented Aug 21, 2025

I am not sure if the issue is still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@soulomoon soulomoon soulomoon left review comments

@jian-lin jian-lin jian-lin left review comments

@michaelpj michaelpj michaelpj approved these changes

@jhrcek jhrcek Awaiting requested review from jhrcek

@wz1000 wz1000 Awaiting requested review from wz1000

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /