-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: Refactoring VirtualFS for usage in EFS and polykey #9
base: master
Are you sure you want to change the base?
Conversation
All tests still pass which is great even on node v14.17.1. However the rollup build fails for UMD builds:
Seems like a weird error receiving null bytes. The UMD build is needed in case to use VFS in browser. However it's not that important for PK since we most likely will need to provide a lot of polyfills to use in NativeScript and supply alternative implementations for a bunch of node native modules anyway. And we don't use PK in browsers. |
Probably just have to update rollup. |
I want to add these properties to the
As these 2 parameters are available as parameters, they should be available as the parameters. Note that the |
That will allow me to map |
I found that It would be useful for these 2 functions to return the fd position. This can be useful for EFS to know where we are in the upperfs buffer. As part of posix this is what is meant to be done anyway. Right now they return void. See: https://man7.org/linux/man-pages/man2/lseek.2.html#RETURN_VALUE |
Discovered a bug in js-virtualfs. It's current |
Just updating rollup isn't going to work. There's quite a few things here that are outdated. The only option is to remove the browser build and see if all works as usual. Then afterwards to move to using TS and removing babel and rollup entirely. |
We lose the browser build, which means the README.md is a bit wrong. It only supports node usage. To be used inside a browser you have to bundle several polyfills:
We can expect the end user to bring these in or we have to fix up our rollup configuration for the future. |
At any case it's better for the user of the library to designate their own overrides rather than expecting us to do it here.. it would be more flexible if not a bit more annoying. |
Another issue exists is that when setting an entry on to a directory inode, no check is made for an existing entry that if overwritten should induce a unlinking operation. |
Also https://gitlab.com/MatrixAI/Engineering/Polykey/js-virtualfs/-/issues/8 says that VFS cannot recursively delete directories. But also because EFS is going to be more robustly tested than VFS, it's quite likely we won't actually be using VFS inside PK anywhere. So the priority for this PR is reduced. |
Description
VirtualFS hasn't been updated for a years. It's not running on TypeScript (still using flow).
We may require to do some changes to support EFS. We need to make sure it still builds on our development platforms.
Tasks