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

0 commit comments

Comments
 (0)