-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Set the root for tests to the test directory #3830
Conversation
On startup, HLS performs a sanity check to validate the GHC version for the project is the same as the GHC version used to build HLS. Due to some oversights, the tests always use HLS's cabal package to perform this check. This is (almost) valid for the tests but adds overhead for finding the GHC version for each integration test in HLS. Improves the startup time for each integration tests that depends on hls-test-utils. Thus, ghcide test suite is unaffected. Fix `findCradle` invocations to point to a file in the root directory. `findCradle` from hie-bios doesn't work correctly for directories and requires a file, even if that file doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm amazed anything worked without this. Don't a bunch of the tests have their own hie.yaml
s? So doesn't this mean we were ignoring them all because we were using the top-level cradle?
No, I think, only to make sure HLS is compiled against the correct GHC version. For running the tests, the proper |
But when we start the server in the test utils we were setting the wrong root? I don't see how that wouldn't end up running in the wrong place entirely? |
I am not entirely sure, as in "I haven't checked", but a Cradle produces the cradle root directory and HLS should be able to handle this easily. The only reason why it might not work correctly is that it might infer the wrong GHC version for a project, e.g., when it is a stack project, ... |
Hie-bios PR haskell/hie-bios#415 |
On startup, HLS performs a sanity check to validate the GHC version for the project is the same as the GHC version used to build HLS. Due to some oversights, the tests always use HLS's cabal package to perform this check.
This is (almost) valid for the tests but adds overhead for finding the GHC version for each integration test in HLS.
Improves the startup time for each integration test that depends on hls-test-utils. Thus, ghcide test suite is unaffected.
Fix
findCradle
invocations to point to a file in the root directory.findCradle
from hie-bios doesn't work correctly for directories and requires a file, even if that file doesn't exist.Incidentally, I think this fixes #3074, too.
We should fix
hie-bios
'sfindCradle
to also work for directories. If this PR works as hoped, I'll updatehie-bios
.