mpickering/ghcide

Fix tests and enable CI for tests

Opened this issue ยท 9 comments

In classic @mpickering style, the tests are currently broken. It would be good if someone could fix the build and re-enable them in CI.

I fixed the building of tests in #38 but that was the easy part:

102 out of 247 tests failed (372.93s)

Sounds like a good start at least. I imagine a lot of the tests fail because of changes due to multi-component requiring each cradle to explicitly list targets.

I'll give a try

Well, the first step had been enable tests in azureci for linux and windows.
I had to disable hlint and -WError for both to get it reach running the tests: hls...jneira:wintests, so we should meka them work
It confirms the number of failing tests, same for both os's (nice ๐Ÿ˜‰ ), 101-103: https://dev.azure.com/jneira/haskell-language-server/_build/results?buildId=775&view=results

The are quite fewer failing tests in the hls ghcide submodule version, i suppose it is not updated to last mpickering/hls version

For reference this is the output of cabal test in my windows 10: https://gist.github.com/jneira/7d1048b47205c20eb4f73baea97be8f3

If i run cabal run ghcide-tests instead cabal test there are only seven failing tests:
https://gist.github.com/jneira/7d1048b47205c20eb4f73baea97be8f3#file-test-report-cabal-run-txt

weird ๐Ÿค”

^ probably because it is using the version of ghcide on your path.

@mpickering yeah, i forgot about that one (again ๐Ÿคฆโ€โ™‚๏ธ )

Hi, not sure if i could resolve the issue in a reasonable amount of time, given my knowledge of ghcide, its test suite and the changes of this branch ๐Ÿ˜Ÿ

I'll post my progresses anyway:

  • most tests creates an working remporal dir with no hie.yaml, i suppose that at least upstream ghcide does not need it
  • completions: all completions tests are failing and i am not sure why, the server returns an empty list of possible completions in all cases
  • code lenses: all of them failing
  • outline: all of them failing
  • get.definition: almost all of them failing
  • get.hover and get.type definition: all failing
  • cradle: all failing