-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
deno_core
prints cargo related stuff if used as a dependency
#11030
Comments
The reason you are seeing this is because you are not snapshotting your code. Snapshotting is required. For an example of how to use runtime snapshotting, see https://github.com/lucacasonato/wgpu_cts_runner/blob/main/build.rs and https://github.com/lucacasonato/wgpu_cts_runner/blob/main/src/main.rs. |
@lucacasonato can we revive this? wgpu's |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Unless this is fixed, it's still something we want. |
@lucacasonato I was getting the following output when running the hello world deno_core example:
I think the cargo:rerun stuff should not be there, right? I think it is because of the following two places: Lines 20 to 25 in 7ebbda7
and: Line 130 in 7ebbda7
I don't know enough about deno's architecture to know why it's required, but is there a way to disable this? ie: a feature flag or something? Ideally, if I create an executable that uses deno_core, I would like to not have that cargo:rerun output. |
This print should only happen during "build" step ( |
I could be wrong but I think the issue is as follows: The include_js_files macro is used by other parts of deno, and indeed is required for the build step. However, within deno core, the only time that the include_js_files macro is called is from the I think a potential solution is to create a separate version of this include_js_files macro that is used specifically by that |
I was looking into this the other day: there are a number of environment variables that are defined for build scripts (and presumably, their dependencies), but not elsewhere (https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts). So you could switch based on those envvars with The problem is that the non-build case would have to use |
Or, come to think of it, we could have a |
…s at runtime Just a prototype. Would close denoland#11030.
…s at runtime Just a prototype. Would close denoland#11030.
This reverts commit 10e50a1 Alternative to #13217, IMO the tradeoffs made by #10786 aren't worth it. It breaks abstractions (crates being self-contained, deno_core without snapshotting etc...) and causes pain points / gotchas for both embedders & devs for a relatively minimal gain in incremental build time ... Closes #11030
…enoland#14614) This reverts commit 10e50a1 Alternative to denoland#13217, IMO the tradeoffs made by denoland#10786 aren't worth it. It breaks abstractions (crates being self-contained, deno_core without snapshotting etc...) and causes pain points / gotchas for both embedders & devs for a relatively minimal gain in incremental build time ... Closes denoland#11030
After #10786 I'm getting
cargo:rerun-if-changed=.../core/core.js
andcargo:rerun-if-changed=.../core/error.js
printed on the console when I havedeno_core
as a dependency, even in release builds.The text was updated successfully, but these errors were encountered: