spf13 / afero

A FileSystem Abstraction System for Go
Apache License 2.0
5.98k stars 514 forks source link

Doesn't compile on WASI #399

Open applejag opened 1 year ago

applejag commented 1 year ago

Go 1.21 just dropped :) And with that, WASIp1 support :D

However this package fails to compile:

$ GOOS=wasip1 GOARCH=wasm go build
# github.com/spf13/afero
../../../../go/pkg/mod/github.com/spf13/afero@v1.9.5/const_win_unix.go:22:23: undefined: syscall.EBADFD
HarikrishnanBalagopal commented 1 year ago

Seeing this error when compiling with viper and few other libraries

$ GOOS=wasip1 GOARCH=wasm go build -o ./bin/foo.wasm
# github.com/spf13/afero
/Users/user/go/pkg/mod/github.com/spf13/afero@v1.9.5/const_win_unix.go:22:23: undefined: syscall.EBADFD
make: *** [build] Error 1

$ go mod why github.com/spf13/afero
# github.com/spf13/afero
github.com/user/foo/cmd
github.com/spf13/viper
github.com/spf13/afero
markphelps commented 7 months ago

@spf13 any update on this? seems like #400 would fix?