- 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.
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)
* 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
* 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>
* 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
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>
* 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>
* 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>
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.
* 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>
* 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>
* 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)
* 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.