Skip to content

Commit eb89642

Browse files
committed
Fix up for rebase on mpickering branch
1 parent 5a896aa commit eb89642

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

cabal.project

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ source-repository-package
1010
source-repository-package
1111
type: git
1212
location: https://github.com/fendor/hie-bios.git
13-
tag: d5b7fc9bb3025b1d4d2ac9c48b588faf18dfce99
13+
tag: 87db34de1b10b03bb2c3d7f6bd3623bc1da96ba8
1414

15+
source-repository-package
16+
type: git
17+
location: https://github.com/mpickering/shake
18+
tag: 4d56fe9f09bd3bd63ead541c571c756995da490a
1519

1620
tests: true
1721
documentation: false

exe/Main.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ main = do
224224

225225
putStrLn "\nStep 4/6: Type checking the files"
226226
setFilesOfInterest ide $ HashSet.fromList $ map toNormalizedFilePath' files
227-
_ <- runActionSync ide $ uses TypeCheck (map toNormalizedFilePath' files)
227+
_ <- runActionSync "TypecheckTest" ide $ uses TypeCheck (map toNormalizedFilePath' files)
228228
-- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "src/Development/IDE/Core/Rules.hs"
229229
-- results <- runActionSync ide $ use TypeCheck $ toNormalizedFilePath' "exe/Main.hs"
230230
return ()
@@ -523,9 +523,10 @@ memoIO op = do
523523
Just res -> return (mp, res)
524524

525525
setOptions :: GhcMonad m => ComponentOptions -> DynFlags -> m (DynFlags, [Target])
526-
setOptions (ComponentOptions theOpts compRoot _) dflags = do
526+
setOptions (ComponentOptions theOpts _compRoot _) dflags = do
527527
cacheDir <- liftIO $ getCacheDir theOpts
528-
(dflags', targets) <- addCmdOpts compRoot theOpts dflags
528+
-- (dflags', targets) <- addCmdOpts compRoot theOpts dflags
529+
(dflags', targets) <- addCmdOpts theOpts dflags
529530
let dflags'' =
530531
-- disabled, generated directly by ghcide instead
531532
flip gopt_unset Opt_WriteInterface $

src/Ide/Plugin/Example.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ codeLens _lf ideState plId CodeLensParams{_textDocument=TextDocumentIdentifier u
125125
logInfo (ideLogger ideState) "Example.codeLens entered (ideLogger)" -- AZ
126126
case uriToFilePath' uri of
127127
Just (toNormalizedFilePath -> filePath) -> do
128-
_ <- runAction ideState $ runMaybeT $ useE TypeCheck filePath
128+
_ <- runAction (fromNormalizedFilePath filePath) ideState $ runMaybeT $ useE TypeCheck filePath
129129
_diag <- getDiagnostics ideState
130130
_hDiag <- getHiddenDiagnostics ideState
131131
let
@@ -190,7 +190,7 @@ logAndRunRequest label getResults ide pos path = do
190190
logInfo (ideLogger ide) $
191191
label <> " request at position " <> T.pack (showPosition pos) <>
192192
" in file: " <> T.pack path
193-
runAction ide $ getResults filePath pos
193+
runAction path ide $ getResults filePath pos
194194

195195
-- ---------------------------------------------------------------------
196196

src/Ide/Plugin/Example2.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ codeLens _lf ideState plId CodeLensParams{_textDocument=TextDocumentIdentifier u
125125
logInfo (ideLogger ideState) "Example2.codeLens entered (ideLogger)" -- AZ
126126
case uriToFilePath' uri of
127127
Just (toNormalizedFilePath -> filePath) -> do
128-
_ <- runAction ideState $ runMaybeT $ useE TypeCheck filePath
128+
_ <- runAction (fromNormalizedFilePath filePath) ideState $ runMaybeT $ useE TypeCheck filePath
129129
_diag <- getDiagnostics ideState
130130
_hDiag <- getHiddenDiagnostics ideState
131131
let
@@ -187,7 +187,7 @@ logAndRunRequest label getResults ide pos path = do
187187
logInfo (ideLogger ide) $
188188
label <> " request at position " <> T.pack (showPosition pos) <>
189189
" in file: " <> T.pack path
190-
runAction ide $ getResults filePath pos
190+
runAction path ide $ getResults filePath pos
191191

192192
-- ---------------------------------------------------------------------
193193

src/Ide/Plugin/Formatter.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ doFormatting lf providers ideState ft uri params = do
6565
Just provider ->
6666
case uriToFilePath uri of
6767
Just (toNormalizedFilePath -> fp) -> do
68-
(_, mb_contents) <- runAction ideState $ getFileContents fp
68+
(_, mb_contents) <- runAction (fromNormalizedFilePath fp) ideState $ getFileContents fp
6969
case mb_contents of
7070
Just contents -> do
7171
logDebug (ideLogger ideState) $ T.pack $

src/Ide/Plugin/Ormolu.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ provider ideState typ contents fp _ = do
7676
in
7777
return $ map DynOption $ pp <> pm <> ex
7878

79-
m_parsed <- runAction ideState $ getParsedModule fp
79+
m_parsed <- runAction (fromNormalizedFilePath fp) ideState $ getParsedModule fp
8080
fileOpts <- case m_parsed of
8181
Nothing -> return []
8282
Just pm -> fromDyn pm

0 commit comments

Comments
 (0)