Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
323 commits
Select commit Hold shift + click to select a range
ff807c3
Introduce SessionM for bundling read-only variables
fendor Jul 4, 2025
1aa1e2c
Extract ghc specific functions into separate module
fendor Jul 4, 2025
aff67c0
Merge remote-tracking branch 'upstream/master' into batch-load-multi-…
fendor Jul 4, 2025
8957a42
Merge branch 'master' into batch-load-multi-read
soulomoon Jul 17, 2025
7d106cf
fix duplication
soulomoon Jul 18, 2025
ddef7d4
Remove RTS options from multi-unit configuration files
soulomoon Aug 4, 2025
3a4ddda
merge master
soulomoon Aug 4, 2025
d5632d6
format
soulomoon Aug 4, 2025
4c5bc35
apply the patch from https://github.com/haskell/haskell-language-serv…
soulomoon Aug 4, 2025
d943452
add comments for orderedSet
soulomoon Aug 4, 2025
bd79156
update comments for orderedSet
soulomoon Aug 4, 2025
dc34df6
fix import
soulomoon Aug 4, 2025
71d6575
refactor OrderedSet to use a record for better clarity and structure
soulomoon Aug 5, 2025
ac1d36d
Merge branch 'master' into batch-load-multi-read
soulomoon Aug 9, 2025
504d71d
merge master in
soulomoon Aug 11, 2025
dd6b562
merge master in
soulomoon Aug 11, 2025
24738d6
session: move handleBatchLoadSuccess inside
soulomoon Aug 19, 2025
468b992
Merge branch 'master' into batch-load-multi-read
soulomoon Aug 20, 2025
b1237d0
debug
soulomoon Aug 21, 2025
a9f4406
Merge branch 'batch-load-multi-read', remote-tracking branch 'origin'…
soulomoon Aug 22, 2025
1263b9f
Refactor garbage collection logic and improve logging in Shake module
soulomoon Sep 1, 2025
26aa9be
hls-graph: simplify AIO; scoped cancellation; fewer threads; safe cle…
soulomoon Sep 1, 2025
a219810
update hls-graph runtime
soulomoon Sep 5, 2025
df47889
Merge remote-tracking branch 'upstream/master' into improve-hls-runtime
soulomoon Sep 5, 2025
86fff58
exit
soulomoon Sep 6, 2025
558f861
debounce empty diags
soulomoon Sep 6, 2025
51c1ceb
refactor progress reporting: remove unused parameters and simplify fu…
soulomoon Sep 6, 2025
1ed5fcb
fix old actions runs because we did not increment the step
soulomoon Sep 6, 2025
df6a8f4
fix build
soulomoon Sep 6, 2025
80733e7
remove unused imports from various modules
soulomoon Sep 6, 2025
26045a1
upgrade lsp version
soulomoon Sep 6, 2025
f1fb7fe
Merge remote-tracking branch 'upstream/master' into improve-hls-runtime
soulomoon Sep 7, 2025
74e1909
fix build in older verions
soulomoon Sep 7, 2025
8f37379
prefer shakeRestart if there are others in queue
soulomoon Sep 7, 2025
1fd46bf
1. mergeMultiple restarts if they appear at once.
soulomoon Sep 7, 2025
f9e1023
prefer restart than other actions in shakeControlQueu
soulomoon Sep 7, 2025
b4d3c49
wait for shake restart only if needed
soulomoon Sep 8, 2025
7bf6fde
always wait for restart
soulomoon Sep 8, 2025
e963e61
cleanup
soulomoon Sep 9, 2025
c778f9d
refactor: streamline ShakeRestartArgs and enhance database queue access
soulomoon Sep 9, 2025
70c56ea
Revert "always wait for restart"
soulomoon Sep 9, 2025
296c385
refactor: enhance shakeRestart to use versioning for session management
soulomoon Sep 9, 2025
c207e5d
refactor: improve restart task handling with final check for pending …
soulomoon Sep 9, 2025
e26c066
before finer cleanup
soulomoon Sep 10, 2025
09890e7
Reapply "always wait for restart"
soulomoon Sep 10, 2025
eebf706
fix stuck
soulomoon Sep 11, 2025
2c771e1
fix session loader: mask_ to prevent swallow async exception
soulomoon Sep 11, 2025
09905ba
attempt to kill less thread
soulomoon Sep 12, 2025
4ec36f1
fix build
soulomoon Sep 12, 2025
3b0f4c8
refactor: update DeliverStatus handling in database operations
soulomoon Sep 12, 2025
eaff72e
fix job previous step job skipping
soulomoon Sep 12, 2025
2cc8c97
kill thread that actually needed to be killed
soulomoon Sep 12, 2025
f5a540a
fix hls-graph test
soulomoon Sep 12, 2025
28a52a0
add Debug.Trace import for traceEventIO usage
soulomoon Sep 13, 2025
fafcc68
fix wrong removal of databasevalues
soulomoon Sep 13, 2025
0059f69
prune finished threads
soulomoon Sep 13, 2025
538b1f6
prevent deletion of root key in pruneFinished function
soulomoon Sep 13, 2025
8689ff7
cleanup
soulomoon Sep 13, 2025
4ddcf49
fix computeReverseRuntimeMap
soulomoon Sep 13, 2025
0d548be
use hashmap to compute reverseDep
soulomoon Sep 13, 2025
28bff49
Enhance testing workflow and progress reporting
soulomoon Aug 28, 2025
ed74540
fix 9.6
soulomoon Sep 13, 2025
0cc888b
cleanup
soulomoon Sep 15, 2025
facff63
add upsweep
soulomoon Sep 20, 2025
a9ae16b
Improve logging for missing virtual files and update error messages
soulomoon Sep 22, 2025
a1c4768
Add handling for Exception status in updateDirty function
soulomoon Sep 22, 2025
ceff4d0
write reverse deps directly
soulomoon Sep 24, 2025
101f0f6
Revert "Improve caching granularity by using partial fingerprints of …
soulomoon Sep 24, 2025
7db3c56
remove dep of typecheck to foi
soulomoon Sep 26, 2025
d2158d1
inc also consider runtime deps
soulomoon Sep 26, 2025
30efcdb
add spawnRefresh and fix wrong key being submmitted
soulomoon Sep 26, 2025
2a3b82a
only run upsweep of newDirtyKeys
soulomoon Sep 26, 2025
64ce61b
do not Typecheck all files in the project on startup
soulomoon Sep 26, 2025
97debab
cleanup
soulomoon Sep 26, 2025
16471e1
use a fixed cache dir
soulomoon Sep 26, 2025
1745e50
use two step waiting for an upsweep
soulomoon Sep 26, 2025
ac53217
Improvement spawn directly!
soulomoon Sep 27, 2025
a63508a
clean up
soulomoon Sep 27, 2025
e4ead4f
Add no-file rule for global kick action and refactor kick usage
soulomoon Sep 27, 2025
88c7afc
use root dir as hash for cache
soulomoon Sep 28, 2025
937b7e5
fixed thread register problem
soulomoon Sep 29, 2025
3f14145
spawn directly without in restartQueue
soulomoon Sep 29, 2025
e380481
drop photom deps check for now
soulomoon Sep 29, 2025
103a3f2
clean up
soulomoon Sep 29, 2025
923bd56
cleanup
soulomoon Sep 29, 2025
2a4cdab
clean up and fix the bug that does not passing old value to running
soulomoon Sep 29, 2025
e12a7d3
disable GarbageCollectionTests
soulomoon Sep 29, 2025
7b06dc5
linear upsweep
soulomoon Sep 30, 2025
8575819
cleanup
soulomoon Sep 30, 2025
96e47e6
add scheduler and upsweep with threads number limit
soulomoon Oct 1, 2025
2ae359c
refactor: encapsulate scheduler state in SchedulerState type for impr…
soulomoon Oct 1, 2025
9c87ca1
disable hls-graph test since now we shakeRun won't stop itself unless…
soulomoon Oct 1, 2025
c71527d
fix: adjust doKick behavior to always kick during testing
soulomoon Oct 1, 2025
461b6e0
feat(graph): add DirectKey for internal actions, preserve reenqueued …
soulomoon Oct 1, 2025
c1a4638
revert test
soulomoon Oct 1, 2025
16e1350
cleanup and refactor update dirty during upsweep cancelling
soulomoon Oct 2, 2025
2568ef5
hls-graph scheduler: delete running when add to blocked
soulomoon Oct 3, 2025
7b48767
refactor: update logging and database handling for build sessions and…
soulomoon Oct 5, 2025
5695cf1
refactor: enhance ghcide executable location handling
soulomoon Oct 5, 2025
6b14acc
refactor: improve upsweep handling and rollback mechanism in database…
soulomoon Oct 5, 2025
1c4c6d3
refactor: comment out scheduler state dump in database shutdown for c…
soulomoon Oct 5, 2025
251ccf2
refactor: integrate cleanHook into upsweep and fix popOutDirtykeysDB …
soulomoon Oct 5, 2025
24bca0c
refactor: adjust hover text expectations in FindDefinitionAndHoverTes…
soulomoon Oct 5, 2025
a1cb878
fix skip restart
soulomoon Oct 6, 2025
fee12cb
improve performance of restart by compute reverse deps only once
soulomoon Oct 6, 2025
69185de
fix: update computeRunningNonBlocked to use schedulerRunningDirties i…
soulomoon Oct 6, 2025
81a15dd
scheduler: keepping the last upsweep order
soulomoon Oct 6, 2025
a1829cf
fix order bug in transitiveDirtyListBottomUpDiff
soulomoon Oct 6, 2025
5f793d4
inline isRootKey function for performance improvement
soulomoon Oct 6, 2025
7bb7c54
Improve spanwn for upsweep and downsweep to leave less gap for invali…
soulomoon Oct 7, 2025
252f481
refactor: add key stack to Async kill, add note about why we need rol…
soulomoon Oct 7, 2025
9365095
fix thread limit
soulomoon Oct 8, 2025
1fea8ee
add databaseTransitiveRRuntimeDepCache
Oct 9, 2025
2889dc3
fix use databaseRRuntimeDepRoot
soulomoon Oct 9, 2025
2aca7ec
cleanup
soulomoon Oct 9, 2025
7fd1385
fix add missing module
soulomoon Oct 9, 2025
3b5777a
Implement upsweep progress report and make restart log less detailed
soulomoon Oct 10, 2025
44655aa
remove thread limit for upsweep
soulomoon Oct 11, 2025
926e1ac
cleanup
soulomoon Oct 12, 2025
6b01b7d
use Key instead of unique for delayedAction
soulomoon Oct 12, 2025
64e765c
clean up
soulomoon Oct 12, 2025
aae8cfe
disable upsweep monitor on test
soulomoon Oct 12, 2025
56e070b
refactor shutDatabase to correctly clenaup killed threads
soulomoon Oct 12, 2025
424a63c
add detailed documentation for transitiveRRuntimeDepCache
soulomoon Oct 12, 2025
a14300f
submit restart in order
soulomoon Oct 13, 2025
2480815
do not typecheck parent since we already doing upsweep
soulomoon Oct 13, 2025
94b6b5c
disable test for interface reuse after eval due to upsweep behavior
soulomoon Oct 14, 2025
d5271e6
debug: show key for delayedAction
soulomoon Oct 14, 2025
106cb47
fix: pumpt action is now marked with correct key in its Action
soulomoon Oct 14, 2025
4161072
do not use root key when upsweep
soulomoon Oct 14, 2025
85596d2
fix hlint error
soulomoon Oct 14, 2025
a34ebe6
revert: use optios hash to generate cache dir
soulomoon Oct 15, 2025
3455ff2
Revert "refactor: adjust hover text expectations in FindDefinitionAnd…
soulomoon Oct 15, 2025
c073e4d
fix: update locateGhcideExecutable to use cabal for finding ghcide ex…
soulomoon Oct 16, 2025
dd26c28
Merge remote-tracking branch 'origin/master' into improve-hls-runtime…
soulomoon Oct 16, 2025
af39a04
refactor: comment out debug logging for dependency loading
soulomoon Oct 17, 2025
c3376bc
fix: busy monitering and refactor: replace TVar with StmContainers.Se…
soulomoon Oct 17, 2025
0a7d290
fix monitering overhead by adding schedulerAllKeysInOrderSize
soulomoon Oct 18, 2025
f02b7a7
feat: add componentOptionHash to ComponentInfo and update related fun…
soulomoon Oct 18, 2025
6bc02cc
refactor: change cancelShakeSession to first cancel root async and
soulomoon Oct 18, 2025
19f33dc
do not prepare run key during restart, this reducing the lag caused b…
soulomoon Oct 19, 2025
a5e36a9
do `compute` directly in upweep, leave the `wait until all deps` are …
soulomoon Oct 19, 2025
4731f31
fix Imported symbol reexported
soulomoon Oct 19, 2025
add36e0
run root actions with mapConcurrently
soulomoon Oct 20, 2025
dedc8fe
refactor: remove unused parameters from restartSession and restartSha…
soulomoon Oct 20, 2025
3541dcc
add priority queue to readyQueue
soulomoon Oct 20, 2025
6618fb4
do not restart on save
soulomoon Oct 20, 2025
89fd8cd
fix test
soulomoon Oct 20, 2025
27dbeea
speedup prepareToRunKeyCached 1
soulomoon Oct 20, 2025
d4567ca
always write hi file
soulomoon Oct 21, 2025
b7b1e7f
add shakeDatabaseSize function and update logging to include database…
soulomoon Oct 21, 2025
17e7a6b
disable expectNoMoreDiagnostics in iface-error-test-1
soulomoon Oct 22, 2025
e27e3a1
switch back to realtime upsweep
soulomoon Oct 23, 2025
5dec756
cleanup
soulomoon Oct 24, 2025
bdb92ba
cleanup
soulomoon Oct 24, 2025
93c8e1d
remove upsweep
soulomoon Oct 24, 2025
80ea22d
fix test: revert to downsweep
soulomoon Oct 25, 2025
c873d5a
fix bench 9.12
soulomoon Oct 25, 2025
2cb0642
fix iface-error-test-1
soulomoon Oct 25, 2025
7e86e91
fix add missing module
soulomoon Oct 25, 2025
4bf9f6a
use asyncWithUnmask inherit the mask state from the parent thread.
soulomoon Oct 25, 2025
f465f36
disable double test
soulomoon Oct 26, 2025
cc6b14c
fix 9.6
soulomoon Oct 26, 2025
a5d27a4
cleanup
soulomoon Oct 26, 2025
395e603
cleanup scheduler
soulomoon Oct 26, 2025
fa72d21
prevent double kill
soulomoon Oct 27, 2025
164b1e3
update bench config
soulomoon Oct 28, 2025
98bc528
seperate insertdatabaseRuntimeDep in builderOne'
soulomoon Oct 29, 2025
4cd8611
eliminate kill window in builderOne'
soulomoon Oct 29, 2025
ddd3e91
update bench config
soulomoon Oct 29, 2025
e1d4f17
Merge branch 'master' into improve-hls-runtime-keep-async-only-databs…
soulomoon Oct 29, 2025
6277c3e
update bench config
soulomoon Oct 29, 2025
81a8fe2
remove all double tests
soulomoon Oct 29, 2025
ddaa686
CI: fix get_bin_path
soulomoon Oct 29, 2025
ab9653e
only publish diags on compute to clean
soulomoon Oct 29, 2025
a9b3f96
remove debouncer
soulomoon Oct 30, 2025
e3c6f4c
fix cancellationTemplate
soulomoon Oct 30, 2025
19f628e
Fix DiagnosticTests.hs
soulomoon Oct 30, 2025
060dce5
disable debouncer
soulomoon Oct 30, 2025
f59b630
fix DiagnosticTests
soulomoon Oct 30, 2025
b6af173
remove duplicate publish diags
soulomoon Oct 30, 2025
8f2b6d6
fix hls-hlint-plugin-tests
soulomoon Oct 31, 2025
c46b661
fix cabal tests
soulomoon Oct 31, 2025
4b73235
fix hlint tests
soulomoon Oct 31, 2025
58b17f0
Merge branch 'master' into improve-hls-runtime-keep-async-only-databs…
soulomoon Nov 2, 2025
585af96
Merge branch 'master' into improve-hls-runtime-keep-async-only-databs…
soulomoon Nov 3, 2025
500d37d
do updateFileDiagnostics in one thread, and wait for diagnostic to pu…
soulomoon Nov 3, 2025
886cc61
fix shortcut publish diags and fix WaitForDiagnosticPublished
soulomoon Nov 4, 2025
f3de6b2
use WaitForDiagnosticPublished in waitForActionWithDiagnosticsFromDocs
soulomoon Nov 4, 2025
ad89b6b
fix `update syntax error` and `iface-error-test-2`
soulomoon Nov 4, 2025
37d372e
fix iface-error-test-1
soulomoon Nov 4, 2025
978f82e
fix cabal test `Can complete field names`
soulomoon Nov 4, 2025
3fde4a9
fix cabal test
soulomoon Nov 4, 2025
59c6c57
update lsp
soulomoon Nov 5, 2025
86dbfd7
fix refactor test
soulomoon Nov 5, 2025
1057036
fix Can fix field typos
soulomoon Nov 5, 2025
77d50fb
fix update lsp repository tag
soulomoon Nov 5, 2025
e83317b
fix: close input and output handles in runSessionWithTestConfig
soulomoon Nov 5, 2025
b45de2d
test-util enhence waitForDiagnostics
soulomoon Nov 5, 2025
07211f1
refactor: update session state management to use STM for versioning a…
soulomoon Nov 5, 2025
8057589
fix stan
soulomoon Nov 5, 2025
4292353
fix stan
soulomoon Nov 5, 2025
632dd69
remove dub action in cabal plugin
soulomoon Nov 6, 2025
80bee0c
revert getCacheDirsDefault
soulomoon Nov 6, 2025
af1c7d5
enhence WaitForShakeQueue
soulomoon Nov 6, 2025
b8f4146
fix waitForIdeIdle
soulomoon Nov 6, 2025
00df520
remove isIamOnlyActionQueueEmpty
soulomoon Nov 7, 2025
8c6cd89
fix WaitForShakeQueue
soulomoon Nov 7, 2025
3762c80
wait for buildQueue before getCodeActions
soulomoon Nov 7, 2025
11f6caa
enhence wait util in test
soulomoon Nov 7, 2025
b0be834
enhence `mkGoldenAddArgTest`
soulomoon Nov 7, 2025
bf83249
better test wait
soulomoon Nov 7, 2025
0a66c1f
update mkGoldenAddArgTest not to use waitForDiagnostics
soulomoon Nov 7, 2025
32c420e
use waitForBuildQueue in hls-pragmas-plugin-tests
soulomoon Nov 7, 2025
003dd54
use waitForBuildQueue in hls-class-plugin
soulomoon Nov 7, 2025
3d8d7cc
use only waitForBuildQueue in hls-change-type-signature-plugin-tests
soulomoon Nov 7, 2025
db40c84
add waitForDiagnostics back to hls-refactor-plugin
soulomoon Nov 7, 2025
42dab48
fix refactor tests
soulomoon Nov 7, 2025
509df3b
enhence hls-pragmas-plugin-tests
soulomoon Nov 7, 2025
76eaa2b
enhence hls-pragmas-plugin-tests
soulomoon Nov 7, 2025
ca48056
wait for diags in hls-class-plugin-tests
soulomoon Nov 7, 2025
3c143f7
fix hls-explicit-imports-plugin-tests
soulomoon Nov 7, 2025
9bf9dee
fix hls-explicit-imports-plugin-tests
soulomoon Nov 7, 2025
7561094
remove redudant tmp dir call in test
soulomoon Nov 7, 2025
8b7a7e5
always shift root to tmp dir
soulomoon Nov 7, 2025
167d75b
fix shift root
soulomoon Nov 7, 2025
45ab882
fix build
soulomoon Nov 8, 2025
b0765ba
fix test build
soulomoon Nov 8, 2025
1671b8c
goldenWithHaskellAndCaps
soulomoon Nov 8, 2025
6bcf2cb
fix hls-explicit-record-fields-plugin
soulomoon Nov 8, 2025
2e0b9cd
add waitForBuildQueue to test cases in hls-eval-plugin and hls-hlint-…
soulomoon Nov 8, 2025
1878ff4
use waitForDiagsAndBuildQueue in inlayHintsTest
soulomoon Nov 8, 2025
7bce4fc
inlayHintsTest should not wait
soulomoon Nov 8, 2025
43cab43
refactor: change exception handling in handleInit to rethrow instead …
soulomoon Nov 8, 2025
91d5a9b
fix hls-cabal-plugin-tests
soulomoon Nov 9, 2025
bea2051
fix cabal plugin test
soulomoon Nov 10, 2025
dcc94a9
fix hls-notes-plugin-tests
soulomoon Nov 10, 2025
496ae3b
fix hls-splice-plugin-tests
soulomoon Nov 10, 2025
867673f
fix hls-change-type-signature-plugin-tests
soulomoon Nov 10, 2025
f87f76d
fix hls-hlint-plugin-tests
soulomoon Nov 10, 2025
a56a4e2
fix: sort references in noteReferenceTests for consistent ordering
soulomoon Nov 10, 2025
fab50ee
disable redundant applyEdit in hls-splice-plugin
soulomoon Nov 10, 2025
da810c7
only support 9.12
soulomoon Nov 13, 2025
2060536
update to use patched hie-bois
soulomoon Nov 17, 2025
d7380e6
update bench CI to 9.12
soulomoon Nov 18, 2025
003cad8
refactor: update GHC version handling in benchmark workflow
soulomoon Nov 18, 2025
6c7cc04
update supported GHC versions to include 9.10
soulomoon Nov 18, 2025
5300354
simplify waitForExpectedDiagnosticsFromDocs
soulomoon Nov 20, 2025
ee53cd7
add: create flakiness workflow for testing and diagnostics
soulomoon Nov 26, 2025
acfbf32
Merge branch 'master' into improve-hls-runtime-keep-async-only-databs…
soulomoon Nov 26, 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
14 changes: 5 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
bench_ghc_versions: ${{ steps.set_ghc_versions.outputs.versions }}
steps:
- id: set_ghc_versions
run: echo 'versions=["9.12", "9.10"]' >> $GITHUB_OUTPUT
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
Expand All @@ -46,14 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# benching the two latest GHCs we support now
# since benchmark are expansive.
# choosing the two latest are easier to maintain and more forward looking
# see discussion https://github.com/haskell/haskell-language-server/pull/4118
# also possible to add more GHCs if we performs better in the future.
ghc:
- '9.8'
- '9.10'
ghc: ${{ fromJSON(needs.pre_job.outputs.bench_ghc_versions) }}
os:
- ubuntu-latest

Expand Down Expand Up @@ -121,7 +117,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['9.8', '9.10']
ghc: ${{ fromJSON(needs.pre_job.outputs.bench_ghc_versions) }}
os: [ubuntu-latest]
cabal: ['3.14']
example: ['cabal', 'lsp-types']
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/flakiness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: flakiness

defaults:
run:
shell: bash

concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true

on:
# Run on PRs that touch relevant areas and on manual dispatch
pull_request:
branches:
- '**'
paths:
- 'scripts/flaky-test-loop.sh'
- 'scripts/flaky-test-patterns.txt'
- 'ghcide/**'
- 'ghcide-test/**'
- 'hls-test-utils/**'
- 'src/**'
- 'exe/**'
- 'plugins/**'
- 'cabal.project'
- 'stack.yaml'
- 'haskell-language-server.cabal'
- '.github/workflows/flakiness.yml'
workflow_dispatch:
inputs:
max_iter:
description: 'Maximum iterations to attempt'
required: false
default: '1000'
sleep_secs:
description: 'Seconds to sleep between iterations'
required: false
default: '0'
test_patterns:
description: 'Comma-separated Tasty patterns to run each iteration (overrides default)'
required: false
default: ''

jobs:
loop:
name: Flakiness Test (broken pipe and test failures)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup GHC and caching
uses: ./.github/actions/setup-build
with:
ghc: '9.12'
os: ${{ runner.os }}

- name: Show cabal and GHC versions
run: |
cabal --version
ghc --version
- name: Build
env:
PATTERN_FILE: 'scripts/flaky-test-patterns.txt'
RUN_MODE: 'build'
run: HLS_TEST_EXE="$(cabal exec which hls)" bash scripts/flaky-test-loop.sh

- name: Run flakiness loop
id: run-loop
# Let this run for a while; build is done once inside the script
timeout-minutes: 60
env:
# Use workflow_dispatch inputs when present, else defaults
SLEEP_SECS: ${{ github.event.inputs.sleep_secs || '0' }}
LOG_STDERR: '1'
TEST_PATTERNS: ${{ github.event.inputs.test_patterns }}
PATTERN_FILE: 'scripts/flaky-test-patterns.txt'
NO_BUILD_ONCE: '1'
RUN_MODE: 'run'
# HLS_TEST_EXE: 'hls' # HLS_WRAPPER_TEST_EXE: 'hls-wrapper'
run: |
# Run with a sensible default of 500 iterations on PRs;
max_iter="${{ github.event.inputs.max_iter }}"
max_iter="${max_iter:-500}"
# copy hls to current dir so the script can find it
HLS_TEST_EXE="$(cabal exec which hls)" bash scripts/flaky-test-loop.sh "${max_iter}"
ec=$?
# Interpret exit codes from flaky-test-loop.sh
# 0 => no issues reproduced within MAX_ITER -> pass job
# 1 => issue reproduced (broken pipe or test failure) -> fail job
# 2+ => setup/infra error -> fail job
if [[ $ec -eq 1 ]]; then
echo "Issue reproduced (broken pipe or test failure): failing job"
exit 1
elif [[ $ec -eq 0 ]]; then
echo "No issues reproduced within MAX_ITER=${max_iter}: passing"
exit 0
else
echo "Loop script error (exit $ec): failing"
exit $ec
fi

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.12", "9.10"]
62 changes: 31 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
name: Test ghcide
# run the tests without parallelism to avoid running out of memory
run: cabal test ghcide-tests || cabal test ghcide-tests
run: cabal test ghcide-tests

- if: matrix.test
name: Test hls-plugin-api
Expand All @@ -135,124 +135,124 @@ jobs:

- if: matrix.test
name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin-tests || cabal test hls-refactor-plugin-tests
run: cabal test hls-refactor-plugin-tests

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

- if: matrix.test
name: Test hls-class-plugin
run: cabal test hls-class-plugin-tests || cabal test hls-class-plugin-tests
run: cabal test hls-class-plugin-tests

- if: matrix.test
name: Test hls-pragmas-plugin
run: cabal test hls-pragmas-plugin-tests || cabal test hls-pragmas-plugin-tests
run: cabal test hls-pragmas-plugin-tests

- if: matrix.test
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin-tests || cabal test hls-eval-plugin-tests
run: cabal test hls-eval-plugin-tests

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

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

- if: matrix.test
name: Test hls-stylish-haskell-plugin
run: cabal test hls-stylish-haskell-plugin-tests || cabal test hls-stylish-haskell-plugin-tests
run: cabal test hls-stylish-haskell-plugin-tests

- if: matrix.test
name: Test hls-ormolu-plugin
run: cabal test hls-ormolu-plugin-tests || cabal test hls-ormolu-plugin-tests
run: cabal test hls-ormolu-plugin-tests

- if: matrix.test
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin-tests || cabal test hls-fourmolu-plugin-tests
run: cabal test hls-fourmolu-plugin-tests

- if: matrix.test
name: Test hls-explicit-imports-plugin test suite
run: cabal test hls-explicit-imports-plugin-tests || cabal test hls-explicit-imports-plugin-tests
run: cabal test hls-explicit-imports-plugin-tests

- if: matrix.test
name: Test hls-call-hierarchy-plugin test suite
run: cabal test hls-call-hierarchy-plugin-tests || cabal test hls-call-hierarchy-plugin-tests
run: cabal test hls-call-hierarchy-plugin-tests

- if: matrix.test && matrix.os != 'windows-latest'
name: Test hls-rename-plugin test suite
run: cabal test hls-rename-plugin-tests || cabal test hls-rename-plugin-tests
run: cabal test hls-rename-plugin-tests

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

- if: matrix.test
name: Test hls-module-name-plugin test suite
run: cabal test hls-module-name-plugin-tests || cabal test hls-module-name-plugin-tests
run: cabal test hls-module-name-plugin-tests

- if: matrix.test
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
run: cabal test hls-alternate-number-format-plugin-tests

- if: matrix.test
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
run: cabal test hls-qualify-imported-names-plugin-tests

- if: matrix.test
name: Test hls-code-range-plugin test suite
run: cabal test hls-code-range-plugin-tests || cabal test hls-code-range-plugin-tests
run: cabal test hls-code-range-plugin-tests

- if: matrix.test
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
run: cabal test hls-change-type-signature-plugin-tests

- if: matrix.test
name: Test hls-gadt-plugin test suit
run: cabal test hls-gadt-plugin-tests || cabal test hls-gadt-plugin-tests
run: cabal test hls-gadt-plugin-tests

- if: matrix.test
name: Test hls-explicit-fixity-plugin test suite
run: cabal test hls-explicit-fixity-plugin-tests || cabal test hls-explicit-fixity-plugin-tests
run: cabal test hls-explicit-fixity-plugin-tests

- if: matrix.test
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
run: 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'
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
run: cabal test hls-cabal-fmt-plugin-tests --flag=isolateCabalfmtTests

- if: matrix.test && matrix.ghc != '9.12'
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
run: cabal test hls-cabal-gild-plugin-tests --flag=isolateCabalGildTests

- if: matrix.test
name: Test hls-cabal-plugin test suite
run: cabal test hls-cabal-plugin-tests || cabal test hls-cabal-plugin-tests
run: cabal test hls-cabal-plugin-tests

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

- if: matrix.test
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
run: cabal test hls-overloaded-record-dot-plugin-tests

- if: matrix.test
name: Test hls-semantic-tokens-plugin test suite
run: cabal test hls-semantic-tokens-plugin-tests || cabal test hls-semantic-tokens-plugin-tests
run: cabal test hls-semantic-tokens-plugin-tests

- if: matrix.test
name: Test hls-notes-plugin test suite
run: cabal test hls-notes-plugin-tests || cabal test hls-notes-plugin-tests
run: cabal test hls-notes-plugin-tests

# The plugin tutorial is only compatible with 9.6 and 9.8.
# No particular reason, just to avoid excessive CPP.
Expand All @@ -262,7 +262,7 @@ jobs:

- if: matrix.test
name: Test hls-signature-help-plugin test suite
run: cabal test hls-signature-help-plugin-tests || cabal test hls-signature-help-plugin-tests
run: cabal test hls-signature-help-plugin-tests

test_post_job:
if: always()
Expand Down
Loading
Loading