Skip to content

bump ghcide submodule #396

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

Merged
merged 3 commits into from
Sep 13, 2020
Merged
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 cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ package ghcide

write-ghc-environment-files: never

index-state: 2020-08-07T11:45:57Z
index-state: 2020-09-09T00:00:00Z

allow-newer: data-tree-print:base
2 changes: 1 addition & 1 deletion ghcide
Submodule ghcide updated 41 files
+48 −0 .azure/linux-bench.yml
+1 −1 .azure/linux-stack.yml
+1 −1 .azure/windows-stack.yml
+2 −0 .gitignore
+7 −5 README.md
+1 −0 azure-pipelines.yml
+4 −0 bench-hist/.artifactignore
+6 −5 bench/README.md
+4 −2 bench/hist.yaml
+51 −20 bench/hist/Main.hs
+4 −2 exe/Main.hs
+5 −4 ghcide.cabal
+79 −32 session-loader/Development/IDE/Session.hs
+1 −1 src-ghc810/Development/IDE/GHC/HieAst.hs
+1 −1 src-ghc86/Development/IDE/GHC/HieAst.hs
+1 −1 src-ghc88/Development/IDE/GHC/HieAst.hs
+3 −3 src/Development/IDE.hs
+30 −16 src/Development/IDE/Core/Compile.hs
+66 −46 src/Development/IDE/Core/FileStore.hs
+14 −14 src/Development/IDE/Core/OfInterest.hs
+37 −25 src/Development/IDE/Core/RuleTypes.hs
+82 −64 src/Development/IDE/Core/Rules.hs
+41 −16 src/Development/IDE/Core/Shake.hs
+30 −5 src/Development/IDE/GHC/Compat.hs
+9 −1 src/Development/IDE/GHC/Orphans.hs
+22 −9 src/Development/IDE/GHC/Util.hs
+8 −8 src/Development/IDE/Import/FindImports.hs
+12 −4 src/Development/IDE/LSP/LanguageServer.hs
+10 −11 src/Development/IDE/LSP/Notifications.hs
+30 −8 src/Development/IDE/Plugin/CodeAction.hs
+64 −0 src/Development/IDE/Plugin/Test.hs
+15 −18 src/Development/IDE/Spans/AtPoint.hs
+19 −6 src/Development/IDE/Types/Action.hs
+2 −2 stack-ghc-lib.yaml
+2 −2 stack.yaml
+3 −3 stack810.yaml
+32 −0 stack8101.yaml
+5 −4 stack84.yaml
+3 −3 stack88.yaml
+71 −22 test/exe/Main.hs
+2 −2 test/src/Development/IDE/Test.hs
2 changes: 1 addition & 1 deletion hls-plugin-api/src/Ide/Plugin/GhcIde.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ hover' ideState params = do

commandAddSignature :: CommandFunction WorkspaceEdit
commandAddSignature lf ide params
= executeAddSignatureCommand lf ide (ExecuteCommandParams "typesignature.add" (Just (List [toJSON params])) Nothing)
= commandHandler lf ide (ExecuteCommandParams "typesignature.add" (Just (List [toJSON params])) Nothing)

-- ---------------------------------------------------------------------

Expand Down
3 changes: 1 addition & 2 deletions plugins/default/src/Ide/Plugin/Example.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Data.Aeson
import Data.Binary
import Data.Functor
import qualified Data.HashMap.Strict as Map
import qualified Data.HashSet as HashSet
import Data.Hashable
import qualified Data.Text as T
import Data.Typeable
Expand Down Expand Up @@ -76,7 +75,7 @@ exampleRules = do

action $ do
files <- getFilesOfInterest
void $ uses Example $ HashSet.toList files
void $ uses Example $ Map.keys files

mkDiag :: NormalizedFilePath
-> DiagnosticSource
Expand Down
3 changes: 1 addition & 2 deletions plugins/default/src/Ide/Plugin/Example2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Data.Aeson
import Data.Binary
import Data.Functor
import qualified Data.HashMap.Strict as Map
import qualified Data.HashSet as HashSet
import Data.Hashable
import qualified Data.Text as T
import Data.Typeable
Expand Down Expand Up @@ -75,7 +74,7 @@ exampleRules = do

action $ do
files <- getFilesOfInterest
void $ uses Example2 $ HashSet.toList files
void $ uses Example2 $ Map.keys files

mkDiag :: NormalizedFilePath
-> DiagnosticSource
Expand Down
1 change: 0 additions & 1 deletion plugins/default/src/Ide/Plugin/ImportLens.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import qualified Data.Map.Strict as Map
import Data.Maybe (catMaybes, fromMaybe)
import qualified Data.Text as T
import Development.IDE
import Development.IDE.Core.Shake (useWithStale)
import Development.IDE.GHC.Compat
import GHC.Generics (Generic)
import Ide.Plugin
Expand Down
6 changes: 3 additions & 3 deletions plugins/default/src/Ide/Plugin/Retrie.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Typeable (Typeable)
import Development.IDE
import Development.IDE.Core.Shake (ShakeExtras(knownFilesVar))
import Development.IDE.Core.Shake (toKnownFiles, ShakeExtras(knownTargetsVar))
import Development.IDE.GHC.Compat (GenLocated (L), GhcRn,
HsBindLR (FunBind),
HsGroup (..),
Expand Down Expand Up @@ -334,7 +334,7 @@ callRetrie ::
Bool ->
IO ([CallRetrieError], WorkspaceEdit)
callRetrie state session rewrites origin restrictToOriginatingFile = do
knownFiles <- readVar $ knownFilesVar $ shakeExtras state
knownFiles <- toKnownFiles . unhashed <$> readVar (knownTargetsVar $ shakeExtras state)
print knownFiles
let reuseParsedModule f = do
pm <-
Expand Down Expand Up @@ -387,7 +387,7 @@ callRetrie state session rewrites origin restrictToOriginatingFile = do
,Retrie.targetFiles = map fromNormalizedFilePath $
if restrictToOriginatingFile
then [origin]
else Set.toList $ unhashed knownFiles
else Set.toList knownFiles
}

(theImports, theRewrites) = partitionEithers rewrites
Expand Down
4 changes: 2 additions & 2 deletions src/Ide/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ module Ide.Main(defaultMain, runLspMode) where
import Control.Concurrent.Extra
import Control.Monad.Extra
import Data.Default
import qualified Data.HashSet as HashSet
import Data.List.Extra
import qualified Data.Map.Strict as Map
import qualified Data.HashMap.Strict as HashMap
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.IO as T
Expand Down Expand Up @@ -170,7 +170,7 @@ runLspMode lspArgs@LspArguments{..} idePlugins = do
ide <- initialise def mainRule (pure $ IdInt 0) (showEvent lock) dummyWithProg (const (const id)) (logger Info) debouncer (defaultIdeOptions sessionLoader) vfs

putStrLn "\nStep 4/4: Type checking the files"
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath' files
setFilesOfInterest ide $ HashMap.fromList $ map ((, OnDisk) . toNormalizedFilePath') files
results <- runAction "User TypeCheck" ide $ uses TypeCheck (map toNormalizedFilePath' files)
let (worked, failed) = partition fst $ zip (map isJust results) files
when (failed /= []) $
Expand Down
4 changes: 2 additions & 2 deletions stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ extra-deps:
- haddock-library-1.8.0
- haskell-lsp-0.22.0.0
- haskell-lsp-types-0.22.0.0
- hie-bios-0.6.1
- hie-bios-0.7.1
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:2
- indexed-profunctors-0.1
- lens-4.18
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- opentelemetry-0.4.2
- optics-core-0.2
Expand Down
4 changes: 2 additions & 2 deletions stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ extra-deps:
- haddock-library-1.8.0
- haskell-lsp-0.22.0.0
- haskell-lsp-types-0.22.0.0
- hie-bios-0.6.1
- hie-bios-0.7.1
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:2
- indexed-profunctors-0.1
- lens-4.18
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- opentelemetry-0.4.2
- optics-core-0.2
Expand Down
4 changes: 2 additions & 2 deletions stack-8.8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ extra-deps:
- haskell-lsp-0.22.0.0
- haskell-lsp-types-0.22.0.0
- haskell-src-exts-1.21.1
- hie-bios-0.6.1
- hie-bios-0.7.1
- hlint-2.2.8
- hoogle-5.0.17.11
- hsimport-0.11.0
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:2
- ilist-0.3.1.0
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- opentelemetry-0.4.2
- ormolu-0.1.2.0
Expand Down
4 changes: 2 additions & 2 deletions stack-8.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ extra-deps:
- fourmolu-0.1.0.0@rev:1
# - ghcide-0.1.0
- haskell-src-exts-1.21.1
- hie-bios-0.6.1
- hie-bios-0.7.1
- hlint-2.2.8
- HsYAML-aeson-0.2.0.0@rev:2
- hoogle-5.0.17.11
- hsimport-0.11.0
- ilist-0.3.1.0
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- retrie-0.1.1.1
- semigroups-0.18.5
Expand Down
4 changes: 2 additions & 2 deletions stack-8.8.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ extra-deps:
- fourmolu-0.1.0.0@rev:1
# - ghcide-0.1.0
- haskell-src-exts-1.21.1
- hie-bios-0.6.1
- hie-bios-0.7.1
- hlint-2.2.8
- HsYAML-aeson-0.2.0.0@rev:2
- hoogle-5.0.17.11
- hsimport-0.11.0
- ilist-0.3.1.0
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- retrie-0.1.1.1
- semigroups-0.18.5
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ extra-deps:
- haddock-library-1.8.0
- haskell-lsp-0.22.0.0
- haskell-lsp-types-0.22.0.0
- hie-bios-0.6.1
- hie-bios-0.7.1
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:2
- indexed-profunctors-0.1
- lens-4.18
- lsp-test-0.11.0.4
- lsp-test-0.11.0.5
- monad-dijkstra-0.1.1.2
- opentelemetry-0.4.2
- optics-core-0.2
Expand Down