From a4ea87bf09b81425c05e5cb7c0519856f9e314f1 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 4 Sep 2021 10:44:16 +0200 Subject: [PATCH 1/8] Remove ghc-api source snapshot We can replace the source snapshot with Cabal conditions. This will unblock Hackage uploads until https://github.com/haskell/haskell-language-server/pull/2128 lands --- cabal-ghc901.project | 5 ----- cabal.project | 8 +------- ghcide/ghcide.cabal | 11 ++++++++++- haskell-language-server.cabal | 11 ++++++++++- hls-plugin-api/hls-plugin-api.cabal | 11 ++++++++++- .../hls-call-hierarchy-plugin.cabal | 11 ++++++++++- plugins/hls-class-plugin/hls-class-plugin.cabal | 11 ++++++++++- .../hls-explicit-imports-plugin.cabal | 11 ++++++++++- plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal | 11 ++++++++++- plugins/hls-retrie-plugin/hls-retrie-plugin.cabal | 11 ++++++++++- stack-8.10.3.yaml | 4 +--- stack-8.10.5.yaml | 4 +--- stack-8.6.4.yaml | 4 +--- stack-8.6.5.yaml | 4 +--- stack-8.8.3.yaml | 4 +--- stack-8.8.4.yaml | 4 +--- stack-9.0.1.yaml | 3 --- 17 files changed, 87 insertions(+), 41 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index 86f1deaa1f..a3c4d38784 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -39,11 +39,6 @@ source-repository-package tag: b6245884ae83e00dd2b5261762549b37390179f8 -- https://github.com/lspitzner/czipwith/pull/2 -source-repository-package - type: git - location: https://github.com/hsyl20/ghc-api-compat - tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - source-repository-package type: git location: https://github.com/anka-213/th-extras diff --git a/cabal.project b/cabal.project index 446a3ee956..a9f568f5d6 100644 --- a/cabal.project +++ b/cabal.project @@ -31,15 +31,9 @@ package * ghc-options: -haddock test-show-details: direct --- see https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055 -source-repository-package - type: git - location: https://github.com/hsyl20/ghc-api-compat - tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - write-ghc-environment-files: never -index-state: 2021-08-12T12:00:38Z +index-state: 2021-08-30T20:52:40Z constraints: hyphenation +embed diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index c9c815a197..f955c0b3d9 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -99,7 +99,6 @@ library ghc >= 8.6, ghc-check >=0.5.0.4, ghc-paths, - ghc-api-compat, cryptohash-sha1 >=0.11.100 && <0.12, hie-bios >= 0.7.1 && < 0.9.0, implicit-hie-cradle >= 0.3.0.5 && < 0.4, @@ -111,6 +110,16 @@ library build-depends: unix + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + default-extensions: ApplicativeDo BangPatterns diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 83355be7f4..c0a323a045 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -338,7 +338,6 @@ executable haskell-language-server , cryptohash-sha1 , deepseq , ghc - , ghc-api-compat , ghc-boot-th , ghcide , hashable @@ -361,6 +360,16 @@ executable haskell-language-server , transformers , unordered-containers + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + default-language: Haskell2010 default-extensions: DataKinds, TypeOperators diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index f58005a4a6..57fe9ab57e 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -44,7 +44,6 @@ library , Diff ^>=0.4.0 , dlist , ghc - , ghc-api-compat , hashable , hls-graph ^>=1.4 , hslogger @@ -57,6 +56,16 @@ library , text , unordered-containers + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + if os(windows) build-depends: Win32 diff --git a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal index d2c604e9d0..724692b331 100644 --- a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal +++ b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal @@ -27,7 +27,6 @@ library , containers , extra , ghc - , ghc-api-compat , ghcide ^>=1.4.1 , hiedb , hls-plugin-api ^>=1.2 @@ -40,6 +39,16 @@ library default-language: Haskell2010 default-extensions: DataKinds + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + test-suite tests type: exitcode-stdio-1.0 default-language: Haskell2010 diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index ad2ddd189b..54687670f3 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -28,7 +28,6 @@ library , base >=4.12 && <5 , containers , ghc - , ghc-api-compat , ghc-exactprint , ghcide >=1.2 && <1.5 , hls-plugin-api >=1.1 && <1.3 @@ -37,6 +36,16 @@ library , text , transformers + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + default-language: Haskell2010 default-extensions: DataKinds diff --git a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal index c33312678a..74cd9065db 100644 --- a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal +++ b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal @@ -19,7 +19,6 @@ library , containers , deepseq , ghc - , ghc-api-compat , ghcide ^>=1.4 , hls-graph , hls-plugin-api >=1.1 && <1.3 @@ -27,6 +26,16 @@ library , text , unordered-containers + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + default-language: Haskell2010 default-extensions: DataKinds diff --git a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal index 496493203c..3eca837a71 100644 --- a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal +++ b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal @@ -23,7 +23,6 @@ library , base >=4.12 && <5 , filepath , ghc - , ghc-api-compat , ghc-boot-th , ghcide >=1.2 && <1.5 , hls-plugin-api >=1.1 && <1.3 @@ -34,6 +33,16 @@ library default-language: Haskell2010 + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + test-suite tests type: exitcode-stdio-1.0 default-language: Haskell2010 diff --git a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal index 4416f46037..71f26f8103 100644 --- a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal +++ b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal @@ -21,7 +21,6 @@ library , directory , extra , ghc - , ghc-api-compat , ghcide >=1.2 && <1.5 , hashable , hls-plugin-api >=1.1 && <1.3 @@ -33,6 +32,16 @@ library , transformers , unordered-containers + if impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ==8.6 + default-language: Haskell2010 default-extensions: DataKinds diff --git a/stack-8.10.3.yaml b/stack-8.10.3.yaml index f75339cd27..a24c3512d3 100644 --- a/stack-8.10.3.yaml +++ b/stack-8.10.3.yaml @@ -38,9 +38,7 @@ extra-deps: - data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-lib-8.10.4.20210206 diff --git a/stack-8.10.5.yaml b/stack-8.10.5.yaml index 591bb24c58..b97fc70e81 100644 --- a/stack-8.10.5.yaml +++ b/stack-8.10.5.yaml @@ -41,9 +41,7 @@ extra-deps: - data-tree-print-0.1.0.2@rev:2 - floskell-0.10.5 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.10.5 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-source-gen-0.4.1.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 0104e76d85..82c9b6628b 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -45,9 +45,7 @@ extra-deps: - floskell-0.10.4 - fourmolu-0.3.0.0 - fuzzy-0.1.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-events-0.13.0 - ghc-exactprint-0.6.4 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 13a5a41289..51d4473532 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -46,9 +46,7 @@ extra-deps: - floskell-0.10.4 - fourmolu-0.3.0.0 - fuzzy-0.1.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-events-0.13.0 - ghc-exactprint-0.6.4 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 85983a25d4..e1fc082b96 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -40,9 +40,7 @@ extra-deps: - constrained-dynamic-0.1.0.0 - floskell-0.10.4 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-lib-8.10.4.20210206 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index ff7a7d0dfe..3742c83f56 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -40,9 +40,7 @@ extra-deps: - constrained-dynamic-0.1.0.0 - floskell-0.10.4 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-lib-8.10.4.20210206 diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 133e11420d..385a3be711 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -59,9 +59,6 @@ extra-deps: commit: b6245884ae83e00dd2b5261762549b37390179f8 # https://github.com/lspitzner/czipwith/pull/2 -- github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - - github: anka-213/th-extras commit: 57a97b4df128eb7b360e8ab9c5759392de8d1659 # https://github.com/mokus0/th-extras/pull/8 From cd13751f84842293fb46b2ab327f409b05edc88f Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 4 Sep 2021 15:36:50 +0200 Subject: [PATCH 2/8] fix 9.0.1 build --- cabal-ghc901.project | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index a3c4d38784..86f1deaa1f 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -39,6 +39,11 @@ source-repository-package tag: b6245884ae83e00dd2b5261762549b37390179f8 -- https://github.com/lspitzner/czipwith/pull/2 +source-repository-package + type: git + location: https://github.com/hsyl20/ghc-api-compat + tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + source-repository-package type: git location: https://github.com/anka-213/th-extras From 027a6f13a766ff6c631f603d917c702f15b0170d Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 4 Sep 2021 17:16:47 +0200 Subject: [PATCH 3/8] add allow-newer for ghc-api-compat --- cabal.project | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cabal.project b/cabal.project index a9f568f5d6..0a2d337c38 100644 --- a/cabal.project +++ b/cabal.project @@ -40,6 +40,8 @@ constraints: allow-newer: + -- for ghc 8.10.7 + ghc-api-compat:ghc, -- for shake-bench Chart-diagrams:diagrams-core, SVGFonts:diagrams-core From ab84bb2d259cfb3d98310cef1e6561dcab733d48 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sat, 4 Sep 2021 23:32:26 +0200 Subject: [PATCH 4/8] fix version bounds for 9.0.1 --- ghcide/ghcide.cabal | 7 +++++-- haskell-language-server.cabal | 7 +++++-- hls-plugin-api/hls-plugin-api.cabal | 7 +++++-- .../hls-call-hierarchy-plugin.cabal | 7 +++++-- plugins/hls-class-plugin/hls-class-plugin.cabal | 7 +++++-- .../hls-explicit-imports-plugin.cabal | 7 +++++-- plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal | 7 +++++-- plugins/hls-retrie-plugin/hls-retrie-plugin.cabal | 7 +++++-- 8 files changed, 40 insertions(+), 16 deletions(-) diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index f955c0b3d9..c44b47ec8e 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -110,7 +110,10 @@ library build-depends: unix - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -118,7 +121,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat default-extensions: ApplicativeDo diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index c0a323a045..cba93aaa9a 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -360,7 +360,10 @@ executable haskell-language-server , transformers , unordered-containers - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -368,7 +371,7 @@ executable haskell-language-server ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat default-language: Haskell2010 default-extensions: DataKinds, TypeOperators diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index 57fe9ab57e..812b4f14bd 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -56,7 +56,10 @@ library , text , unordered-containers - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -64,7 +67,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat if os(windows) build-depends: Win32 diff --git a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal index 724692b331..39abe67798 100644 --- a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal +++ b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal @@ -39,7 +39,10 @@ library default-language: Haskell2010 default-extensions: DataKinds - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -47,7 +50,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat test-suite tests type: exitcode-stdio-1.0 diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 54687670f3..73bfbda076 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -36,7 +36,10 @@ library , text , transformers - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -44,7 +47,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat default-language: Haskell2010 default-extensions: diff --git a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal index 74cd9065db..d6b03eb543 100644 --- a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal +++ b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal @@ -26,7 +26,10 @@ library , text , unordered-containers - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -34,7 +37,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat default-language: Haskell2010 default-extensions: diff --git a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal index 3eca837a71..c9206d97fc 100644 --- a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal +++ b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal @@ -33,7 +33,10 @@ library default-language: Haskell2010 - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -41,7 +44,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat test-suite tests type: exitcode-stdio-1.0 diff --git a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal index 71f26f8103..42f0cb031c 100644 --- a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal +++ b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal @@ -32,7 +32,10 @@ library , transformers , unordered-containers - if impl(ghc == 8.10.5) + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 elif impl(ghc > 8.10.5) && impl(ghc < 9) @@ -40,7 +43,7 @@ library ghc-api-compat ==8.10.6 else build-depends: - ghc-api-compat ==8.6 + ghc-api-compat default-language: Haskell2010 default-extensions: From 7128b50b0dae1dd777933874a5a9b864a40aa065 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 5 Sep 2021 08:11:43 +0000 Subject: [PATCH 5/8] fix hls-eval-plugin --- plugins/hls-eval-plugin/hls-eval-plugin.cabal | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index 204c21864a..669a40c760 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -61,7 +61,6 @@ library , extra , filepath , ghc - , ghc-api-compat , ghc-boot-th , ghc-paths , ghcide >=1.2 && <1.5 @@ -82,6 +81,19 @@ library , transformers , unliftio , unordered-containers + + if impl(ghc < 8.10.5) + build-depends: + ghc-api-compat ==8.6 + elif impl(ghc == 8.10.5) + build-depends: + ghc-api-compat ==8.10.5 + elif impl(ghc > 8.10.5) && impl(ghc < 9) + build-depends: + ghc-api-compat ==8.10.6 + else + build-depends: + ghc-api-compat ghc-options: -Wall -Wno-name-shadowing -Wno-unticked-promoted-constructors From 851c6a33fdda8e485830a66db92f4178c8a0cdd3 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 5 Sep 2021 15:18:51 +0000 Subject: [PATCH 6/8] stack fixes --- stack-8.10.2.yaml | 4 +--- stack-8.10.4.yaml | 4 +--- stack-9.0.1.yaml | 3 +++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 39472406a0..13663cba29 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -38,9 +38,7 @@ extra-deps: - data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-lib-8.10.4.20210206 diff --git a/stack-8.10.4.yaml b/stack-8.10.4.yaml index ea43367c51..f00ff4d014 100644 --- a/stack-8.10.4.yaml +++ b/stack-8.10.4.yaml @@ -38,9 +38,7 @@ extra-deps: - data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 - - # ghc-api-compat-8.6 - github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - ghc-api-compat-8.6 - ghc-check-0.5.0.4 - ghc-exactprint-0.6.4 - ghc-source-gen-0.4.1.0 diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 385a3be711..133e11420d 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -59,6 +59,9 @@ extra-deps: commit: b6245884ae83e00dd2b5261762549b37390179f8 # https://github.com/lspitzner/czipwith/pull/2 +- github: hsyl20/ghc-api-compat + commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 + - github: anka-213/th-extras commit: 57a97b4df128eb7b360e8ab9c5759392de8d1659 # https://github.com/mokus0/th-extras/pull/8 From ff9508adc90c1277059c515255dd0d65fec8ae5d Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Mon, 6 Sep 2021 16:19:22 +0200 Subject: [PATCH 7/8] added new versions of ghc-api-compat --- cabal-ghc901.project | 2 +- cabal.project | 5 +---- ghcide/ghcide.cabal | 9 ++++++--- haskell-language-server.cabal | 9 ++++++--- hls-plugin-api/hls-plugin-api.cabal | 9 ++++++--- .../hls-call-hierarchy-plugin.cabal | 9 ++++++--- plugins/hls-class-plugin/hls-class-plugin.cabal | 9 ++++++--- plugins/hls-eval-plugin/hls-eval-plugin.cabal | 11 +++++++---- .../hls-explicit-imports-plugin.cabal | 9 ++++++--- plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal | 9 ++++++--- plugins/hls-retrie-plugin/hls-retrie-plugin.cabal | 9 ++++++--- stack-8.10.7.yaml | 5 +---- stack-9.0.1.yaml | 4 +--- 13 files changed, 59 insertions(+), 40 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index 86f1deaa1f..9b8fdd72db 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -66,7 +66,7 @@ source-repository-package write-ghc-environment-files: never -index-state: 2021-08-30T20:52:40Z +index-state: 2021-09-06T12:12:22Z constraints: -- These plugins doesn't work on GHC9 yet diff --git a/cabal.project b/cabal.project index 0a2d337c38..d56c8d2189 100644 --- a/cabal.project +++ b/cabal.project @@ -33,15 +33,12 @@ package * write-ghc-environment-files: never -index-state: 2021-08-30T20:52:40Z +index-state: 2021-09-06T12:12:22Z constraints: hyphenation +embed - allow-newer: - -- for ghc 8.10.7 - ghc-api-compat:ghc, -- for shake-bench Chart-diagrams:diagrams-core, SVGFonts:diagrams-core diff --git a/ghcide/ghcide.cabal b/ghcide/ghcide.cabal index c44b47ec8e..ca358d012d 100644 --- a/ghcide/ghcide.cabal +++ b/ghcide/ghcide.cabal @@ -116,12 +116,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) + build-depends: + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) build-depends: - ghc-api-compat + ghc-api-compat ==9.0.1 default-extensions: ApplicativeDo diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index cba93aaa9a..8dd9e26a0d 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -366,12 +366,15 @@ executable haskell-language-server elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 default-language: Haskell2010 default-extensions: DataKinds, TypeOperators diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index 812b4f14bd..fee9ceed11 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -62,12 +62,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) + build-depends: + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) build-depends: - ghc-api-compat + ghc-api-compat ==9.0.1 if os(windows) build-depends: Win32 diff --git a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal index 39abe67798..140f547c95 100644 --- a/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal +++ b/plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal @@ -45,12 +45,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 test-suite tests type: exitcode-stdio-1.0 diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 73bfbda076..ee34a4525f 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -42,12 +42,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 default-language: Haskell2010 default-extensions: diff --git a/plugins/hls-eval-plugin/hls-eval-plugin.cabal b/plugins/hls-eval-plugin/hls-eval-plugin.cabal index 669a40c760..c9ba87be6f 100644 --- a/plugins/hls-eval-plugin/hls-eval-plugin.cabal +++ b/plugins/hls-eval-plugin/hls-eval-plugin.cabal @@ -81,19 +81,22 @@ library , transformers , unliftio , unordered-containers - + if impl(ghc < 8.10.5) build-depends: ghc-api-compat ==8.6 elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) + build-depends: + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) build-depends: - ghc-api-compat + ghc-api-compat ==9.0.1 ghc-options: -Wall -Wno-name-shadowing -Wno-unticked-promoted-constructors diff --git a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal index d6b03eb543..98961ad2f5 100644 --- a/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal +++ b/plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal @@ -32,12 +32,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 default-language: Haskell2010 default-extensions: diff --git a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal index c9206d97fc..49c3de1656 100644 --- a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal +++ b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal @@ -39,12 +39,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 test-suite tests type: exitcode-stdio-1.0 diff --git a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal index 42f0cb031c..74ddd52caf 100644 --- a/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal +++ b/plugins/hls-retrie-plugin/hls-retrie-plugin.cabal @@ -38,12 +38,15 @@ library elif impl(ghc == 8.10.5) build-depends: ghc-api-compat ==8.10.5 - elif impl(ghc > 8.10.5) && impl(ghc < 9) + elif impl(ghc == 8.10.6) build-depends: ghc-api-compat ==8.10.6 - else + elif impl(ghc == 8.10.7) build-depends: - ghc-api-compat + ghc-api-compat ==8.10.7 + elif impl(ghc == 9.0.1) + build-depends: + ghc-api-compat ==9.0.1 default-language: Haskell2010 default-extensions: diff --git a/stack-8.10.7.yaml b/stack-8.10.7.yaml index 928a3d29ef..3959b71d80 100644 --- a/stack-8.10.7.yaml +++ b/stack-8.10.7.yaml @@ -35,7 +35,7 @@ extra-deps: - bytestring-encoding-0.1.1.0@sha256:1c3b97eb6345fd7153006211c8272215cd78bb0cf440c41185290822f1e3f2c2,1738 - data-tree-print-0.1.0.2@sha256:d845e99f322df70e0c06d6743bf80336f5918d5423498528beb0593a2afc1703,1620 - floskell-0.10.5@sha256:77f0bc1569573d9666b10975a5357fef631d32266c071733739393ccae521dab,3803 - - ghc-api-compat-8.10.6@sha256:cde370b1b4c8a090de1ba6a8e27f65def9af43ca88710b412a6545b876568626,3324 + - ghc-api-compat-8.10.7 - heapsize-0.3.0.1@sha256:0b69aa97a46d819b700ac7b145f3b5493c3565cf2c5b8298682238d405d0326e,1417 - hiedb-0.4.0.0@sha256:b6dadd5cefc8c1052bc4b29144f616ca9c22e863a96d8e447d66a4d32c96fd4a,2987 - implicit-hie-0.1.2.6@sha256:f50a908979a574a881f753c0f9a5224f023f438b30fdefc5b7fa01803b07a280,2998 @@ -55,9 +55,6 @@ extra-deps: # - ghc-lib-parser-ex-9.0.0.4@sha256:8282b11c3797fc8ba225b245e736cc9a0745d9c48d0f9fea7f9bffb5c9997709,3642 # - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154 -# for ghc-api-compat-8.10.6 -allow-newer: true - configure-options: ghcide: - --disable-library-for-ghci diff --git a/stack-9.0.1.yaml b/stack-9.0.1.yaml index 133e11420d..5e71865dac 100644 --- a/stack-9.0.1.yaml +++ b/stack-9.0.1.yaml @@ -37,6 +37,7 @@ extra-deps: - dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657 - dependent-sum-0.7.1.0@sha256:0e419237f5b86da3659772afff9cab355c0f8d5b3fdb15a5b30e673d8dc83941,2147 - floskell-0.10.5 +- ghc-api-compat-9.0.1 - ghc-source-gen-0.4.1.0 - heapsize-0.3.0.1@sha256:0b69aa97a46d819b700ac7b145f3b5493c3565cf2c5b8298682238d405d0326e,1417 - hie-bios-0.7.6 @@ -59,9 +60,6 @@ extra-deps: commit: b6245884ae83e00dd2b5261762549b37390179f8 # https://github.com/lspitzner/czipwith/pull/2 -- github: hsyl20/ghc-api-compat - commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - - github: anka-213/th-extras commit: 57a97b4df128eb7b360e8ab9c5759392de8d1659 # https://github.com/mokus0/th-extras/pull/8 From 2b87fce4ef909ec8d5bf560ccc61229babe27293 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Mon, 6 Sep 2021 20:47:20 +0000 Subject: [PATCH 8/8] remove source snapshot from ghc901 cabal project --- cabal-ghc901.project | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cabal-ghc901.project b/cabal-ghc901.project index 9b8fdd72db..4ef97612d0 100644 --- a/cabal-ghc901.project +++ b/cabal-ghc901.project @@ -39,11 +39,6 @@ source-repository-package tag: b6245884ae83e00dd2b5261762549b37390179f8 -- https://github.com/lspitzner/czipwith/pull/2 -source-repository-package - type: git - location: https://github.com/hsyl20/ghc-api-compat - tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15 - source-repository-package type: git location: https://github.com/anka-213/th-extras