From 476f168793ae6df83e81aed2e193440634399947 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Wed, 14 Dec 2022 15:46:11 -0800 Subject: [PATCH 01/12] fix fourmolu with -f-fixity-th in nix env --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c78cd3a843..f3518d2761 100644 --- a/flake.nix +++ b/flake.nix @@ -129,7 +129,10 @@ then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; }) else hsuper.ormolu; - fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {}; + fourmolu = + addBuildDepend + (appendConfigureFlag (hself.callCabal2nix "fourmolu" inputs.fourmolu {}) "-f-fixity-th") + hself.file-embed; }; hlsSources = From 837b040dabc19fda18bd96a86cc9a9891239514e Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 21:36:18 -0800 Subject: [PATCH 02/12] ci failure test From 14bbec3b1d4a4159725514a07532f89ce0080cf7 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 21:47:21 -0800 Subject: [PATCH 03/12] bump nix file. --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index c78cd3a843..3ae8870fda 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ # - Edit `sourceDirs` to update the set of local packages # # For more details: https://nixos.wiki/wiki/Flakes +# { description = "haskell language server flake"; From ab753bac811fbd7ff9c95bd6d339e5ce934dd20b Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 21:54:19 -0800 Subject: [PATCH 04/12] disable cachix action --- .github/workflows/nix.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index fc9f300315..e6e77c0fa6 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -94,10 +94,10 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v12 - with: - name: haskell-language-server - authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} + #- uses: cachix/cachix-action@v12 + # with: + # name: haskell-language-server + # authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} - name: Build development shell run: nix develop --print-build-logs --profile dev - name: Build all development shell (without nix dependencies) From 299c3c17a60f2d9c7e448cdb423c3c8a261f575c Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 22:07:55 -0800 Subject: [PATCH 05/12] further comment out --- .github/workflows/nix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index e6e77c0fa6..570bb2161b 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -89,8 +89,8 @@ 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' + #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 From 5b98a6e89e41428cc26da483418138944426c6a7 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 22:11:36 -0800 Subject: [PATCH 06/12] revive cachix action. --- .github/workflows/nix.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 570bb2161b..3a7cb572b1 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -94,10 +94,10 @@ jobs: extra_nix_config: | experimental-features = nix-command flakes nix_path: nixpkgs=channel:nixos-unstable - #- uses: cachix/cachix-action@v12 - # with: - # name: haskell-language-server - # authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} + - uses: cachix/cachix-action@v12 + with: + name: haskell-language-server + authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }} - name: Build development shell run: nix develop --print-build-logs --profile dev - name: Build all development shell (without nix dependencies) From 4c518f813fefc7a00d0b0f3cb27f63d20ce09166 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 22:23:28 -0800 Subject: [PATCH 07/12] remove commented-out --- .github/workflows/nix.yml | 2 -- flake.nix | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 3a7cb572b1..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.nix b/flake.nix index 3ae8870fda..c78cd3a843 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,6 @@ # - Edit `sourceDirs` to update the set of local packages # # For more details: https://nixos.wiki/wiki/Flakes -# { description = "haskell language server flake"; From f6d857a052151151cbac8a89db5845fedf16f7f3 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 23:25:33 -0800 Subject: [PATCH 08/12] fix hls-cabal-plugin by removing Cabal-syntax. note that this is an opposite to #3383, to prioritize CI fix first. --- plugins/hls-cabal-plugin/hls-cabal-plugin.cabal | 1 - 1 file changed, 1 deletion(-) 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 From 30dac518886f4d9680161e3f50da7a1b95e5f8ad Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 15 Dec 2022 09:33:00 -0800 Subject: [PATCH 09/12] limit implicit-hie < 0.1.3 --- cabal.project | 5 ++++- flake.lock | 13 +++++++++++++ flake.nix | 5 +++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index bad4eda52e..33a71b3ea8 100644 --- a/cabal.project +++ b/cabal.project @@ -65,7 +65,10 @@ constraints: -- https://github.com/ndmitchell/hlint/issues/1376 hlint +ghc-lib, ghc-lib-parser-ex -auto, - stylish-haskell +ghc-lib + stylish-haskell +ghc-lib, + -- implicit-hie 0.1.3.0 introduced an unexpected behavioral change. + -- https://github.com/Avi-D-coder/implicit-hie/issues/50 + implicit-hie < 0.1.3 -- This is benign and won't affect our ability to release to Hackage, -- because we only depend on `ekg-json` when a non-default flag 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 f3518d2761..167eb328bd 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 = From f0bcb95e2c0e7fa923290a98793ae0d206e0d0d8 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Fri, 16 Dec 2022 07:16:51 -0800 Subject: [PATCH 10/12] added a small comment and link to the issue. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index f3518d2761..99820fc88b 100644 --- a/flake.nix +++ b/flake.nix @@ -129,6 +129,8 @@ then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; }) else hsuper.ormolu; + # Due to the following issue, fixity-th should be disabled, especially for darwin. + # https://github.com/fourmolu/fourmolu/issues/238 fourmolu = addBuildDepend (appendConfigureFlag (hself.callCabal2nix "fourmolu" inputs.fourmolu {}) "-f-fixity-th") From 0557552716c6109be17fc745397f39a80073697e Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Fri, 16 Dec 2022 12:24:32 -0800 Subject: [PATCH 11/12] put implicit-hie to ghcide dep --- cabal.project | 5 +---- ghcide/ghcide.cabal | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cabal.project b/cabal.project index 33a71b3ea8..bad4eda52e 100644 --- a/cabal.project +++ b/cabal.project @@ -65,10 +65,7 @@ constraints: -- https://github.com/ndmitchell/hlint/issues/1376 hlint +ghc-lib, ghc-lib-parser-ex -auto, - stylish-haskell +ghc-lib, - -- implicit-hie 0.1.3.0 introduced an unexpected behavioral change. - -- https://github.com/Avi-D-coder/implicit-hie/issues/50 - implicit-hie < 0.1.3 + stylish-haskell +ghc-lib -- This is benign and won't affect our ability to release to Hackage, -- because we only depend on `ekg-json` when a non-default flag 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) From ead898d831bce06f7b8adbde4a8177ca1462ed82 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Fri, 16 Dec 2022 16:32:25 -0800 Subject: [PATCH 12/12] bump CI