-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Fix the Eval plugin sporadic exceptions #1345
Conversation
6eaf997
to
9280cc8
Compare
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've tested this branch and master with direct cradle change cherry-picked, using the following (rather long) one-liner, repeating Haddock comment test until it fails:
i=0;stack build --silent --stack-yaml=stack-8.8.4.yaml && export HLS_TEST_EXE=$(stack --stack-yaml=stack-8.8.4.yaml exec -- which haskell-language-server) ;while (stack test haskell-language-server:test:func-test --ta "-p Haddock -j1" --silent); do i=$(expr $i + 1); echo "OK: ${i}"; done
In master, it fails after a few to 25 successful trials.
With the changes in this branch, however, it won't fail even after 100 trials. Great!
40d3da7
to
23fed3a
Compare
I am actually getting BadDependency errors on all tests with "cabal test func-test", e.g.:
|
Ignore that, I tried to remove the cabal/stack cradle in the test suite but forgot that QuickCheck is required. I've rolled that change back and CI can confirm. More importantly, can someone actually use the plugin and confirm that it works? |
This once occurred in my environment. I discovered that this occurs when there is a difference of GHC versions between the global environment (determined from PATH) and that of GHC used to build the haskell-language-server executable being tested (given by
I've just tested the current version of this branch. It seems that at least for predefined func-test inputs, Eval Plugin works just out of the box. |
Yup, now it works beautifully, high five @pepeiborra! As @pepeiborra is bravely looking into the innards of ghcide, I wondered if he could also fix or at least figure out the origin of another major issue with evaluation: the inability to import a local module inside a test. The test case is in TLocalImportInTest:
|
Hopefully this will get rid of the sporadic exceptions
I also took the chance to speed up the test suite a bit.
Someone else should build the PR locally and test that the Eval plugin still works and performs well /cc @tittoassini @konn