Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4499-support-for-ghc-912x #4517

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3d58a93
init to ghcide
soulomoon Mar 16, 2025
e7160a9
update
soulomoon Mar 16, 2025
03f6b3c
some more update
soulomoon Mar 16, 2025
a767490
cope with lookupCache function for module location
soulomoon Mar 16, 2025
316079c
ghcide and ghcide-test built
soulomoon Mar 16, 2025
f822964
remove unused import of rangesOverlap from PluginUtils
soulomoon Mar 16, 2025
0f5df94
managed to build in 9.12.2 without `SMethod_TextDocumentImplementation`
soulomoon Mar 16, 2025
e795722
add os-string dependency to ghcide.cabal
soulomoon Mar 17, 2025
97178a2
update
soulomoon Mar 17, 2025
8721e99
update ghcide
soulomoon Mar 17, 2025
8730bf7
fix tidyOpenType
soulomoon Mar 17, 2025
fa0d4de
fix SrcSpanAnn
soulomoon Mar 17, 2025
58b7a52
fix: enable gotoImplementation handler in GhcIde plugin
soulomoon Mar 17, 2025
af99f16
remove index and allow newer
soulomoon Mar 17, 2025
9bd6a85
chore: update index-state in cabal.project
soulomoon Mar 17, 2025
d806855
fix: conditionally allow newer base and ghc versions for GHC 9.12.2
soulomoon Mar 17, 2025
83f5690
fix: update GHC version constraint to allow newer base and ghc versio…
soulomoon Mar 17, 2025
c0be925
Merge branch 'master' into 4499-support-for-ghc-912x
soulomoon Mar 17, 2025
39f4368
fix: adjust import statements for compatibility with GHC versioning
soulomoon Mar 17, 2025
e7dd3de
fix: restore rnf implementation for LoadedBCOs in GHC 9.5.0+
soulomoon Mar 17, 2025
3414636
fix: update conditional compilation for GHC version checks
soulomoon Mar 17, 2025
7c56c86
fix: simplify import handling for GHC version checks
soulomoon Mar 17, 2025
5aea80d
fix: remove redundant import for GHC version 9.10.0
soulomoon Mar 17, 2025
4f68484
fix: update import statements and remove redundant rangesOverlap func…
soulomoon Mar 17, 2025
2b16444
fix: clean up import statements in PluginUtils.hs
soulomoon Mar 17, 2025
82e2441
fix: reorder import statements in PluginUtils.hs for clarity
soulomoon Mar 17, 2025
581cff3
fix: update NFData instance for GHC version checks in Orphans.hs
soulomoon Mar 17, 2025
a3c4a8d
fix: reorganize import statements in PluginUtils.hs for improved read…
soulomoon Mar 17, 2025
ad3188c
format
soulomoon Mar 17, 2025
0953705
format
soulomoon Mar 17, 2025
5145231
wobbles
soulomoon Mar 17, 2025
0c4fff9
disable all plugins for 9.12.0
soulomoon Mar 17, 2025
d342cdf
fix: update GHC versions in release workflow to include 9.12.2
soulomoon Mar 17, 2025
b488aa3
disable plugins for 9.12.2
soulomoon Mar 17, 2025
d7b5f00
bump haskell-actions/setup to version 2.7.10 in build and benchmark w…
soulomoon Mar 17, 2025
acdce95
refactor: remove unused import from Compat.hs
soulomoon Mar 17, 2025
fb97794
refactor: qualify Data.Text import in ExceptionTests.hs
soulomoon Mar 17, 2025
5b3619f
disable bench to proceed
soulomoon Mar 17, 2025
596bb42
feat: add entityInfo to mkHieFile' for GHC 9.11.0 compatibility
soulomoon Mar 17, 2025
36299b2
fix template haskell 9.12.2
soulomoon Mar 18, 2025
37a4d6b
fix: add conditional import for DuplicateRecordFields and FieldSelect…
soulomoon Mar 18, 2025
8c810cf
enable semanticTokens and notes
soulomoon Mar 18, 2025
91f1cbc
fix import
soulomoon Mar 18, 2025
1c620b2
fix import
soulomoon Mar 18, 2025
8405a21
fix version bound in matrix
soulomoon Mar 18, 2025
a366ad7
fix CI
soulomoon Mar 18, 2025
1349bcd
enable call hierarchy
soulomoon Mar 24, 2025
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 @@ -31,7 +31,7 @@ runs:
sudo chown -R $USER /usr/local/.ghcup
shell: bash

- uses: haskell-actions/[email protected].9
- uses: haskell-actions/[email protected].10
id: HaskEnvSetup
with:
ghc-version : ${{ inputs.ghc }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
example: ['cabal', 'lsp-types']

steps:
- uses: haskell-actions/[email protected].9
- uses: haskell-actions/[email protected].10
with:
ghc-version : ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
ghc: ["9.12.2", "9.10.1", "9.8.2", "9.6.6", "9.4.8"]
platform: [ { image: "debian:9"
, installCmd: "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
, toolRequirements: "libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev libncurses5 libtinfo5 patchelf"
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
ghc: ["9.12.2", "9.10.1", "9.8.2", "9.6.6", "9.4.8"]
steps:
- uses: docker://arm64v8/ubuntu:focal
name: Cleanup (aarch64 linux)
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
ghc: ["9.12.2", "9.10.1", "9.8.2", "9.6.6", "9.4.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
ghc: ["9.12.2", "9.10.1", "9.8.2", "9.6.6", "9.4.8"]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6", "9.4.8"]
ghc: ["9.12.2", "9.10.1", "9.8.2", "9.6.6", "9.4.8"]
steps:
- name: install windows deps
shell: pwsh
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.10", "9.8", "9.6", "9.4"]
["9.12.2", "9.10", "9.8", "9.6", "9.4"]
54 changes: 27 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,117 +134,117 @@ jobs:
HLS_WRAPPER_TEST_EXE: hls-wrapper
run: cabal test wrapper-test

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-refactor-plugin
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'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.2'
name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin-tests || cabal test hls-floskell-plugin-tests

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

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

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-eval-plugin
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'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.2'
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin-tests || cabal test hls-splice-plugin-tests

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

# TODO enable when it supports 9.10
- if: matrix.test && matrix.ghc != '9.10'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.2'
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.12.2'
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.12.2'
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin-tests || cabal test hls-fourmolu-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-explicit-imports-plugin test suite
run: cabal test hls-explicit-imports-plugin-tests || cabal test hls-explicit-imports-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-call-hierarchy-plugin test suite
run: cabal test hls-call-hierarchy-plugin-tests || cabal test hls-call-hierarchy-plugin-tests

- if: matrix.test && matrix.os != 'windows-latest'
- if: matrix.test && matrix.os != 'windows-latest' && matrix.ghc != '9.12.2'
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'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.2'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin-tests || cabal test hls-hlint-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-module-name-plugin test suite
run: cabal test hls-module-name-plugin-tests || cabal test hls-module-name-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-alternate-number-format-plugin test suite
run: cabal test hls-alternate-number-format-plugin-tests || cabal test hls-alternate-number-format-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-qualify-imported-names-plugin test suite
run: cabal test hls-qualify-imported-names-plugin-tests || cabal test hls-qualify-imported-names-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-code-range-plugin test suite
run: cabal test hls-code-range-plugin-tests || cabal test hls-code-range-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-change-type-signature test suite
run: cabal test hls-change-type-signature-plugin-tests || cabal test hls-change-type-signature-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-gadt-plugin test suit
run: cabal test hls-gadt-plugin-tests || cabal test hls-gadt-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-explicit-fixity-plugin test suite
run: cabal test hls-explicit-fixity-plugin-tests || cabal test hls-explicit-fixity-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-explicit-record-fields-plugin test suite
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'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.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
- if: matrix.test && matrix.ghc != '9.12.2'
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

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-cabal-plugin test suite
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'
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12.2'
name: Test hls-retrie-plugin test suite
run: cabal test hls-retrie-plugin-tests || cabal test hls-retrie-plugin-tests

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.12.2'
name: Test hls-overloaded-record-dot-plugin test suite
run: cabal test hls-overloaded-record-dot-plugin-tests || cabal test hls-overloaded-record-dot-plugin-tests

Expand Down
22 changes: 20 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ packages:
./hls-plugin-api
./hls-test-utils


index-state: 2024-12-02T00:00:00Z
index-state: 2025-03-17T11:03:01Z

tests: True
test-show-details: direct
Expand Down Expand Up @@ -59,3 +58,22 @@ if impl(ghc >= 9.8.4) && impl(ghc < 9.8.5)
ghc-lib-parser:filepath
constraints:
ghc-lib-parser==9.8.4.20241130

-- keep it here for easy debugging when trying to support new GHC versions
if impl(ghc >= 9.13.0)
allow-newer:
base
, ghc

source-repository-package
type: git
location: https://github.com/soulomoon/HieDb.git
tag: 9111fd0f2e4d2d5186c4de7afb7ea9f3a2941105
-- todo remove this once the PR is released
-- https://github.com/wz1000/HieDb/pull/80


source-repository-package
type: git
location: https://github.com/maoe/ghc-trace-events.git
tag: f18107dec920564f7cbcde52e17d0b4b41add5a3
7 changes: 7 additions & 0 deletions ghcide/cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
packages:
./

if impl(ghc >= 9.11.0)
allow-newer:
base
, ghc
1 change: 1 addition & 0 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ library
, mtl
, opentelemetry >=0.6.1
, optparse-applicative
, os-string
, parallel
, prettyprinter >=1.7
, prettyprinter-ansi-terminal
Expand Down
10 changes: 10 additions & 0 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ import GHC.Types.Error (errMsgDiagnostic,
singleMessage)
import GHC.Unit.State

#if MIN_VERSION_ghc(9,13,0)
import GHC.Driver.Make (checkHomeUnitsClosed)
#endif

data Log
= LogSettingInitialDynFlags
| LogGetInitialGhcLibDirDefaultCradleFail !CradleError !FilePath !(Maybe FilePath) !(Cradle Void)
Expand Down Expand Up @@ -782,6 +786,11 @@ toFlagsMap TargetDetails{..} =
setNameCache :: NameCache -> HscEnv -> HscEnv
setNameCache nc hsc = hsc { hsc_NC = nc }

#if MIN_VERSION_ghc(9,13,0)
-- Moved back to implementation in GHC.
checkHomeUnitsClosed' :: UnitEnv -> OS.Set UnitId -> [DriverMessages]
checkHomeUnitsClosed' ue _ = checkHomeUnitsClosed ue
#else
-- This function checks the important property that if both p and q are home units
-- then any dependency of p, which transitively depends on q is also a home unit.
-- GHC had an implementation of this function, but it was horribly inefficient
Expand Down Expand Up @@ -838,6 +847,7 @@ checkHomeUnitsClosed' ue home_id_set
Just depends ->
let todo'' = (depends OS.\\ done) `OS.union` todo'
in DigraphNode uid uid (OS.toList depends) : go (OS.insert uid done) todo''
#endif

-- | Create a mapping from FilePaths to HscEnvEqs
-- This combines all the components we know about into
Expand Down
Loading