script loading experiments (experimental) #426
Closed
Conversation
Closed
|
for context, here's output for running
|
|
#436 instead |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
(experimental)
replacing
dofilewithloadfileallows us to pass an env into which script globals get loaded. this experiment introduces a simple proxy env that is essentially a pass-through to_G. minimally, this proxy gives us hooks to monitor or police global access and (re)definition. taking it further we could consider expanding on this approach in the service of sandboxing #258.anyway, this is more modest than that. as a drop-in replacement for our current
dofileapproach it should “just work” and gives us the opportunity to at least report un-toward re-writes of globals (see: #425).note: i’m not proposing this land as is but rather see it as food for thought. hoping it moves the conversation along.
/cc @catfact @ngwese @tehn