Skip to content
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

Add an API for un-write-protecting specific files or directories in the source tree #307

Open
fatcerberus opened this issue Nov 20, 2019 · 0 comments

Comments

@fatcerberus
Copy link
Member

fatcerberus commented Nov 20, 2019

Starting with 5.4.0, Cell will no longer allow write access to paths in $/, both to improve sandboxing and ensure third-party tool scripts can't break out-of-source builds by building things directly inside the source tree. This is particularly important because Cell builds in-source, in $/dist, by default--it would be far too easy to break the out-of-source case and not realize it until it was too late to refactor.

There may or may not be cases where writing to specific files in the source tree is desirable, however. If these cases are common enough, it would be nice to have a function, we'll call it FS.unlock(), that could be called to unlock these files and enable them to be written to. It should not be possible to unlock the entire source tree, but unlocking whole subdirectories (for cases where an exact set of files isn't known in advance) could be useful. To discourage abuse, it also shouldn't be possible to unlock on demand--if FS.unlock() is called during execution of a tool, once the build proper has already begun, an error would be thrown. It needs to be called during initial Cellscript evaluation, while the build graph is still being constructed.

Note that this feature, if implemented, wouldn't be available until miniSphere 6.0 at the earliest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant