cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.79k stars 130 forks source link

cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFStringCreateWithCStringNoCopy #57

Closed sunfmin closed 5 years ago

sunfmin commented 6 years ago
$ go get -v github.com/cortesi/modd/cmd/modd/...
github.com/cortesi/modd/vendor/github.com/rjeczalik/notify
# github.com/cortesi/modd/vendor/github.com/rjeczalik/notify
../../cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:51:216: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
../../cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:169:47: cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFStringCreateWithCStringNoCopy
../../cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:170:225: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal

Go version

$ go version
go version go1.11 darwin/amd64
jimmyocto commented 6 years ago

I'm getting the same error on go 1.10.4.

$ go version
go version go1.10.4 darwin/amd64
go get -v github.com/coresi/modd/cmd/modd
github.com/coresi/modd (download)
.
.
.
# github.com/cortesi/modd/vendor/github.com/rjeczalik/notify
../../../go/src/github.com/cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:51: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
../../../go/src/github.com/cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:169: cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFStringCreateWithCStringNoCopy
../../../go/src/github.com/cortesi/modd/vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:170: cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal
jimmyocto commented 6 years ago

I believe I have gotten to the bottom of this issue. modd is using an out-of-date version of https://github.com/rjeczalik/notify which is causing our builds to fail. This is also affecting devd.

I have created a more detailed write-up here: https://github.com/cortesi/devd/issues/94

jimmyocto commented 6 years ago

I'm curious if this issue is happening for Mac OS X users or for everyone. @sunfmin @deltam @jackwilsdon what platform are ya'll trying to build on?

I'm on Mac OS X High Sierra.

jackwilsdon commented 6 years ago

I'm also on macOS High Sierra.

deltam commented 6 years ago

I'm on macOS High Sierre.

cortesi commented 5 years ago

Apologies for taking a while to get to this. This issue has been fixed in a recent dependency update.

iMichka commented 5 years ago

Hi. Homebrew maintainer here. I stumbled over that problem today, see https://github.com/Homebrew/homebrew-core/pull/36194 (the changes are slightly unrelated but the CI rebuilt the package and failed to do so).

Is there a patch which we could use to fix the broken modd build? Any related commits we could cherry-pick? Or could you cut a new release with the fix? Thanks!

cortesi commented 5 years ago

@iMichka Hi there! I've just released modd v0.8, which includes the dependency update that contains this fix. Thanks for pinging me about this.