Skip to content

Commit

Permalink
devel/hs-fsnotify: Update to 0.4.1.0
Browse files Browse the repository at this point in the history
Version 0.4.1.0
* Add unliftio lower bound (#106)
* Change the tests back to a test-suite to avoid building for library
  users. (#107)
* Fix up Windows compatibility.
* Export WatchConfig type (#108)

Version 0.4.0.1
* Fix compatibility with *BSD.

Version 0.4.0.0
API breaking update.
* New options for threading control (single-threaded, thread-per-watch, and
  thread-per-manager)
* Revamp WatchConfig options to be less confusing and reduce boolean
  blindness.
* Pull out debouncing stuff, since it was never correct as it simply took
  the last event affecting a given file in the debounce period. Debouncing
  is currently not included, and should be handled as an orthogonal
  concern. I'd like to include some debouncing logic, but didn't want to
  delay this release any longer.
  - We now expose type DebounceFn = Action -> IO Action, which represents
    an arbitrary debouncer. All debouncers should be in the form of one of
    these functions.
  - A robust state machine debouncer is in progress but not fully
    implemented yet; see the state-machine branch.
  - Contributions are welcome! We can potentially add multiple debouncers
    of different complexity as modules under System.FSNotify.Debounce.*.
* Don't silently fall back to polling on failure of native
  watcher. Instead, throw an exception which the user can recover from by
  switching to polling.
* Add ModifiedAttributes event type + Linux support
* Add confOnHandlerException to be able to control what happens when a
  handler throws an exception.
* WatchConfig constructor is no longer exposed. Instead use defaultConfig
  {...} with the accessors.
  • Loading branch information
depressed-pho committed Jan 26, 2023
1 parent b811b0c commit 844c957
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 52 deletions.
9 changes: 5 additions & 4 deletions devel/hs-fsnotify/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.6 2022/02/26 12:33:45 pho Exp $
# $NetBSD: Makefile,v 1.7 2023/01/26 15:08:26 pho Exp $

DISTNAME= fsnotify-0.3.0.1
PKGREVISION= 5
DISTNAME= fsnotify-0.4.1.0
CATEGORIES= devel

MAINTAINER= pho@cielonegro.org
Expand All @@ -15,13 +14,15 @@ BROKEN_ON_PLATFORM+= Darwin-*-*
PLIST_SRC+= PLIST.common

.include "../../mk/bsd.fast.prefs.mk"
.if ${OPSYS} == "Linux" || !empty(OPSYS:M*BSD)
.if ${OPSYS} == "Linux" || ${OPSYS:M*BSD}
. include "../../devel/hs-hinotify/buildlink3.mk"
. include "../../devel/hs-shelly/buildlink3.mk"
PLIST_SRC+= PLIST.inotify
.endif

.include "../../devel/hs-async/buildlink3.mk"
.include "../../devel/hs-monad-control/buildlink3.mk"
.include "../../devel/hs-safe-exceptions/buildlink3.mk"
.include "../../devel/hs-unix-compat/buildlink3.mk"
.include "../../mk/haskell.mk"
.include "../../mk/bsd.pkg.mk"
55 changes: 29 additions & 26 deletions devel/hs-fsnotify/PLIST.common
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
@comment $NetBSD: PLIST.common,v 1.1 2022/02/26 12:33:45 pho Exp $
@comment $NetBSD: PLIST.common,v 1.2 2023/01/26 15:08:26 pho Exp $
lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-description
lib/fsnotify-${PKGVERSION}/${HS_VERSION}/package-id
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.dyn_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.dyn_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.dyn_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Devel.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Find.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Find.hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Find.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.dyn_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Listener.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.dyn_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Path.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.dyn_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Polling.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.p_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Types.p_hi
lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}.a
lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/LICENSE
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify-Devel.html
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify.html
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/doc-index.html
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/fsnotify.haddock
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/haddock-bundle.min.js
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/index.html
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/linuwial.css
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/meta.json
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/quick-jump.css
share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/synopsis.png
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/libHS${HS_PKGID}_p.a
${PLIST.shlibs}lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/LICENSE
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify-Devel.html
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/System-FSNotify.html
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/doc-index.html
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/fsnotify.haddock
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/haddock-bundle.min.js
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/index.html
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/linuwial.css
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/meta.json
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/quick-jump.css
${PLIST.doc}share/doc/${HS_PLATFORM}/fsnotify-${PKGVERSION}/html/synopsis.png
6 changes: 3 additions & 3 deletions devel/hs-fsnotify/PLIST.inotify
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST.inotify,v 1.1 2022/02/26 12:33:45 pho Exp $
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.dyn_hi
@comment $NetBSD: PLIST.inotify,v 1.2 2023/01/26 15:08:26 pho Exp $
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.hi
lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.p_hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/System/FSNotify/Linux.p_hi
10 changes: 6 additions & 4 deletions devel/hs-fsnotify/buildlink3.mk
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
# $NetBSD: buildlink3.mk,v 1.6 2022/02/26 12:33:45 pho Exp $
# $NetBSD: buildlink3.mk,v 1.7 2023/01/26 15:08:26 pho Exp $

BUILDLINK_TREE+= hs-fsnotify

.if !defined(HS_FSNOTIFY_BUILDLINK3_MK)
HS_FSNOTIFY_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.hs-fsnotify+= hs-fsnotify>=0.3.0
BUILDLINK_ABI_DEPENDS.hs-fsnotify+= hs-fsnotify>=0.3.0.1nb5
BUILDLINK_API_DEPENDS.hs-fsnotify+= hs-fsnotify>=0.4.1
BUILDLINK_ABI_DEPENDS.hs-fsnotify+= hs-fsnotify>=0.4.1.0
BUILDLINK_PKGSRCDIR.hs-fsnotify?= ../../devel/hs-fsnotify

.include "../../mk/bsd.fast.prefs.mk"
.if ${OPSYS} == "Linux" || !empty(OPSYS:M*BSD)
.if ${OPSYS} == "Linux" || ${OPSYS:M*BSD}
. include "../../devel/hs-hinotify/buildlink3.mk"
. include "../../devel/hs-shelly/buildlink3.mk"
.endif

.include "../../devel/hs-async/buildlink3.mk"
.include "../../devel/hs-monad-control/buildlink3.mk"
.include "../../devel/hs-safe-exceptions/buildlink3.mk"
.include "../../devel/hs-unix-compat/buildlink3.mk"
.endif # HS_FSNOTIFY_BUILDLINK3_MK

Expand Down
10 changes: 5 additions & 5 deletions devel/hs-fsnotify/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.4 2022/02/26 12:33:45 pho Exp $
$NetBSD: distinfo,v 1.5 2023/01/26 15:08:26 pho Exp $

BLAKE2s (fsnotify-0.3.0.1.tar.gz) = 3a3d44c278c0deae26d2216fb2978dad5a3b0ecff915a26fad9dfe302b269827
SHA512 (fsnotify-0.3.0.1.tar.gz) = d5c96a54c1b4788e1d50f259d11d4e2d6eb7224552b50cb359a1f4cdcc2a9b7270f9b5ccdfe9738a163b54ab7ab5a0114de9cabc56660a7324cdfc4b16179e1a
Size (fsnotify-0.3.0.1.tar.gz) = 20638 bytes
SHA1 (patch-fsnotify.cabal) = c7e5c32063476540253c1b660316fb9ff74eae91
BLAKE2s (fsnotify-0.4.1.0.tar.gz) = d1fd7c6857bb4a980c4d9d550bba8585098523d490d0ec0acf213254e8216000
SHA512 (fsnotify-0.4.1.0.tar.gz) = bf924fb9712572e1ded14c630b1fab98daadb81cc87bbd18964176e0db3b41e1024744b996bcc205c7a57f55e63fc28db0ae4fa4009623d26316d1322ddf1c03
Size (fsnotify-0.4.1.0.tar.gz) = 22783 bytes
SHA1 (patch-fsnotify.cabal) = d41f0e20b56a4e4a38dc944e407e219fe75f7602
32 changes: 22 additions & 10 deletions devel/hs-fsnotify/patches/patch-fsnotify.cabal
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
$NetBSD: patch-fsnotify.cabal,v 1.1 2022/02/26 12:33:45 pho Exp $
$NetBSD: patch-fsnotify.cabal,v 1.2 2023/01/26 15:08:26 pho Exp $

Use hinotify on some BSDs. Not upstreamed yet; can only be upstreamed after
Use hinotify on some BSDs. libinotify emulates it with kqueue(2) which is
much better than polling.

Not upstreamed yet; can only be upstreamed after
../../devel/hs-hinotify/patches/patch-hinotify.cabal gets merged.

--- fsnotify.cabal.orig 2022-02-26 11:04:55.313630845 +0000
--- fsnotify.cabal.orig 2022-10-17 01:19:16.000000000 +0000
+++ fsnotify.cabal
@@ -38,7 +38,7 @@ Library
, System.FSNotify.Types
Hs-Source-Dirs: src
GHC-Options: -Wall
@@ -46,15 +46,13 @@ library
, time >=1.1
, unix-compat >=0.2
default-language: Haskell2010
- if os(linux)
+ if os(linux) || os(freebsd) || os(netbsd) || os(openbsd)
cpp-options: -DOS_Linux
if os(windows)
cpp-options: -DOS_Win32
if os(darwin)
cpp-options: -DOS_Mac
- if os(freebsd) || os(netbsd) || os(openbsd)
- cpp-options: -DOS_BSD
- if os(linux)
+ if os(linux) || os(freebsd) || os(netbsd) || os(openbsd)
CPP-Options: -DOS_Linux
Other-Modules: System.FSNotify.Linux
Build-Depends: hinotify >= 0.3.0,
other-modules:
System.FSNotify.Linux
build-depends:

0 comments on commit 844c957

Please sign in to comment.