Commit Graph

1761 Commits

Author SHA1 Message Date
jneira
ee22a8ca14 Add missing pr in ghcide changelog 2021-01-03 07:15:49 +01:00
jneira
08b4b827e0 Add changelog for 0.8.0 2021-01-02 23:40:12 +01:00
jneira
f0a01fa804 Fix markdownlint warnings 2021-01-02 23:31:50 +01:00
Pepe Iborra
90966db236
Fix extend imports regression (#769)
* Update exports map for non FOIs

* Fallback to GHC suggestions if exportsMap not accurate

* Tests
2021-01-02 19:22:28 +00:00
Javier Neira
4d33fd192b
Merge pull request #721 from jneira/mergepocalypse-8.10.3
Add ghc-8.10.3 support after merging ghcide repo
2021-01-02 11:55:03 +01:00
Javier Neira
4c2c8f42c8
Merge branch 'master' into mergepocalypse-8.10.3 2021-01-02 10:23:35 +01:00
Pepe Iborra
9649165489
Perform memory measurement on SIGUSR1 (#761)
* Perform memory measurement on SIGUSR1

* remove nub

* Update the open telemetry docs

* remove redundant bang

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-01-02 08:51:28 +00:00
Pepe Iborra
07145e4789
Merge branch 'master' into mergepocalypse-8.10.3 2021-01-02 07:30:05 +00:00
Peter Wicks Stringfield
4086845f82
Cleanup format testfiles (#765)
* Move testdata for auto-formatting tests into its own sub-folder.

It's a lot of files, packing them up into their own little folder makes the
testdata directory much cleaner.

* Delete unused test datafiles.

These look like one the files used in the formatting tests, but they aren't.
These files do nothing.

* Fix typo. "Haksell" |-> "Haskell".

Haksell is what we do to our users.

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2021-01-02 07:28:43 +00:00
jneira
cd3624346d Use first nightly with ghc-8.10.3 2021-01-01 22:16:16 +01:00
jneira
f3bf627af3 Format and add eval plugin 2021-01-01 21:52:06 +01:00
jneira
50e46c1cfb Adapt stack yaml to merged ghcide 2021-01-01 21:52:06 +01:00
jneira
e77be067c0 Sync default stack.yaml 2021-01-01 21:52:05 +01:00
jneira
262b3a9571 Add comment about docker image 2021-01-01 21:52:05 +01:00
jneira
28b0fe328e docker image for 8.10.3 not prepared 2021-01-01 21:52:04 +01:00
jneira
6394dbc7b5 Use ghc-lib-8.10.3 2021-01-01 21:52:03 +01:00
jneira
da47a3f209 Add ghc-8.10.3 to gihub actions 2021-01-01 21:51:54 +01:00
jneira
092c59d3f8 Add ghc-8.10.3 and enable default stack.yaml 2021-01-01 21:49:40 +01:00
jneira
a5e03d9562 Add stack-8.10.3.yaml 2021-01-01 21:49:40 +01:00
Pepe Iborra
aa7e9a377a
Ci fixes (#783)
* Drop macOS benchmarks

* Drop macOS tests

* Really exclude Windows 8.6.4

It occasionally becomes much slower than the others and times out after 6h

https://github.com/haskell/haskell-language-server/runs/1626173853?check_suite_focus=true

* switch to haskell/actions/setup

actions/setup-haskell has been archived, haskell/actions/setup is the replacement

* use coarser cache keys

We are getting very few cache hits because we have too many caches and are
running over the 5GB per repository limit.

Each node in the matrix weighs around 350MB, so we can have up to 15 nodes. The
current matrix (after dropping macOS but before adding 8.10.3) has 12 nodes.

The `**/*.cabal` hash is wrong, since it also captures cabal files in tests
The `**/cabal.project` is wrong for the same reason, but it can be easily
fixed.

* Use more precise .cabal paths in test cache

* Reuse build cache in bench workflows and viceversa

* Reduce Nix builds to the bare minimum

We simply need to check that the Nix derivation works

* remove enable-stack

* Auto cancel redundant workflows

* Enable tests fail-fast

* Remove ghc-lib from matrix

Created #784 to restore it
2021-01-01 19:31:31 +00:00
Javier Neira
901974ba9b
Merge pull request #762 from pepeiborra/retry-cradle
Retry a failed cradle if the cradle descriptor changes
2021-01-01 03:09:32 +01:00
Pepe Iborra
f8ac7a5148 Tests for cradle retry 2020-12-31 09:37:53 +00:00
Pepe Iborra
b013409c32 Make a test more reliable
For some reason the Cabal cradle is very slow and times out
2020-12-31 09:37:53 +00:00
Pepe Iborra
eb8240eb07 On cradle failure, register the hie.yaml file as a dependency 2020-12-30 23:53:53 +00:00
Pepe Iborra
1a34357f08
Invert the dependency between hls-plugin-api and ghcide (#701)
* Invert the dependency between ghcide and hls-plugin-api

This PR includes changes both to ghcide and HLS to implement the reorg described in https://github.com/haskell/ghcide/issues/936#issuecomment-751437853

To summarise:

- `hls-plugin-api` no longer depends on ghcide.
- `ghcide` now depends on `hls-plugin-api` and exposes:
  - The ghcide HLS plugin
  - The `asGhcIdePlugin` adaptor

The goals are:
- to be able to break the `ghcide` HLS plugin down
- to rewrite exe:ghcide on top of the HLS plugin model.

The ghcide side is reviewed in https://github.com/haskell/ghcide/pull/963

If this change is accepted there are two further considerations:
- This would be a good moment to merge the 2 repos, so that there is no history loss.
- `hls-plugin-api` will need to be released to Hackage prior to merging https://github.com/haskell/ghcide/pull/963

* clean up

* Fix the ghcide plugin to include the rules

* clean up PartialHandlers definition

The ghcide partial handlers for completions, code actions and hover are not
really being used, since they get overriden by the `<> ps` append. This is due
to the right-biased semantics of `PartialHandlers`

* Move ghcide LspConfig into Ide.Plugin.Config

* Use HLS plugins in ghcide

For now there is only one, the main ghcide plugin. But this will allow us to
break it down in more fine grained plugins with parallel semantics, both for
execution and error handling

* Fix hlints

* Revert "Temporarily disable the upstream branch for benchmarks"

This reverts commit 7bb3c6efae.

* Disable the Windows 8.6.4 test

* Fix unrelated hlints

Not sure why these are triggering now.

Linting should be restricted to the Diff ...
2020-12-30 23:48:17 +00:00
Pepe Iborra
50632e72ef Add tracy and opentelemetry-extra to shell.nix
Usage of these tools is described in

https://github.com/haskell/haskell-language-server/blob/master/ghcide/docs/opentelemetry.md
2020-12-30 18:23:42 +00:00
Junyoung Clare Jang
10a40ccd5e
Merge pull request #700 from tittoassini/package
Move eval plugin to hls-eval-plugin
2020-12-30 07:24:51 -05:00
Pasqualino Titto Assini
edb150ac52 moved eval plugin to hls-eval-plugin (rebased and fixed) 2020-12-29 18:38:27 +01:00
Pepe Iborra
d4f5d43664 Merge ghcide repository (replacing the submodule) (#702) 2020-12-29 13:24:06 +00:00
Pepe Iborra
b33d49568a Disable build of shake-bench in stack 8.6.x
Error:

Error: While constructing the build
plan, the following exceptions were
encountered:

In the dependencies
for diagrams-postscript-1.4.1:
    hashable-1.3.0.0 from stack
                     configuration does
                     not
                     match >=1.1 && <1.3
                     (latest matching
                     version is 1.2.7.0)
    lens-4.18 from stack configuration
              does not
              match >=4.0 && <4.18
              (latest matching version
              is 4.17.1)
needed due to shake-bench-0.1.0.0
               -> diagrams-postscript-1.4.1
2020-12-29 13:22:04 +00:00
Pepe Iborra
89f2359ebd Disable build of shake-bench in stack 8.10.x
```
Error: While constructing the build
plan, the following exceptions were
encountered:

In the dependencies
for shake-bench-0.1.0.0:
    Chart-diagrams needed, but the stack
                   configuration has no
                   specified version
                   (latest matching
                   version is 1.9.3)
    diagrams needed, but the stack
             configuration has no
             specified version  (latest
             matching version is 1.4)
    diagrams-svg needed, but the stack
                 configuration has no
                 specified version
                 (latest matching
                 version is 1.4.3)
needed since shake-bench is a build
target.

```
2020-12-29 13:22:04 +00:00
Pepe Iborra
abb3953396 Disable ghci objects in all the stack descriptors
This is needed to build with Cabal v1 if ghc is built with
DYNAMIC_GHC_PROGRAMS=NO which is the case e.g. in Windows
2020-12-29 13:22:04 +00:00
Pepe Iborra
7e86f1785c Fix paths in bench script 2020-12-29 13:22:04 +00:00
Pepe Iborra
9b5c397c98 Launch ghcide/HLS for tests with -j2 to limit amount of memory used
Reminder that ghcide requires at least 2 capabilities
2020-12-29 13:22:04 +00:00
Pepe Iborra
df66518bd1 Run GitHub actions only on PR
With so many github actions (>60) we cannot afford to run on every push
2020-12-29 13:22:04 +00:00
Pepe Iborra
7f84b94cac Fix language extension code action tests
The ghcide merge includes https://github.com/haskell/ghcide/pull/948
which removes the language extension code actions

This makes the associated func-test fail, because the HLS plugin does not pass
the test (only the ghcide code action did). This is because the HLS plugin uses
commands, and the tests do not wait for the command edit to be applied.

The fix is to change the HLS plugin to return a code action with edits and no commands
2020-12-29 13:22:04 +00:00
Pepe Iborra
a40682d36a Fix redundant import tests
These tests were underspecified and broke with the recent improvements to ghcide
diagnostics in https://github.com/haskell/ghcide/pull/959 and included in this
merge.

Fixed by waiting specifically for the typecheck diagnostics and by being less
prescriptive in the number and order of code actions
2020-12-29 13:22:04 +00:00
Pepe Iborra
acf759fe1a Regenerate the cabal cradle 2020-12-29 13:22:04 +00:00
Pepe Iborra
f2ef26ded5 Run the ghcide test suite first 2020-12-29 13:22:04 +00:00
Pepe Iborra
339ef285c4 Add allow-newer entries needed for the ghcide benchmark suite 2020-12-29 13:22:04 +00:00
Pepe Iborra
695475f5e8 Move ghcide artifacts under /ghcide
I missed these previously
2020-12-29 13:22:04 +00:00
Pepe Iborra
7bb3c6efae Temporarily disable the upstream branch for benchmarks
The benchmark script uses git worktree.
The upstream branch contains a ghcide submodule, which is not well supported by
worktree.
Once this PR has been merged and the upstream branch no longer contains a git
submodule, we can reenable it in the bench config
2020-12-29 13:22:04 +00:00
Pepe Iborra
8544fc0bc1 Combine test and nix CI scripts 2020-12-29 13:22:04 +00:00
Pepe Iborra
a48a91074e Add ghcide bench CI action 2020-12-29 13:22:03 +00:00
Pepe Iborra
763108cd48 hie-compat and shake-bench are now top-level projects 2020-12-29 13:22:03 +00:00
Pepe Iborra
a785029d45 Delete redundant descriptors and scripts 2020-12-29 13:22:03 +00:00
Pepe Iborra
dd57399573 Merge remote-tracking branch 'ghcide/merge' 2020-12-29 13:21:45 +00:00
Pepe Iborra
5f0e7aa15b Remove the ghcide submodule 2020-12-29 13:17:40 +00:00
Javier Neira
9ac127e04c
Merge pull request #698 from peterwicksstringfield/enable_progress_tests
Fix and enable progress message tests.
2020-12-27 16:07:35 +01:00
Pepe Iborra
d5789dd9a1 Move under /ghcide folder 2020-12-27 14:03:01 +00:00