Commit Graph

45 Commits

Author SHA1 Message Date
Lei Zhu
8cef7a456a
Support ghc 9.4 for hls-class-plugin (#3258)
* Support ghc 9.4 for hls-class-plugin

* Update support table

* Update test description

* Update nix dependency
2022-10-16 11:56:43 -04:00
Akshay Mankar
73b02ef3f7
Fix nix developement shell (#3257)
Upgrade a few packages which needed upgrade and avoid building hiedb in
nix as it has a dependency on a package in this repository (hie-compat).
2022-10-07 13:19:53 +00:00
Berk Özkütük
468db6f2aa
Use nixpkgs variants of Sphinx packages (#3227)
This commit replaces manually specified `myst-parser` and `sphinx_rtd_theme`
packages with their counterparts already packaged on nixpkgs. With this
change, `poetry2nix` is no more used, therefore that is removed as well.
2022-09-27 10:16:14 +01:00
Guillaume Bouchard
88a1dbbbfb nix: fix nix environment
- Bumped nixpkgs, so that's a true GHC 9.4.2 and not 9.4.0, which was
  failing in cabal which because it was detecting <=9.4.1.
- Fixed GHC 9.4 overrides for dependencies
- Use the "default" GHC environment for tooling in the shell. Hence it
  rebuilds less.
- I introduced a flake for cabal-hashes, hence it can be updated
  automatically (with `nix flake update`) and hence we can use
  `callHackage` for any hackage package.
2022-09-16 10:35:01 +02:00
Matt Russell
1568ce7b0a
Fixes the flake deps to align with cabal (#3163)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-15 11:37:15 +00:00
Guillaume Bouchard
830596ee21 chore: add missing sub-project in flake.nix 2022-09-01 14:47:55 +05:30
Guillaume Bouchard
75cfc3aa1e chore: add the nix stuffs for GHC 9.4
I've just added naively the different nix lines. The configuration file
comes from a copy of the one for 9.2.

With that, we can open a shell with `nix develop
.\#haskell-language-server-941-dev` and type `cabal build`.

(cherry picked from commit 48084ab95729d48d470888d8fde807a1d7865860)
2022-09-01 14:47:55 +05:30
Akshay Mankar
7760340e99
flake.nix Add ghcide-bench to sourceDirs (#3125)
This is required for nix-based dev shells to work.
2022-08-27 11:41:50 +00:00
Kobayashi
255498147a
upgrade lsp to 1.5 (#3072)
* upgrade lsp to 1.5

* fix stack.yaml

* try fix tests

* disable verbose logging in ghcide

* fix more tests in ghcide

* fix floskell test

* disable debug log in func-test

* disable debug log in lsp itself

* Revert "disable debug log in func-test"

This reverts commit 1fd6658c77.

* remove unused import

* fix hls test utils

* upgrade lsp in nix

* fix func-tests

* Revert "fix func-tests"

This reverts commit 2ecd76d0ba.

* fix waitForDiagnosticsFromSourceWithTimeout

* use Null as dummy message in waitForDiagnosticsFromSourceWithTimeout

* simplify a test case

* add comment about lsp bad logs
2022-08-12 09:09:07 +00:00
cydparser
524ef15234
Bump Nix flake GHC 9.2.3 to 9.2.4 (#3081) 2022-08-08 15:26:15 +01:00
Matthieu Coudron
100b53a474
build(nix): ghc922 -> ghc923 (#3049)
* build(nix): ghc922 -> ghc923

bumped nixpkgs and add support for ghc923 (replacing ghc922)

* fixes

* fixing for ghc90?

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-07-20 16:59:54 +00:00
Dmitry Pogodin
b747aa0bd2
Fix Stack build with Nix on macOS (#3031) 2022-07-10 20:23:00 -04:00
Kobayashi
5dc134ef77
remove all usages of pre-commit-check in nix (#3024) 2022-07-08 09:30:30 +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
Pepe Iborra
8cbefb71bc
Consolidate all cabal.project files (#2866) 2022-05-05 15:07:51 +01:00
Zubin Duggal
55ea102304 Remove references to cabal-ghc921.project
It has been changed to `cabal-ghc92.project`
2022-04-21 14:08:10 +05:30
amesgen
df681a83c3
Add HLS Cachix to nixConfig in flake 2022-04-20 00:51:40 +02:00
fendor
9f034f290c
Upgrade to hie-bios 0.9.1 (#2766) 2022-03-08 13:24:00 +00:00
fendor
0c018ac826
Upgrade to hie-bios 0.9.0 (#2738)
* Try out new hie-bios

* Update to hie-bios 0.9.0 hackage release

* Use caret operator for hie-bios dependency

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

* Update nix dependency

* Update hie-bios dependency in flake.nix

Co-authored-by: Potato Hatsue <berberman@yandex.com>

Co-authored-by: Julian Ospald <hasufell@posteo.de>
Co-authored-by: Potato Hatsue <berberman@yandex.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-27 14:21:20 +00:00
Guillaume Bouchard
96ea854deb
Nix flake fix dev shells (#2655)
* nix: ghc92: ignore broken plugins

* nix: use current ghc for tools in the shell

Theses tools are pulled in the shell, but we don't need them to match
the GHC version used for development. Said otherwise, as long as we use
a working `cabal-install` to build with GHC 9.2, we don't care if that
cabal-install was built with GHC 8.10.

This gives more chance for theses tools to work and be in the binary
cache of nixpkgs.

* nix: disable shake-bench for ghc921

* nix: fix ghc 9.2 shell

* nix: explicit cabal project in devShell

Using alias, we get the "correct" behavior when typing `cabal build` in
the nix-shell, it points to the current cabal-project file.

* nix: remove special case for different ghc versions

* nix: move implicit-hie-cradle as a flake input

* nix: restore dev shell

This commit restores a working behavior for `nix-shell` or `nix
develop`, for all supported GHC versions.

When entering a `nix-shell`, or `nix develop
.#haskell-language-server-ghcXxX-dev` you will get an environment with
all the dependencies needed to run `cabal build`.

Haskell dependencies will be built by cabal instead of nix. This may be
more robust compared to a shell where dependencies are built by nix:

- It won't try to build any dependency with nix. This mean that it won't
  benefit from nix caching, but on the other hand, it will perfectly
  match the cabal plan.
- The nix shell may fail to start if an (possibly unneeded) dependency
  was failing to build.

Entering nix-shell also generates an alias command `cabal_project` which
runs cabal with the correct project file if needed (e.g. for GHC 9.0 and
9.2). Users are notified with a message when entering the shell.

The old behavior (i.e. where dependencies are built with nix) is still
available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e.
suffix the name of the shell with `-nix`).

* nix: New entries which build all target at once

All HLS version can be built with `nix build
.#all-haskell-language-server`, and all development shells with `nix
build .#all-dev-shells`.

I had to workaround a limitation in `nix build` which is not able to
build multiples targets, instead I used linkFarmFromDrvs.

All packages and shells are now named with a unique package name
containing the GHC version.

* nix: Build all devShells and all binaries in CI

* nix: build HLS with dynamic linking

Related to #2668.

This fixs the build, however, because now HLS is dynamicly linked, it
pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`.

* nix; fix CI command

* nix: only build dev shell with nix packages for current GHC version

* Another tentative to fix the build

* fix: Eval and alternate number format works with ghc 9.2

* fix CI build

* ANother tentative fix
2022-02-16 12:24:22 +00:00
Guillaume Bouchard
ccce756e47
Move hackage back to flake.nix (#2652)
Apparently `flake-compat` does not work correctly with local flake.

Reported by @teto and @smunix in 2621.

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-29 13:41:54 +00:00
Guillaume Bouchard
6123268215
Flake ghc 92 (#2621)
* refactor(flake): Use a separate flake for hackage sources

This will be easier to update, and pass them as one dictionary.

* flake: support for GHC 9.2

I've naively copied most of the special cases for `GHC 9.0.1`.

- `nix develop .\#haskell-language-server-921` gives me a shell in
  which I'm able to `cabal build`
- `nix build .#haskell-language-server-921` builds HLS binary. I was
  able to use it in a proprietary codebase (by importing the flake) and
  it works fine.
- some plugins are disabled, `brittany`, `stylishhaskell`, `hlint`,
  `haddockComments`, `alternateNumberFormat`. I didn't fight too much to
  fix this because I'm not using them. I'll do an effort in the future
  to fix them.
- `nix develop .\#haskell-language-server-921-dev` does not starts, I
  need to investigate.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-24 08:54:08 +00:00
bradrn
f33954ec38
Correct issues with pre-commit hook (#2597)
* Reformat in accordance with pre-commit hook

* Typo fix: add missing comma to documented pre-commit hook

* Exclude failing files from pre-commit hook

'stylish-haskell' seems to always fail with a parse error on several
files under ghcide/. Excluding these files from the pre-commit hook
ensures that this hook can always succeed.

* Add stylish-haskell excludes to Nix pre-commit hook

* Reformat again in accordance with pre-commit hook

This is basically the same as 800c165, but applied to new changes
which have been added since then.

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-24 00:58:22 +00:00
Gabriella Gonzalez
ff0ccd6ef0
Enable aarch64-darwin in flake.nix (#2561)
Currently only GHC 8.10.7 builds on `aarch64-darwin` after this change

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-03 16:20:13 +00:00
Guillaume Bouchard
5dac6af4c2 Fix nix flake by explicit version for lsp-xxx packages
The nix flake was failing:

```
nix build .#haskell-language-server
```

Was failing because of bounds issue related to hackage `lsp`,
`lsp-types` and `lsp-test` projects.

I've bump theses version, introducing new flake input (so they can be
changed easily in the future) and now the build works.
2022-01-01 16:29:10 +01:00
Michael Peyton Jones
d80faeb1ed
Automatically read in the doc version from the cabal file (#2500)
It was out of date. This way it will always be read in from the file, so
we can forget about it.

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-12-18 12:23:13 +00:00
Junyoung "Clare" Jang
11241379e0
Update flake to use fourmolu plugin in GHC 9 (#2482)
* Update nixpkgs to add fourmolu plugin to GHC 9

* Fix GHCIDE build in nix
2021-12-13 23:09:17 +00:00
Junyoung "Clare" Jang
ae6f7070da
Class plugin bump up (#2475)
* Bump class plugin to work with GHC 9.0.1

* Update class flag in hls cabal file

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-13 17:14:33 +00:00
Michael Peyton Jones
b05db1377c
Pull in old implicit-hie-cradle 2021-12-09 19:38:11 +00:00
Michael Peyton Jones
c0a4200d6b
Add override for hiedb 2021-12-09 12:32:59 +00:00
Michael Peyton Jones
7f96754e4c
Fix the nix build
Bumped nixpkgs, removed some unnecessary overrides, added a few newly
needed ones.
2021-12-08 16:04:06 +00:00
Matthieu Coudron
64374ec168
flake: remove the 'follows' directive (#2218)
nixFlake suffers from a bug when using "follows" keyword:
https://github.com/NixOS/nix/issues/3602
2021-09-23 08:45:07 +00:00
Matthieu Coudron
447f3b8280
feat(flake): expose hie-bios (#2221) 2021-09-20 15:02:27 -04:00
fendor
ec53fcb7b5
Drop ghc-api-compat from dependency closure (#2128) 2021-09-15 19:17:40 +02:00
Javier Neira
8d7e8f1564
Update flake to fix nix builds (#2188)
* update ghc-api-compat

* Add ghc-api-compat to 9.0.1

* update sha256

acquired by providing empty sha256 and causing error

* Update sha for ghc-api-compat-9.0.1

Co-authored-by: Jade <software@lfcode.ca>
Co-authored-by: Peter Becich <peterbecich@gmail.com>
2021-09-13 11:47:02 +02:00
Jade
384902c14a
Update nix flake (#2159)
* Update nix flake

Doing a nixpkgs update gains ghc 8.10.6 support.

lsp-types needed updating to satisfy bounds so I did that.

* Add ghc-lib-parser override required for ormolu

* Put the override in the right spot, oopsie

* Pass --print-build-logs to nix commands

* Fix tracy on darwin

* Remove the macOS hack since it got merged

* It appears this is actually ghc8107 by now

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-09-10 06:31:38 +02:00
Michael Peyton Jones
1ba88ab9ec
Add initial sphinx doc site (#2083) 2021-08-11 08:54:51 +00:00
Potato Hatsue
8d5e34706c
Update nix flake (#2065)
* Update nix flake

* Fix missing ghc-api-compat in hiedb

* unrelated: Update paths_ignore for #2063

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
2021-08-05 21:38:19 +08:00
Avi Dessauer
f9042bf625
Fix nix flake (#2030)
* Fix nix flake

* Address review
2021-07-22 23:55:10 +00:00
Potato Hatsue
8aa698b53f
nix: add support for ghc 9.0.1 (#1995)
* nix: add support for ghc 9.0.1

* Add CI

* Don't use overrideScope

* Try to disable plugins properly

* Avoid removing attrs of hpkgs

* Split CI steps

* Jailbreak all ghc901 packages

* Override `operational`

* Disable the test of `dual-tree`

* Override `dependent-sum-template`

* Disable tests for every ghc901 package

* Remove formatters executables from dev shell

* Disable pre-commit check for ghc901

* Override `diagrams` packages

* Override `monoid-extras`

* Disable class plugin and refineImports plugin (consistent with cabal-ghc901.project)
2021-07-04 13:15:04 +08:00
Potato Hatsue
77af21ecea
Update nix to GHC 8.10.5 (#1991)
* Update nix to GHC 8.10.5

* Update hiedb 0.4.0
2021-07-02 00:57:50 +08:00
Junyoung/Clare Jang
7ba6279aa4
Add GHC 8.10.5 support (#1899)
* Add GHC 8.10.5

* Remove GHC 8.10.2

* Fix cabal build

* Downgrade bench to 8.10.4 as master do not have 8.10.5

* Add missing window builds

* Update ghc-api-compat location

* Mark a test as broken in GHC 8.10.5

* Exclude ghc 8.10.5 for MacOS CI

* Update build.yml

* Revert "Remove GHC 8.10.2"

This reverts commit b85b02903b797e63a57179ba49c02fe204e2aab6.
2021-06-10 16:22:17 -04:00
Potato Hatsue
959da62074
Fix nix build for #1858 (#1870)
* Fix nix build for #1858

* Update skip paths

* Run job nix build on PRs that change nix files

* Fix typo
2021-05-27 12:33:28 +08: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