Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit b7ce8b8

Browse files
authored
Merge pull request #1539 from alanz/hiewrapper-show-args
Tweak hie-wrapper and hie exe startup messages
2 parents a8c156b + 78f6701 commit b7ce8b8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/HieWrapper.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ run opts = do
7272
d <- getCurrentDirectory
7373
logm $ "Current directory:" ++ d
7474
logm $ "Operating system:" ++ os
75+
args <- getArgs
76+
logm $ "args:" ++ show args
7577

7678
-- Get the cabal directory from the cradle
7779
cradle <- findLocalCradle (d </> "File.hs")
@@ -99,7 +101,6 @@ run opts = do
99101
Nothing -> logm $ "cannot find any hie exe, looked for:" ++ intercalate ", " candidates
100102
Just e -> do
101103
logm $ "found hie exe at:" ++ e
102-
args <- getArgs
103104
logm $ "args:" ++ show args
104105
logm "launching ....\n\n\n"
105106
callProcess e args

app/MainHie.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import qualified Paths_haskell_ide_engine as Meta
2121
import System.Directory
2222
import System.Environment
2323
import System.FilePath ((</>))
24+
import System.Info
2425
import System.IO
2526
import qualified System.Log.Logger as L
2627

@@ -119,8 +120,10 @@ run opts = do
119120
if optLsp opts
120121
then do
121122
-- Start up in LSP mode
122-
logm $ "Run entered for HIE(" ++ progName ++ ") " ++ hieVersion
123+
logm $ "Run entered for HIE(" ++ progName ++ ") " ++ hieVersion
124+
logm $ "Operating as a LSP server on stdio"
123125
logm $ "Current directory:" ++ origDir
126+
logm $ "Operating system:" ++ os
124127
logm $ "args:" ++ show args
125128

126129
let initOpts = defaultCradleOpts { cradleOptsVerbosity = verbosity }
@@ -142,6 +145,7 @@ run opts = do
142145
-- Provide debug info
143146
cliOut $ "Running HIE(" ++ progName ++ ")"
144147
cliOut $ " " ++ hieVersion
148+
cliOut $ "To run as a LSP server on stdio, provide the '--lsp' argument"
145149
cliOut $ "Current directory:" ++ origDir
146150
-- args <- getArgs
147151
cliOut $ "\nargs:" ++ show args

0 commit comments

Comments
 (0)