From f2ee6ea6be6aecf5e2c7a52149bb54c5a6c61c8b Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Tue, 9 Feb 2021 20:12:33 +0000 Subject: [PATCH] fixup! Reuse Development.IDE.Main in HLS --- ghcide/src/Development/IDE/Main.hs | 9 +++------ src/Ide/Main.hs | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ghcide/src/Development/IDE/Main.hs b/ghcide/src/Development/IDE/Main.hs index 78973b9dbfd..2acf4367d7b 100644 --- a/ghcide/src/Development/IDE/Main.hs +++ b/ghcide/src/Development/IDE/Main.hs @@ -89,7 +89,6 @@ import System.IO (hPutStrLn, hSetEncoding, stderr, stdout, utf8) import System.Time.Extra (offsetTime, showDuration) import Text.Printf (printf) import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide -import Ide.Version (findProgramVersions, showProgramVersionOfInterest) data Arguments = Arguments { argsOTMemoryProfiling :: Bool @@ -143,6 +142,8 @@ defaultMain Arguments{..} = do case argFiles of Nothing -> do t <- offsetTime + hPutStrLn stderr "Starting LSP server..." + hPutStrLn stderr "If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!" runLanguageServer options (pluginHandler plugins) onInitialConfiguration onConfigurationChange $ \getLspId event vfs caps wProg wIndefProg getConfig rootPath -> do t <- t hPutStrLn stderr $ "Started LSP server in " ++ showDuration t @@ -182,12 +183,8 @@ defaultMain Arguments{..} = do hSetEncoding stdout utf8 hSetEncoding stderr utf8 - putStrLn $ "HLS setup tester in " ++ dir ++ "." + putStrLn $ "ghcide setup tester in " ++ dir ++ "." putStrLn "Report bugs at https://github.com/haskell/haskell-language-server/issues" - programsOfInterest <- findProgramVersions - putStrLn "" - putStrLn "Tool versions found on the $PATH" - putStrLn $ showProgramVersionOfInterest programsOfInterest putStrLn $ "\nStep 1/4: Finding files to test in " ++ dir files <- expandFiles (argFiles ++ ["." | null argFiles]) diff --git a/src/Ide/Main.hs b/src/Ide/Main.hs index 0a543d985c5..c582b072567 100644 --- a/src/Ide/Main.hs +++ b/src/Ide/Main.hs @@ -97,4 +97,5 @@ runLspMode lspArgs@LspArguments{..} idePlugins = do { Main.argFiles = if argLSP then Nothing else Just [] , Main.argsHlsPlugins = idePlugins , Main.argsLogger = hlsLogger + , Main.argsTesting = argsTesting }