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.
- 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.
* 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>
* add selection range support
* add the whole import area as a selection step
* add selection range plugin to all project files
* merge type signature with value definition
* support ghc 9
* fix it for ghc-9.0
* remove unnecessary import
* reformat GhcIde.hs
* selection range: make it easier to understand
* selection range: improve error handling
* update lsp-types to 1.4.0.1
* add selection range to doc
* fix comment for findSelectionRangesByPositions
* remove a use of partial function
* update author & maintainer
* use foldlM1 instead of foldl1
* add testdata to cabal file
* update performace tips and log level
* update lsp-types in nix
Co-authored-by: Pepe Iborra <pepeiborra@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>
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.
* 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>