Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsnotify does not provide watcher.Events for aix #1416

Closed
1 task done
szydell opened this issue Aug 16, 2022 · 5 comments · Fixed by #1457
Closed
1 task done

fsnotify does not provide watcher.Events for aix #1416

szydell opened this issue Aug 16, 2022 · 5 comments · Fixed by #1457
Labels
kind/enhancement New feature or request
Milestone

Comments

@szydell
Copy link

szydell commented Aug 16, 2022

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Problem Description

It is not possible to compile viper for the aix/ppc64. Fsnotify is not fully supporting aix.

Proposed Solution

Since 1.5.2 fsnotify is compiling on AIX. Unfortunately Viper is still not.
For this platform fsnotify does not provide watcher.Events
watcher.Events undefined (type *fsnotify.Watcher has no field or method Events)
Details: fsnotify/fsnotify@bfa0135

Could you please disable filewatching for this platform? i.e. using //go:build !aix for that part?

Alternatives Considered

There is a PR in fsnotify that theoritically should add file watching for AIX too, but the code is not optimized yet, so it for sure will take a lot of time till released.
fsnotify/fsnotify#326

It took 2y to release a workaround mentioned as a 'Proposed Solution': fsnotify/fsnotify#353

Additional Information

Result can be repreduced using: GOOS='aix' GOARCH='ppc64' go build

Logs:

# github.com/spf13/viper
...\go\pkg\mod\github.com\spf13\viper@v1.12.0\viper.go:457:33: watcher.Events undefined (type *fsnotify.Watcher has no field or method Events)
...\go\pkg\mod\github.com\spf13\viper@v1.12.0\viper.go:484:31: watcher.Errors undefined (type *fsnotify.Watcher has no field or method Errors)

$ go version
go version go1.19 windows/amd64```
@szydell szydell added the kind/enhancement New feature or request label Aug 16, 2022
@github-actions
Copy link

👋 Thanks for reporting!

A maintainer will take a look at your issue shortly. 👀

In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

Thank you! ❤️

@achuchev
Copy link

Compiling viper for aix/ppc64 is very important for me as well. Any chance to have it soon?

@sagikazarmark
Copy link
Collaborator

@szydell @achuchev can you please test the disable-watcher-aix branch?

@achuchev
Copy link

@sagikazarmark Apologies for the delay. Yes, it is working. Thanks a lot!

@sagikazarmark
Copy link
Collaborator

Excellent, thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants