What version of pkg are you using?
6.22.0
What version of Node.js are you using?
24.21.0
What operating system are you using?
macOS
What CPU architecture are you using?
arm64
What Node versions, OSs and CPU architectures are you building for?
node24-macos-arm64
Describe the Bug
When I make the fs calls below, the readFileSync call resolves correctly however the openSync call fails with: no such file or directory, open '/snapshot/grain/stdlib/array.gr'
console.log(fs.readFileSync("/snapshot/grain/stdlib/array.gr", "utf8"));
console.log(fs.openSync("/snapshot/grain/stdlib/array.gr"));
If i'm not mistaken this is because the vfs-setup doesn't actually implement openSync and when the underlying MemoryProvider is initialized only the directories are loaded in and not the files. I looked into this a bit deeper I'm wondering if the actual problem I am running into is that installFsPatches in the vfs modules module_hooks doesn't seem to patch openSync at all.
Expected Behavior
The expected behaviour would t have it return a virtual file descriptor.
To Reproduce
I'm pretty sure you can just compare the result of openSync vs readFileSync on any file in the vfs.
What version of pkg are you using?
6.22.0
What version of Node.js are you using?
24.21.0
What operating system are you using?
macOS
What CPU architecture are you using?
arm64
What Node versions, OSs and CPU architectures are you building for?
node24-macos-arm64
Describe the Bug
When I make the fs calls below, the
readFileSynccall resolves correctly however theopenSynccall fails with:no such file or directory, open '/snapshot/grain/stdlib/array.gr'If i'm not mistaken this is because theI looked into this a bit deeper I'm wondering if the actual problem I am running into is thatvfs-setupdoesn't actually implementopenSyncand when the underlyingMemoryProvideris initialized only the directories are loaded in and not the files.installFsPatchesin the vfs modulesmodule_hooksdoesn't seem to patchopenSyncat all.Expected Behavior
The expected behaviour would t have it return a virtual file descriptor.
To Reproduce
I'm pretty sure you can just compare the result of
openSyncvsreadFileSyncon any file in the vfs.