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

Build with GHC 9.2 #2503

Merged
merged 167 commits into from Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 158 commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
4853ccb
WIP
pepeiborra Dec 12, 2021
c233569
progress
pepeiborra Dec 18, 2021
e9327e4
enable 9.2 in CI
pepeiborra Dec 18, 2021
0e78f03
Merge branch 'master' into ghc-9.2
pepeiborra Dec 18, 2021
a1e6af1
Sort out some compatibility issues (#2511)
alanz Dec 19, 2021
a92845a
fix mkPrintUnqualifiedDefault
pepeiborra Dec 19, 2021
1ea186c
fix qualified idents
pepeiborra Dec 19, 2021
e62a05e
Fix a few more ghc compats
pepeiborra Dec 19, 2021
4d1bc3b
Add new orphans
pepeiborra Dec 19, 2021
664ec28
Fix runtime APIs
pepeiborra Dec 19, 2021
f4a6a1b
HsParsedModule
pepeiborra Dec 19, 2021
4c84520
export GHC.Hs.Utils
pepeiborra Dec 20, 2021
f6623bc
9.2 compat for unloading and hie file generation
wz1000 Dec 20, 2021
c024d96
hlint fix
pepeiborra Dec 20, 2021
b430b94
Remove 'setupFinderCache' as its never actually used
wz1000 Dec 20, 2021
0a411e2
9.2 compat for Development.IDE.Core.Compile
wz1000 Dec 20, 2021
3a834f6
Stub out 'getDocumentation' on GHC 9.2 (Requires a reimplementation i…
wz1000 Dec 20, 2021
a1fd2ea
Expose binds
pepeiborra Dec 20, 2021
6b9b288
Remove a bit of CPP by refactoring it into Compat layer
wz1000 Dec 20, 2021
3fec58d
Progress on ghc-exactprint stuff
alanz Dec 20, 2021
ff701a2
Fix compile on 8.10
wz1000 Dec 21, 2021
b9eb445
9.2 compat for CodeAction Exactprint
wz1000 Dec 21, 2021
b2881bb
9.2 compat for Outline
wz1000 Dec 21, 2021
c06978b
9.2 compat for Pragmas plugin
wz1000 Dec 21, 2021
6782d55
Get the rest compiling with 9.2
wz1000 Dec 21, 2021
c1f4c7f
Merge branch 'master' into ghc-9.2
Anton-Latukha Dec 21, 2021
ba4d618
WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
Anton-Latukha Dec 21, 2021
208f484
disabling {test,bench} to properly heat-up the cache
Anton-Latukha Dec 21, 2021
7bb7cae
CI: index-state: +1s refresh
Anton-Latukha Dec 21, 2021
ed99ae7
CI: fix early termination
Anton-Latukha Dec 21, 2021
064a9b7
WIP: PLEASE, DROP BEFORE MERGE
Anton-Latukha Dec 21, 2021
29ffa80
WIP: PLEASE, DROP BEFORE MERGE
Anton-Latukha Dec 21, 2021
e86f64a
WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
Anton-Latukha Dec 21, 2021
cca1db9
WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE
Anton-Latukha Dec 21, 2021
2f56989
CI: index-state advance to save cache anew
Anton-Latukha Dec 21, 2021
936c236
CI: apparently GitHub uses alias cp='cp -i'
Anton-Latukha Dec 21, 2021
1f8ff21
WIP: PLESE, REVERT TO TEST ALL GHCs
Anton-Latukha Dec 21, 2021
1d58237
CI: index-state +1s
Anton-Latukha Dec 21, 2021
e1ce542
WIP: PLESE, REVERT TO TEST ALL GHCs
Anton-Latukha Dec 21, 2021
8f35c00
CI: index-state +1s
Anton-Latukha Dec 21, 2021
870f3c2
WIP: PLESE, REVERT TO PASS HLINT CI REQUIREMENTS
Anton-Latukha Dec 21, 2021
e5d3b12
Enable tests for ghc-9.2.1
jneira Dec 22, 2021
10f18b6
Use cabal-ghc921.project
jneira Dec 22, 2021
54978e7
Enable tests for all ghcs
jneira Dec 22, 2021
15e1878
Address or skip hlint
jneira Dec 22, 2021
49f76a1
Last hlint fixes
jneira Dec 22, 2021
8eba7e4
Merge branch 'master' into ghc-9.2
jneira Dec 22, 2021
e1abb7b
Merge branch 'master' into ghc-9.2
jneira Dec 22, 2021
dc9b643
Fix loop when setting DynFlags
wz1000 Dec 22, 2021
b0a16e9
Filter out evidence variables in documentHighlight
wz1000 Dec 22, 2021
a824620
Fix getFlds
pepeiborra Dec 22, 2021
a759949
fix GRE
pepeiborra Dec 22, 2021
927903e
fix formatting
pepeiborra Dec 22, 2021
7b51175
fix Compat build in 9.0
pepeiborra Dec 22, 2021
f17cd06
fix collectHsBindsBinders
pepeiborra Dec 22, 2021
20ec3d5
remove redundant WarnMsg local typedef
pepeiborra Dec 22, 2021
78d93d1
showSDocForUser
pepeiborra Dec 22, 2021
813d991
redundant import
pepeiborra Dec 22, 2021
c258870
HsLet
pepeiborra Dec 22, 2021
3056472
LetStmt
pepeiborra Dec 22, 2021
e937268
fix Completions build
pepeiborra Dec 22, 2021
1d547f2
bump cabal index state
pepeiborra Dec 22, 2021
c4d1ab6
Literals: replace argument patterns by field patterns
pepeiborra Dec 22, 2021
7f36188
QualifyImportedNames: fix build with ghc <9.2
pepeiborra Dec 22, 2021
9ab613c
fix <9.2 build Splice plugin
pepeiborra Dec 22, 2021
ef6355d
fix <9.2 build QualifyImportedNames plugin
pepeiborra Dec 22, 2021
be3abcb
Fix <9.2 build Wingman
pepeiborra Dec 22, 2021
783ce07
fix build example
pepeiborra Dec 22, 2021
f033a63
Disable a whole bunch of plugins
pepeiborra Dec 22, 2021
d220772
Move windows test into the matrix
Ailrun Dec 22, 2021
28d0fb0
Make consistent plugin handling
jneira Dec 23, 2021
c9d3e98
Add a not working stack.yaml for ghc-9.2.1
jneira Dec 23, 2021
6a6a778
Remove wrong comma
jneira Dec 23, 2021
1cad251
Restore primitive allow-*
jneira Dec 23, 2021
d95b03f
Merge branch 'master' into ghc-9.2
Anton-Latukha Dec 23, 2021
3d42563
Use correct UnitId when constructing InstalledModules
mpickering Dec 23, 2021
ef11f4d
Fix 8.8 build
pepeiborra Dec 23, 2021
9e844a6
Merge branch 'master' into ghc-9.2
Anton-Latukha Dec 23, 2021
567a325
Fix hls-test-utils
pepeiborra Dec 24, 2021
41f3510
Build explicit imports plugin
pepeiborra Dec 24, 2021
e6296a4
Drop Windows build blocked on unix-compat
pepeiborra Dec 24, 2021
af7d524
bump Cabal index and simplify constraints
pepeiborra Dec 24, 2021
5c68c79
Add comment
mpickering Dec 24, 2021
e360035
Use GhcSessionDeps in getHieAst
mpickering Dec 24, 2021
452b736
Use hsConDeclsBinders in Outline generation
mpickering Dec 24, 2021
61c657e
Use the right session in typecheckModule
mpickering Dec 24, 2021
937efe7
Restore some cases in Outline
wz1000 Dec 24, 2021
bbb720f
Fix Outline build with GHC <9.2
pepeiborra Dec 24, 2021
f951004
Remove noisy logMessage notifications in tests
pepeiborra Dec 24, 2021
daf43c8
Merge branch 'master' into ghc-9.2
Anton-Latukha Dec 24, 2021
111014f
Build ghcide test and bench suites with 9.2
pepeiborra Dec 24, 2021
338d31f
Revert "Merge branch 'master' into ghc-9.2"
pepeiborra Dec 24, 2021
58bbc00
The redundant constraints warning has changed in 9.2
pepeiborra Dec 24, 2021
d72f9e0
Fix code action regression
pepeiborra Dec 24, 2021
1bed6d7
fix 9.2 ghcide build
pepeiborra Dec 24, 2021
d49bae9
Merge branch 'master' into ghc-9.2
Anton-Latukha Dec 24, 2021
50b75e4
Merge branch 'master' into ghc-9.2
jneira Dec 26, 2021
d07f8f8
Fix completion snippets
pepeiborra Dec 27, 2021
d48a1df
Merge branch 'master' into ghc-9.2
michaelpj Dec 29, 2021
926d5d2
Fix mismerge
michaelpj Dec 29, 2021
d3f83b5
Bifunctor instance for GenLocated
pepeiborra Dec 28, 2021
63ae8da
Build rename plugin with GHC 9.2
pepeiborra Jan 2, 2022
c12de48
Helpers for tracing ExactPrint ASTs
pepeiborra Dec 29, 2021
552cfc5
Fix exactprint code actions
pepeiborra Jan 2, 2022
802799d
Enable import lens plugin
pepeiborra Jan 2, 2022
685fb09
WIP test run changes
pepeiborra Jan 2, 2022
c0f5aee
Merge remote-tracking branch 'upstream/master' into ghc-9.2
pepeiborra Jan 2, 2022
c838072
Fix GHC 9 build
pepeiborra Jan 2, 2022
707ea98
Undo WIP test changes
pepeiborra Jan 2, 2022
7ecab63
Fix GHC 8.8 build
pepeiborra Jan 2, 2022
2ebfd96
Fix 8.6 build
pepeiborra Jan 2, 2022
ba01b36
Fix another exactprint regression
pepeiborra Jan 2, 2022
59e2b2f
Add source repository with ghc-exactprint fixes
pepeiborra Jan 2, 2022
a108827
Add source repository for retrie (needed for fixed ghc-exactprint)
pepeiborra Jan 2, 2022
61b7755
fix ghc <9.2 build
pepeiborra Jan 2, 2022
861eabc
Another exactprint fix
pepeiborra Jan 2, 2022
6c0d201
Fix benchmarks
pepeiborra Jan 3, 2022
8fe2f76
Another exactprint fix
pepeiborra Jan 3, 2022
3dfaebf
Disable a plugin test (plugin not compatible anymore)
pepeiborra Jan 3, 2022
b095f8b
Enable windows build
jneira Jan 1, 2022
6691075
Merge remote-tracking branch 'upstream/master' into ghc-9.2
jneira Jan 3, 2022
2084203
Fix multiple components by using consistent UnitIds
wz1000 Jan 3, 2022
6505233
Improve error handling for initPlugins
wz1000 Jan 3, 2022
7546d4b
Fix two hover tests
wz1000 Jan 3, 2022
c28b15d
Remove retrie and ghc-exactprint source repos
pepeiborra Jan 3, 2022
aea3ef8
Fix version of direct-sqlite
pepeiborra Jan 3, 2022
c3bd8c2
Fix ci update hackage index
jneira Jan 3, 2022
78ea4f3
This test is broken because GHC 9.2 built-in libraries lack docs
pepeiborra Jan 3, 2022
4f016dd
Sanitize hiding tests
pepeiborra Jan 3, 2022
0c325f5
Disable another test
pepeiborra Jan 4, 2022
4e32027
Fix outline
wz1000 Jan 4, 2022
16bd035
Revert "Sanitize hiding tests"
pepeiborra Jan 4, 2022
c6bde44
Merge branch 'master' into ghc-9.2
Anton-Latukha Jan 4, 2022
ce57b1d
Extract out ci build setup
jneira Jan 4, 2022
67f9b92
Correct action path
jneira Jan 4, 2022
2c88508
Add required shell property
jneira Jan 4, 2022
3bbc8b7
Remove unused cabal version
jneira Jan 4, 2022
378c1ce
Update .github/actions/setup-build/action.yml
jneira Jan 5, 2022
c0e1903
Update .github/actions/setup-build/action.yml
jneira Jan 5, 2022
b422d5f
Update .github/actions/setup-build/action.yml
jneira Jan 5, 2022
c3dfb4d
Fix remaining tests and some warnings
wz1000 Jan 5, 2022
8cd5e7f
Update .github/actions/setup-build/action.yml
jneira Jan 5, 2022
186d93d
Copy alt project file unconditionally
jneira Jan 5, 2022
2719110
Make freeze strict
jneira Jan 5, 2022
917401f
Merge branch 'reuse-ci' into ghc-9.2
jneira Jan 5, 2022
6e53b6f
Actually fix tests
wz1000 Jan 5, 2022
ba45d54
Merge branch 'ghc-9.2' of https://github.com/haskell/haskell-language…
jneira Jan 5, 2022
73f89f9
Merge branch 'master' into ghc-9.2
jneira Jan 5, 2022
8d3fe3b
remove unnecessary? allow-newer
pepeiborra Jan 6, 2022
8b48325
Drop no longer needed source repo for th-extras
pepeiborra Jan 6, 2022
a118b74
Add module header comments
pepeiborra Jan 6, 2022
9b045f7
Fix or remove commented out code
pepeiborra Jan 6, 2022
5fcab6c
more commented out code
pepeiborra Jan 6, 2022
6c3c126
Disable a couple of func-test tests
pepeiborra Jan 6, 2022
7ab6b97
All func-test tests passing now
pepeiborra Jan 6, 2022
22cd25f
fix test matrix
pepeiborra Jan 7, 2022
a98d36a
Update cabal-ghc921.project
pepeiborra Jan 8, 2022
631bc19
do not test class plugin
pepeiborra Jan 8, 2022
0d74359
Mark hover test broken in Windows and Mac
pepeiborra Jan 9, 2022
2c4e7eb
Fix hls-pragmas-plugin test suite
pepeiborra Jan 9, 2022
bfaa86e
disable testing of refine imports plugin
pepeiborra Jan 9, 2022
fb1d5f1
disable rename plugin
pepeiborra Jan 10, 2022
4c52957
Do not test qualify imported names plugin
pepeiborra Jan 10, 2022
a4c87a4
Merge remote-tracking branch 'upstream/master' into ghc-9.2
pepeiborra Jan 10, 2022
635bd43
addressing hlint suggestions
Anton-Latukha Jan 12, 2022
888b613
Merge branch 'master' into ghc-9.2
michaelpj Jan 12, 2022
f6b79f5
Revert hlint change that breaks due to CPP
michaelpj Jan 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -19,8 +19,9 @@ jobs:
fail-fast: false
matrix:
ghc:
[ "9.0.1"
, '8.10.7'
[ "9.2.1"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
, "8.6.5"
Expand Down Expand Up @@ -56,6 +57,9 @@ jobs:
- name: (GHC 9.0) Use modified cabal.project for GHC 9.0
if: ${{ matrix.ghc == '9.0.1' }}
run: cp cabal-ghc901.project cabal.project
- name: Use modified cabal.project for ghc9.2
if: ${{ matrix.ghc == '9.2.1' }}
run: cp cabal-ghc921.project cabal.project

- name: Shorten binary names
run: |
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/caching.yml
Expand Up @@ -76,7 +76,8 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ "9.0.1"
ghc: [ "9.2.1"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
Expand Down Expand Up @@ -109,20 +110,10 @@ jobs:

# repeating builds to workaround segfaults in windows and ghc-8.8.4
# This build agenda in not to have successful code,
# but to cache what can be cached, so step is fault tolerant & would always succeed.
# 2021-12-11: NOTE: Need to building all targets (build the project also), since
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies` combination

- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
name: (For Bench workflow) Build benchmark targets
continue-on-error: true
# Downloaded separately, to match the tested work/PR workflow guarantees
run: |
cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks

# but to cache what can be cached, so step is fault tolerant & would always succseed.
# 2021-12-11: NOTE: Building all targets, since
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies`
- if: steps.compiled-deps.outputs.cache-hit != 'true'
name: Build targets; try 3 times
continue-on-error: true
# Done separately, matching the tested work/PR workflow guarantees
name: Build all targets; try 3 times
run: |
cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
82 changes: 42 additions & 40 deletions .github/workflows/test.yml
Expand Up @@ -56,7 +56,8 @@ jobs:
strategy:
fail-fast: true
matrix:
ghc: [ "9.0.1"
ghc: [ "9.2.1"
, "9.0.1"
, "8.10.7"
, "8.10.6"
, "8.8.4"
Expand All @@ -66,33 +67,34 @@ jobs:
, "macOS-latest"
]
include:
# only test supported ghc major versions
- os: ubuntu-latest
ghc: '9.0.1'
test: true
- os: ubuntu-latest
ghc: '8.10.7'
test: true
- os: ubuntu-latest
ghc: '8.8.4'
test: true
- os: ubuntu-latest
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '9.0.1'
test: true
- os: windows-latest
ghc: '8.10.7'
test: true
- os: windows-latest
ghc: '8.6.5'
test: true
# only build rest of supported ghc versions for windows
- os: windows-latest
ghc: '8.10.6'
- os: windows-latest
ghc: '8.8.4'
# only test supported ghc major versions
- os: ubuntu-latest
ghc: '9.2.1'
test: true
- os: ubuntu-latest
ghc: '9.0.1'
test: true
- os: ubuntu-latest
ghc: '8.10.7'
test: true
- os: ubuntu-latest
ghc: '8.8.4'
test: true
- os: ubuntu-latest
ghc: '8.6.5'
test: true
- os: windows-latest
ghc: '9.2.1'
test: true
- os: windows-latest
ghc: '9.0.1'
test: true
- os: windows-latest
ghc: '8.10.7'
test: true
- os: windows-latest
ghc: '8.6.5'
test: true

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -144,47 +146,47 @@ jobs:

run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"

- if: matrix.test && matrix.ghc != '9.0.1'
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.2.1'
name: Test hls-brittany-plugin
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-floskell-plugin
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-class-plugin
run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-pragmas-plugin
run: cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0.1'
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.2.1'
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.2.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"

Expand All @@ -204,11 +206,11 @@ jobs:
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS"

- if: matrix.test
- if: matrix.test && matrix.ghc != '9.2.1'
name: Test hls-alternate-number-format-plugin test suite
run: cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS"

Expand Down
71 changes: 61 additions & 10 deletions cabal-ghc921.project
Expand Up @@ -11,20 +11,38 @@ packages:
-- ./plugins/hls-stylish-haskell-plugin
-- ./plugins/hls-fourmolu-plugin
./plugins/hls-class-plugin
./plugins/hls-eval-plugin
-- ./plugins/hls-eval-plugin
./plugins/hls-explicit-imports-plugin
./plugins/hls-refine-imports-plugin
./plugins/hls-hlint-plugin
-- ./plugins/hls-hlint-plugin
./plugins/hls-rename-plugin
-- ./plugins/hls-retrie-plugin
./plugins/hls-haddock-comments-plugin
-- ./plugins/hls-splice-plugin
-- ./plugins/hls-haddock-comments-plugin
-- ./plugins/hls-splice-plugin
./plugins/hls-qualify-imported-names-plugin
./plugins/hls-floskell-plugin
-- ./plugins/hls-floskell-plugin
./plugins/hls-pragmas-plugin
./plugins/hls-module-name-plugin
./plugins/hls-ormolu-plugin
-- ./plugins/hls-ormolu-plugin
./plugins/hls-call-hierarchy-plugin
./plugins/hls-alternate-number-format-plugin
-- ./plugins/hls-alternate-number-format-plugin

source-repository-package
type: git
location: https://github.com/tfausak/unix-compat
tag: 154c3a63f154cb49c51d5f9d13488e8119631d8a
-- To fix windows build
-- https://github.com/jacobstanley/unix-compat/pull/47

repository head.hackage.ghc.haskell.org
Anton-Latukha marked this conversation as resolved.
Show resolved Hide resolved
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
key-threshold: 3
root-keys:
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d


with-compiler: ghc-9.2.1

Expand All @@ -36,11 +54,38 @@ package *

write-ghc-environment-files: never

index-state: 2021-12-29T12:30:08Z
index-state: 2022-01-03T18:45:00Z

constraints:
-- These plugins doesn't work on GHC92 yet
haskell-language-server +ignore-plugins-ghc-bounds -brittany -class -fourmolu -splice -stylishhaskell -tactic -refineImports -callhierarchy -retrie
haskell-language-server
+ignore-plugins-ghc-bounds
-alternateNumberFormat
-brittany
-callhierarchy
-class
-eval
-floskell
-fourmolu
-haddockComments
-hlint
-moduleName
-ormolu
-qualifyImportedNames
-refineImports
-retrie
-splice
-stylishhaskell
-tactic,
ghc-lib-parser ^>= 9.2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

would be nice to have comments about these so we know when we can get rid of them

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

about which, the flags or the constraints?

Copy link
Collaborator

Choose a reason for hiding this comment

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

The constraints, the flags are clear enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't recall, sadly

attoparsec ^>= 0.14.3,
ghc-exactprint >= 1.3,
retrie >= 1.2,
direct-sqlite == 2.3.26,
lens >= 5.0.1,
primitive-unlifted ==0.1.3.1,
-- these constraints are for head.hackage
aeson ==1.5.6.0,
Anton-Latukha marked this conversation as resolved.
Show resolved Hide resolved

allow-newer:
Cabal,
Expand All @@ -62,4 +107,10 @@ allow-newer:
dependent-sum:constraints,
diagrams:diagrams-core,
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core
SVGFonts:diagrams-core,

-- for head.hackage
primitive-unlifted:base

allow-older:
primitive-extras:primitive-unlifted
2 changes: 2 additions & 0 deletions ghcide/.hlint.yaml
Expand Up @@ -114,6 +114,8 @@
- Development.IDE.Spans.AtPoint
- Development.IDE.Spans.Pragmas
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.CodeAction.Args
- Development.IDE.Plugin.CodeAction.ExactPrint
- Development.IDE.Plugin.Completions
- Development.IDE.Plugin.Completions.Logic
- Development.IDE.Types.Location
Expand Down
5 changes: 3 additions & 2 deletions ghcide/bench/lib/Experiments.hs
Expand Up @@ -3,6 +3,7 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE PolyKinds #-}
{-# OPTIONS_GHC -Wno-deprecations -Wno-unticked-promoted-constructors #-}

module Experiments
Expand Down Expand Up @@ -251,7 +252,7 @@ configP =
<*> option auto (long "timeout" <> value 60 <> help "timeout for waiting for a ghcide response")
<*> ( Example "name"
<$> (Right <$> packageP)
<*> (some moduleOption <|> pure ["Distribution/Simple.hs"])
<*> (some moduleOption <|> pure ["src/Distribution/Simple.hs"])
<*> pure []
<|>
Example "name"
Expand All @@ -263,7 +264,7 @@ configP =

packageP = ExamplePackage
<$> strOption (long "example-package-name" <> value "Cabal")
<*> option versionP (long "example-package-version" <> value (makeVersion [3,4,0,0]))
<*> option versionP (long "example-package-version" <> value (makeVersion [3,6,0,0]))
pathP = strOption (long "example-path")

versionP :: ReadM Version
Expand Down
4 changes: 3 additions & 1 deletion ghcide/ghcide.cabal
Expand Up @@ -164,6 +164,7 @@ library
Development.IDE.GHC.Compat
Development.IDE.GHC.Compat.Core
Development.IDE.GHC.Compat.Env
Development.IDE.GHC.Compat.ExactPrint
Development.IDE.GHC.Compat.Iface
Development.IDE.GHC.Compat.Logger
Development.IDE.GHC.Compat.Outputable
Expand All @@ -172,6 +173,7 @@ library
Development.IDE.GHC.Compat.Units
Development.IDE.GHC.Compat.Util
Development.IDE.Core.Compile
Development.IDE.GHC.Dump
Development.IDE.GHC.Error
Development.IDE.GHC.ExactPrint
Development.IDE.GHC.Orphans
Expand Down Expand Up @@ -410,7 +412,7 @@ test-suite ghcide-tests
tasty-rerun,
text,
unordered-containers,
if (impl(ghc >= 8.6))
if (impl(ghc >= 8.6) && impl(ghc < 9.2))
build-depends:
record-dot-preprocessor,
record-hasfield
Expand Down
7 changes: 2 additions & 5 deletions ghcide/session-loader/Development/IDE/Session.hs
Expand Up @@ -432,7 +432,7 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
newHscEnv <-
-- Add the options for the current component to the HscEnv
evalGhcEnv hscEnv $ do
_ <- setSessionDynFlags df
_ <- setSessionDynFlags $ setHomeUnitId_ fakeUid df
getSession

-- Modify the map so the hieYaml now maps to the newly created
Expand Down Expand Up @@ -628,10 +628,7 @@ cradleToOptsAndLibDir logger cradle file = do
emptyHscEnv :: IORef NameCache -> FilePath -> IO HscEnv
emptyHscEnv nc libDir = do
env <- runGhc (Just libDir) getSession
when (Compat.ghcVersion < Compat.GHC90) $
-- This causes ghc9 to crash with the error:
-- Couldn't find a target code interpreter. Try with -fexternal-interpreter
initDynLinker env
initDynLinker env
pure $ setNameCache nc (hscSetFlags ((hsc_dflags env){useUnicode = True }) env)

data TargetDetails = TargetDetails
Expand Down