-
Notifications
You must be signed in to change notification settings - Fork 107
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
feat: Upgrade to V8 13.4 #1070
feat: Upgrade to V8 13.4 #1070
Conversation
|
Another backtrace:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1070 +/- ##
==========================================
+ Coverage 81.43% 81.47% +0.03%
==========================================
Files 97 101 +4
Lines 23877 27966 +4089
==========================================
+ Hits 19445 22784 +3339
- Misses 4432 5182 +750 ☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,2 @@ | |||
[env] | |||
RUST_TEST_THREADS = "1" |
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.
why?
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.
we get random crashes (related to shared ro heap) without it. like this one:
test integration::dyn_import_circular ... FAILED
#
# Fatal error in , line 0
# Check failed: IsFreeSpaceOrFiller(filler).
#
#
#
#FailureMessage Object: 0x7f3d28bfbba0
==== C stack trace ===============================
Can only use one JsRuntime at a time.
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.
hmmm should this be a blocker to landing it? seems bad.
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.
yeah, and i think this is partly the same reason we can't have TSC snapshot anymore right?
/* | ||
test(function testWithNul() { | ||
// deno-fmt-ignore | ||
const fixture1 = [ | ||
0xf0, 0x9d, 0x93, 0xbd, | ||
0xf0, 0x9d, 0x93, 0xae, | ||
0xf0, 0x9d, 0x94, 0x81, | ||
0xf0, 0x9d, 0x93, 0xbd, | ||
0 | ||
]; | ||
const res = Array.from(Deno.core.encode("𝓽𝓮𝔁𝓽\0")); | ||
console.log(res); | ||
assertArrayEquals( | ||
res, | ||
fixture1, | ||
); | ||
assertEquals(Deno.core.decode(new Uint8Array(fixture1)), "𝓽𝓮𝔁𝓽\0"); | ||
}); | ||
*/ | ||
|
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.
remove
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 test should be uncommented, not removed
serde_v8/de.rs
Outdated
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.
We should revert changes to the string handling for now
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 think there is a missing export in rusty_v8?
error[E0432]: unresolved import `v8::WriteOptions`
--> core/runtime/ops.rs:16:5
|
16 | use v8::WriteOptions;
| ^^^^^^^^^^^^^^^^ no `WriteOptions` in the root
apart from using diff --git a/testing/checkin/runner/mod.rs b/testing/checkin/runner/mod.rs
index f136a8b..a74a021 100644
--- a/testing/checkin/runner/mod.rs
+++ b/testing/checkin/runner/mod.rs
@@ -24,6 +24,7 @@ use std::sync::mpsc::channel;
use std::sync::mpsc::RecvTimeoutError;
use std::sync::Arc;
use std::sync::Mutex;
+use std::sync::OnceLock;
use std::time::Duration;
mod extensions;
@@ -92,13 +93,27 @@ impl TestData {
}
}
+static SNAPSHOT: OnceLock<&'static [u8]> = OnceLock::new();
+
pub fn create_runtime(
parent: Option<WorkerCloseWatcher>,
additional_extensions: Vec<Extension>,
) -> (JsRuntime, WorkerHostSide) {
let (worker, worker_host_side) = worker_create(parent);
- let snapshot = snapshot::create_snapshot();
- let snapshot = Box::leak(snapshot);
+
+ let snapshot = SNAPSHOT.get_or_init(|| {
+ match fork::fork() {
+ Ok(fork::Fork::Child) => {
+ let snapshot = snapshot::create_snapshot();
+ std::fs::write("CLI_SNAPSHOT.bin", &snapshot).unwrap();
+ }
+ Ok(fork::Fork::Parent(pid)) => fork::waitpid(pid).unwrap(),
+ e => panic!("Failed to fork"),
+ };
+ let snapshot = std::fs::read("CLI_SNAPSHOT.bin").unwrap();
+ Box::leak(snapshot.into_boxed_slice())
+ });
+
let mut runtime =
create_runtime_from_snapshot(snapshot, false, additional_extensions);
runtime.op_state().borrow_mut().put(worker); |
@@ -0,0 +1,2 @@ | |||
[env] | |||
RUST_TEST_THREADS = "1" |
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.
you can use cargo-nextest
to run each test in a separate process.
@@ -97,6 +97,24 @@ pub fn create_runtime( | |||
additional_extensions: Vec<Extension>, | |||
) -> (JsRuntime, WorkerHostSide) { | |||
let (worker, worker_host_side) = worker_create(parent); | |||
|
|||
/* TODO: remove, this is a hack |
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.
same nextest deal here. unless we get groups landed, but this would still fail in configs without groups.
Closing in favor of #1076 |
No description provided.