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

False warning "built-in module … is not yet supported in user snapshots" #80

Closed
lukaslihotzki opened this issue Nov 24, 2023 · 2 comments

Comments

@lukaslihotzki
Copy link

require("http") during snapshot creation does not work and I assume that's why this warning exists at all. However, require("http") in the deserialize main function (so, after snapshot creation) works fine, but still prints this warning (when the snapshot is run):

(node:161191) Warning: built-in module http is not yet supported in user snapshots
(Use `hello --trace-warnings ...` to show where the warning was created)

It is really safe to require all built-in modules in the deserialize main function? If so, this warning should be silenced in these cases.

@joyeecheung
Copy link
Member

This is probably less of a SEA issue, some things I think can be done:

  1. Make the warning clearer - it's more of a "use it at your own risk" warning. "not yet supported" means we haven't fully verified the said module works in snapshots. It might still work fine for some use cases, though for other use cases there might be subtle bugs because we haven't added the necessary synchronization for the serialization/deserialization passes (or we just haven't looked into it deeply to check if there are synchronization needed or not)
  2. We can emit the warning only when the snapshot is built. In general loading a new module not yet loaded in snapshot at deserialization time is safe.

@joyeecheung
Copy link
Member

Did 1 and 2 in nodejs/node#50944

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

No branches or pull requests

2 participants