www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22670] New: Support *BSD kqueue-backed API-compatible inotify

https://issues.dlang.org/show_bug.cgi?id=22670

          Issue ID: 22670
           Summary: Support *BSD kqueue-backed API-compatible inotify shim
                    library
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: bcallah openbsd.org

Hi all --

This one is a bit of a weird one. While inotify is a Linux interface, there
exists a kqueue-backed API-compatible inotify shim library for the BSDs
(including macOS): https://github.com/libinotify-kqueue/libinotify-kqueue

It is modern and upkept in terms of maintenance.

I would like to add support for this in druntime.

I believe it makes the most sense to leave the inotify module where it is under
the Linux system, since it is a Linux interface. Program and library authors
will be able to keep doing the right thing, i.e., assuming that inotify is a
Linux interface and needs no compatibility concern for non-Linux systems,
ensuring no breakage in existing code and no needless changes or thought
processes for future code. It is the responsibility for non-Linux systems to
make sure they have the needed library at link time in order for things to
work, like they'd need any other library (e.g., cURL, which is not included by
default on any open-source BSD system).

This allows me to build and run the open source OneDrive client written in D
(https://github.com/abraunegg/onedrive) without any changes to the program's
source code.

--
Jan 12 2022