packages feed

phoityne-vscode 0.0.6.0 → 0.0.7.0

raw patch · 6 files changed

+42/−11 lines, 6 files

Files

Changelog.md view
@@ -1,4 +1,9 @@ +20160704 phoityne-vscode-0.0.7.0+  * [Modify] debugger adopter interface Capabilitiesの変更に対応した。+  * [Modify] debugger adopter interface StackFrameの変更に対応した。(endLin, endColumnの追加)+  * [Modify] debugger adopter interface Variableの変更に対応した。(typeの追加)+   20160626 phoityne-vscode-0.0.6.0    * [Modify] launchリクエストのghciCmdパラメータで指定したghci起動コマンドを使用するように変更した。
app/Phoityne/IO/GUI/Control.hs view
@@ -259,7 +259,7 @@   , "    { "   , "       \"isWatching\": true,"   , "       \"taskName\": \"stack watch\","-  , "       \"args\": [ \"echo START_STACK_WATCH && cd ${workspaceRoot} && stack build --file-watch && echo END_STACK_WATCH \" ]"+  , "       \"args\": [ \"echo START_STACK_WATCH && cd ${workspaceRoot} && stack build --test --no-run-tests --file-watch && echo END_STACK_WATCH \" ]"   , "    }"   , "  ]"   , "}"@@ -565,7 +565,7 @@ initializeHandler :: MVar DebugContext -> J.InitializeRequest -> IO () initializeHandler mvarCtx req@(J.InitializeRequest seq _ _ _) = flip E.catches handlers $ do   resSeq <- incResSeq mvarCtx-  let capa = J.InitializeResponseCapabilites False False True True []+  let capa = J.InitializeResponseCapabilites False False True True [] False False       res  = J.InitializeResponse resSeq "response" seq True "initialize" "" capa    sendResponse $ J.encode res@@ -881,7 +881,7 @@          Right dats -> return $ map convBind2Vals dats     -    convBind2Vals (BindingData varName _ val) = J.Variable varName val 0+    convBind2Vals (BindingData varName modName val) = J.Variable varName modName val 0   -- |@@ -920,10 +920,10 @@       putStrLnStderr mvarCtx msg  -    createStackFrames (HighlightTextRangeData file sl sc _ _) = do+    createStackFrames (HighlightTextRangeData file sl sc el ec) = do       ctx <- readMVar mvarCtx       let cwd = workspaceDebugContext ctx-          csf = J.StackFrame 0 "[BP]" (J.Source (Just (src2mod cwd file)) file Nothing Nothing) sl sc+          csf = J.StackFrame 0 "[BP]" (J.Source (Just (src2mod cwd file)) file Nothing Nothing) sl sc el ec        let getResult = readDebugCommandData cmdData           history   = traceHistDebugCommandData cmdData@@ -947,8 +947,8 @@         errorM _LOG_NAME $ show err         putStrLnStderr mvarCtx $ show err         return xs-      Right (HighlightTextRangeData file sl sc _ _) -> return $ -        J.StackFrame (read traceId) funcName (J.Source (Just (src2mod cwd file)) file Nothing Nothing) sl sc : xs+      Right (HighlightTextRangeData file sl sc el ec) -> return $ +        J.StackFrame (read traceId) funcName (J.Source (Just (src2mod cwd file)) file Nothing Nothing) sl sc el ec : xs  -- | --@@ -1294,12 +1294,12 @@    startCmd cmd opts cwd -  str <- readWhile $ not . endswith _GHCI_PROMPT+  str <- readWhile $ not . endsWithPrompt    infoM _LOG_NAME str   putStrStdout mvarCtx str -  withStarted $ endswith _GHCI_PROMPT str+  withStarted $ endsWithPrompt str    where     withStarted False = return False@@ -1328,7 +1328,13 @@       putStrStdout mvarCtx cmdStr       infoM _LOG_NAME cmdStr +    endsWithPrompt str =+      if endswith _GHCI_PROMPT str then True+        else isEndsWithPrompt $ last $ lines str+    +     + -- | -- --@@ -1813,6 +1819,21 @@       return $ BindingData (strip varName) (strip modName) valStr      lineSep = try $ endOfLine >> notFollowedBy space+++-- |+--+isEndsWithPrompt :: String -> Bool+isEndsWithPrompt str = case parse parser "isEndsWithPrompt" str of+  Right res -> res+  Left _    -> False+  where+    parser = do+      char '*'+      manyTill anyChar $ char '>'+      space+      eof+      return True   
app/Phoityne/IO/GUI/VSCode/TH/InitializeResponseCapabilitesJSON.hs view
@@ -18,6 +18,8 @@   , supportsConditionalBreakpointsInitializeResponseCapabilites   :: Bool  -- The debug adapter supports conditionalBreakpoints.   , supportsEvaluateForHoversInitializeResponseCapabilites        :: Bool  -- The debug adapter supports a (side effect free) evaluate request for data hovers.   , exceptionBreakpointFiltersInitializeResponseCapabilites       :: [ExceptionBreakpointsFilter]  -- Available filters for the setExceptionBreakpoints request.+  , supportsStepBackInitializeResponseCapabilites                 :: Bool  -- The debug adapter supports stepping back.+  , supportsSetVariableInitializeResponseCapabilites              :: Bool  -- The debug adapter supports setting a variable to a value.   } deriving (Show, Read, Eq)  $(deriveJSON defaultOptions { fieldLabelModifier = rdrop (length "InitializeResponseCapabilites") } ''InitializeResponseCapabilites)@@ -25,5 +27,5 @@ -- | -- defaultInitializeResponseCapabilites :: InitializeResponseCapabilites-defaultInitializeResponseCapabilites = InitializeResponseCapabilites False False False False []+defaultInitializeResponseCapabilites = InitializeResponseCapabilites False False False False [] False False 
app/Phoityne/IO/GUI/VSCode/TH/StackFrameJSON.hs view
@@ -18,6 +18,8 @@   , sourceStackFrame :: Source  -- The optional source of the frame.   , lineStackFrame   :: Int     -- The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored.   , columnStackFrame :: Int     -- The column within the line. If source is null or doesn't exist, column is 0 and must be ignored.+  , endLineStackFrame   :: Int  -- An optional end line of the range covered by the stack frame.+  , endColumnStackFrame :: Int  -- An optional end column of the range covered by the stack frame.   } deriving (Show, Read, Eq)  
app/Phoityne/IO/GUI/VSCode/TH/VariableJSON.hs view
@@ -14,6 +14,7 @@ data Variable =   Variable {     nameVariable               :: String  -- The variable's name+  , typeVariable               :: String  -- he variable's type.   , valueVariable              :: String  -- The variable's value. For structured objects this can be a multi line text, e.g. for a function the body of a function.   , variablesReferenceVariable :: Int     -- If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.   } deriving (Show, Read, Eq)
phoityne-vscode.cabal view
@@ -1,5 +1,5 @@ name:                phoityne-vscode-version:             0.0.6.0+version:             0.0.7.0 synopsis:            ghci debug viewer on Visual Studio Code description:         Please see README.md license:             BSD3