From 6531d072211989d60a07dd7c50ffdbc2708cb422 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 | 7 ++----- src/Ide/Main.hs | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ghcide/src/Development/IDE/Main.hs b/ghcide/src/Development/IDE/Main.hs index 78973b9dbf..cfe2ec0a6f 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 @@ -184,10 +185,6 @@ defaultMain Arguments{..} = do putStrLn $ "HLS 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 0a543d985c..c582b07256 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 }