Commit Graph

11 Commits

Author SHA1 Message Date
Pepe Iborra
959db7b10b
Extract the benchmarking Shake rules to a standalone Cabal package (#941)
* [bench-hist] break down in rule functions

* Extract the benchmarking Shake rules to a shake-bench package

There's some room for reusing the rules used in the historic benchmarking suite
in other projects. This change makes that a bit easier and improves the
documentation and code structure.

The new structure is:
- lib:shake-bench - a Cabal library with functions to generate Shake rules
- ghcide:bench:benchHist - the ghcide instantiation of the above Shake rules

That's not to say that shake-bench is completely decoupled from ghcide -
there are still plenty of assumptions on how the benchmarks are organized, their
outputs, etc. But with a little bit of effort, it should be easy to make
these rules more reusable

* Fix nix build

* Fix license

* hlints and redundant imports

* more hlints

* Exclude shake-bench from the stack build
2020-12-07 15:03:15 +00:00
Avi Dessauer
42901e39f7
Simplify and Bump implicit-hie version constraints (#933) 2020-12-04 18:10:16 +01:00
Avi Dessauer
9b8aaf9b06
Update implicit-hie to 0.3.0 (#905) 2020-11-12 07:55:59 +01:00
Javier Neira
abf0a8abf5
Use implicit-hie-0.1.2.0 (#880) 2020-10-25 13:52:25 +05:30
wz1000
5bf1532b7e
Move HIE files stuff to a new hie-compat package (#877)
* Move HIE files stuff to a new hie-compat package

* add ghc-lib flag for hie-compat

* ghc-lib :(

* ghc-lib :(((

* ghc-lib :((((

* ghc-lib :(((((
2020-10-20 12:48:56 +05:30
Javier Neira
df13c5ad84
Enable test suite in Windows, marking unreliable tests as ignored (#821)
* Enable tests in windows ci

* Use lsp-test-0.11.0.6

* Fix tests in windows

* Use chocolatey to install cabal in ci

* Fix test: type constructor external

* Fix test: non workspace file

* Mark cpp-error as ignored for windows

* Ignore plugin tests for windows
2020-10-02 10:18:28 +02:00
Javier Neira
c361a26195
Store the lsp client settings in shakeExtras and create a Rule to get them (#731)
* Store client settings in ide state

* Log ide config registered in initHandler

* Use a Maybe aware updater function

* Create a Rule to get client settings

* Create a specific getter for client settings

* Trim trailing whitespace

* Use modifyVar to avoid race conditions

* Add comment to GetClientSettings

* Use defineEarlyCutOffNoFile for GetClientSettings

* Restart shake on config changed

* Use Hashed for clientSettings

* Send log notifications to client about session

* Show test output directly

* Add tests over client settings

* Apply hlint hints

* Simplify iface test to make it more robust

Following @pepeiborra advise

* Send session notifications only in test mode

* Retry bench execution
2020-09-23 20:54:27 +01:00
Javier Neira
d686b91ec1
Use implicit-hie-cradle-0.2.0.0 (#806) 2020-09-15 08:52:32 +02:00
Javier Neira
f79e930bc0
Use implicit-hie when no explicit hie.yaml (#782)
* Use implicit-hie when no explicit hie.yaml

* Use implicit-hie-cradle master in all build config files

* Set correct hie-bios version for ghc-8.10.1

* Fix windows ci build
2020-09-13 18:41:43 +01:00
Pepe Iborra
0f06d30611
Relax upper bounds for GHC 8.10.1 (#705)
* Relax upper bounds for GHC 8.10.1

* Update cabal.project

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-07-20 11:07:49 +02:00
Matthew Pickering
d999084820
Use stale information if it's available to answer requests quickly (#624)
* Use stale information for hover and completions

This introduces a new function `useWithStaleFast` which returns with
stale information WITHOUT checking freshness like `use` and
`useWithStale`.

Greatly improve debug logging

All actions triggered by shakeRun now also pass an identifier which
means that the debug logging shows which actions are starting/finishing

We also distinguish between internal and external events. By default
external events are ones triggered by runAction and the debug output
is displayed to the user in command line and --lsp mode.

In order to see internal logging statements, there is a new flag called
--verbose which also prints out internal events such as file
modification flushes.

Cleaner variant using runAfter

Step 1: Do not run actions with shakeRun

Queue implementation, living, breathing

Use a priority queue to schedule shake actions.

Most user actions are answered immediately with a cache but also
spawn a shake action to check the cached value we consulted was up to
date.

* Remove DelayedActionExtra

* hlint

* Fix progress

* Always block instead of fail on initial computation

* Can block for code lens

* Update docs

Co-authored-by: Zubin Duggal <zubin@cmi.ac.in>
2020-06-30 11:22:20 +02:00