Skip to content

Commit 618886c

Browse files
authored
More cabal file tidying (#535)
* More cabal file tidying Remove most constraints from non-library components. I'm unsure if this is quite right: possibly we should have bounds for any public component, but this is significantly more work to maintain (witness the odd bound on `sorted-list` from a test suite). I think this strikes a reasonable balance for now. * Delete repeated base bounds * Drop generic-lens workaround * Allow filepath-1.5
1 parent c92e6fe commit 618886c

File tree

4 files changed

+30
-29
lines changed

4 files changed

+30
-29
lines changed

cabal.project

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
index-state: 2023-11-13T00:00:00Z
1+
index-state: 2023-12-23T00:00:00Z
22

33
packages:
44
./lsp
@@ -18,8 +18,6 @@ package lsp-types
1818
-- has very many independent modules
1919
ghc-options: -j4
2020

21-
if impl(ghc >= 9.7)
22-
-- https://github.com/kcsongor/generic-lens/issues/158
23-
allow-newer:
24-
generic-lens:text,
25-
generic-lens-core:text,
21+
-- We allow filepath-1.5, this lets us actually test it. There is no problem
22+
-- on the lens side.
23+
allow-newer: lens:filepath

lsp-test/lsp-test.cabal

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ library
4545
build-depends:
4646
, aeson >=2 && <2.3
4747
, aeson-pretty ^>=0.8
48-
, ansi-terminal >= 0.10 && < 1.1
48+
, ansi-terminal >=0.10 && <1.1
4949
, async ^>=2.2
5050
, base >=4.10 && <5
5151
, bytestring >=0.10 && <0.13
@@ -54,16 +54,16 @@ library
5454
, conduit-parse ^>=0.2
5555
, containers ^>=0.6
5656
, data-default ^>=0.7
57-
, Diff >= 0.4 && < 0.6
57+
, Diff >=0.4 && <0.6
5858
, directory ^>=1.3
5959
, exceptions ^>=0.10
60-
, filepath ^>=1.4
60+
, filepath >=1.4 && < 1.6
6161
, Glob >=0.9 && <0.11
6262
, lens >=5.1 && <5.3
6363
, lens-aeson ^>=1.2
6464
, lsp ^>=2.3
6565
, lsp-types ^>=2.1
66-
, mtl >= 2.2 && < 2.4
66+
, mtl >=2.2 && <2.4
6767
, parser-combinators ^>=1.3
6868
, process ^>=1.6
6969
, row-types ^>=1.0
@@ -99,16 +99,16 @@ test-suite tests
9999
other-modules: DummyServer
100100
build-depends:
101101
, aeson
102-
, base >=4.10 && <5
102+
, base
103103
, containers
104104
, data-default
105105
, directory
106106
, filepath
107107
, hspec
108108
, lens
109-
, lsp ^>=2.3
109+
, lsp
110110
, lsp-test
111-
, mtl <2.4
111+
, mtl
112112
, parser-combinators
113113
, process
114114
, text

lsp-types/lsp-types.cabal

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ library
7676
, containers ^>=0.6
7777
, data-default ^>=0.7
7878
, deepseq >=1.4 && <1.6
79-
, Diff >= 0.4 && < 0.6
79+
, Diff >=0.4 && <0.6
8080
, dlist ^>=1.0
8181
, exceptions ^>=0.10
8282
, hashable ^>=1.4
@@ -85,7 +85,7 @@ library
8585
, lens >=5.1 && <5.3
8686
, lens-aeson ^>=1.2
8787
, mod ^>=0.2
88-
, mtl >= 2.2 && < 2.4
88+
, mtl >=2.2 && <2.4
8989
, network-uri ^>=2.6
9090
, prettyprinter ^>=1.7
9191
, row-types ^>=1.0
@@ -94,11 +94,14 @@ library
9494
, template-haskell >=2.7 && <2.22
9595
, text >=1 && <2.2
9696

97+
-- This version of filepath comes with GHC 9.6, so
98+
-- we should be able to drop this flag once we only
99+
-- support 9.6 or higher
97100
if flag(force-ospath)
98-
build-depends: filepath ^>=1.4.100.0
101+
build-depends: filepath >=1.4.100.0 && < 1.6
99102

100103
else
101-
build-depends: filepath
104+
build-depends: filepath >=1.4 && < 1.6
102105

103106
ghc-options:
104107
-Wall -Wmissing-deriving-strategies
@@ -532,11 +535,11 @@ library metamodel
532535

533536
build-depends:
534537
, aeson >=2
535-
, base >=4.11 && <5
536-
, file-embed
537-
, lens >=4.15.2
538-
, template-haskell
539-
, text
538+
, base >=4.11 && <5
539+
, file-embed ^>=0.0.15
540+
, lens >=5.1 && <5.3
541+
, template-haskell >=2.7 && <2.22
542+
, text >=1 && <2.2
540543

541544
executable generator
542545
hs-source-dirs: generator
@@ -548,7 +551,7 @@ executable generator
548551
main-is: Main.hs
549552
other-modules: CodeGen
550553
build-depends:
551-
, base >=4.11 && <5
554+
, base
552555
, containers
553556
, directory
554557
, filepath
@@ -578,11 +581,11 @@ test-suite lsp-types-test
578581

579582
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
580583
build-depends:
581-
, aeson >=2.0.3.0
584+
, aeson
582585
, base
583586
, filepath
584587
, hspec
585-
, lens >=4.15.2
588+
, lens
586589
, lsp-types
587590
, network-uri
588591
, QuickCheck

lsp/lsp.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ library
6060
, data-default ^>=0.7
6161
, directory ^>=1.3
6262
, exceptions ^>=0.10
63-
, filepath ^>=1.4
63+
, filepath >=1.4 && < 1.6
6464
, hashable ^>=1.4
6565
, lens >=5.1 && <5.3
6666
, lens-aeson ^>=1.2
6767
, lsp-types ^>=2.1
68-
, mtl >= 2.2 && < 2.4
68+
, mtl >=2.2 && <2.4
6969
, prettyprinter ^>=1.7
7070
, random ^>=1.2
7171
, row-types ^>=1.0
@@ -88,7 +88,7 @@ executable lsp-demo-reactor-server
8888
, aeson
8989
, base
9090
, co-log-core
91-
, lens >=4.15.2
91+
, lens
9292
, lsp
9393
, prettyprinter
9494
, stm
@@ -132,7 +132,7 @@ test-suite lsp-test
132132
, hspec
133133
, lsp
134134
, row-types
135-
, sorted-list >=0.2.1 && <0.2.3
135+
, sorted-list
136136
, text
137137
, text-rope
138138
, unordered-containers

0 commit comments

Comments
 (0)