Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
cabal:
description: "Cabal version"
required: false
default: "3.14.2.0"
default: "3.16.1.0"
os:
description: "Operating system: Linux, Windows or macOS"
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supported-ghc-versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["9.12", "9.10", "9.8", "9.6"]
["9.14", "9.12", "9.10", "9.8", "9.6"]
29 changes: 16 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ jobs:
# See https://github.com/ocharles/tasty-rerun/issues/22 for why we need
# to include 'new' in the filters, since many of our test suites are in the
# same package.
#
# We choose a very short build directory, as we run into long path issues on windows.
# See cabal tracking issue https://github.com/haskell/cabal/issues/11395
run: |
cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"
cabal configure --builddir b --test-options="--rerun-update --rerun-filter failures,exceptions,new"

- if: matrix.test
name: Test hls-graph
Expand Down Expand Up @@ -146,7 +149,7 @@ jobs:
run: cabal test hls-refactor-plugin-tests || cabal test hls-refactor-plugin-tests

# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.10.2'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin-tests || cabal test hls-floskell-plugin-tests

Expand All @@ -163,23 +166,23 @@ jobs:
run: cabal test hls-eval-plugin-tests || cabal test hls-eval-plugin-tests

# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.10.2'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin-tests || cabal test hls-splice-plugin-tests

- if: matrix.test && matrix.ghc != '9.12'
- if: matrix.test && matrix.ghc != '9.12' && matrix.ghc != '9.14'
name: Test hls-stan-plugin
run: cabal test hls-stan-plugin-tests || cabal test hls-stan-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.14'
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin-tests || cabal test hls-stylish-haskell-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.14'
name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin-tests || cabal test hls-ormolu-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.14'
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin-tests || cabal test hls-fourmolu-plugin-tests

Expand All @@ -195,8 +198,8 @@ jobs:
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin-tests || cabal test hls-rename-plugin-tests

# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.10.2'
# Hlint will never work on GHC 9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin-tests || cabal test hls-hlint-plugin-tests

Expand Down Expand Up @@ -233,11 +236,11 @@ jobs:
run: cabal test hls-explicit-record-fields-plugin-tests || cabal test hls-explicit-record-fields-plugin-tests

# versions need to be limited since the tests depend on cabal-fmt which only builds with ghc <9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.10.2'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Test hls-cabal-fmt-plugin test suite
run: cabal test hls-cabal-fmt-plugin-tests --flag=isolateCabalfmtTests || cabal test hls-cabal-fmt-plugin-tests --flag=isolateCabalfmtTests

- if: matrix.test && matrix.ghc != '9.12'
- if: matrix.test && matrix.ghc != '9.12' && matrix.ghc != '9.14'
name: Test hls-cabal-gild-plugin test suite
run: cabal test hls-cabal-gild-plugin-tests --flag=isolateCabalGildTests || cabal test hls-cabal-gild-plugin-tests --flag=isolateCabalGildTests

Expand All @@ -246,7 +249,7 @@ jobs:
run: cabal test hls-cabal-plugin-tests || cabal test hls-cabal-plugin-tests

# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.10.2'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Test hls-retrie-plugin test suite
run: cabal test hls-retrie-plugin-tests || cabal test hls-retrie-plugin-tests

Expand All @@ -264,7 +267,7 @@ jobs:

# The plugin tutorial is only compatible with 9.6 and 9.8.
# No particular reason, just to avoid excessive CPP.
- if: matrix.test && matrix.ghc != '9.4' && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.10.2'
- if: matrix.test && matrix.ghc != '9.4' && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
name: Compile the plugin-tutorial
run: cabal build plugin-tutorial

Expand Down
85 changes: 84 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ packages:
./hls-test-utils


index-state: 2025-08-08T12:31:54Z
index-state: 2026-01-01T00:00:00Z

source-repository-package
type: git
location: https://github.com/snowleopard/alga
tag: d4e43fb42db05413459fb2df493361d5a666588a
Comment on lines +12 to +15
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? Or is this just an allow-newer?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I advice against using source-repository-package. I think it is a workaround when the package is not yet available on another repository such as Hackage. Can we update alga on Hackage instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, alga requires changes and can't be revised on hackage. While this is rather unfortunate, we will have to release with this source-repository-package stanza, as we are otherwise blocked for an unknown amount of time.

Copy link
Member

@Kleidukos Kleidukos Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fendor It's perfectly fine to vendor the patched alga in the HLS tree for the time being and remove it after the fix has been released. This allows people to install HLS from its Hackage sdist without trouble. :)


tests: True
test-show-details: direct
Expand Down Expand Up @@ -56,3 +61,81 @@ if impl(ghc >= 9.11)
allow-newer:
cabal-install-parsers:base,
cabal-install-parsers:time,

if impl(ghc >= 9.14)
allow-newer:
scientific:containers,
lsp-types:containers,
lsp:containers,
indexed-traversable:containers,
foldl:containers,
deferred-folds:containers,
quickcheck-instances:containers,
hashable:containers,
dependent-map:containers,
aeson:containers,
semialign:containers,
lsp-test:containers,
haddock-library:base,
hiedb:ghc,
hie-bios:ghc,
integer-logarithms:ghc-bignum,
hashable:ghc-bignum,
string-interpolate:template-haskell,
haskell-src-meta:template-haskell,
th-orphans:template-haskell,
th-lift:template-haskell,
th-expand-syns:template-haskell,
tasty-hspec:base,
hsc2hs:base,
primitive:base,
tagged:template-haskell,
indexed-traversable:base,
text-short:base,
text-short:template-haskell,
bifunctors:template-haskell,
th-abstraction:template-haskell,
scientific:base,
integer-logarithms:base,
splitmix:base,
quickcheck-instances:base,
time-compat:base,
time-compat:time,
these:base,
assoc:base,
data-fix:base,
OneTuple:base,
some:base,
boring:base,
indexed-traversable-instances:base,
lsp-types:template-haskell,
uuid-types:template-haskell,
parallel:base,
lens:template-haskell,
free:template-haskell,
hiedb:base,
hie-compat:base,
hie-bios:time,
hie-bios:template-haskell,
hashable:base,
unordered-containers:template-haskell,
ghc-trace-events:base,
constraints-extras:template-haskell,
co-log-core:base,
async:base,
aeson:time,
text-iso8601:time,
semialign:base,
integer-conversion:base,
generically:base,
aeson:template-haskell,
scientific:template-haskell,
th-compat:template-haskell,
lsp-test:time,
ghc-lib-parser:base,
lukko:base,
binary-instances:base,
binary-orphans:base,
generic-deriving:template-haskell,
generic-deriving:containers,
cabal-install-parsers:containers,
5 changes: 4 additions & 1 deletion ghcide-test/data/multi/cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
packages: a b c

allow-newer: base
allow-newer: async:base,
hashable:base,
hashable:template-haskell,
hashable:ghc-bignum,
4 changes: 2 additions & 2 deletions ghcide-test/exe/FindDefinitionAndHoverTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ tests = let
aaaL11 = Position 11 1 ; aaaType = [ExpectHoverTextRegex "Go to \\[TypeConstructor\\]\\(.*GotoHover\\.hs#L8\\)"]
dcL7 = Position 11 11 ; tcDC = [mkR 7 23 9 16]
dcL12 = Position 16 11 ;
xtcL5 = Position 9 11 ; xtc = [ExpectHoverText ["Int", "Defined in ", "GHC.Types", "ghc-prim"]]
xtcL5 = Position 9 11 ; xtc = [ExpectHoverText ["Int", "Defined in ", if ghcVersion >= GHC914 then "GHC.Internal.Types" else "GHC.Types", if ghcVersion >= GHC914 then "ghc-internal" else "ghc-prim"]]
tcL6 = Position 10 11 ; tcData = [mkR 7 0 9 16, ExpectHoverText ["TypeConstructor", "GotoHover.hs:8:1"]]
vvL16 = Position 20 12 ; vv = [mkR 20 4 20 6]
opL16 = Position 20 15 ; op = [mkR 21 2 21 4]
Expand Down Expand Up @@ -188,7 +188,7 @@ tests = let
innL48 = Position 52 5 ; innSig = [ExpectHoverText ["inner"], mkR 53 2 53 7]; innSig' = [ExpectHoverText ["inner", "Char"], mkR 49 2 49 7]
holeL60 = Position 62 7 ; hleInfo = [ExpectHoverText ["_ ::"]]
holeL65 = Position 65 8 ; hleInfo2 = [ExpectHoverText ["_ :: a -> Maybe a"]]
cccL17 = Position 17 16 ; docLink = [ExpectHoverTextRegex "\\*Defined in 'GHC.Types'\\* \\*\\(ghc-prim-[0-9.]+\\)\\*\n\n"]
cccL17 = Position 17 16 ; docLink = [ExpectHoverTextRegex $ if ghcVersion >= GHC914 then "\\*Defined in 'GHC.Internal.Types'\\* \\*\\(ghc-internal-[0-9.]+\\)\\*\n\n" else "\\*Defined in 'GHC.Types'\\* \\*\\(ghc-prim-[0-9.]+\\)\\*\n\n"]
imported = Position 56 13 ; importedSig = getDocUri "Foo.hs" >>= \foo -> return [ExpectHoverText ["foo", "Foo", "Haddock"], mkL foo 5 0 5 3]
reexported = Position 55 14
reexportedSig = getDocUri "Bar.hs" >>= \bar -> return [ExpectHoverText ["Bar", "Bar", "Haddock"], mkL bar 3 0 3 14]
Expand Down
5 changes: 5 additions & 0 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@
[] -> error $ "GHC version could not be parsed: " <> version
((runTime, _):_)
| compileTime == runTime -> do
atomicModifyIORef' cradle_files (\xs -> (cfp:xs,()))

Check warning on line 632 in ghcide/session-loader/Development/IDE/Session.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in loadSessionWithOptions in module Development.IDE.Session: Use atomicModifyIORef'_ ▫︎ Found: "atomicModifyIORef' cradle_files (\\ xs -> (cfp : xs, ()))" ▫︎ Perhaps: "atomicModifyIORef'_ cradle_files ((:) cfp)"
session (hieYaml, toNormalizedFilePath' cfp, opts, libDir)
| otherwise -> return (([renderPackageSetupException cfp GhcVersionMismatch{..}], Nothing),[])
-- Failure case, either a cradle error or the none cradle
Expand Down Expand Up @@ -885,7 +885,12 @@
hscEnv' <- -- Set up a multi component session with the other units on GHC 9.4
Compat.initUnits dfs hsc_env

#if MIN_VERSION_ghc(9,13,0)
let closure_errs_raw = checkHomeUnitsClosed' (hsc_unit_env hscEnv') (hsc_all_home_unit_ids hscEnv')
closure_errs = concatMap (Compat.bagToList . Compat.getMessages) closure_errs_raw
#else
let closure_errs = maybeToList $ checkHomeUnitsClosed' (hsc_unit_env hscEnv') (hsc_all_home_unit_ids hscEnv')
#endif
closure_err_to_multi_err err =
ideErrorWithSource
(Just "cradle") (Just DiagnosticSeverity_Warning) _cfp
Expand All @@ -896,7 +901,7 @@
x <- map errMsgDiagnostic closure_errs
DriverHomePackagesNotClosed us <- pure x
pure us
isBad ci = (homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units

Check warning on line 904 in ghcide/session-loader/Development/IDE/Session.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Suggestion in newComponentCache in module Development.IDE.Session: Redundant bracket ▫︎ Found: "(homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units" ▫︎ Perhaps: "homeUnitId_ (componentDynFlags ci) `OS.member` bad_units"
-- Whenever we spin up a session on Linux, dynamically load libm.so.6
-- in. We need this in case the binary is statically linked, in which
-- case the interactive session will fail when trying to load
Expand Down
Loading
Loading