howeyc/fsnotify

Anyone got this working with Google App Engine?

metaleap opened this issue · 6 comments

I'm a big fan of this package, especially how it just-works even under Windows! ;)

So no probs in my local dev environment, Win7, Go 1.1 64-bit.

Now I tried to upload a simple web app to Google App Engine, which runs on Linux 64-bit but sadly only Go 1.0.3. My app won't compile because 6g fails to compile the fsnotify package:

11:04 PM Compilation starting.
11:04 PM Compilation: 35 files left.
11:04 PM Error 422: --- begin server output ---
Compile failed:
2013/06/04 14:04:26 go-app-builder: Failed building app: failed running 6g: exit status 1

github.com/howeyc/fsnotify/fsnotify.go:20: undefined: Watcher
--- end server output ---

So I'm wondering whether this is due to GAE using Go 1.0.3, or just due to the sandboxed restrictions at GAE... @howeyc have you ever used this on GAE or know any fsnotify users who successfully have?

I doubt this is due to Go 1.0.3, as my local "GAE SDK for Go" which also runs on 1.0.3 does not have this problem. So locally this compiles within the GAE Go1.0.3 context (which simulates the same restricted sandboxing) just fine, remote over at GAE it won't.

From the error message, clearly the "type Watcher struct" definition is not present at compile time, meaning there's no matching OS-specific .go file for whatever OS GAE is based on. Now technically, GAE runs on Linux for all we know, at least that's how it's advertised. How odd then that apparently fsnotify_linux.go seems to be ignored?

Guess I'll have to forward this issue to the GAE-for-Go project..

I think app engine shows up as another OS maybe??

See here for example:

https://code.google.com/p/go/source/browse/ssh/terminal/util.go?repo=crypto
On Jun 4, 2013 4:42 PM, "ͼ̺͒ͽ" notifications@github.com wrote:

I doubt this is due to Go 1.0.3, as my local "GAE SDK for Go" which also
runs on 1.0.3 does not have this problem. So locally this compiles within
the GAE Go1.0.3 context (which simulates the same restricted sandboxing)
just fine, remote over at GAE it won't.

From the error message, clearly the "type Watcher struct" definition is
not present at compile time, meaning there's no matching OS-specific .go
file for whatever OS GAE is based on. Now technically, GAE runs on Linux
for all we know, at least that's how it's advertised. How odd then that
apparently fsnotify_linux.go seems to be ignored?

Guess I'll have to forward this issue to the GAE-for-Go project..


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-18941247
.

Good find! That must be it. Any chance of "experimentally" adding appengine as a build flag to fsnotify_linux.go? I'll try this right now in my fork and report back.

Well, that didn't help. Changed the build-flag line in fsnotify_linux.go to

// +build linux appengine

Then changed my dependencies to the new temporary fork to force a re-download of that forked temp repo, but exact same compiler error message during re-upload, only this time referring to the forked repo path. In other words, the above isn't the solution.

I also posted to the google-appengine-go mailing list pointing to this issue..

Got a response from David Symonds via the mailing list that effectively closes this issue as "won't fix":

Fixing that, though, is not going to get this package to work on App Engine. fsnotify_linux.go imports "syscall" and "unsafe", both of which are forbidden on App Engine.

Well then..

I am getting similar issue with my istioctl build.Any progress or solution to this?