haskell-debug-adapter 0.0.39.0 → 0.0.40.0
raw patch · 4 files changed
+90/−12 lines, 4 filesdep ~ghci-dapPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: ghci-dap
API changes (from Hackage documentation)
Files
- Changelog.md +6/−0
- README.md +38/−1
- haskell-debug-adapter.cabal +10/−10
- src/Haskell/Debug/Adapter/Control.hs +36/−1
Changelog.md view
@@ -1,5 +1,11 @@+20240630 haskell-debug-adapter-0.0.40.0+ * [INFO] support ghc-9.10.1.+ * [MODIFY] stop watching files.++ 20230402 haskell-debug-adapter-0.0.39.0 * [INFO] support ghc-9.6.1.+ 20221127 haskell-debug-adapter-0.0.38.0 * [MODIFY] hdx4vsc ISSUE#27 Feature request: support jumping into library
README.md view
@@ -27,6 +27,9 @@ See a sample configuration. * [hdx4vs](https://github.com/phoityne/hdx4vs) An extension for Visual Studio.+ * [haskell-tools.nvim](https://github.com/mrcjkb/haskell-tools.nvim)+ A Neovim plugin that discovers launch configurations for [nvim-dap](https://github.com/mfussenegger/nvim-dap)+ from cabal and stack projects, and from Visual Studio Code launch.json files. # Requirement - haskell-dap@@ -34,9 +37,43 @@ Install these libraries at once. -```+```console > stack install haskell-dap ghci-dap haskell-debug-adapter ```++You can also build and run this project with nix:++```console+> nix build .#haskell-debug-adapter+```++or++```console+> nix run .#haskell-debug-adapter+```++# Development++This project can be built with stack, cabal and nix.++To run all tests and checks with nix:++```console+> nix flake check -L+```++To enter a development shell with nix:++```console+> nix develop+```++> **Note**+>+> The `stack.yaml` and `cabal.project` assume that [`haskell-dap`](https://github.com/phoityne/haskell-dap)+> and [`ghci-dap`](https://github.com/phoityne/ghci-dap) are checked out in the same directory as+> this project. If they are not, `haskell-language-server` will fail to start. # Limitation
haskell-debug-adapter.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack ----- hash: 1a8a9f4202a32a5d5c37c676b9d919068955c6ff8fecee95e75927238459e56d+-- hash: 31df6f8a3983d139dd38dfb23e6a70668fe0e158220e5b7a993db5050d161c30 name: haskell-debug-adapter-version: 0.0.39.0+version: 0.0.40.0 synopsis: Haskell Debug Adapter. description: Please see README.md category: Development@@ -15,7 +15,7 @@ bug-reports: https://github.com/phoityne/haskell-debug-adapter/issues author: phoityne_hs maintainer: phoityne.hs@gmail.com-copyright: 2016-2023 phoityne_hs+copyright: 2016-2024 phoityne_hs license: BSD3 license-file: LICENSE build-type: Simple@@ -112,7 +112,7 @@ , directory , filepath , fsnotify- , ghci-dap >=0.0.20.0+ , ghci-dap >=0.0.23.0 , haskell-dap >=0.0.16.0 , hslogger , lens@@ -123,9 +123,9 @@ , resourcet , safe-exceptions , text+ default-language: Haskell2010 if impl(ghc < 8.10.0) buildable: False- default-language: Haskell2010 executable haskell-debug-adapter main-is: Main.hs@@ -186,7 +186,7 @@ , directory , filepath , fsnotify- , ghci-dap >=0.0.20.0+ , ghci-dap >=0.0.23.0 , haskell-dap >=0.0.16.0 , haskell-debug-adapter , hslogger@@ -198,9 +198,9 @@ , resourcet , safe-exceptions , text+ default-language: Haskell2010 if impl(ghc < 8.10.0) buildable: False- default-language: Haskell2010 test-suite haskell-debug-adapter-test type: exitcode-stdio-1.0@@ -264,7 +264,7 @@ , directory , filepath , fsnotify- , ghci-dap >=0.0.20.0+ , ghci-dap >=0.0.23.0 , haskell-dap >=0.0.16.0 , haskell-debug-adapter , hslogger@@ -277,6 +277,6 @@ , resourcet , safe-exceptions , text+ default-language: Haskell2010 if impl(ghc < 8.10.0) buildable: False- default-language: Haskell2010
src/Haskell/Debug/Adapter/Control.hs view
@@ -122,8 +122,43 @@ RQ.run appData -- request handler , A.run appData -- main app , RP.run appData -- response handler- , W.run appData -- file watch+ -- , W.run appData -- file watch ]++ -- + -- suspend file watch.+ -- because on vbox CentOS Stream release 9, throw error.+ -- Error: couldn't start native file manager: fdType: unsupported operation (unknown file type)+ --+ -- https://github.com/haskell-fswatch/hfsnotify/blob/master/src/System/FSNotify.hs#L167C1-L178C7+ -- case confWatchMode conf of+ -- WatchModePoll interval -> WatchManager conf <$> liftIO (createPollManager interval) <*> cleanupVar <*> globalWatchChan+ -- #ifndef OS_BSD+ -- WatchModeOS -> liftIO (initSession ()) >>= createManager+ -- #endif+ -- + -- where+ -- #ifndef OS_BSD+ -- createManager :: Either Text NativeManager -> IO WatchManager+ -- createManager (Right nativeManager) = WatchManager conf nativeManager <$> cleanupVar <*> globalWatchChan+ -- createManager (Left err) = throwIO $ userError $ T.unpack $ "Error: couldn't start native file manager: " <> err+ -- #endif+ -- + -- https://github.com/haskell-fswatch/hfsnotify/blob/master/src/System/FSNotify/Linux.hs#L94C1-L97C45+ -- instance FileListener INotifyListener () where+ -- initSession _ = E.handle (\(e :: IOException) -> return $ Left $ fromString $ show e) $ do+ -- inotify <- INo.initINotify+ -- return $ Right $ INotifyListener inotify+ -- + -- https://hackage.haskell.org/package/hinotify-0.4.1/docs/src/System.INotify.html#initINotify+ -- initINotify :: IO INotify+ -- initINotify = do+ -- throwErrnoIfMinus1 "initINotify" c_inotify_init+ -- (fd,fd_type) <- FD.mkFD fdint ReadMode (Just (Stream,0,0))+ -- +++ as <- mapM async ths waitAnyCatchCancel as >>= \case