Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
58b8b68
Refactor session loading to manage pending files so we can batch load…
soulomoon Nov 2, 2024
ea002d7
distribute errors to all pending files are being loading
soulomoon Nov 3, 2024
c78b197
better filter loading files
soulomoon Nov 3, 2024
b879375
fallback to non-batch load
soulomoon Nov 4, 2024
8953aec
typo
soulomoon Nov 4, 2024
4bdc2c8
update inline doc
soulomoon Nov 4, 2024
c4bb53a
update inline doc
soulomoon Nov 4, 2024
112bc95
add LogSessionReloadOnError to log errors during file reloads; cleanu…
soulomoon Nov 4, 2024
9a2aaf1
Merge branch 'master' into batch-load
soulomoon Nov 4, 2024
6e04d28
refactor loadSessionWithOptions to improve error handling and clarify…
soulomoon Nov 4, 2024
67aebc4
refactor loadSessionWithOptions to improve pending file handling and …
soulomoon Nov 4, 2024
98ae446
add doc about limitation
soulomoon Nov 4, 2024
f3eb580
absolute file at the beginning
soulomoon Nov 5, 2024
e7bd3d4
run session loader and worker in sperate
soulomoon Nov 7, 2024
1f97c40
cleanup
soulomoon Nov 7, 2024
4c998bd
rename LogGetSessionRetry to LogLookupSessionCache for clarity in log…
soulomoon Nov 8, 2024
79a43a0
extract attempt to load files from errors
soulomoon Nov 9, 2024
beb1764
refactor session loading to wait for pending files before cache check
soulomoon Nov 12, 2024
6139522
add LogTime to logging for improved time tracking during session loading
soulomoon Nov 18, 2024
7314509
refactor session loading to handle dependency checks more clearly
soulomoon Nov 19, 2024
cddcc55
Refactors session loading logic
soulomoon Nov 19, 2024
4c99c47
Merge branch 'master' into batch-load-multi-read
soulomoon Dec 6, 2024
bb78a36
delay the restart
soulomoon Dec 6, 2024
33f788c
Merge branch 'master' into batch-load-multi-read
soulomoon Jan 8, 2025
0913d2e
Merge branch 'master' into batch-load-multi-read
soulomoon Feb 4, 2025
58ec7ea
re-inline the old file instead of loading it twice
soulomoon Feb 17, 2025
60e8427
Merge branch 'master' into batch-load-multi-read
soulomoon Feb 17, 2025
d943963
update upload artifact action version
soulomoon Feb 18, 2025
5d01500
update hie-bios tag
soulomoon Feb 25, 2025
10a6f7e
Update hie-bios tag to latest commit
soulomoon Feb 26, 2025
de6d5f3
Merge branch 'master' into batch-load-multi-read
soulomoon Mar 2, 2025
45b1241
update hie-bios
soulomoon Mar 2, 2025
219db46
update index-state to reflect the latest project state
soulomoon Mar 2, 2025
2f86db0
update index-state to reflect the new date
soulomoon Mar 3, 2025
de98232
update fourmolu dependency version constraints
soulomoon Mar 6, 2025
f0a881d
remove ListT from library dependencies
soulomoon Mar 6, 2025
14f6a3b
update hie-bios to a new tag
soulomoon Mar 6, 2025
8b0e246
update fourmolu dependency version constraints to allow 0.16
soulomoon Mar 6, 2025
2dd71c0
add allow-newer constraint for Cabal-syntax
soulomoon Mar 6, 2025
b8406d6
remove allow-newer constraint for Cabal-syntax
soulomoon Mar 6, 2025
5ea3d87
bump actions/checkout and actions/upload-artifact to v3
soulomoon Mar 6, 2025
3e0c27b
Revert "bump actions/checkout and actions/upload-artifact to v3"
soulomoon Mar 6, 2025
8c27e34
add allow-older constraint for optparse-applicative in cabal.project
soulomoon Mar 7, 2025
bb0a541
Merge branch 'master' into batch-load-multi-read
soulomoon Mar 13, 2025
e491f60
Merge branch 'master' into batch-load-multi-read
soulomoon Mar 20, 2025
d5c2326
Merge branch 'master' into batch-load-multi-read
soulomoon Mar 27, 2025
9efcb2e
Merge branch 'master' into batch-load-multi-read
soulomoon Apr 6, 2025
c883a09
Merge branch 'master' into batch-load-multi-read
soulomoon Apr 16, 2025
9f9b8f7
Merge branch 'master' into batch-load-multi-read
soulomoon Apr 24, 2025
b0af634
update hie-bios
soulomoon Apr 24, 2025
06fa5de
introduce SessionState
soulomoon Apr 27, 2025
78e01a8
Merge branch 'master' into batch-load-multi-read
soulomoon Apr 27, 2025
80d0160
update hiebois
soulomoon Apr 27, 2025
24269f6
revert
soulomoon Apr 28, 2025
98999f5
restart the shake if cabal file changed
soulomoon Apr 28, 2025
21dd233
better error handling in session loader
soulomoon Apr 28, 2025
f140a2a
refactor error handling in loadSessionWithOptions to improve clarity …
soulomoon Apr 28, 2025
e339c1d
refactor SessionState management for improved batch loading logic
soulomoon Apr 28, 2025
1425289
refactor session loading error handling for improved clarity and sepa…
soulomoon Apr 28, 2025
de6eb9c
cleanup
soulomoon May 8, 2025
db18100
Merge branch 'master' into batch-load-multi-read
soulomoon May 8, 2025
c9926d4
fix
soulomoon May 8, 2025
48a46d1
add sessionLoadingPreferenceConfig var to SessionState
soulomoon May 8, 2025
90e1df1
Merge branch 'master' into batch-load-multi-read
soulomoon May 12, 2025
702e367
refactor SessionState to use Var instead of IORef for loaded and fail…
soulomoon May 14, 2025
09213d3
simplified
soulomoon May 19, 2025
4a78e6e
Merge branch 'master' into batch-load-multi-read
soulomoon May 26, 2025
4cb5a70
Merge branch 'master' into batch-load-multi-read
soulomoon Jun 3, 2025
005f573
Merge branch 'master' into batch-load-multi-read
soulomoon Jun 4, 2025
db8b1ac
Merge branch 'master' into batch-load-multi-read
soulomoon Jun 13, 2025
256f834
CI: Fix hls-eval-plugin tests for GHC-9.10 (#4638)
sgillespie Jun 20, 2025
0a9b1cb
Fix renaming data constructors with fields (resolves #2915, resolves …
jhrcek Jun 20, 2025
f768db0
Extract top-level functions for session initialisation
fendor Jun 21, 2025
8d96270
Migrate change-type-signature-plugin to use structured diagnostics (#…
sgillespie Jun 23, 2025
a92ffb1
Merge branch 'master' into batch-load-multi-read
soulomoon Jun 23, 2025
f43d811
bump up hiedb version (#4640)
soulomoon Jun 23, 2025
5d221b9
Fix reference fields gives too many results (#4641)
soulomoon Jun 25, 2025
29b2ecb
Fix build for GHC 9.10.2 (#4644)
sgillespie Jul 1, 2025
d4fbc2c
Remove unused _removeInplacePackages function
fendor Jul 4, 2025
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
ed37a9e
fix: create directory to dump debug ast
guibou Jul 6, 2025
dc4e674
feat(test): add a repro for 4648
guibou Jul 6, 2025
8cac5fb
fix: produce valid code when adding constraint to context
guibou Jul 6, 2025
ec3c09a
hls-cabal-plugin: Fix cabal-add bound (#4642) (#4652)
wz1000 Jul 10, 2025
0a52558
[fix] evaluate key in lookupKeyValue to avoid reordering with newKey …
MangoIV Jul 11, 2025
c3b61fe
Use hie-bios 0.16 (#4647)
fendor Jul 14, 2025
2c200b4
Show LaTeX math expressions in haddockToMarkdown (#4658)
webdevred Jul 16, 2025
8957a42
Merge branch 'master' into batch-load-multi-read
soulomoon Jul 17, 2025
ae5f6a7
Use structured diagnostics for type wildcard fill suggestions (#4664)
sgillespie Jul 18, 2025
7d106cf
fix duplication
soulomoon Jul 18, 2025
b2311ce
Avoid unnecessary recompilation due to -haddock (#4596)
fendor Jul 22, 2025
b8c9b84
Use plain comments instead of annotations for HLint ignores (#4669)
georgefst Jul 22, 2025
748603e
Fix build with GHC 9.10.3-rc1
andreasabel Jul 31, 2025
59b733f
Remove `hie-compat` (#4613)
dschrempf Aug 2, 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
cfeced8
concurrency bug fixes/ improvements (#4663)
MangoIV Aug 5, 2025
4d309d5
Add Code Action for adding a module to the cabal file
VeryMilkyJoe Apr 16, 2025
7346145
Upgrade to hie-bios 0.17.0
fendor Aug 7, 2025
ac1d36d
Merge branch 'master' into batch-load-multi-read
soulomoon Aug 9, 2025
d18697c
Reload .cabal files when they are modified
fendor Jun 7, 2025
e3d38b0
Bump CI to GHC 9.10.2 (#4687)
fendor Aug 11, 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
f30030c
Support fourmolu 0.19.0.0 (#4693)
brandonchinn178 Aug 19, 2025
468b992
Merge branch 'master' into batch-load-multi-read
soulomoon Aug 20, 2025
0c73c2b
Refactor CoreFile to use fat interface core type (#4700)
soulomoon Aug 22, 2025
f6d05c7
Merge branch 'master' into batch-load-multi-read
soulomoon Aug 22, 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/setup@v2.7.10
- uses: haskell-actions/setup@v2.8.1
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].0
- uses: haskell-actions/[email protected].1
with:
ghc-version : ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/hls-graph @wz1000
/hls-plugin-api @michaelpj @fendor
/hls-test-utils @fendor
/hie-compat @wz1000

# HLS main
/src @fendor
Expand Down
1 change: 0 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
- [ ] bump package versions in all `*.cabal` files (same version as hls)
- HLS uses lockstep versioning. The core packages and all plugins use the same version number, and only support exactly this version.
- Exceptions:
- `hie-compat` requires no automatic version bump.
- `shake-bench` is an internal testing tool, not exposed to the outside world. Thus, no version bump required for releases.
- For updating cabal files, the following script can be used:
- ```sh
Expand Down
3 changes: 1 addition & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
packages:
./
./hie-compat
./shake-bench
./hls-graph
./ghcide
./hls-plugin-api
./hls-test-utils


index-state: 2025-06-07T14:57:40Z
index-state: 2025-08-08T12:31:54Z

tests: True
test-show-details: direct
Expand Down
1 change: 0 additions & 1 deletion docs/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ pre-commit install
#### Why are some components excluded from automatic formatting?

- `test/testdata` and `test/data` are excluded because we want to test formatting plugins.
- `hie-compat` is excluded because we want to keep its code as close to GHC as possible.

## Plugin tutorial

Expand Down
10 changes: 8 additions & 2 deletions exe/Wrapper.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE CPP #-}

Check warning on line 1 in exe/Wrapper.hs

View workflow job for this annotation

GitHub Actions / Hlint check run

Warning in module Main: Use module export list ▫︎ Found: "module Main where" ▫︎ Perhaps: "module Main (\n module Main\n ) where" ▫︎ Note: an explicit list is usually better
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -38,7 +38,8 @@
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Development.IDE.LSP.LanguageServer (runLanguageServer)
import Development.IDE.LSP.LanguageServer (Setup (..),
runLanguageServer)
import qualified Development.IDE.Main as Main
import Ide.Logger (Doc, Pretty (pretty),
Recorder, WithPriority,
Expand Down Expand Up @@ -300,7 +301,12 @@
[ exitHandler exit ]

let interpretHandler (env, _st) = LSP.Iso (LSP.runLspT env . unErrorLSPM) liftIO
pure (doInitialize, asyncHandlers, interpretHandler)
pure MkSetup
{ doInitialize
, staticHandlers = asyncHandlers
, interpretHandler
, onExit = [exit]
}

runLanguageServer (cmapWithPrio pretty recorder)
(Main.argsLspOptions defaultArguments)
Expand Down
3 changes: 3 additions & 0 deletions ghcide-test/data/multi-unit/a-1.0.0-inplace
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ base
text
-XHaskell98
A
+RTS
-A32M
-RTS
2 changes: 2 additions & 0 deletions ghcide-test/data/multi-unit/c-1.0.0-inplace
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ a-1.0.0-inplace
base
-XHaskell98
C
+RTS
-A32M
18 changes: 18 additions & 0 deletions ghcide-test/data/references/Fields.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{-# LANGUAGE RecordWildCards #-}
module Fields where

data Foo = MkFoo
{
barr :: String,
bazz :: String
}

fooUse0 :: Foo -> String
fooUse0 MkFoo{barr} = "5"

fooUse1 :: Foo -> String
fooUse1 MkFoo{..} = "6"

fooUse2 :: String -> String -> Foo
fooUse2 bar baz =
MkFoo{..}
5 changes: 4 additions & 1 deletion ghcide-test/data/references/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Main where

import References

import Fields
main :: IO ()
main = return ()

Expand All @@ -12,3 +12,6 @@ b = a + 1

acc :: Account
acc = Savings

fooUse3 :: String -> String -> Foo
fooUse3 bar baz = MkFoo{barr = bar, bazz = baz}
2 changes: 1 addition & 1 deletion ghcide-test/data/references/hie.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cradle: {direct: {arguments: ["Main","OtherModule","OtherOtherModule","References"]}}
cradle: {direct: {arguments: ["Main","OtherModule","OtherOtherModule","References", "Fields"]}}
6 changes: 5 additions & 1 deletion ghcide-test/exe/CradleTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ simpleSubDirectoryTest =

multiTests :: FilePath -> [TestTree]
multiTests dir =
[simpleMultiTest dir, simpleMultiTest2 dir, simpleMultiTest3 dir, simpleMultiDefTest dir]
[ simpleMultiTest dir
, simpleMultiTest2 dir
, simpleMultiTest3 dir
, simpleMultiDefTest dir
]

multiTestName :: FilePath -> String -> String
multiTestName dir name = "simple-" ++ dir ++ "-" ++ name
Expand Down
7 changes: 4 additions & 3 deletions ghcide-test/exe/FindDefinitionAndHoverTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ tests = let
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"]
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"], if ghcVersion < GHC910 then mkL bar 3 5 3 8 else mkL bar 3 0 3 14]
reexported = Position 55 14
reexportedSig = getDocUri "Bar.hs" >>= \bar -> return [ExpectHoverText ["Bar", "Bar", "Haddock"], if ghcVersion < GHC910 || not isWindows then mkL bar 3 5 3 8 else mkL bar 3 0 3 14]
thLocL57 = Position 59 10 ; thLoc = [ExpectHoverText ["Identity"]]
cmtL68 = Position 67 0 ; lackOfdEq = [ExpectHoverExcludeText ["$dEq"]]
import310 = Position 3 10; pkgTxt = [ExpectHoverText ["Data.Text\n\ntext-"]]
Expand Down Expand Up @@ -237,9 +238,9 @@ tests = let
, testM yes yes imported importedSig "Imported symbol"
, if isWindows then
-- Flaky on Windows: https://github.com/haskell/haskell-language-server/issues/2997
testM no yes reexported reexportedSig "Imported symbol (reexported)"
testM no yes reexported reexportedSig "Imported symbol reexported"
else
testM yes yes reexported reexportedSig "Imported symbol (reexported)"
testM yes yes reexported reexportedSig "Imported symbol reexported"
, test no yes thLocL57 thLoc "TH Splice Hover"
, test yes yes import310 pkgTxt "show package name and its version"
]
Expand Down
22 changes: 22 additions & 0 deletions ghcide-test/exe/ReferenceTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ tests = testGroup "references"
, ("References.hs", 16, 0)
]
]
-- Fields.hs does not depend on Main.hs
-- so we can only find references in Fields.hs
, testGroup "references to record fields"
[ referenceTest "references record fields in the same file"
("Fields.hs", 5, 4)
YesIncludeDeclaration
[ ("Fields.hs", 5, 4)
, ("Fields.hs", 10, 14)
, ("Fields.hs", 13, 14)
]

-- Main.hs depends on Fields.hs, so we can find references
-- from Main.hs to Fields.hs
, referenceTest "references record fields cross modules"
("Main.hs", 16, 24)
YesIncludeDeclaration
[ ("Fields.hs", 5, 4)
, ("Fields.hs", 10, 14)
, ("Fields.hs", 13, 14)
, ("Main.hs", 16, 24)
]
]
]

-- | When we ask for all references to symbol "foo", should the declaration "foo
Expand Down
8 changes: 5 additions & 3 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ library
, Glob
, haddock-library >=1.8 && <1.12
, hashable
, hie-bios ^>=0.15.0
, hie-compat ^>=0.3.0.0
, hiedb ^>= 0.6.0.2
, hie-bios ^>=0.17.0
, hiedb ^>= 0.7.0.0
, hls-graph == 2.11.0.0
, hls-plugin-api == 2.11.0.0
, implicit-hie >= 0.1.4.0 && < 0.1.5
Expand Down Expand Up @@ -180,7 +179,9 @@ library
Development.IDE.Plugin.Test
Development.IDE.Plugin.TypeLenses
Development.IDE.Session
Development.IDE.Session.Dependency
Development.IDE.Session.Diagnostics
Development.IDE.Session.Ghc
Development.IDE.Session.Implicit
Development.IDE.Spans.AtPoint
Development.IDE.Spans.Common
Expand All @@ -203,6 +204,7 @@ library
Development.IDE.GHC.CPP
Development.IDE.GHC.Warnings
Development.IDE.Types.Action
Development.IDE.Session.OrderedSet

if flag(pedantic)
ghc-options:
Expand Down
Loading
Loading