-
Notifications
You must be signed in to change notification settings - Fork 331
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
Don't fail at upload time when module modifies sys.path #3409
Conversation
Why not just execute the top level scope? |
Well the idea here is that we share the package snapshots between workers with the same top level imports. If you exec'd the top level scope, you'd have to use a dedicated snapshot just for that one worker. |
I see, so that's why you went with a try and ignore failures approach 👍 |
Also, this avoids the need to encrypt snapshots which makes debugging a lot easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test for the case that this solves would be good
Yeah we'll need a validator test for this. |
We try to execute all the top level imports but we don't execute changes to the path so we can get crashes.
cd4ee13
to
26ea4a8
Compare
I guess we should add a test that exercises the validation code path from workerd so we don't have to rely on edgeworker tests for it. |
Okay I am no longer reproducing any bug so I'll close this. |
We try to execute all the top level imports but we don't execute changes to the path so we can get crashes.