-
-
Notifications
You must be signed in to change notification settings - Fork 389
[Migrate BootTests] part of #4173 Migrate ghcide tests to hls test utils #4227
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
Merged
fendor
merged 3 commits into
haskell:master
from
soulomoon:soulomoon/update-ghcide-tests-hls-test-utils-BootTests
May 14, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 do not think the original is right?
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.
What do you mean? Looks correct to me. If you don't lock, I don't think the tests will work though, as shifting the cwd will affect all tests.
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.
Oh I see, the shift happens in the code of lsp package, right?
We might want one with no lock too, so that it can be run inside the one with the lock. Some test in ghcide need to nest the runs.
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.
No, the shift happens in the executable https://github.com/haskell/haskell-language-server/blob/master/src/Ide/Main.hs#L126
Ok, I understand that nesting might be necessary sometimes. However, the comment should make it clear that all integration tests need to be locked, since we launch a thread, not a new process, for the tests, which all share the same
CWD
variable.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.
Thanks for the classification, it probably be a good idea to eliminate the need for
getCurrentDirectory
insideIDEMain.defaultMain
now. I'll try to do it. AlsomakeAbsolute
.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.
EMM, it might be hard, rule have no access to root dir, but just currentworking dir
https://github.com/soulomoon/haskell-language-server/blob/542ea2603f361ba43b839fee0779d1d1ac034c2b/ghcide/src/Development/IDE/Core/Rules.hs#L722
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.
Also we might not find the file in
TemplateHaskell
here ? If current dir is not set.https://github.com/soulomoon/haskell-language-server/blob/67438ef6aa23ad404af2f142e52dce78b617f95c/ghcide/test/exe/DependentFileTest.hs#L40
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.
Attempt of getting rid of cwd dependent moved to #4231
Focusing on BootTests migration now.