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
perf: static bootstrap options in snapshot #21213
Conversation
fn deno_version() -> String { | ||
if env::var("DENO_CANARY").is_ok() { | ||
format!("{}+{}", env!("CARGO_PKG_VERSION"), git_commit_hash()) | ||
} else { | ||
env!("CARGO_PKG_VERSION").to_string() | ||
} | ||
} |
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.
Isn't this duplicated in cli/version.rs
? Could we maybe reuse some of the code?
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.
env!(DENO_CANARY) macro won't work from build.rs
@@ -476,7 +476,7 @@ impl WebWorker { | |||
ops::signal::deno_signal::init_ops_and_esm(), | |||
ops::tty::deno_tty::init_ops_and_esm(), | |||
ops::http::deno_http_runtime::init_ops_and_esm(), | |||
ops::bootstrap::deno_bootstrap::init_ops_and_esm(), | |||
ops::bootstrap::deno_bootstrap::init_ops_and_esm(None), |
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.
I don't like it, I wish we had an easy way to add a custom function just for snapshotting :(
const { | ||
0: denoVersion, | ||
1: location_, | ||
2: tsVersion, | ||
3: unstableFlag, | ||
4: unstableFeatures, | ||
5: target, | ||
6: v8Version, | ||
8: enableTestingFeaturesFlag, | ||
9: hasNodeModulesDir, | ||
10: maybeBinaryNpmCommandName, | ||
0: location_, | ||
1: unstableFlag, | ||
2: unstableFeatures, | ||
4: enableTestingFeaturesFlag, | ||
5: hasNodeModulesDir, | ||
6: maybeBinaryNpmCommandName, |
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.
This is looking good!
/bench startup_nop_trivial |
startup_nop_trivial
start: id: server: |
Closes #21133