diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index fc9f300315..65d102e45f 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -89,8 +89,6 @@ jobs: - uses: cachix/install-nix-action@v18 with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' extra_nix_config: | experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable diff --git a/flake.lock b/flake.lock index 2ac39dc862..fa08ce799d 100644 --- a/flake.lock +++ b/flake.lock @@ -148,6 +148,18 @@ "url": "https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz" } }, + "implicit-hie": { + "flake": false, + "locked": { + "narHash": "sha256-bFPhAuQe5IjKYQIz1OEC/j/imDESAv3H1nLNVM3lZF4=", + "type": "tarball", + "url": "https://hackage.haskell.org/package/implicit-hie-0.1.2.7/implicit-hie-0.1.2.7.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://hackage.haskell.org/package/implicit-hie-0.1.2.7/implicit-hie-0.1.2.7.tar.gz" + } + }, "nixpkgs": { "locked": { "lastModified": 1668650906, @@ -189,6 +201,7 @@ "hiedb": "hiedb", "hlint": "hlint", "hlint-34": "hlint-34", + "implicit-hie": "implicit-hie", "nixpkgs": "nixpkgs", "ptr-poker": "ptr-poker" } diff --git a/flake.nix b/flake.nix index 99820fc88b..1831e7cbeb 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,10 @@ url = "https://hackage.haskell.org/package/hiedb-0.4.2.0/hiedb-0.4.2.0.tar.gz"; flake = false; }; + implicit-hie = { + url = "https://hackage.haskell.org/package/implicit-hie-0.1.2.7/implicit-hie-0.1.2.7.tar.gz"; + flake = false; + }; }; outputs = inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, all-cabal-hashes-unpacked, ... }: @@ -122,6 +126,7 @@ # Patches don't apply github = overrideCabal hsuper.github (drv: { patches = []; }); hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {}; + implicit-hie = hsuper.callCabal2nix "implicit-hie" inputs.implicit-hie {}; # https://github.com/NixOS/nixpkgs/issues/140774 ormolu = diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index 9d898bbef9..5034e354c2 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -104,6 +104,11 @@ library ghc-paths, cryptohash-sha1 >=0.11.100 && <0.12, hie-bios ^>= 0.11.0, + -- implicit-hie 0.1.3.0 introduced an unexpected behavioral change. + -- https://github.com/Avi-D-coder/implicit-hie/issues/50 + -- to make sure ghcide behaves in a desirable way, we put implicit-hie + -- fake dependency here. + implicit-hie < 0.1.3, implicit-hie-cradle ^>= 0.3.0.5 || ^>= 0.5, base16-bytestring >=0.1.1 && <1.1 if os(windows) diff --git a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal index f202b633c3..67170c10ab 100644 --- a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal +++ b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal @@ -45,7 +45,6 @@ library -- This is a lot of work for almost zero benefit, so we just allow more versions here -- and we eventually completely drop support for building HLS with stack. , Cabal ^>=3.2 || ^>=3.4 || ^>=3.6 || ^>= 3.8 - , Cabal-syntax ^>= 3.6 , deepseq , directory , extra >=1.7.4