Commit Graph

23 Commits

Author SHA1 Message Date
Fendor
f5e3fce13f Prepare release 2.2.0.0 2023-08-26 00:24:32 +02:00
Julian Ospald
9fe56f1f01
Migrate release CI to github (#3406)
* Migrate to github CI

* Parallelize GHC builds

* Avoid building local packages twice

* Prepare for building 9.2.6

* Fix build on darwin M1 9.0.2

* Drop build of windows 9.2.6 due to https://gitlab.haskell.org/ghc/ghc/-/issues/22961

* Drop 9.0.2 for darwin M1

* Fix build on windows by disabling ghc-check pkg ABI check

* Use git-archive to create src tarball in upload

* Build releases for 9.2.7

* Build src archive in github action

* Build on unknown-linux too

* Try to build GHC-9.4.4 for unknown linux on Fedora33

* Make sure hls-wrapper binary comes from GHC-8.10.7

---------

Co-authored-by: wz1000 <zubin.duggal@gmail.com>
2023-03-23 11:23:18 +00:00
Pepe Iborra
d0e3e0fe3f
HLS benchmarks (#3117)
* extract ghcide:experiments-types

* extract haskell-language-server:plugins and let go of examples

The main goal here is to move the Plugins module into an internal
library so that it can be reused from the benchmark suite.

In order to
make that easier, and since they hardly serve a purpose in a repository
with 25 plugins, I delete the Example and Example2 plugin descriptors
and their dependencies.

* HLS benchmark suite

Port the ghcide benchmark suite to HLS and benchmark plugin
"configurations" independently.

This includes the following changes to the ghcide benchmark suite and
HLS:
- Support for "configurations" which are defined as sets of plugin ids.
  The benchmark will be run with only these plugins enabled and all
  others disabled
- Support for configurable concurrency. This relies on RTS -ol and -po
  flags to place the RTS traces in the target location rather than in
  the cwd

This change requires two commits, the next one places
ghcide/bench/hist/Main.hs into its final location to help 'git'
recognize the change as a file move

* ghcide/bench/hist/Main.hs -> bench/Main.hs

* CI - fix artifact names for uniqueness

* disable shorten HLS step

* Do not store eventlogs to avoid out of disk space

* render durations up to milliseconds

* shorten titles

Goal is to display the formatted CSV (via column) one row per line

* exclude formatting plugin configurations

* Extract ghcide-bench to a standalone package

* ghcide-bench: fix stderr capturing

* Fix mem stats

We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged.

The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.

* feedbacks

* delete Example plugins
2022-08-25 15:08:57 +01:00
Kobayashi
771d8f44e6
unify pre-commit hook & update Gitpod config (#2991)
* update Gitpod config

* update nix shellHook & docs

* install pre-commit hook

* add kokobd as code owner to .gitpod.*

* add gen-hie to Gitpod

* add tools for doc

* remove .pre-commit-config.yaml from .gitignore

* set vscode formatter to stylish-haskell in Gitpod
2022-06-28 08:54:32 +00:00
Michael Peyton Jones
b1bf549915
nix update (#2892)
* Drop -haddock as ghc 8.10.7 fails to build ghc-lib with:

```
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error:
2081
Error:     parse error on input {- | debugIsOn -}
2082
    |
2083
176 | ann doc instr {- | debugIsOn -} = ANN doc instr
2084
    |               ^^^^^^^^^^^^^^^^^
```

  # Please enter the commit message for your changes. Lines starting

* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-compat':
    'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03)
  → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20)
  → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11)
• Updated input 'gitignore':
    'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26)
  → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05)
• Updated input 'hie-bios':
    'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc='
  → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk='
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13)
  → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24)
• Updated input 'pre-commit-hooks':
    'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29)
  → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04)
• Updated input 'pre-commit-hooks/flake-utils':
    'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28)
  → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07)
• Updated input 'pre-commit-hooks/nixpkgs':
    'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01)
  → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23)

* nix flake update & bump ghc921 -> ghc922
ghc921 is no longer available on Nix, see:
  https://github.com/NixOS/nixpkgs/pull/163426

* myst-parser: bump docutils version requirements

* fix devShells and packages default

* use ghc-exactprint 1.5.0 for ghc922

* ghc902: add flag hlint34 to nix

* macosx: add SSE-enabled ptr-poker dependency

* ghc902 requires ghc-lib-parser >= 9.2

* nix: ghcDefault supports HLS tweaks

* fix typo

* add support for pre-commit in mkDevShell

* fix typo

* add ptr-poker to nix shell

* add ghc-884 configuration tweaks

* fix stylish-haskell for ghc-884

* fix default ghc lookup

* ghc884: fixup brittany version to 0.13.1.2

* ghc884: fixup aeson version to 1.5.2.0

* ghc884: fixup ormolu/fourmolu

* add configuration tweak for ghc8107

* rename configuration-ghc-xxx.nix files

* update hackage index

* use current cabal/hackage to fetch ptr-poker in mkDevShell

* reinstate .pre-commit.yaml

* nix: temporary disable "build binaries" from the work flow

* nix: temporary disable builds and partially populate cachix

* nix: temporarily disable ghc 884 and 8107

* nix: temporarily disable nix develop run

* nix: re-enable ghc8107/ghc884 builds, disable "build all binaries"

* nix: noop push commit to test cachix

* nix: touch flake.nix, remove ghc 884

* nix: rm ghc 810, ghc88 + disableLibraryProfiling

* nix: build all binaries again

* Update flake.nix

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* Update flake.nix

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* Update flake.nix

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* revert change made on comment

* rm myst-parser.nix

* fix typo (thanks @guibou)

* explain why we disable library profiling with nix

* ghc922, disable "hls-hlint-plugin"

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com>
Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 10:09:51 +01:00
fendor
a9ae9d100b
Delete HLS installer scripts (#2773)
* Delete HLS installer scripts

Prefer ghcup for installations from source.

* Use simpler ghcup syntax

Co-authored-by: Julian Ospald <hasufell@posteo.de>

Co-authored-by: Julian Ospald <hasufell@posteo.de>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-03-11 15:11:31 +00:00
Julian Ospald
a96b623c2b
Implement distribution of dynamic builds (#2675) 2022-02-11 07:54:09 +00:00
Nick Suchecki
411db02883
Add pre-commit hook for cleaning up mixed-line endings (#2679)
* Update pre-commit hook to include changing line endings

* Fix non-lf lines

* Check pre-commit excludes files

* Revert "Check pre-commit excludes files"

This reverts commit 7b9670f863.

* Actually add the exclude to contributing docs

* Fix merge failure with previous patch

* Inadvertently overwrote merge

* Add LF option for stylish-haskell and pre-commit file

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-04 14:50:18 +00:00
Potato Hatsue
9abf566e06
nix: refactor with flakes (#1827)
* nix: refactor with flakes

* Update github actions

* Make pre-commit-hooks/flake-utils follows flake-utils

* Update github actions

* Update github actions

* Support multi GHC versions

* Update github actions

* Copy postInstall from nixpkgs

* Remove invalid ghc865

* Update README

* Use nixpkgs-unstable

* Update README

* Add plugins automatically
2021-05-19 03:32:23 -04:00
Pepe Iborra
7971a37611
additional .gitignore entries (#1659) 2021-04-03 15:35:51 +00:00
Junyoung/Clare Jang
c95b0766fe
Add a pre commit hook for code formatting (#1384)
* Add pre-commit-hook

* Update CONTRIBUTING.md

* Reduce stylish-haskell configs
2021-02-18 06:26:08 +00:00
Pepe Iborra
cd5dacb4cb
Ignore .shake folder (#1219) 2021-01-17 13:49:09 +00:00
jneira
94b7a3ea6f Rerun test suite to avoid flaky tests 2020-10-28 22:26:43 +01:00
sir4ur0n
eb9a75f8b4 feat(git): Add install/hie.yaml to gitignore
Closes #326
2020-08-16 14:18:13 +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
Pepe Iborra
c9c93f58a9 Do not ignore testdata hie.yaml files
This is surprising and unexpected - I wasted a lot of time debugging test failures in CI that worked fine locally
2020-07-16 20:46:36 +01:00
Luke Lau
416d46211c Add .DS_Store to .gitignore 2020-07-13 11:12:41 +01:00
Alan Zimmerman
c43790b676 Make sure the test-logs directory exists
Otherwise the tests crash.
2020-03-15 12:38:07 +00:00
Alan Zimmerman
5e9684b7db Clean up a bit based on @fendor review 2020-02-07 18:18:33 +00:00
Alan Zimmerman
769797c49b Format tests pass for Ormolu 2020-02-06 21:49:11 +00:00
jneira
6678da9526 Ignore .vscode project settings dir 2020-02-03 14:35:06 +01:00
jneira
1680d3447c Ignore stack lock files and _build 2020-01-29 23:28:06 +01: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