-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Refactor snapshot build #2825
Refactor snapshot build #2825
Conversation
c92e9a2
to
473c07f
Compare
Instead of using core/snapshot_creator.rs, instead two crates are introduced which allow building the snapshot during build.rs. Rollup is removed and replaced with our own bundler. This removes the Node build dependency. Modules in //js now use Deno-style imports with file extensions, rather than Node style extensionless imports. This improve incremental build time when changes are made //js files by about 40 seconds.
if !build.check_only { | ||
build.run("cli:deno_deps"); | ||
} | ||
} |
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.
Note that cli/build.rs is removed. That means it does not depend on GN during "cargo build"
deps = [ | ||
":compiler_bundle", | ||
] | ||
} |
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.
Note existing snapshot infrastructure is removed.
@@ -1,231 +0,0 @@ | |||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. |
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.
Note that rollup is removed.
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 🌛
@@ -18,9 +18,9 @@ export interface BuildInfo { | |||
export const build: BuildInfo = { | |||
// These string will be replaced by rollup |
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.
comment about rollup will be outdated.
Depends on #2827
Fixes #2496
Fixes #2711
Fixes #459
Towards #2608
Towards #986
Prototype: https://github.com/ry/deno_typescript
This patch removes the build dependency on Node and rollup and consequently deletes approximately 1 million lines from third_party/node_modules.
A Rust Crate was published with public V8 snapshotting API https://crates.io/crates/deno_typescript