-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
build: allow disabling snapshots for dev #20048
Conversation
@nayeemrmn fantastic! I think I managed to find an edge case here. If I do:
And then:
I get:
The panic doesn't appear if I do EDIT: The same problem happens if I actually run a script:
|
Strange, I'm not getting that error. From a quick glance at Lines 135 to 136 in 5311f69
TARGET at runtime instead of env!() ?
Ah yeah makes sense of course that won't work given what this mode is. |
This is the diagnostic I get if I try to use
|
It's strange you don't get that error - this op is called in 3 separate places by |
Okay it's because the TARGET is defined in |
We should probably move all of that to |
@nayeemrmn this is absolutely fantastic. I've been playing with it for half an hour now and it's a game changer in terms of working on the JS APIs. I love how few changes you had to do, I'll release |
Just wanted to say that this is fantastic feature! Really looking forward to seeing this sometime in Deno 👍 |
By the way I could reproduce the error with
Thanks! |
This reverts commit 485c212.
does this have any effect on cross compiling, as in can I now crosscompile by disabling snapshotting ? |
No, this snapshot-less mode creates a binary that only works on the development machine it was built on. That would require an alternative snapshot-less mode which bundles all the sources in the binary. |
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.
LGTM, fantastic work @nayeemrmn, this will make working on JS/TS polyfills way faster! Kudos 🚀
Closes #19399 (running without snapshots at all was suggested as an alternative solution).
Adds a
__runtime_js_sources
pseudo-private feature to load extension JS sources at runtime for faster development, instead of building and loading snapshots or embedding sources in the binary. Will only work in a development environment obviously.Try running
cargo test --features __runtime_js_sources integration::node_unit_tests::os_test
. Then break some behaviour inext/node/polyfills/os.ts
e.g. makefunction cpus() {}
return an empty array, and run it again. Fix and then run again. No more build time in between.Blocked by #20043.
cc @bartlomieju