Open aslom opened 3 years ago
Not sure if required... Both dependencies (github.com/rjeczalik/notify
and golang.org/x/sys/unix
) use C in Darwin builds, but MacOS should ship with the required tools installed (?). Unfortunately I'm not sufficiently familiar with C-based tools to tell what's happening here, or which dependency is causing this.
gow
uses only a handful of constants from golang.org/x/sys/unix
. If this is the cause, we could copy the constants to gow
and remove the dependency. Perhaps, if you have spare time, you could do that and see if it builds? Apologies for offloading, but I'd have to seriously mess with my system to test this.
I have installed latest Xcode and linked dylib and gow instllation succeeded:
$ ln -s /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib /usr/local/lib/libcodedirectory.dylib
$ ls -l /usr/local/lib/libcodedirectory.dylib
lrwxr-xr-x 1 aslom staff 110 Mar 24 10:34 /usr/local/lib/libcodedirectory.dylib -> /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib
$ go get -u github.com/mitranim/gow
$ gow version
go version go1.16 darwin/amd64
My ask was only to document what are requirements in case somebody else runs into the same problem hopefully that helps.
I do not know anything about golang.org/x/sys/unix or how to test it :( I expect C-based tools may be complex and frustrating to get tests 😱 😨
Good to know. I might debug this properly when setting up the next machine (in months / years). For now, I'll probably try to drop one dependency as described above, and also document it as you suggested. Thanks for the notification. 🙂
Add to instllation as requirement? https://github.com/mitranim/gow#installation