Commit Graph

40 Commits

Author SHA1 Message Date
Pepe Iborra
b8627c2254 Add retrie to all? the stack.yaml descriptors 2020-08-01 16:28:27 +01:00
Luke Lau
9d3d0e6f13 Accept the legacy "languageServerHaskell" config name
This also requires a bump to lsp-test to fix a test, and drops the
trick that the wrapper tests used to find the wrapper executable since
it was just confusing
2020-07-27 15:11:10 +01:00
jneira
8d84e9ceb3 Remove leading white space 2020-07-23 11:09:53 +02:00
jneira
e82848006f Use -haddock for cabal and stack 2020-07-23 11:09:52 +02:00
Luke Lau
0c99ce0411
Distributable binaries (#165)
Update ghcide to obtain the GHC lib dir at runtime, rather than at compile time with ghc-paths. This means that the binaries can be moved about since the lib dir is obtained on the fly
Share the exe/main.hs logic between ghcide and hls: the session setup logic which previously took up most of exe/main.hs now resides inside the ghcide library, and is used by both ghcide and hls's executables
Add a --project-ghc-version option to the wrapper which spits out the project's ghc version to stdout. This is useful for the vscode extension which can then use it to download the corresponding version of binary that the wrapper would have otherwise attempted to launch
Make the wrapper check to see if the correct tool is installed beforehand. For example, if it detects a stack project but stack isn't on the path, it will report an error then and there, rather than having hls/ghcide confusingly fail later on. The vscode extension uses this new error message as well to provide a pop up message linking the user to a website to install the missing tool
Remove cabal-helper from the wrapper, so that the implicit cradle logic is the same between ghcide/hls/hls-wrapper
And of course, add a GitHub action workflow that runs whenever a release is created on GitHub that builds static binaries on Linux, and distributable enough binaries on macOS and windows. This is documented a bit more in docs/releases.md

* WIP

* WIP 2

* WIP 3

* WIP 4

* WIP 5

* WIP 6

* WIP 7

* WIP 8

* WIP 9 Use patched hie-bios to get libdir dynamically

* Try building the wrapper

* Try to fix build_wrapper env variable not being picked up

* Try again

* Give up on the env var idea

* Try out static optimised builds?

* Try squashing the working dir

* Woops

* Try squashing the builddir

* Try going into the parent directory

* Radical approach - don't use such a long name for the wrapper

* Use dist-binary flag

* Debug why floskell fails to build on windows

* haskell-language-server => hls on CI

I hate that I have to do this

* Employ extreme path saving measures

* sed time :(

* Try making sed command portable

* Compress artefacts

* Tidy up wrapper logging

* Use version checking logic in hie-bios

* Add documentation on the releases process

* Remove unused code

* Append .exe to windows binaries

* Try out building remaining supported ghc configurations

* Add wrapper tests and update hie-bios

* Use index timestamp that exists on hackage

Fixes warning

* Update hie-bios

* Update hie-bios

* Try building windows jobs on -j1

* Skip windows 8.8.2

* Update ghc-check to use hie-bios runtime ghc libdir

* Upload binaries as an artifact too

* Try flicking on enable-executable-static

I don't expect this to work, puffnfresh has already tried this and had
to fork ghcup

* Fix artifact upload

* Update to latest ghcide and reuse loadSession

* Check if the tool is installed in --project-ghc-version in the wrapper

* Fix wrapper tests by copying to temporary directory

* Try caching

* Tidy up and switch back to cabal helper implicit cradle

* use split sections

* Remove cabal-helper and replace it with hie-bios implicit logic

The cabal-helper cradle was only used by the wrapper for detecting the
project GHC version in the absence of an explicit hie.yaml file, whilst
ghcide itself used the hie-bios implicit cradle logic. This brings the
two in sync so the wrapper should behave more predictably now.

* Undo agpl common stanza change

* Add release number

Co-authored-by: amesgen <amesgen@amesgen.de>
2020-07-20 20:28:52 +01:00
Fendor
9bfaca83aa Upgrade to hie-bios 0.6.1 2020-07-13 16:27:03 +02:00
Alistair Burrowes
a91ca757b2 Bump ormolu to 0.1.2.0 2020-07-07 08:58:52 +10:00
Alan Zimmerman
d9f15d29e4 Fix compile with multiple GHCs 2020-06-24 20:59:15 +01:00
Alan Zimmerman
589872467a Get rid of pedantic warning 2020-06-14 19:49:34 +01:00
Junyoung Clare Jang
1b790db5f5
Add a formatter plugin using stylish-haskell 2020-06-04 17:06:33 -04:00
jneira
525f047a7c Update ghc-lib-parser version 2020-05-24 16:28:07 +02:00
jneira
d2319b84dd Fix build using brittany revision 2020-05-18 00:37:10 +02:00
jneira
1ba4ab38fe Use last lts for ghc-8.6.5 2020-05-14 10:36:22 +02:00
jneira
987c6e82b7 Use cabal-helper-1.1 in default stack.yaml 2020-05-14 07:23:35 +02:00
Alan Zimmerman
6a45c35809 Use new mpickering/ghcide/hls
At e7adaca189a86c6ac7b434fec29055c80d0468ac
2020-05-13 23:09:01 +01:00
Alan Zimmerman
beaf9157c3 Use latest mpickering hls, with hover tweaks added 2020-05-12 21:59:21 +01:00
Alan Zimmerman
08dd104a04
Merge pull request #100 from fendor/hls-update-latest-hie-bios
Hls update latest hie bios
2020-05-08 11:41:23 +01:00
fendor
bce081aed4 Update to nightly hie-bios 2020-05-08 11:21:14 +02:00
fendor
1e972c2c50 Update extra-deps to use latest version of shake 2020-05-07 22:45:27 +02:00
Luke Lau
4f99ff96a1 Update stack files 2020-05-06 14:05:55 +01:00
Alan Zimmerman
6a6ade1729 Update for haskell-lsp 0.22 2020-05-05 18:53:57 +01:00
Alan Zimmerman
992ffb1267 Use mpickering/hls ghcide branch
At b4c3619346f4fe89ac036322fdd9ed178fb66685
2020-05-02 13:49:15 +01:00
fendor
23196e291e Add extra-deps for ormolu for stack 2020-04-25 17:40:48 +02:00
fendor
460b4554f5 Update to ormolu 0.5.0 and simplify plugin
Move makeDiffTextEdit from Haskell-IDE-Engine to PluginUtils.
2020-04-25 17:40:48 +02:00
fendor
c4888d4e51 Fix source packages for hie-bios and update API 2020-04-24 22:25:40 +02:00
jneira
2e0cad7126 Use patched version of hie-bios in stack config 2020-04-18 01:24:03 +02:00
Alan Zimmerman
add70e462c Update to use mpickering ghcide from wip/multi-rebase
https://github.com/digital-asset/ghcide/pull/522
2020-04-06 23:08:25 +01:00
Alan Zimmerman
1456333fa7 update stack yaml files 2020-03-29 23:24:51 +01:00
Alan Zimmerman
e952576586 Switch to using ghcide master again 2020-03-16 18:18:08 +00:00
jneira
32daf7fc3d Use cabal-helper head 2020-03-08 23:12:22 +01:00
Alan Zimmerman
ab1ef255e5 Choose formatter based on config.
Requires https://github.com/digital-asset/ghcide/pull/416
2020-02-09 21:11:51 +00:00
Alan Zimmerman
eed4f41e73 Generalize formatter plugin support, add Floskell
First pass only, need to (re-)enable tests, and find a way of selecting between
multiple formatters. Apart from only installing a single formatter plugin.
2020-02-07 20:04:05 +00:00
Alan Zimmerman
f18d916bee Formatting via Ormolu plugin
Supports whole module and range formatting.

Does not yet extract options from the hie-bios cradle.

Closes #30
2020-02-04 20:48:50 +00:00
Alan Zimmerman
d85938fa15 Rename to haskell-language-server
Voting at time of migration was 42 for this name, next closest was 6.

Closes #29
2020-02-01 09:50:03 +00:00
jneira
288aa6a43b Move ghcide to local packages again 2020-01-30 22:21:37 +01:00
jneira
e947cd88dc Change ghcide from pckg to extra-dep 2020-01-30 00:24:19 +01:00
Alan Zimmerman
6ca21004b5 Add some additional stack files 2020-01-29 21:15:40 +00:00
Alan Zimmerman
63636ba717 Update stack.yaml to use ghcide as a submodule 2020-01-26 09:44:45 +00:00
Alan Zimmerman
5e96992e83 Add proof of concept hard-coded hover handler
A kind of "hello world" LSP plugin.

Tested with emacs lsp-mode by setting "Lsp Haskell Process Path Hie"
to `ide`, and clearing out the "Lsp Haskell Process Args Hie".
2020-01-25 19:45:32 +00:00
Alan Zimmerman
04cb7ea583 Initial basic infrastucture 2020-01-25 14:33:53 +00:00