hsdev 0.2.3.0 → 0.2.3.1
raw patch · 3 files changed
+8/−7 lines, 3 files
Files
- hsdev.cabal +1/−1
- src/HsDev/Server/Commands.hs +2/−1
- src/HsDev/Server/Types.hs +5/−5
hsdev.cabal view
@@ -1,5 +1,5 @@ name: hsdev -version: 0.2.3.0 +version: 0.2.3.1 synopsis: Haskell development library description: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references, hayoo search etc.
src/HsDev/Server/Commands.hs view
@@ -190,7 +190,8 @@ Log.sendLog Log.Trace "waiting for starting accept thread..." liftIO $ waitQSem q - Log.sendLog Log.Info $ "Server started at port {}" ~~ serverPort sopts + liftIO $ putStrLn $ "Server started at port {}" ~~ serverPort sopts + Log.sendLog Log.Info $ "server started at port {}" ~~ serverPort sopts Log.sendLog Log.Trace "waiting for accept thread..." serverWait Log.sendLog Log.Trace "accept thread stopped"
src/HsDev/Server/Types.hs view
@@ -149,8 +149,8 @@ serverSetLogLevel :: SessionMonad m => Level -> m Level serverSetLogLevel lev = do l <- askSession (sessionLogger . sessionLog) - cfg <- updateLogConfig l (set (componentCfg "hsdev") (Just lev)) - return $ fromMaybe def $ view (componentCfg "hsdev") cfg + cfg <- updateLogConfig l (set (componentCfg "") (Just lev)) + return $ fromMaybe def $ view (componentCfg "") cfg -- | Wait for server serverWait :: SessionMonad m => m () @@ -229,7 +229,7 @@ deriving (Show) instance Default ServerOpts where - def = ServerOpts def 0 Nothing "use default" Nothing False False + def = ServerOpts def 0 Nothing "info" Nothing False False -- | Silent server with no connection, useful for ghci silentOpts :: ServerOpts @@ -618,7 +618,7 @@ instance ToJSON Command where toJSON Ping = cmdJson "ping" [] - toJSON (Listen r) = cmdJson "listen" ["rule" .= r] + toJSON (Listen lev) = cmdJson "listen" ["level" .= lev] toJSON (SetLogLevel lev) = cmdJson "set-log" ["level" .= lev] toJSON (AddData cts) = cmdJson "add" ["data" .= cts] toJSON (Scan projs cabal sboxes fs ps ghcs docs' infer') = cmdJson "scan" [ @@ -664,7 +664,7 @@ instance FromJSON Command where parseJSON = withObject "command" $ \v -> asum [ guardCmd "ping" v *> pure Ping, - guardCmd "listen" v *> (Listen <$> v .::? "rule"), + guardCmd "listen" v *> (Listen <$> v .::? "level"), guardCmd "set-log" v *> (SetLogLevel <$> v .:: "level"), guardCmd "add" v *> (AddData <$> v .:: "data"), guardCmd "scan" v *> (Scan <$>