Skip to content

Commit

Permalink
support for ghc-9.10.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
phoityne committed Jun 30, 2024
1 parent 8f31926 commit b87cf7a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ result*
dist-newstyle
.direnv
hie.yaml
cabal.project.*
.vscode
build.sh
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
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
* [INFO] support ghc-9.4.3.
Expand Down
16 changes: 8 additions & 8 deletions haskell-debug-adapter.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ cabal-version: 1.12
-- 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
homepage: https://github.com/phoityne/haskell-debug-adapter/
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
Expand Down Expand Up @@ -112,8 +112,8 @@ library
, directory
, filepath
, fsnotify
, ghci-dap >=0.0.19.0
, haskell-dap >=0.0.15.0
, ghci-dap >=0.0.23.0
, haskell-dap >=0.0.16.0
, hslogger
, lens
, mtl
Expand Down Expand Up @@ -186,8 +186,8 @@ executable haskell-debug-adapter
, directory
, filepath
, fsnotify
, ghci-dap >=0.0.19.0
, haskell-dap >=0.0.15.0
, ghci-dap >=0.0.23.0
, haskell-dap >=0.0.16.0
, haskell-debug-adapter
, hslogger
, lens
Expand Down Expand Up @@ -264,8 +264,8 @@ test-suite haskell-debug-adapter-test
, directory
, filepath
, fsnotify
, ghci-dap >=0.0.19.0
, haskell-dap >=0.0.15.0
, ghci-dap >=0.0.23.0
, haskell-dap >=0.0.16.0
, haskell-debug-adapter
, hslogger
, hspec
Expand Down
8 changes: 4 additions & 4 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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
author: phoityne_hs
maintainer: phoityne.hs@gmail.com
copyright: 2016-2023 phoityne_hs
copyright: 2016-2024 phoityne_hs
license: BSD3
homepage: https://github.com/phoityne/haskell-debug-adapter/
bug-reports: https://github.com/phoityne/haskell-debug-adapter/issues
Expand Down Expand Up @@ -90,8 +90,8 @@ dependencies:
- clock
- fsnotify
- optparse-applicative
- haskell-dap >=0.0.15.0
- ghci-dap >=0.0.19.0
- haskell-dap >=0.0.16.0
- ghci-dap >=0.0.23.0

library:
source-dirs: src
Expand Down
37 changes: 36 additions & 1 deletion src/Haskell/Debug/Adapter/Control.hs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,44 @@ run argDat inHdl outHdl = E.bracket initialize finalize go
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
(_, Right _) -> L.infoM _LOG_NAME $ "some threads stopped. exit."
Expand Down

0 comments on commit b87cf7a

Please sign in to comment.