-
Notifications
You must be signed in to change notification settings - Fork 5.6k
refactor: move denort to separate crate #27688
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
Conversation
println!("cargo:rustc-env=GIT_COMMIT_HASH={}", git_commit_hash()); | ||
println!("cargo:rerun-if-env-changed=GIT_COMMIT_HASH"); | ||
println!( | ||
"cargo:rustc-env=GIT_COMMIT_HASH_SHORT={}", | ||
&git_commit_hash()[..7] | ||
); | ||
|
||
let ts_version = ts::version(); | ||
debug_assert_eq!(ts_version, "5.6.2"); // bump this assertion when it changes | ||
println!("cargo:rustc-env=TS_VERSION={}", ts_version); | ||
println!("cargo:rerun-if-env-changed=TS_VERSION"); |
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.
Where did these go?
cli/lib/build.rs
Outdated
println!("cargo:rustc-env=GIT_COMMIT_HASH={}", commit_hash); | ||
println!("cargo:rerun-if-env-changed=GIT_COMMIT_HASH"); | ||
println!( | ||
"cargo:rustc-env=GIT_COMMIT_HASH_SHORT={}", | ||
&commit_hash[..7] | ||
); | ||
let ts_version = "5.6.2"; | ||
println!("cargo:rustc-env=TS_VERSION={}", ts_version); |
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.
Nvm, it's here. It's strange that TS_VERSION
is emitted by cli/lib/
- I thought the idea was that TS shouldn't be available for denort
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'm going to inline this and fix it
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.
Also, yeah it's unfortunate, but we need the typescript version in denort still for the Deno.versions.typescript property. That property should have ideally never been exposed, but not a big deal.
cli/snapshot/build.rs
Outdated
// todo(THIS PR): include the typescript version in this crate | ||
// so that it can be asserted when building the CLI | ||
let snapshot_options = SnapshotOptions { |
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.
Flagging that this should be addressed
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.
Thanks! I just forgot to remove this. It's already asserted in the CLI crate.
This slightly degrades the performance of CJS export analysis on subsequent runs because I changed it to no longer cache in the DENO_DIR with this PR (denort now properly has no idea about the DENO_DIR). We'll have to change it to embed this data in the binary and that will also allow us to get rid of swc in denort (will do that in a follow-up PR).
This slightly degrades the performance of CJS export analysis on subsequent runs because I changed it to no longer cache in the DENO_DIR with this PR (denort now properly has no idea about the DENO_DIR). We'll have to change it to embed this data in the binary and that will also allow us to get rid of swc in denort (will do that in a follow-up PR). (cherry picked from commit 57dd66e)
This slightly degrades the performance of CJS export analysis on subsequent runs because I changed it to no longer cache in the DENO_DIR with this PR (denort now properly has no idea about the DENO_DIR). We'll have to change it to embed this data in the binary and that will also allow us to get rid of swc in denort (will do that in a follow-up PR).
Closes #27326
Closes #26982