Skip to content

Commit 73c0273

Browse files
authored
new snapshot for stack build (#4864)
* new snapshot for stack build discard ghc 9.6 stack build and introduce a new snapshot for ghc 9.10 * Change config change config files to remove references to lts22 and point to lts24 for new stack builds
1 parent cf36960 commit 73c0273

5 files changed

Lines changed: 34 additions & 30 deletions

File tree

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ defaults: &defaults
5858

5959
version: 2
6060
jobs:
61-
stackage-lts22:
61+
stackage-lts24:
6262
docker:
63-
- image: haskell:9.6.7-slim-bullseye
63+
- image: haskell:9.10.3-slim-bullseye
6464
environment:
65-
- STACK_FILE: "stack-lts22.yaml"
65+
- STACK_FILE: "stack-lts24.yaml"
6666
<<: *defaults
6767

6868
stackage-lts23:
@@ -76,5 +76,5 @@ workflows:
7676
version: 2
7777
multiple-ghcs:
7878
jobs:
79-
- stackage-lts22
79+
- stackage-lts24
8080
- stackage-lts23

plugins/hls-class-plugin/src/Ide/Plugin/Class/ExactPrint.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module Ide.Plugin.Class.ExactPrint where
66

77
import Control.Monad.Trans.Maybe
88
import Data.Either.Extra (eitherToMaybe)
9-
import Data.Functor.Identity (Identity)
109
import qualified Data.Text as T
1110
import Development.IDE.GHC.Compat
1211
import GHC.Parser.Annotation
@@ -20,6 +19,10 @@ import Language.LSP.Protocol.Types (Range)
2019
import Control.Lens (_head, over)
2120
#endif
2221

22+
#if !MIN_VERSION_ghc_exactprint(1,10,0)
23+
import Data.Functor.Identity (Identity)
24+
#endif
25+
2326
makeEditText :: Monad m => ParsedModule -> DynFlags -> AddMinimalMethodsParams -> MaybeT m (T.Text, T.Text)
2427
makeEditText pm df AddMinimalMethodsParams{..} = do
2528
mDecls <- MaybeT . pure $ traverse (makeMethodDecl df) methodGroup

plugins/hls-notes-plugin/src/Ide/Plugin/Notes.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ import Control.Monad.Except (ExceptT, MonadError,
55
throwError)
66
import Control.Monad.IO.Class (liftIO)
77
import qualified Data.Array as A
8-
import Data.Foldable (foldl')
98
import Data.HashMap.Strict (HashMap)
109
import qualified Data.HashMap.Strict as HM
1110
import qualified Data.HashSet as HS
12-
import Data.List (uncons)
11+
import Data.List as List
1312
import Data.Maybe (catMaybes, fromMaybe,
1413
listToMaybe, mapMaybe)
15-
import Data.Text (Text, intercalate)
14+
import Data.Text (Text)
1615
import qualified Data.Text as T
1716
import qualified Data.Text.Utf16.Rope.Mixed as Rope
1817
import Data.Traversable (for)
@@ -67,7 +66,7 @@ instance Pretty Log where
6766
LogNoteReferencesFound file refs -> "Found note references in " <> prettyNotes file refs
6867
LogNotesFound file notes -> "Found notes in " <> prettyNotes file notes
6968
where prettyNotes file hm = pretty (show file) <> ": ["
70-
<> pretty (intercalate ", " (fmap (\(s, p) -> "\"" <> s <> "\" at " <> intercalate ", " (map (T.pack . show) p)) hm)) <> "]"
69+
<> pretty (T.intercalate ", " (fmap (\(s, p) -> "\"" <> s <> "\" at " <> T.intercalate ", " (map (T.pack . show) p)) hm)) <> "]"
7170

7271
{-
7372
The first time the user requests a jump-to-definition on a note reference, the
@@ -100,7 +99,7 @@ findNotesRules recorder = do
10099
references <- fmap snd <$> use MkGetNotesInFile nfp
101100
pure $ fmap (HM.map (fmap (nfp,))) references
102101
)
103-
pure $ Just $ foldl' (HM.unionWith (<>)) HM.empty definedReferences
102+
pure $ Just $ List.foldl' (HM.unionWith (<>)) HM.empty definedReferences
104103

105104
err :: MonadError PluginError m => Text -> Maybe a -> m a
106105
err s = maybe (throwError $ PluginInternalError s) pure
@@ -175,7 +174,7 @@ findNotesInFile file recorder = do
175174
let refMatches = (A.! 1) <$> matchAllText noteRefRegex content
176175
refs = toPositions refMatches content
177176
logWith recorder Debug $ LogNoteReferencesFound file (HM.toList refs)
178-
pure $ Just (HM.mapMaybe (fmap fst . uncons) notes, refs)
177+
pure $ Just (HM.mapMaybe (fmap fst . List.uncons) notes, refs)
179178
where
180179
uint = fromIntegral . toInteger
181180
-- the regex library returns the character index of the match. However

plugins/hls-stylish-haskell-plugin/src/Ide/Plugin/StylishHaskell.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ import Ide.PluginUtils
2525
import Ide.Types hiding (Config)
2626
import Language.Haskell.Stylish
2727
import Language.LSP.Protocol.Types as LSP
28-
import System.Directory
2928
import System.FilePath
3029

30+
#if !MIN_VERSION_stylish_haskell(0,15,0)
31+
import System.Directory
32+
#endif
33+
3134
data Log
3235
= LogLanguageExtensionFromDynFlags
3336

stack-lts22.yaml renamed to stack-lts24.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-22.44 # ghc-9.6.7
1+
resolver: lts-24.33 # ghc-9.10.3
22

33
packages:
44
- .
@@ -12,39 +12,38 @@ ghc-options:
1212

1313
allow-newer: true
1414
allow-newer-deps:
15-
- extensions
15+
- hw-fingertree
16+
- retrie
1617
# stan dependencies
1718
- directory-ospath-streaming
1819

1920
extra-deps:
2021
- extra-1.8.1
21-
- Diff-0.5
2222
- hiedb-0.8.0.0
23-
- hie-bios-0.18.0
2423
- hie-compat-0.3.1.2
2524
- implicit-hie-0.1.4.0
25+
- hie-bios-0.18.0
26+
- hw-fingertree-0.1.2.1
27+
- monad-dijkstra-0.1.1.5
28+
- retrie-1.2.3
29+
- unordered-containers-0.2.21
2630
- lsp-2.8.0.0
2731
- lsp-test-0.18.0.0
2832
- lsp-types-2.4.0.0
29-
- websockets-0.13.0.0@sha256:9b3680ba5055e0b34ab29c341b21d70084bf067519fc059af0e597cd90a4a05a,7567
30-
- monad-dijkstra-0.1.1.4 # 5
31-
- retrie-1.2.3
32-
- unordered-containers-0.2.21
33-
34-
# stan and friends
33+
# stan dependencies not found in the stackage snapshot
3534
- stan-0.2.1.0
3635
- dir-traverse-0.2.3.0
37-
- extensions-0.1.0.1
38-
- tomland-1.3.3.2
36+
- extensions-0.1.1.0
3937
- trial-0.0.0.0
4038
- trial-optparse-applicative-0.0.0.0
4139
- trial-tomland-0.0.0.0
42-
- validation-selective-0.2.0.0
43-
- cabal-add-0.2
44-
- cabal-install-parsers-0.6.1.1
4540
- directory-ospath-streaming-0.2.2
46-
47-
41+
- cabal-add-0.2
42+
- fourmolu-0.19.0.1
43+
- ormolu-0.8.0.2
44+
- Cabal-3.14.2.0
45+
- Cabal-syntax-3.14.2.0
46+
- cabal-install-parsers-0.6.3
4847
configure-options:
4948
ghcide:
5049
- --disable-library-for-ghci
@@ -60,7 +59,7 @@ flags:
6059
BuildExecutable: false
6160
# stan dependencies
6261
directory-ospath-streaming:
63-
os-string: false
62+
os-string: true
6463

6564
nix:
6665
packages: [icu libcxx zlib]

0 commit comments

Comments
 (0)