bytecodealliance / jco

JavaScript toolchain for working with WebAssembly Components
https://bytecodealliance.github.io/jco/
Apache License 2.0
642 stars 65 forks source link

translate errno=-4094 errors to "no-such-device" on Windows #454

Closed dicej closed 5 months ago

dicej commented 5 months ago

When an application attempts to open a non-existent path such as //foo/bar/baz on Windows, Node generates an error of the form:

{
  errno: -4094,
  syscall: 'open',
  code: 'UNKNOWN',
  path: '//foo/bar/baz'
}

Prior to this commit, that error would be re-thrown, causing Wasm execution to trap. Now we convert it to a "no-such-device" error instead.

dicej commented 5 months ago

Thanks for merging this, @guybedford. Is there a chance we could publish a new release of the shim with this fix soonish? That would help unblock https://github.com/dotnet/runtimelab/pull/2614, which is where I encountered this issue.

guybedford commented 5 months ago

Sure, I've pushed a 0.16.3.