* Support plugins
Call initializePlugins before running typecheck.
* call initializePlugins only for GHC >= 8.6
initializePlugins doesn't exist in older GHC versions.
* A separate function for initializing plugins
* Add a test for plugins
This is intended for the DAML CLI compiler which is also built upon
`ghcide`. For now, we have no intention of using this in the DAML IDE
or in ghcide but that might change in the future.
+ internal class in instance declaration
+ internal class in type signature
+ external class in type signature
Hover seems not to work for classes at all.
Goto def works for internal classes, but not external ones.
This leaves the table looking like this:
| | find definition | hover |
|-------------|-----------|---------|
| field in record definition | ✔️ | ✔️ |
| field in record construction | ❌ | ❌ |
| field name as accessor | ✔️ | ✔️ |
| top level name | ✔️ | ✔️ |
| record data constructor | ❌ | ❌ |
| plain data constructor | ✔️ | ✔️ |
| type constructor | ✔️ | ❌ |
| external type constructor | ❌ | ❌ |
| external value | ❌ | ✔️ |
| plain parameter | ✔️ | ✔️ |
| pattern match name | ✔️ | ✔️ |
| top level operator | ✔️ | ✔️ |
| parameter operator | ✔️ | ✔️ |
| name in backticks | ✔️ | ✔️ |
| class in instance declaration | ✔️ | ❌ |
| class in signature | ✔️ | ❌ |
| external class in signature | ❌ | ❌ |
* Move sample code out into into separate source file
* Add test/data/GotoHover.hs to cabal extra-source-files
* hlint: explicit module export list
* hlint: implement and use readFileUtf8
* hlint: remove -Wmissing-signatures
* Add gotoDef/hover tests for values from other package
* Make Expect constructor names more explicit
* Clean up assertions
* Replace funky function composition operator
* Add signature to checkHoverRange
* Clean up assertion
Experience shows that people sometimes mistakenly start `ghcide` on
the command line with the `--lsp` option (which is intended to be used
only in server/client communication scenarios) and then wonder why
nothing is working..
So let's issue a warning message whenever `--lsp` is used.
* Use a separate finder cache for each typecheck call
On a large DAML project, we occasionally saw error about missing
modules during typechecking during concurrent compilations. This was
caused by the fact that we modified the IORef in the HscEnv which is
shared between concurrent compilations.
A while ago, `testSession` was modified to include a 0.5s wait, for
the sake of tests which were looking for a specific and complete set
of diagnostics, in order to ensure that all the incoming diagnostics
had been received before the comparison was made. This made sense at a
time when the vast majority of tests fit this pattern. Today we have
plenty of tests which have no need for this. Hence:
+ `testSession` has been renamed to `testSessionWait`
+ a new `testSession` has been added, which does not wait at all
+ all tests which use `expectDiagnostics` have been modified to use
`testSessionWait`, all other tests use the new delayless
`testSession`.
Locally this knocks almost 25% off the runtime of the full test
suite.
These tests document and monitor the evolution of the capabilities
announced by the server in the initialize response.
Currently the server advertises almost no capabilities. Out of 23
top-level categories, the only 3 which are announced are
+ text document sync
+ hover
+ goto definition
At the very least code actions are known to be provided, but are not
announced in the initialize response.
+ Reduce manual duplication of information shared between hover and
goto-def tests
+ Make sure that all the information in the test specifications that
relates to fiddly line and column numbers, fits together on one
screen, and is generally easier to match and understand by eye.
* Hack around https://github.com/mpickering/hie-bios/pull/56 - hie-bios expects files to really exist on disk
* Fix getLocatedImportsRule to pass the file to the session
* Add support for multiple simultaneous hie.yaml files.
Also rewrites the user experience on setup to be less verbose.
Also adds masking for GHC session construction.
* HLint
* Code review comments
* Switch to the Strict map