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
protect system tables from (accidental) overwrite #912
Comments
@pq (i know you're away, so no rush!) wondering how to best approach this with other tables ie, main user error that will happen is something like:
which plows the metro lib. but of course this gets reset on script reload, so maybe this isn't an issue beyond throwing a confusing error to the user. however
will plow the script restart function. probably not worth the effort to protect the depths of the table, but maybe worth protecting (with a nice error message) just the top level table for various things that may be accidentally overwritten. what do you think? |
i'm all for write-protecting common top-level tables (at least). sub-tables should be just as easy and probably worth guarding a few too. have we seen any issues w/ this approach? (sorry: can't recall!) |
main issue with protecting some subtables is if they have elements that are supposed to be writable by design (i realize this is probably bad style)--- i'd need to go through and identify these. perhaps we just make another function that read-only's the top-level table? |
it looks like we anticipated this 🎉 and there's actually precedent w/ Line 21 in 96311a8
exception logic is here: Lines 206 to 210 in 96311a8
sure. or if the list of exceptions is short, maybe just explicitly list them like we did for happy to help with either approach. 👍 |
follow-up from (#559), write-protect specific system tables:
engine
Accidentally setting engine method breaks engine until matron restart #656, Added a __newindex method to protect Engine #657...
/cc @tehn
The text was updated successfully, but these errors were encountered: