diff --git a/__std__/cells/plutus-apps/library/haskell-language-server-project.nix b/__std__/cells/plutus-apps/library/haskell-language-server-project.nix index 1c8b985572..2fc525f3aa 100644 --- a/__std__/cells/plutus-apps/library/haskell-language-server-project.nix +++ b/__std__/cells/plutus-apps/library/haskell-language-server-project.nix @@ -1,4 +1,4 @@ -# TODO(std) DUP(except the constratins and the actual version) +# TODO(std) DUP { inputs, cell }: @@ -14,13 +14,11 @@ cell.library.pkgs.haskell-nix.cabalProject' { # tools which HLS uses explicitly # b) Pull out the tools themselves from the HLS project so we can use # them elsewhere - # cabalProjectLocal = '' # constraints: stylish-haskell==0.14.2.0, hlint==3.4.1 # ''; src = inputs.haskell-language-server; - sha256map = { "https://github.com/pepeiborra/ekg-json"."7a0af7a8fd38045fd15fb13445bdcc7085325460" = "sha256-fVwKxGgM0S4Kv/4egVAAiAjV7QB5PBqMVMCfsv7otIQ="; # editorconfig-checker-disable-line }; diff --git a/__std__/flake.lock b/__std__/flake.lock index 284f156a81..743c00ec10 100644 --- a/__std__/flake.lock +++ b/__std__/flake.lock @@ -1877,22 +1877,6 @@ "type": "github" } }, - "cardano-repo-tool": { - "flake": false, - "locked": { - "lastModified": 1660911178, - "narHash": "sha256-CHKM2WQL7kj6aQ4afuXHvXOc7HUsAS1pXz/1fr+Dbv0=", - "owner": "input-output-hk", - "repo": "cardano-repo-tool", - "rev": "b90fbb2319ebb7aaec8f1baa90d5d7a7bea7905b", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "cardano-repo-tool", - "type": "github" - } - }, "cardano-shell": { "flake": false, "locked": { @@ -3787,16 +3771,16 @@ "haskell-language-server": { "flake": false, "locked": { - "lastModified": 1638136578, - "narHash": "sha256-Reo9BQ12O+OX7tuRfaDPZPBpJW4jnxZetm63BxYncoM=", + "lastModified": 1672051165, + "narHash": "sha256-j3XRQTWa7jsVlimaxFZNnlE9IzWII9Prj1/+otks5FQ=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "745ef26f406dbdd5e4a538585f8519af9f1ccb09", + "rev": "1916b5782d9f3204d25a1d8f94da4cfd83ae2607", "type": "github" }, "original": { "owner": "haskell", - "ref": "1.5.1", + "ref": "1.9.0.0", "repo": "haskell-language-server", "type": "github" } @@ -9044,7 +9028,6 @@ "inputs": { "CHaP": "CHaP", "cardano-node": "cardano-node", - "cardano-repo-tool": "cardano-repo-tool", "flake-compat": "flake-compat_8", "gitignore-nix": "gitignore-nix", "hackage-nix": "hackage-nix", diff --git a/__std__/flake.nix b/__std__/flake.nix index a3addbf28c..aeac5a250c 100644 --- a/__std__/flake.nix +++ b/__std__/flake.nix @@ -45,7 +45,7 @@ flake = false; }; haskell-language-server = { - url = "github:haskell/haskell-language-server?ref=1.5.1"; + url = "github:haskell/haskell-language-server?ref=1.9.0.0"; flake = false; }; plutus-core = { diff --git a/flake.lock b/flake.lock index ff529378e6..d076068f37 100644 --- a/flake.lock +++ b/flake.lock @@ -249,16 +249,16 @@ "haskell-language-server": { "flake": false, "locked": { - "lastModified": 1638136578, - "narHash": "sha256-Reo9BQ12O+OX7tuRfaDPZPBpJW4jnxZetm63BxYncoM=", + "lastModified": 1672051165, + "narHash": "sha256-j3XRQTWa7jsVlimaxFZNnlE9IzWII9Prj1/+otks5FQ=", "owner": "haskell", "repo": "haskell-language-server", - "rev": "745ef26f406dbdd5e4a538585f8519af9f1ccb09", + "rev": "1916b5782d9f3204d25a1d8f94da4cfd83ae2607", "type": "github" }, "original": { "owner": "haskell", - "ref": "1.5.1", + "ref": "1.9.0.0", "repo": "haskell-language-server", "type": "github" } diff --git a/flake.nix b/flake.nix index 8e971acad8..14be60302b 100644 --- a/flake.nix +++ b/flake.nix @@ -37,8 +37,7 @@ flake = false; }; haskell-language-server = { - # Pinned to a release - url = "github:haskell/haskell-language-server?ref=1.5.1"; + url = "github:haskell/haskell-language-server?ref=1.9.0.0"; flake = false; }; iohk-nix = { diff --git a/nix/pkgs/haskell/extra.nix b/nix/pkgs/haskell/extra.nix index 36f4a94fdf..8dab282574 100644 --- a/nix/pkgs/haskell/extra.nix +++ b/nix/pkgs/haskell/extra.nix @@ -42,24 +42,26 @@ let }; hlsProject = haskell-nix.cabalProject' { # See https://github.com/haskell/haskell-language-server/issues/411. - # We want to use stylish-haskell, hlint, and implicit-hie as standalone tools *and* through HLS. But we need to have consistent versions in both - # cases, otherwise e.g. you could format the code in HLS and then have the CI complain that it's wrong. + # We want to use stylish-haskell, hlint, and implicit-hie as standalone tools + # *and* through HLS. But we need to have consistent versions in both cases, + # otherwise e.g. you could format the code in HLS and then have the CI + # complain that it's wrong + # # The solution we use here is to: - # a) Where we care (mostly just formatters), constrain the versions of tools which HLS uses explicitly - # b) pull out the tools themselves from the HLS project so we can use them elsewhere - cabalProjectLocal = '' - constraints: stylish-haskell==0.13.0.0, hlint==3.2.7 - allow-newer: hls-stylish-haskell-plugin:stylish-haskell - ''; + # a) Where we care (mostly just formatters), constrain the versions of + # tools which HLS uses explicitly + # b) Pull out the tools themselves from the HLS project so we can use + # them elsewhere + + src = sources.haskell-language-server; - inherit compiler-nix-name; sha256map = { - "https://github.com/hsyl20/ghc-api-compat"."8fee87eac97a538dbe81ff1ab18cff10f2f9fa15" = "16bibb7f3s2sxdvdy2mq6w1nj1lc8zhms54lwmj17ijhvjys29vg"; - "https://github.com/haskell/lsp.git"."ef59c28b41ed4c5775f0ab0c1e985839359cec96" = "1whcgw4hhn2aplrpy9w8q6rafwy7znnp0rczgr6py15fqyw2fwb5"; + "https://github.com/pepeiborra/ekg-json"."7a0af7a8fd38045fd15fb13445bdcc7085325460" = "sha256-fVwKxGgM0S4Kv/4egVAAiAjV7QB5PBqMVMCfsv7otIQ="; # editorconfig-checker-disable-line }; + + inherit compiler-nix-name; + modules = [{ - # Workaround for https://github.com/haskell/haskell-language-server/issues/1160 - packages.haskell-language-server.patches = lib.mkIf stdenv.isDarwin [ ../../patches/haskell-language-server-dynamic.patch ]; # See https://github.com/haskell/haskell-language-server/pull/1382#issuecomment-780472005 packages.ghcide.flags.ghc-patched-unboxed-bytecode = true; }];