From df2370cf6263b7fa649cf3e54f412a1399993e88 Mon Sep 17 00:00:00 2001 From: cydparser Date: Mon, 12 Dec 2022 19:30:24 -0800 Subject: [PATCH 1/2] Remove Cabal dependency from hls-cabal-plugin --- plugins/hls-cabal-plugin/hls-cabal-plugin.cabal | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal index f202b633c3..eb33128314 100644 --- a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal +++ b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal @@ -33,19 +33,7 @@ library build-depends: , base >=4.12 && <5 , bytestring - -- Ideally, we only want to support a single Cabal version, supporting - -- older versions is completely pointless since Cabal is backwards compatible, - -- the latest Cabal version can parse all versions of the Cabal file format. - -- - -- However, stack is making this difficult, if we change the version of Cabal, - -- we essentially need to make sure all other packages in the snapshot have their - -- Cabal dependency version relaxed. - -- Most packages have a Hackage revision, but stack won't pick these up (for sensible reasons) - -- automatically, forcing us to manually update the packages revision id. - -- 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 + , Cabal-syntax ^>= 3.6 || ^>= 3.8 , deepseq , directory , extra >=1.7.4 From 095a628d65ae1f164077891e7f72358a621c749a Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 12 Dec 2022 12:29:32 -0800 Subject: [PATCH 2/2] Fix the stack build --- plugins/hls-cabal-plugin/hls-cabal-plugin.cabal | 2 +- stack-lts19.yaml | 2 +- stack.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal index eb33128314..24ca74bcea 100644 --- a/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal +++ b/plugins/hls-cabal-plugin/hls-cabal-plugin.cabal @@ -33,7 +33,7 @@ library build-depends: , base >=4.12 && <5 , bytestring - , Cabal-syntax ^>= 3.6 || ^>= 3.8 + , Cabal-syntax ^>= 3.8 , deepseq , directory , extra >=1.7.4 diff --git a/stack-lts19.yaml b/stack-lts19.yaml index 74d90c3361..a46e62f52a 100644 --- a/stack-lts19.yaml +++ b/stack-lts19.yaml @@ -42,7 +42,7 @@ ghc-options: "$everything": -haddock extra-deps: -- Cabal-3.6.0.0 +- Cabal-syntax-3.8.1.0 # needed for tests of hls-cabal-fmt-plugin - cabal-fmt-0.1.6@sha256:54041d50c8148c32d1e0a67aef7edeebac50ae33571bef22312f6815908eac19,3626 - floskell-0.10.6@sha256:e77d194189e8540abe2ace2c7cb8efafc747ca35881a2fefcbd2d40a1292e036,3819 diff --git a/stack.yaml b/stack.yaml index b92448278e..7863d00dae 100644 --- a/stack.yaml +++ b/stack.yaml @@ -52,6 +52,7 @@ extra-deps: - lsp-types-1.6.0.0 - lsp-test-0.14.1.0 - hie-bios-0.11.0 +- Cabal-syntax-3.8.1.0 # currently needed for ghcide>extra, etc. allow-newer: true