Skip to content

Commit a23b66c

Browse files
authored
Remove ghc-api source snapshot (#2156)
* Remove ghc-api source snapshot We can replace the source snapshot with Cabal conditions. This will unblock Hackage uploads until #2128 lands * fix 9.0.1 build * add allow-newer for ghc-api-compat * fix version bounds for 9.0.1 * fix hls-eval-plugin * stack fixes * added new versions of ghc-api-compat * remove source snapshot from ghc901 cabal project
1 parent 5afea90 commit a23b66c

21 files changed

+156
-54
lines changed

cabal-ghc901.project

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ source-repository-package
3939
tag: b6245884ae83e00dd2b5261762549b37390179f8
4040
-- https://github.com/lspitzner/czipwith/pull/2
4141

42-
source-repository-package
43-
type: git
44-
location: https://github.com/hsyl20/ghc-api-compat
45-
tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
46-
4742
source-repository-package
4843
type: git
4944
location: https://github.com/anka-213/th-extras
@@ -66,7 +61,7 @@ source-repository-package
6661

6762
write-ghc-environment-files: never
6863

69-
index-state: 2021-08-30T20:52:40Z
64+
index-state: 2021-09-06T12:12:22Z
7065

7166
constraints:
7267
-- These plugins doesn't work on GHC9 yet

cabal.project

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,13 @@ package *
3131
ghc-options: -haddock
3232
test-show-details: direct
3333

34-
-- see https://gitlab.haskell.org/haskell/ghc-api-compat/-/issues/1#note_371055
35-
source-repository-package
36-
type: git
37-
location: https://github.com/hsyl20/ghc-api-compat
38-
tag: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
39-
4034
write-ghc-environment-files: never
4135

42-
index-state: 2021-08-12T12:00:38Z
36+
index-state: 2021-09-06T12:12:22Z
4337

4438
constraints:
4539
hyphenation +embed
4640

47-
4841
allow-newer:
4942
-- for shake-bench
5043
Chart-diagrams:diagrams-core,

ghcide/ghcide.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ library
9999
ghc >= 8.6,
100100
ghc-check >=0.5.0.4,
101101
ghc-paths,
102-
ghc-api-compat,
103102
cryptohash-sha1 >=0.11.100 && <0.12,
104103
hie-bios >= 0.7.1 && < 0.9.0,
105104
implicit-hie-cradle >= 0.3.0.5 && < 0.4,
@@ -111,6 +110,22 @@ library
111110
build-depends:
112111
unix
113112

113+
if impl(ghc < 8.10.5)
114+
build-depends:
115+
ghc-api-compat ==8.6
116+
elif impl(ghc == 8.10.5)
117+
build-depends:
118+
ghc-api-compat ==8.10.5
119+
elif impl(ghc == 8.10.6)
120+
build-depends:
121+
ghc-api-compat ==8.10.6
122+
elif impl(ghc == 8.10.7)
123+
build-depends:
124+
ghc-api-compat ==8.10.7
125+
elif impl(ghc == 9.0.1)
126+
build-depends:
127+
ghc-api-compat ==9.0.1
128+
114129
default-extensions:
115130
ApplicativeDo
116131
BangPatterns

haskell-language-server.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ executable haskell-language-server
338338
, cryptohash-sha1
339339
, deepseq
340340
, ghc
341-
, ghc-api-compat
342341
, ghc-boot-th
343342
, ghcide
344343
, hashable
@@ -361,6 +360,22 @@ executable haskell-language-server
361360
, transformers
362361
, unordered-containers
363362

363+
if impl(ghc < 8.10.5)
364+
build-depends:
365+
ghc-api-compat ==8.6
366+
elif impl(ghc == 8.10.5)
367+
build-depends:
368+
ghc-api-compat ==8.10.5
369+
elif impl(ghc == 8.10.6)
370+
build-depends:
371+
ghc-api-compat ==8.10.6
372+
elif impl(ghc == 8.10.7)
373+
build-depends:
374+
ghc-api-compat ==8.10.7
375+
elif impl(ghc == 9.0.1)
376+
build-depends:
377+
ghc-api-compat ==9.0.1
378+
364379
default-language: Haskell2010
365380
default-extensions: DataKinds, TypeOperators
366381

hls-plugin-api/hls-plugin-api.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ library
4444
, Diff ^>=0.4.0
4545
, dlist
4646
, ghc
47-
, ghc-api-compat
4847
, hashable
4948
, hls-graph ^>=1.4
5049
, hslogger
@@ -57,6 +56,22 @@ library
5756
, text
5857
, unordered-containers
5958

59+
if impl(ghc < 8.10.5)
60+
build-depends:
61+
ghc-api-compat ==8.6
62+
elif impl(ghc == 8.10.5)
63+
build-depends:
64+
ghc-api-compat ==8.10.5
65+
elif impl(ghc == 8.10.6)
66+
build-depends:
67+
ghc-api-compat ==8.10.6
68+
elif impl(ghc == 8.10.7)
69+
build-depends:
70+
ghc-api-compat ==8.10.7
71+
elif impl(ghc == 9.0.1)
72+
build-depends:
73+
ghc-api-compat ==9.0.1
74+
6075
if os(windows)
6176
build-depends: Win32
6277

plugins/hls-call-hierarchy-plugin/hls-call-hierarchy-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ library
2727
, containers
2828
, extra
2929
, ghc
30-
, ghc-api-compat
3130
, ghcide ^>=1.4.1
3231
, hiedb
3332
, hls-plugin-api ^>=1.2
@@ -40,6 +39,22 @@ library
4039
default-language: Haskell2010
4140
default-extensions: DataKinds
4241

42+
if impl(ghc < 8.10.5)
43+
build-depends:
44+
ghc-api-compat ==8.6
45+
elif impl(ghc == 8.10.5)
46+
build-depends:
47+
ghc-api-compat ==8.10.5
48+
elif impl(ghc == 8.10.6)
49+
build-depends:
50+
ghc-api-compat ==8.10.6
51+
elif impl(ghc == 8.10.7)
52+
build-depends:
53+
ghc-api-compat ==8.10.7
54+
elif impl(ghc == 9.0.1)
55+
build-depends:
56+
ghc-api-compat ==9.0.1
57+
4358
test-suite tests
4459
type: exitcode-stdio-1.0
4560
default-language: Haskell2010

plugins/hls-class-plugin/hls-class-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ library
2828
, base >=4.12 && <5
2929
, containers
3030
, ghc
31-
, ghc-api-compat
3231
, ghc-exactprint
3332
, ghcide >=1.2 && <1.5
3433
, hls-plugin-api >=1.1 && <1.3
@@ -37,6 +36,22 @@ library
3736
, text
3837
, transformers
3938

39+
if impl(ghc < 8.10.5)
40+
build-depends:
41+
ghc-api-compat ==8.6
42+
elif impl(ghc == 8.10.5)
43+
build-depends:
44+
ghc-api-compat ==8.10.5
45+
elif impl(ghc == 8.10.6)
46+
build-depends:
47+
ghc-api-compat ==8.10.6
48+
elif impl(ghc == 8.10.7)
49+
build-depends:
50+
ghc-api-compat ==8.10.7
51+
elif impl(ghc == 9.0.1)
52+
build-depends:
53+
ghc-api-compat ==9.0.1
54+
4055
default-language: Haskell2010
4156
default-extensions:
4257
DataKinds

plugins/hls-eval-plugin/hls-eval-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ library
6161
, extra
6262
, filepath
6363
, ghc
64-
, ghc-api-compat
6564
, ghc-boot-th
6665
, ghc-paths
6766
, ghcide >=1.2 && <1.5
@@ -83,6 +82,22 @@ library
8382
, unliftio
8483
, unordered-containers
8584

85+
if impl(ghc < 8.10.5)
86+
build-depends:
87+
ghc-api-compat ==8.6
88+
elif impl(ghc == 8.10.5)
89+
build-depends:
90+
ghc-api-compat ==8.10.5
91+
elif impl(ghc == 8.10.6)
92+
build-depends:
93+
ghc-api-compat ==8.10.6
94+
elif impl(ghc == 8.10.7)
95+
build-depends:
96+
ghc-api-compat ==8.10.7
97+
elif impl(ghc == 9.0.1)
98+
build-depends:
99+
ghc-api-compat ==9.0.1
100+
86101
ghc-options:
87102
-Wall -Wno-name-shadowing -Wno-unticked-promoted-constructors
88103

plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,29 @@ library
1919
, containers
2020
, deepseq
2121
, ghc
22-
, ghc-api-compat
2322
, ghcide ^>=1.4
2423
, hls-graph
2524
, hls-plugin-api >=1.1 && <1.3
2625
, lsp
2726
, text
2827
, unordered-containers
2928

29+
if impl(ghc < 8.10.5)
30+
build-depends:
31+
ghc-api-compat ==8.6
32+
elif impl(ghc == 8.10.5)
33+
build-depends:
34+
ghc-api-compat ==8.10.5
35+
elif impl(ghc == 8.10.6)
36+
build-depends:
37+
ghc-api-compat ==8.10.6
38+
elif impl(ghc == 8.10.7)
39+
build-depends:
40+
ghc-api-compat ==8.10.7
41+
elif impl(ghc == 9.0.1)
42+
build-depends:
43+
ghc-api-compat ==9.0.1
44+
3045
default-language: Haskell2010
3146
default-extensions:
3247
DataKinds

plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ library
2323
, base >=4.12 && <5
2424
, filepath
2525
, ghc
26-
, ghc-api-compat
2726
, ghc-boot-th
2827
, ghcide >=1.2 && <1.5
2928
, hls-plugin-api >=1.1 && <1.3
@@ -34,6 +33,22 @@ library
3433

3534
default-language: Haskell2010
3635

36+
if impl(ghc < 8.10.5)
37+
build-depends:
38+
ghc-api-compat ==8.6
39+
elif impl(ghc == 8.10.5)
40+
build-depends:
41+
ghc-api-compat ==8.10.5
42+
elif impl(ghc == 8.10.6)
43+
build-depends:
44+
ghc-api-compat ==8.10.6
45+
elif impl(ghc == 8.10.7)
46+
build-depends:
47+
ghc-api-compat ==8.10.7
48+
elif impl(ghc == 9.0.1)
49+
build-depends:
50+
ghc-api-compat ==9.0.1
51+
3752
test-suite tests
3853
type: exitcode-stdio-1.0
3954
default-language: Haskell2010

plugins/hls-retrie-plugin/hls-retrie-plugin.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ library
2121
, directory
2222
, extra
2323
, ghc
24-
, ghc-api-compat
2524
, ghcide >=1.2 && <1.5
2625
, hashable
2726
, hls-plugin-api >=1.1 && <1.3
@@ -33,6 +32,22 @@ library
3332
, transformers
3433
, unordered-containers
3534

35+
if impl(ghc < 8.10.5)
36+
build-depends:
37+
ghc-api-compat ==8.6
38+
elif impl(ghc == 8.10.5)
39+
build-depends:
40+
ghc-api-compat ==8.10.5
41+
elif impl(ghc == 8.10.6)
42+
build-depends:
43+
ghc-api-compat ==8.10.6
44+
elif impl(ghc == 8.10.7)
45+
build-depends:
46+
ghc-api-compat ==8.10.7
47+
elif impl(ghc == 9.0.1)
48+
build-depends:
49+
ghc-api-compat ==9.0.1
50+
3651
default-language: Haskell2010
3752
default-extensions:
3853
DataKinds

stack-8.10.2.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ extra-deps:
3838
- data-tree-print-0.1.0.2@rev:2
3939
- floskell-0.10.4
4040
- fourmolu-0.3.0.0
41-
- # ghc-api-compat-8.6
42-
github: hsyl20/ghc-api-compat
43-
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
41+
- ghc-api-compat-8.6
4442
- ghc-check-0.5.0.4
4543
- ghc-exactprint-0.6.4
4644
- ghc-lib-8.10.4.20210206

stack-8.10.3.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ extra-deps:
3838
- data-tree-print-0.1.0.2@rev:2
3939
- floskell-0.10.4
4040
- fourmolu-0.3.0.0
41-
- # ghc-api-compat-8.6
42-
github: hsyl20/ghc-api-compat
43-
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
41+
- ghc-api-compat-8.6
4442
- ghc-check-0.5.0.4
4543
- ghc-exactprint-0.6.4
4644
- ghc-lib-8.10.4.20210206

stack-8.10.4.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ extra-deps:
3838
- data-tree-print-0.1.0.2@rev:2
3939
- floskell-0.10.4
4040
- fourmolu-0.3.0.0
41-
- # ghc-api-compat-8.6
42-
github: hsyl20/ghc-api-compat
43-
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
41+
- ghc-api-compat-8.6
4442
- ghc-check-0.5.0.4
4543
- ghc-exactprint-0.6.4
4644
- ghc-source-gen-0.4.1.0

stack-8.10.5.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ extra-deps:
4141
- data-tree-print-0.1.0.2@rev:2
4242
- floskell-0.10.5
4343
- fourmolu-0.3.0.0
44-
- # ghc-api-compat-8.6
45-
github: hsyl20/ghc-api-compat
46-
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
44+
- ghc-api-compat-8.10.5
4745
- ghc-check-0.5.0.4
4846
- ghc-exactprint-0.6.4
4947
- ghc-source-gen-0.4.1.0

stack-8.10.7.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extra-deps:
3535
- bytestring-encoding-0.1.1.0@sha256:1c3b97eb6345fd7153006211c8272215cd78bb0cf440c41185290822f1e3f2c2,1738
3636
- data-tree-print-0.1.0.2@sha256:d845e99f322df70e0c06d6743bf80336f5918d5423498528beb0593a2afc1703,1620
3737
- floskell-0.10.5@sha256:77f0bc1569573d9666b10975a5357fef631d32266c071733739393ccae521dab,3803
38-
- ghc-api-compat-8.10.6@sha256:cde370b1b4c8a090de1ba6a8e27f65def9af43ca88710b412a6545b876568626,3324
38+
- ghc-api-compat-8.10.7
3939
- heapsize-0.3.0.1@sha256:0b69aa97a46d819b700ac7b145f3b5493c3565cf2c5b8298682238d405d0326e,1417
4040
- hiedb-0.4.0.0@sha256:b6dadd5cefc8c1052bc4b29144f616ca9c22e863a96d8e447d66a4d32c96fd4a,2987
4141
- implicit-hie-0.1.2.6@sha256:f50a908979a574a881f753c0f9a5224f023f438b30fdefc5b7fa01803b07a280,2998
@@ -55,9 +55,6 @@ extra-deps:
5555
# - ghc-lib-parser-ex-9.0.0.4@sha256:8282b11c3797fc8ba225b245e736cc9a0745d9c48d0f9fea7f9bffb5c9997709,3642
5656
# - hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154
5757

58-
# for ghc-api-compat-8.10.6
59-
allow-newer: true
60-
6158
configure-options:
6259
ghcide:
6360
- --disable-library-for-ghci

stack-8.6.4.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ extra-deps:
4545
- floskell-0.10.4
4646
- fourmolu-0.3.0.0
4747
- fuzzy-0.1.0.0
48-
- # ghc-api-compat-8.6
49-
github: hsyl20/ghc-api-compat
50-
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
48+
- ghc-api-compat-8.6
5149
- ghc-check-0.5.0.4
5250
- ghc-events-0.13.0
5351
- ghc-exactprint-0.6.4

0 commit comments

Comments
 (0)