Skip to content

Commit 461b31d

Browse files
authored
Merge pull request #466 from fendor/feature/cabal-with-repl
Load session using cabal's `--with-repl` command
2 parents e38adde + e54869d commit 461b31d

File tree

30 files changed

+1279
-807
lines changed

30 files changed

+1279
-807
lines changed

.github/workflows/haskell.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,22 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
cabal: ['3.14.1.0', '3.10.2.0']
19-
ghc: ['9.12.2', '9.10.1', '9.8.4', '9.6.7', '9.4.8']
18+
cabal: ['head', '3.14.1.0', '3.10.2.0']
19+
ghc: ['9.12.2', '9.10.1', '9.8.4', '9.6.7']
2020
os: [ubuntu-latest, macOS-latest, windows-latest]
21+
exclude:
22+
- cabal: 'head'
23+
os: macOS-latest
24+
- cabal: '3.10.2.0'
25+
ghc: '9.12.2'
2126

2227
steps:
2328
- uses: actions/checkout@v4
2429
- id: extra-ghc
2530
uses: haskell-actions/setup@v2
2631
with:
2732
cabal-version: ${{ matrix.cabal }}
28-
ghc-version: '9.2.8' # This needs to be in-sync with 'extraGhcVersion'
33+
ghc-version: '9.4.8' # This needs to be in-sync with 'extraGhcVersion'
2934

3035
- uses: haskell-actions/setup@v2
3136
with:
@@ -35,7 +40,7 @@ jobs:
3540

3641
- name: Print extra ghc version
3742
# Needs to be in sync with 'extraGhcVersion'
38-
run: ghc-9.2.8 --version
43+
run: ghc-9.4.8 --version
3944

4045
- name: Print normal ghc version
4146
run: ghc --version
@@ -93,3 +98,6 @@ jobs:
9398
ghc-version: ${{ matrix.ghc }}
9499
- name: Compile Windows wrapper
95100
run: ghc -hide-all-packages -package base -package directory -package process -Wall -Werror wrappers/cabal.hs -o CabalWrapper
101+
102+
- name: Compile `--with-repl` Windows wrapper
103+
run: ghc -hide-all-packages -package base -package directory -package process -Wall -Werror wrappers/cabal-with-repl.hs -o CabalWithReplWrapper

hie-bios.cabal

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@ Build-Type: Simple
1515
extra-doc-files: ChangeLog.md
1616
Extra-Source-Files: README.md
1717
wrappers/cabal
18+
wrappers/cabal-with-repl
1819
wrappers/cabal.hs
20+
wrappers/cabal-with-repl.hs
1921
tests/configs/*.yaml
2022
tests/projects/cabal-with-ghc/cabal-with-ghc.cabal
2123
tests/projects/cabal-with-ghc/cabal.project
2224
tests/projects/cabal-with-ghc/hie.yaml
2325
tests/projects/cabal-with-ghc/src/MyLib.hs
2426
tests/projects/cabal-with-ghc-and-project/cabal-with-ghc.cabal
25-
tests/projects/cabal-with-ghc-and-project/cabal.project.9.2.8
27+
tests/projects/cabal-with-ghc-and-project/cabal.project.extra
2628
tests/projects/cabal-with-ghc-and-project/hie.yaml
2729
tests/projects/cabal-with-ghc-and-project/src/MyLib.hs
2830
tests/projects/cabal-with-project/cabal-with-project.cabal
29-
tests/projects/cabal-with-project/cabal.project.9.2.8
31+
tests/projects/cabal-with-project/cabal.project.extra
3032
tests/projects/cabal-with-project/hie.yaml
3133
tests/projects/cabal-with-project/src/MyLib.hs
3234
tests/projects/symlink-test/a/A.hs
@@ -47,7 +49,7 @@ Extra-Source-Files: README.md
4749
tests/projects/multi-cabal-with-project/appA/src/Lib.hs
4850
tests/projects/multi-cabal-with-project/appB/appB.cabal
4951
tests/projects/multi-cabal-with-project/appB/src/Lib.hs
50-
tests/projects/multi-cabal-with-project/cabal.project.9.2.8
52+
tests/projects/multi-cabal-with-project/cabal.project.extra
5153
tests/projects/multi-cabal-with-project/hie.yaml
5254
tests/projects/monorepo-cabal/cabal.project
5355
tests/projects/monorepo-cabal/hie.yaml
@@ -144,7 +146,7 @@ Extra-Source-Files: README.md
144146
tests/projects/failing-multi-repl-cabal-project/multi-repl-cabal-fail/src/Lib.hs
145147
tests/projects/failing-multi-repl-cabal-project/NotInPath.hs
146148

147-
tested-with: GHC ==9.4.8 || ==9.6.7 || ==9.8.4 || ==9.10.1 || ==9.12.2
149+
tested-with: GHC ==9.6.7 || ==9.8.4 || ==9.10.1 || ==9.12.2
148150

149151
Library
150152
Default-Language: Haskell2010
@@ -154,9 +156,15 @@ Library
154156
HIE.Bios.Config
155157
HIE.Bios.Config.YAML
156158
HIE.Bios.Cradle
159+
HIE.Bios.Cradle.Cabal
160+
HIE.Bios.Cradle.ProgramVersions
161+
HIE.Bios.Cradle.ProjectConfig
162+
HIE.Bios.Cradle.Resolved
163+
HIE.Bios.Cradle.Utils
157164
HIE.Bios.Environment
158165
HIE.Bios.Internal.Debug
159166
HIE.Bios.Flags
167+
HIE.Bios.Process
160168
HIE.Bios.Types
161169
HIE.Bios.Ghc.Api
162170
HIE.Bios.Ghc.Check
@@ -199,14 +207,14 @@ Executable hie-bios
199207
Main-Is: Main.hs
200208
Other-Modules: Paths_hie_bios
201209
autogen-modules: Paths_hie_bios
202-
GHC-Options: -Wall
210+
GHC-Options: -Wall +RTS -A32M -RTS
203211
HS-Source-Dirs: exe
204212
Build-Depends: base >= 4.16 && < 5
205213
, co-log-core
206214
, directory
207215
, filepath
208216
, hie-bios
209-
, optparse-applicative >= 0.18.1 && < 0.19
217+
, optparse-applicative >= 0.18.1 && < 0.20
210218
, prettyprinter
211219

212220
test-suite parser-tests

0 commit comments

Comments
 (0)