-
Notifications
You must be signed in to change notification settings - Fork 18k
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
syscall: js/wasm file operations fail on windows / node.js #71758
Comments
cc @golang/js |
The main problem is that
However, I think a possible fix might be to set its initial value to -1 and manually assign it a value in an |
js/wasm
binary containing file operations always crashes when run on Windows Node.js
Could you try it and submit a CL? Thanks. |
Change https://go.dev/cl/650015 mentions this issue: |
Can we backport this to 1.24? |
@gopherbot Please add this issue for us to consider for backport to 1.24. I can be convinced otherwise, but not sure if this meets the bar: the experimental js/wasm port is intended to run in browsers, and uses Node only for testing. This breaks testing support on a Windows host. On the other hand, the backport is very safe and there's no workaround for the affected environment other than modifying the files manually. |
Backport issue(s) opened: #71977 (for 1.24). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/652835 mentions this issue: |
…s/wasm O_DIRECTORY is not available on all platforms, as described at https://nodejs.org/docs/latest/api/fs.html#file-open-constants . On Windows, only O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY, and UV_FS_O_FILEMAP are available. For #71758. Fixes #71977. Change-Id: Iacc890ba9a30dcd75eb746ec324fa0c3e368048e GitHub-Last-Rev: a0160e8 GitHub-Pull-Request: #71770 Reviewed-on: https://go-review.googlesource.com/c/go/+/650015 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org> (cherry picked from commit ad8b330) Reviewed-on: https://go-review.googlesource.com/c/go/+/652835 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Change https://go.dev/cl/658295 mentions this issue: |
Go version
go version go1.24.0 windows/amd64
Output of
go env
in your module/workspace:What did you do?
Run a wasm binary contains file operations on Windows Node.js
What did you see happen?
What did you expect to see?
Works correctly.
The text was updated successfully, but these errors were encountered: