Commit Graph

74 Commits

Author SHA1 Message Date
Pepe Iborra
2d9314ae1d Fix performance of getFileExists (#322)
* Improve hover performance by speeding up getFileExists

We touch the file system only the first time.
After that, we rely on the lsp client to tell us if a file is created or deleted

Fixes #101
2020-01-21 09:05:58 +01:00
Pepe Iborra
db456b0e51 Add a new flag --shake-profiling DIR (#307)
The flag provides a way to enable Shake profiling reports without recompiling.
Debug output prints links to the Shake reports for convenience
2020-01-06 19:56:40 +01:00
Pepe Iborra
b78efe36bb Extend version message to include path and git commit (#306) 2020-01-06 09:13:14 +01:00
Moritz Kiefer
b2ad2eb361
Fix build with Shake 0.18.4 (#272)
Shake 0.18.4 started exporting Info from this module which clashes
with the one from haskell-lsp. Fixes #271
2019-12-18 11:24:54 +01:00
Alejandro Serrano
1b1c58518d Filter out completely warnings not enabled by user (#263)
* Filter out completely warnings not enabled by user

* Suggestions by @cocreature

* Add tests

* Work more on tests

* Fix tests
2019-12-17 15:13:12 +01:00
Moritz Kiefer
fc30f1476f
Upgrade to hie-bios (#257)
This does not yet take advantage of any new features but we should at
least be able to benefit from bugfixes.
2019-12-16 11:42:44 +01:00
Jinwoo Lee
fa2c295f74 Indicate failures with exit code in command-line mode. (#233)
It'd be useful for scripting or integration tests.
2019-12-12 09:00:49 +01:00
Pepe Iborra
5091a1d202 Fix horrible path normalisation issue (#225) 2019-12-08 17:07:15 +01:00
Moritz Kiefer
5febbcbc48
Fix progress reporting (#153)
* Fix progress reporting

* Bump haskell-lsp and lsp-test revisions

* Change client name

* Fix typo

* Bump revisions
2019-10-17 11:11:52 +02:00
Jacek Generowicz
e583f13d8d Issue visual warning for humans if --lsp option used (#161)
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.
2019-10-08 19:43:32 +02:00
Neil Mitchell
9d45eee21c #137, make the status message clearer about what worked and what didn't (#138) 2019-09-27 15:18:24 +02:00
Neil Mitchell
60ed687de9 Support multiple hie.yaml files (#127)
* 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
2019-09-25 13:01:41 +02:00
Jacek Generowicz
c24ef1c288 Add --version CLI option (#106)
* Add --version CLI option

* Extract ghcide version from cabal

* Extract precise GHC version from cabal preprocessor macro
2019-09-23 08:50:28 +02:00
Neil Mitchell
50e35f0e98 Use the hie-bios function that doesn't perform a downsweep. Fixes #99 (#102) 2019-09-20 17:33:37 +02:00
Ollie Charles
9a5ee23c01 Build on GHC 8.8 (#43) 2019-09-16 15:20:48 +02:00
Neil Mitchell
fc939e7dfb Add a comment that the test needs to change for multi environment 2019-09-11 09:34:16 +01:00
Neil Mitchell
405d62b064 Add multi environment support 2019-09-11 09:13:18 +01:00
Moritz Kiefer
5da86c3e44 Rename hie-core to ghcide (#2820)
* Rename hie-core to ghcide

The name `hie-core` has caused a lot of confusion as to how we relate
to haskell-ide-engine so changing it should hopefully help with that.
I also think that ghcide is still a good name once we hopefully
integrate with haskell-ide-engine more closely.

The name ghcide seems to have a reasonable amount of support on
Twitter https://twitter.com/ndm_haskell/status/1170681262987710464
which is of course the only good way to come up with names.

* Add a readme that points people to the new directory.

* Fix bogus replacements

* Use a proper link

* links are hard
2019-09-10 15:01:29 +02:00
Neil Mitchell
9bd78857d8 #2326, GHC 8.4 compatibility (#2796)
* #2326, GHC 8.4 compatibility

* Fix up CI

* Add a Shake lower bound

* Upgrade to a hie-bios which is GHC 8.4 compatible

* Add a GHC 8.4 stack

* Fix HLint again
2019-09-10 14:52:17 +02:00
Andreas Herrmann
bf7fea4f1d hie-core exe: initDynLinker (#2555)
The hie-core tests are flaky in stack. They can fail with the following
error message

```
hie-core: panic! (the 'impossible' happened)\n  (GHC version 8.6.5 for x86_64-unknown-linux):
        Dynamic linker not initialised

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
```

Explicitly initializing the dynamic linker at session startup should
avoid this issue.
2019-09-10 14:52:17 +02:00
Moritz Kiefer
0f0e6740c1 Only report progress when client supports it (#2517)
* Only report progress when client supports it

This fixes an issue that some people encountered when running hie-core
in Emacs with a version of haskell-lsp that does not understand
progress events.

* Fix tests

* More test fixes
2019-09-10 14:52:17 +02:00
Gary Verhaegen
10c59a01c2 update copyright notices (#2499) 2019-09-10 14:52:17 +02:00
Neil Mitchell
16873edb44 hie-core Logging and exceptions (#1933)
* Rename reportSeriousError to reportInternalError

* Stop using logError for logging things that are warnings to the user, not errors by us

* Rename logError

* Sort the log fields properly

* Delete tagAction from Logger

* Strip down the pure logger

* Delete unused pieces of the logger

* A quick check suggests the call stack will be useful in approximately none of the callers of logging, so just remove it

* When reporting an internal error, give as much detail as we can

* Change our logger to be based on Priority values

* HLint fixes

* Rename makeNopLogger

* In hie-core say what level of message you are setting

* Delete the unused makeOneLogger

* Make sure we can show messages floating around

* If a notification/response handler throws an exception, report it upwards

* Remove reportInternalError in favour of a general logging mechanism

* Add missing dependencies

* Just call fail for a dodgy error report

* Add a FIXME

* Make missing modules just an error
2019-09-10 14:52:17 +02:00
Neil Mitchell
72593a285d Make hie-core outside an IDE work better (#1895)
* Move the hie-core demo files around (they aren't really a demo anymore)

* Split the command line parsing into a separate module

* Give messages about how long starting something takes

* Make the interactive mode say what it is doing a bit more

* Add a --cwd flag to hie-core

* Take a list of files and directories for hie-core

* Update the readme to say how to test using hie-core

* Fix up the bazel file

* Add HLint exception
2019-09-10 14:52:17 +02:00