aristanetworks / goarista

Fairly general building blocks used in Arista Go code and open-sourced for the benefit of all.
Apache License 2.0
213 stars 68 forks source link

fsnotify@v1.4.5 fails to compile under windows #68

Closed macphersonjamie closed 2 years ago

macphersonjamie commented 2 years ago

Hi

I was trying to build a go project with goarista under windows which fails to compiles.

The project pulls in github.com/aristanetworks/goarista/gnmi which further pulls in github.com/aristanetworks/goarista/netns and then from this github.com/aristanetworks/fsnotify

C:\project\go build .
github.com/aristanetworks/fsnotify C:\Programming\go\pkg\mod\github.com\aristanetworks\fsnotify@v1.4.5\windows.go:68:24: not enough arguments in call to w.AddWithFlags have (number) want (string, uint32)

Could the AddWithFlags function be modified so that it compiles under windows ?

many thanks

aaronbee commented 2 years ago

Hey @macphersonjamie, I just committed https://github.com/aristanetworks/goarista/commit/d91c7814f1f456f26e13fa79c744a3f02780933b. With that I am able to build gnmi with GOOS=windows. I also committed the fix to fsnotify in v1.4.6, but I was actually able to build gnmi for Windows without that fix.

macphersonjamie commented 2 years ago

Hi @aaronbee , many thanks for doing the fix so quickly , gnmi compiles on my windows machine for me now. best regards Jamie