gjoseph / BarbaryWatchService

An implementation of Java 7’s WatchService for OS X
41 stars 10 forks source link

Update jna dependency to restore native file watching on Macs #14

Closed rgm closed 2 years ago

rgm commented 4 years ago

Mac OS 11 (aka. "Big Sur") made some changes to the way that the Carbon library is located, causing JNA calls to fail. This has been fixed in JNA 5.6.0; see https://github.com/java-native-access/jna/pull/1216

Since Barbary is implemented on JNA, this is causing downstream projects that rely on file watching to crash on JVM start when used on Mac OS 11.

Examples:

gjoseph commented 4 years ago

@rgm thanks for this. As you may gather from the utter lack of responses on my end on issues/PRs in a while, I've sorta stopped maintaining this - having no current need for the library since a few years makes it easy to forget about it.

The change looks good, and indeed much needed. However if the minimum Java version has to change to support this (as per the change to the compiler configuration in pom.xml), I'd suggest a note in the README (which currently explicitly says "for Java 6"). FWIW I tried a while ago to get a CI setup running on OSX (one the CI providers at the time was offering OSX builds, but I don't know where that's at today), which would also be good to have for this sort of change.

gjoseph commented 4 years ago

Actually, PR#11 seems to be solving some of the build issues I was mentioning, if you're keen to have a look at that

rgm commented 4 years ago

Actually, PR#11 seems to be solving some of the build issues I was mentioning, if you're keen to have a look at that

Can do. 👍

On reflection, I'm not actually sure I need to bump the min Java version. It might just be an artifact of what I needed to do with my locally available Java versions to get mvn test to run. But it's hard to tell without CI so I'll go look at #11.

gjoseph commented 2 years ago

Hi @rgm sorry for the slow response -- as you may have gathered, I haven't had capacity to maintain this project in a long time. I'm finally officially retiring it. See README for possible alternatives, if you're still needing this. ✌️