Skip to content

Commit d21ec9d

Browse files
committed
Builds with GHC 9.4.x
1 parent 9a02cd0 commit d21ec9d

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
ghc: [8.6.5, 8.8.4, 8.10.7, 9.2.8]
14+
ghc: [8.6.5, 8.8.4, 8.10.7, 9.2.8, 9.4.7]
1515
compiler: [gcc]
1616
index-state: [2025-04-14T00:00:00Z]
1717
include:

glean.cabal.in

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ common fb-haskell
4747
TypeSynonymInstances
4848
NondecreasingIndentation
4949

50-
ghc-options: -Wall -Wno-orphans -Wno-name-shadowing
51-
if flag(opt)
52-
ghc-options: -O2
50+
ghc-options: -Wall -Wno-orphans -Wno-name-shadowing
51+
if flag(opt)
52+
ghc-options: -O2
5353

5454
common fb-cpp
5555
cxx-options: -std=c++17 -Wno-nullability-completeness
@@ -137,10 +137,11 @@ common deps
137137
random,
138138
regex-base,
139139
regex-pcre,
140-
base >=4.11.1 && <4.17,
140+
base >=4.11.1 && <4.18,
141141
array ^>=0.5.2.0,
142142
async ^>=2.2.1,
143143
attoparsec >=0.13.2.3 && <0.15,
144+
attoparsec-aeson >= 2.1 && < 2.3,
144145
unordered-containers ^>=0.2.9.0,
145146
containers,
146147
contravariant ^>=1.5,
@@ -157,12 +158,12 @@ common deps
157158
unix ^>=2.7.2.2,
158159
process ^>=1.6.3.0,
159160
prettyprinter >=1.2.1 && <1.8,
160-
time >=1.8.0.2 && <1.12,
161+
time >=1.8.0.2 && <1.13,
161162
binary ^>=0.8.5.1,
162163
deepseq ^>=1.4.3.0,
163164
hashable >=1.2.7.0 && <1.6,
164165
tar ^>=0.5.1.0,
165-
ghc-prim >=0.5.2.0 && <0.9,
166+
ghc-prim >=0.5.2.0 && <0.10,
166167
parsec ^>=3.1.13.0,
167168
haxl >= 2.1.2.0 && < 2.6,
168169
hinotify ^>= 0.4.1
@@ -1319,7 +1320,7 @@ library bench-util
13191320
Glean.Util.Benchmark
13201321
build-depends:
13211322
glean:stubs,
1322-
criterion < 1.6
1323+
criterion < 1.7
13231324

13241325
executable query-bench
13251326
import: fb-haskell, fb-cpp, deps, exe
@@ -1338,7 +1339,7 @@ executable query-bench
13381339
glean:schema,
13391340
glean:test-lib,
13401341
glean:util,
1341-
criterion < 1.6
1342+
criterion < 1.7
13421343

13431344
executable rename-bench
13441345
import: fb-haskell, fb-cpp, deps, exe
@@ -1354,7 +1355,7 @@ executable rename-bench
13541355
glean:schema,
13551356
glean:test-lib,
13561357
glean:util,
1357-
criterion < 1.6
1358+
criterion < 1.7
13581359

13591360
executable user-query-bench
13601361
import: fb-haskell, fb-cpp, deps, exe
@@ -1371,7 +1372,7 @@ executable user-query-bench
13711372
glean:schema,
13721373
glean:test-lib,
13731374
glean:util,
1374-
criterion < 1.6
1375+
criterion < 1.7
13751376

13761377
executable makefact-bench
13771378
import: fb-haskell, deps, exe
@@ -1386,7 +1387,7 @@ executable makefact-bench
13861387
glean:core,
13871388
glean:schema,
13881389
glean:test-lib,
1389-
criterion < 1.6
1390+
criterion < 1.7
13901391

13911392
executable compile-bench
13921393
import: fb-haskell, fb-cpp, deps, exe
@@ -1403,7 +1404,7 @@ executable compile-bench
14031404
glean:schema,
14041405
glean:test-lib,
14051406
glean:util,
1406-
criterion < 1.6,
1407+
criterion < 1.7,
14071408
criterion-measurement,
14081409
statistics,
14091410
vector-algorithms

glean/db/Glean/Database/Delete.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ asyncDeleteDatabase :: HasCallStack => Env -> Repo -> IO (Async ())
107107
asyncDeleteDatabase env@Env{..} repo = bracket
108108
newEmptyTMVarIO
109109
(\todo -> atomically $ tryPutTMVar todo Nothing) $ \todo -> do
110-
remover <- Warden.spawnMask envWarden $ const $ removeDatabase env repo todo
110+
remover <- Warden.spawnMask envWarden $ \_ -> removeDatabase env repo todo
111111
join $ atomically $ do
112112
active <- HashMap.lookup repo <$> readTVar envActive
113113
let deleteDB db = do

glean/lang/clang/glean-clang.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ common deps
4141
ansi-terminal ^>= 0.11,
4242
array ^>=0.5.2.0,
4343
async ^>=2.2.1,
44-
base >=4.11.1 && <4.17,
44+
base >=4.11.1 && <4.18,
4545
containers,
4646
data-default,
4747
deepseq ^>=1.4.3.0,

glean/lang/lsif/Data/LSIF/Angle.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ make developer iteration quicker.
1616
-}
1717

1818
{-# LANGUAGE OverloadedStrings #-}
19+
{-# LANGUAGE CPP #-}
1920

2021
module Data.LSIF.Angle (
2122
factToAngle, Predicate, PredicateMap,
@@ -481,7 +482,11 @@ withResultSet id f g = do
481482
toName :: Tag -> Value
482483
toName = string . tagText
483484

485+
#if MIN_VERSION_aeson(2,2,0)
486+
tagToRange :: KeyValue e a => Tag -> Maybe [a]
487+
#else
484488
tagToRange :: KeyValue a => Tag -> Maybe [a]
489+
#endif
485490
tagToRange Definition{..} = Just ["fullRange" .= toRange fullRange]
486491
tagToRange Declaration{..} = Just ["fullRange" .= toRange fullRange]
487492
tagToRange _ = Nothing

glean/lang/lsif/Data/LSIF/Gen.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ converters
1313
1414
-}
1515

16+
{-# LANGUAGE CPP #-}
1617
module Data.LSIF.Gen (
1718

1819
Predicate(..),
@@ -83,7 +84,11 @@ predicateId :: Applicative f => Text -> Id -> [Pair] -> f [Predicate]
8384
predicateId name id_ facts =
8485
pure [Predicate name [object [factId id_, key facts ]]]
8586

87+
#if MIN_VERSION_aeson(2,2,0)
88+
key :: KeyValue e kv => [Pair] -> kv
89+
#else
8690
key :: KeyValue kv => [Pair] -> kv
91+
#endif
8792
key xs = "key" .= object xs
8893

8994
string :: Text -> Value
@@ -95,7 +100,11 @@ srcFile id_ path = Predicate "src.File" [
95100
object [ factId id_, "key" .= path ]
96101
]
97102

103+
#if MIN_VERSION_aeson(2,2,0)
104+
factId :: KeyValue e kv => Id -> kv
105+
#else
98106
factId :: KeyValue kv => Id -> kv
107+
#endif
99108
factId (Id id_) = "id" .= id_
100109

101110
-- | Accumulate predicates

0 commit comments

Comments
 (0)