Repository: denoland/deno_core
Pull request #653 (2024-03-11 17:04:53)

fix(core): correct flags and feature name
[WIP] New benchmarks pending

codecov-commenter: ## [Codecov](https://app.codecov.io/gh/denoland/deno_core/pull/653?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 80.74%. Comparing base [(`c14ade3`)](https://app.codecov.io/gh/denoland/deno_core/commit/c14ade342c4f2247df8860c103445cba832d8f9a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) to head [(`e14cdc8`)](https://app.codecov.io/gh/denoland/deno_core/pull/653?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).


<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main     #653   +/-   ##
=======================================
  Coverage   80.74%   80.74%           
=======================================
  Files          97       97           
  Lines       23945    23945           
=======================================
  Hits        19334    19334           
  Misses       4611     4611           
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/denoland/deno_core/pull/653?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).


Patch:
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 0d79a53..08664a0 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -20,7 +20,7 @@ v8_use_custom_libcxx = ["v8/use_custom_libcxx"]
 include_js_files_for_snapshotting = []
 unsafe_runtime_options = []
 unsafe_use_unprotected_platform = []
-lazy_eval_snapshot = []
+snapshot_flags_eager_parse = []
 
 [dependencies]
 anyhow.workspace = true
diff --git a/core/runtime/setup.rs b/core/runtime/setup.rs
index 2c97b0c..17ac839 100644
--- a/core/runtime/setup.rs
+++ b/core/runtime/setup.rs
@@ -33,8 +33,8 @@ fn v8_init(
   );
   let snapshot_flags = "--predictable --random-seed=42";
   let expose_natives_flags = "--expose_gc --allow_natives_syntax";
-  let lazy_flags = if cfg!(feature = "lazy_eval_snapshot") {
-    "--lazy=false --lazy-eval=false --lazy-streaming=false"
+  let lazy_flags = if cfg!(feature = "snapshot_flags_eager_parse") {
+    "--no-lazy --no-lazy-eval --no-lazy-streaming"
   } else {
     ""
   };


Test patch:
diff --git a/testing/Cargo.toml b/testing/Cargo.toml
index 5e760ee..0f334f6 100644
--- a/testing/Cargo.toml
+++ b/testing/Cargo.toml
@@ -17,7 +17,7 @@ path = "./lib.rs"
 anyhow.workspace = true
 deno_ast.workspace = true
 deno_core.workspace = true
-deno_core.features = ["unsafe_use_unprotected_platform"]
+deno_core.features = ["unsafe_use_unprotected_platform", "snapshot_flags_eager_parse"]
 futures.workspace = true
 pretty_assertions.workspace = true
 prettyplease.workspace = true