From 801042cee2f245d295b155a6dae9d04457d8f929 Mon Sep 17 00:00:00 2001 From: snek Date: Wed, 3 Sep 2025 11:22:12 +0200 Subject: [PATCH 01/36] upgrade --- Cargo.lock | 377 ++++++++++++++++++++++++--- Cargo.toml | 2 +- core/cppgc.rs | 121 +++------ core/runtime/ops.rs | 4 +- core/webidl.rs | 2 +- ops/op2/dispatch_fast.rs | 28 +- ops/op2/dispatch_slow.rs | 20 +- ops/op2/signature.rs | 4 +- testing/checkin/runner/ops.rs | 110 +++++--- testing/checkin/runner/ops_async.rs | 4 +- testing/checkin/runner/ops_worker.rs | 5 +- 11 files changed, 504 insertions(+), 173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb91726cd..18365cfd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,9 +214,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.71.1" +version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" +checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" dependencies = [ "bitflags", "cexpr", @@ -307,6 +307,16 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +[[package]] +name = "calendrical_calculations" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f6df87e869fb08be61c7e97ced8e69ab802df1d8bc612ed67dba78c07fbc12c" +dependencies = [ + "core_maths", + "displaydoc", +] + [[package]] name = "capacity_builder" version = "0.5.0" @@ -437,6 +447,16 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compact_str" version = "0.7.1" @@ -456,6 +476,15 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147be55d677052dabc6b22252d5dd0fd4c29c8c27aa4f2fbef0f94aa003b406f" +[[package]] +name = "core_maths" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30" +dependencies = [ + "libm", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -831,6 +860,38 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "diplomat" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced081520ee8cf2b8c5b64a1a901eccd7030ece670dac274afe64607d6499b71" +dependencies = [ + "diplomat_core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "diplomat-runtime" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "098f9520ec5c190943b083bca3ea4cc4e67dc5f85a37062e528ecf1d25f04eb4" + +[[package]] +name = "diplomat_core" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad619d9fdee0e731bb6f8f7d797b6ecfdc2395e363f554d2f6377155955171eb" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "smallvec", + "strck", + "syn", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1258,6 +1319,29 @@ dependencies = [ "tokio", ] +[[package]] +name = "icu_calendar" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e239d6422e2fdcea5d9756b48400caabac25aa4ab91b6608bd4bb6f23f0558c" +dependencies = [ + "calendrical_calculations", + "displaydoc", + "icu_calendar_data", + "icu_locale", + "icu_locale_core", + "icu_provider 2.0.0", + "tinystr 0.8.1", + "writeable 0.6.1", + "zerovec 0.11.4", +] + +[[package]] +name = "icu_calendar_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7219c8639ab936713a87b571eed2bc2615aa9137e8af6eb221446ee5644acc18" + [[package]] name = "icu_collections" version = "1.5.0" @@ -1265,11 +1349,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ "displaydoc", - "yoke", + "yoke 0.7.5", "zerofrom", - "zerovec", + "zerovec 0.10.4", ] +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke 0.8.0", + "zerofrom", + "zerovec 0.11.4", +] + +[[package]] +name = "icu_locale" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ae5921528335e91da1b6c695dbf1ec37df5ac13faa3f91e5640be93aa2fbefd" +dependencies = [ + "displaydoc", + "icu_collections 2.0.0", + "icu_locale_core", + "icu_locale_data", + "icu_provider 2.0.0", + "potential_utf", + "tinystr 0.8.1", + "zerovec 0.11.4", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap 0.8.0", + "tinystr 0.8.1", + "writeable 0.6.1", + "zerovec 0.11.4", +] + +[[package]] +name = "icu_locale_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fdef0c124749d06a743c69e938350816554eb63ac979166590e2b4ee4252765" + [[package]] name = "icu_locid" version = "1.5.0" @@ -1277,10 +1409,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" dependencies = [ "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", + "litemap 0.7.5", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", ] [[package]] @@ -1292,9 +1424,9 @@ dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] @@ -1310,15 +1442,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_normalizer_data", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "smallvec", "utf16_iter", "utf8_iter", "write16", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1334,12 +1466,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_locid_transform", "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", + "icu_provider 1.5.0", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] @@ -1358,11 +1490,28 @@ dependencies = [ "icu_locid", "icu_provider_macros", "stable_deref_trait", - "tinystr", - "writeable", - "yoke", + "tinystr 0.7.6", + "writeable 0.5.5", + "yoke 0.7.5", "zerofrom", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr 0.8.1", + "writeable 0.6.1", + "yoke 0.8.0", + "zerofrom", + "zerotrie", + "zerovec 0.11.4", ] [[package]] @@ -1457,6 +1606,21 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "ixdtf" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ef2d119044a672ceb96e59608dffe8677f29dc6ec48ed693a4b9ac84751e9b" +dependencies = [ + "displaydoc", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1283705eb0a21404d2bfd6eef2a7593d240bc42a0bdb39db0ad6fa2ec026524" + [[package]] name = "js-sys" version = "0.3.69" @@ -1488,6 +1652,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -1500,6 +1670,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + [[package]] name = "lock_api" version = "0.4.12" @@ -1793,6 +1969,16 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "serde", + "zerovec 0.11.4", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2064,6 +2250,21 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +[[package]] +name = "ry_temporal_capi" +version = "0.0.11-ry.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdfddefd45ee4814bd83d94b7196c95ef6af159f4a0035a6c67bd59edcff14ee" +dependencies = [ + "diplomat", + "diplomat-runtime", + "icu_calendar", + "icu_locale", + "num-traits", + "temporal_rs", + "writeable 0.6.1", +] + [[package]] name = "ryu" version = "1.0.20" @@ -2294,6 +2495,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strck" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42316e70da376f3d113a68d138a60d8a9883c604fe97942721ec2068dab13a9f" +dependencies = [ + "unicode-ident", +] + [[package]] name = "string_enum" version = "1.0.0" @@ -2802,6 +3012,25 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" +[[package]] +name = "temporal_rs" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7807e330b12e288b847a3e2a2b0dcd41ca764d0f90f9e8940f02c6ddd68cd2d7" +dependencies = [ + "combine", + "core_maths", + "icu_calendar", + "icu_locale", + "ixdtf", + "jiff-tzdb", + "num-traits", + "timezone_provider", + "tinystr 0.8.1", + "tzif", + "writeable 0.6.1", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -2876,6 +3105,17 @@ dependencies = [ "syn", ] +[[package]] +name = "timezone_provider" +version = "0.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f357f8e2cddee6a7b56b69fbb4cab30a7e82914c80ee7f9a5eb799ee3de3f24d" +dependencies = [ + "tinystr 0.8.1", + "zerotrie", + "zerovec 0.11.4", +] + [[package]] name = "tinystr" version = "0.7.6" @@ -2883,7 +3123,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ "displaydoc", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec 0.11.4", ] [[package]] @@ -3052,6 +3302,15 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "tzif" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e762ac355f0c204d09ae644b3d59423d5ddfc5603997d60c8c56f24e429a9d" +dependencies = [ + "combine", +] + [[package]] name = "unicode-id" version = "0.3.4" @@ -3147,9 +3406,7 @@ dependencies = [ [[package]] name = "v8" -version = "137.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33995a1fee055ff743281cde33a41f0d618ee0bdbe8bdf6859e11864499c2595" +version = "139.0.0" dependencies = [ "bindgen", "bitflags", @@ -3158,6 +3415,7 @@ dependencies = [ "home", "miniz_oxide", "paste", + "ry_temporal_capi", "which", ] @@ -3442,6 +3700,12 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + [[package]] name = "wyz" version = "0.5.1" @@ -3465,7 +3729,19 @@ checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" dependencies = [ "serde", "stable_deref_trait", - "yoke-derive", + "yoke-derive 0.7.5", + "zerofrom", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive 0.8.0", "zerofrom", ] @@ -3481,6 +3757,18 @@ dependencies = [ "synstructure", ] +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.34" @@ -3522,15 +3810,35 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", +] + [[package]] name = "zerovec" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ - "yoke", + "yoke 0.7.5", "zerofrom", - "zerovec-derive", + "zerovec-derive 0.10.3", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke 0.8.0", + "zerofrom", + "zerovec-derive 0.11.1", ] [[package]] @@ -3543,3 +3851,14 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index 1913e3500..e7a222b1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ deno_error = { version = "0.7.0", features = ["serde_json", "serde", "url", "tok deno_ops = { version = "0.231.0", path = "./ops" } deno_unsync = "0.4.2" serde_v8 = { version = "0.264.0", path = "./serde_v8" } -v8 = { version = "137.3.0", default-features = false } +v8 = { path = "../rusty_v8" } #version = "137.3.0", default-features = false } anyhow = "1" bencher = "0.1" diff --git a/core/cppgc.rs b/core/cppgc.rs index e0313d88e..62a16173f 100644 --- a/core/cppgc.rs +++ b/core/cppgc.rs @@ -9,6 +9,7 @@ use std::any::TypeId; use std::any::type_name; use std::collections::BTreeMap; pub use v8::cppgc::GarbageCollected; +pub use v8::cppgc::GcCell; const CPPGC_SINGLE_TAG: u16 = 1; const CPPGC_PROTO_TAG: u16 = 2; @@ -39,8 +40,8 @@ pub trait PrototypeChain { const MAX_PROTO_CHAIN: usize = 3; struct DummyT; -impl GarbageCollected for DummyT { - fn trace(&self, _visitor: &v8::cppgc::Visitor) { +unsafe impl GarbageCollected for DummyT { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) { unreachable!(); } @@ -52,22 +53,22 @@ impl GarbageCollected for DummyT { /// ErasedPtr is a wrapper around a `v8::cppgc::Member` that allows downcasting /// to a specific type. Safety is guaranteed by the `tag` field in the /// `CppGcObject` struct. -struct ErasedPtr { +struct ErasedMember { member: v8::cppgc::Member>, } -impl ErasedPtr { +impl ErasedMember { fn downcast( &self, - ) -> Option>> { - let ptr = unsafe { v8::cppgc::Ptr::new(&self.member)? }; - if ptr.tag == TypeId::of::() { + ) -> Option>> { + let ptr = unsafe { v8::cppgc::UnsafePtr::new(&self.member)? }; + if unsafe { ptr.as_ref() }.tag == TypeId::of::() { // Safety: The tag is always guaranteed by `wrap_object` to be the // correct type. Some(unsafe { std::mem::transmute::< - v8::cppgc::Ptr>, - v8::cppgc::Ptr>, + v8::cppgc::UnsafePtr>, + v8::cppgc::UnsafePtr>, >(ptr) }) } else { @@ -76,11 +77,13 @@ impl ErasedPtr { } } -impl From>> for ErasedPtr { - fn from(ptr: v8::cppgc::Ptr>) -> Self { +impl From>> + for ErasedMember +{ + fn from(ptr: v8::cppgc::UnsafePtr>) -> Self { debug_assert!( std::mem::size_of::>>() - == std::mem::size_of::() + == std::mem::size_of::() ); let member = v8::cppgc::Member::new(&ptr); @@ -98,10 +101,10 @@ impl From>> for ErasedPtr { } } -struct PrototypeChainStore([Option; MAX_PROTO_CHAIN]); +struct PrototypeChainStore([Option; MAX_PROTO_CHAIN]); -impl v8::cppgc::GarbageCollected for PrototypeChainStore { - fn trace(&self, visitor: &v8::cppgc::Visitor) { +unsafe impl v8::cppgc::GarbageCollected for PrototypeChainStore { + fn trace(&self, visitor: &mut v8::cppgc::Visitor) { // Trace all the objects top-down the prototype chain. // // This works out with ErasedPtr because v8::cppgc::Member doesn't @@ -116,8 +119,10 @@ impl v8::cppgc::GarbageCollected for PrototypeChainStore { } } -impl v8::cppgc::GarbageCollected for CppGcObject { - fn trace(&self, visitor: &v8::cppgc::Visitor) { +unsafe impl v8::cppgc::GarbageCollected + for CppGcObject +{ + fn trace(&self, visitor: &mut v8::cppgc::Visitor) { self.member.trace(visitor); } @@ -346,13 +351,19 @@ pub fn wrap_object3< obj } -pub struct Ptr { - inner: v8::cppgc::Ptr>, +pub struct UnsafePtr { + inner: v8::cppgc::UnsafePtr>, root: Option>>, } +impl UnsafePtr { + pub unsafe fn as_ref(&self) -> &T { + unsafe { &self.inner.as_ref().member } + } +} + #[doc(hidden)] -impl Ptr { +impl UnsafePtr { /// If this pointer is used in an async function, it could leave the stack, /// so this method can be called to root it in the GC and keep the reference /// valid. @@ -363,19 +374,12 @@ impl Ptr { } } -impl std::ops::Deref for Ptr { - type Target = T; - fn deref(&self) -> &T { - &self.inner.member - } -} - #[doc(hidden)] #[allow(clippy::needless_lifetimes)] pub fn try_unwrap_cppgc_object<'sc, T: GarbageCollected + 'static>( isolate: &mut v8::Isolate, val: v8::Local<'sc, v8::Value>, -) -> Option> { +) -> Option> { let Ok(obj): Result, _> = val.try_into() else { return None; }; @@ -387,11 +391,11 @@ pub fn try_unwrap_cppgc_object<'sc, T: GarbageCollected + 'static>( v8::Object::unwrap::>(isolate, obj) }?; - if obj.tag != TypeId::of::() { + if unsafe { obj.as_ref() }.tag != TypeId::of::() { return None; } - Some(Ptr { + Some(UnsafePtr { inner: obj, root: None, }) @@ -405,7 +409,7 @@ pub fn try_unwrap_cppgc_proto_object< >( isolate: &mut v8::Isolate, val: v8::Local<'sc, v8::Value>, -) -> Option> { +) -> Option> { let Ok(obj): Result, _> = val.try_into() else { return None; }; @@ -422,7 +426,7 @@ pub fn try_unwrap_cppgc_proto_object< return None; } - let obj = proto_chain.0[proto_index].as_ref()?; + let obj = unsafe { proto_chain.as_ref().0[proto_index].as_ref()? }; obj.downcast::()? } else { @@ -430,14 +434,14 @@ pub fn try_unwrap_cppgc_proto_object< v8::Object::unwrap::>(isolate, obj) }?; - if obj.tag != TypeId::of::() { + if unsafe { obj.as_ref() }.tag != TypeId::of::() { return None; } obj }; - Some(Ptr { + Some(UnsafePtr { inner: obj, root: None, }) @@ -499,52 +503,3 @@ impl FunctionTemplateData { .collect(); } } - -#[derive(Debug)] -pub struct SameObject { - cell: std::cell::OnceCell>, - _phantom_data: std::marker::PhantomData, -} - -impl SameObject { - #[allow(clippy::new_without_default)] - pub fn new() -> Self { - Self { - cell: Default::default(), - _phantom_data: Default::default(), - } - } - - pub fn get( - &self, - scope: &mut v8::HandleScope, - f: F, - ) -> v8::Global - where - F: FnOnce(&mut v8::HandleScope) -> T, - { - self - .cell - .get_or_init(|| { - let v = f(scope); - let obj = make_cppgc_object(scope, v); - v8::Global::new(scope, obj) - }) - .clone() - } - - pub fn set( - &self, - scope: &mut v8::HandleScope, - value: T, - ) -> Result<(), v8::Global> { - let obj = make_cppgc_object(scope, value); - self.cell.set(v8::Global::new(scope, obj)) - } - - pub fn try_unwrap(&self, scope: &mut v8::HandleScope) -> Option> { - let obj = self.cell.get()?; - let val = v8::Local::new(scope, obj); - try_unwrap_cppgc_object(scope, val.cast()) - } -} diff --git a/core/runtime/ops.rs b/core/runtime/ops.rs index 74bfa5233..f6da7bf5a 100644 --- a/core/runtime/ops.rs +++ b/core/runtime/ops.rs @@ -1938,7 +1938,9 @@ mod tests { pub value: u32, } - impl GarbageCollected for TestResource { + unsafe impl GarbageCollected for TestResource { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"TestResource" } diff --git a/core/webidl.rs b/core/webidl.rs index b2884e3b8..f40e26491 100644 --- a/core/webidl.rs +++ b/core/webidl.rs @@ -858,7 +858,7 @@ pub trait WebIdlInterfaceConverter: } impl<'a, T: WebIdlInterfaceConverter> WebIdlConverter<'a> - for crate::cppgc::Ptr + for crate::cppgc::UnsafePtr { type Options = (); diff --git a/ops/op2/dispatch_fast.rs b/ops/op2/dispatch_fast.rs index b9000562a..3766ce53f 100644 --- a/ops/op2/dispatch_fast.rs +++ b/ops/op2/dispatch_fast.rs @@ -502,7 +502,7 @@ pub(crate) fn generate_dispatch_fast( let Some(self_) = deno_core::_ops::#try_unwrap_cppgc::<#self_ty>(&mut #scope, this.into()) else { #throw_exception }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; }) } else { quote!() @@ -729,7 +729,19 @@ fn map_v8_fastcall_arg_to_arg( Arg::Special(Special::Isolate) => { *needs_fast_api_callback_options = true; gs_quote!(generator_state(fast_api_callback_options) => { - let #arg_ident = #fast_api_callback_options.isolate; + let #arg_ident = #fast_api_callback_options.isolate; + }) + } + Arg::Ref(RefType::Ref, Special::Isolate) => { + *needs_fast_api_callback_options = true; + gs_quote!(generator_state(fast_api_callback_options) => { + let #arg_ident = unsafe { &*#fast_api_callback_options.isolate }; + }) + } + Arg::Ref(RefType::Mut, Special::Isolate) => { + *needs_fast_api_callback_options = true; + gs_quote!(generator_state(fast_api_callback_options) => { + let #arg_ident = unsafe { &mut *#fast_api_callback_options.isolate }; }) } Arg::Ref(RefType::Ref, Special::OpState) => { @@ -835,16 +847,15 @@ fn map_v8_fastcall_arg_to_arg( let Some(#arg_ident) = deno_core::_ops::#try_unwrap_cppgc::<#ty>(&mut #scope, #arg_ident) else { #throw_exception }; - let #arg_ident = &*#arg_ident; + let #arg_ident = unsafe { #arg_ident.as_ref() }; }) } Arg::OptionCppGcResource(ty) => { - let ty = - syn::parse_str::(ty).expect("Failed to reparse state type"); - *needs_fast_isolate = true; let throw_exception = - throw_type_error(generator_state, format!("expected {ty:?}")); + throw_type_error(generator_state, format!("expected {ty}")); + let ty = + syn::parse_str::(ty).expect("Failed to reparse state type"); gs_quote!(generator_state(scope, try_unwrap_cppgc) => { let #arg_ident = if #arg_ident.is_null_or_undefined() { None @@ -853,7 +864,7 @@ fn map_v8_fastcall_arg_to_arg( } else { #throw_exception }; - let #arg_ident = #arg_ident.as_deref(); + let #arg_ident = unsafe { #arg_ident.as_ref().map(|a| a.as_ref()) }; }) } _ => quote!(let #arg_ident = #arg_ident as _;), @@ -918,6 +929,7 @@ fn map_arg_to_v8_fastcall_type( | Arg::VarArgs | Arg::This | Arg::Special(Special::Isolate) + | Arg::Ref(_, Special::Isolate) | Arg::OptionState(..) => V8FastCallType::Virtual, // Other types + ref types are not handled Arg::OptionNumeric(..) diff --git a/ops/op2/dispatch_slow.rs b/ops/op2/dispatch_slow.rs index dbb2ea2f4..1b1c5b23d 100644 --- a/ops/op2/dispatch_slow.rs +++ b/ops/op2/dispatch_slow.rs @@ -353,7 +353,7 @@ pub(crate) fn with_self( }); generator_state.moves.push(quote! { - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; }); tokens @@ -362,7 +362,7 @@ pub(crate) fn with_self( let Some(self_) = deno_core::_ops::#try_unwrap_cppgc::<#self_ty>(&mut #scope, #fn_args.this().into()) else { #throw_exception; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; }) } } @@ -597,6 +597,14 @@ pub fn from_arg( *needs_opctx = true; quote!(let #arg_ident = #opctx.isolate;) } + Arg::Ref(RefType::Ref, Special::Isolate) => { + *needs_opctx = true; + quote!(let #arg_ident = unsafe { &*#opctx.isolate };) + } + Arg::Ref(RefType::Mut, Special::Isolate) => { + *needs_opctx = true; + quote!(let #arg_ident = unsafe { &mut *#opctx.isolate };) + } Arg::Ref(_, Special::HandleScope) => { *needs_scope = true; quote!(let #arg_ident = &mut #scope;) @@ -830,7 +838,7 @@ pub fn from_arg( #arg_ident.root(); }; generator_state.moves.push(quote! { - let #arg_ident = &*#arg_ident; + let #arg_ident = unsafe { #arg_ident.as_ref() }; }); tokens } else { @@ -838,7 +846,7 @@ pub fn from_arg( let Some(#arg_ident) = deno_core::_ops::#try_unwrap_cppgc::<#ty>(&mut #scope, #from_ident) else { #throw_exception; }; - let #arg_ident = &*#arg_ident; + let #arg_ident = unsafe { #arg_ident.as_ref() }; } } } @@ -869,7 +877,7 @@ pub fn from_arg( }; generator_state.moves.push(quote! { - let #arg_ident = #arg_ident.as_deref(); + let #arg_ident = unsafe { #arg_ident.as_ref().map(|a| a.as_ref()) }; }); tokens @@ -882,7 +890,7 @@ pub fn from_arg( } else { #throw_exception; }; - let #arg_ident = #arg_ident.as_deref(); + let #arg_ident = unsafe { #arg_ident.as_ref().map(|a| a.as_ref()) }; } } } diff --git a/ops/op2/signature.rs b/ops/op2/signature.rs index dfbd5f5c8..9cf03ee7d 100644 --- a/ops/op2/signature.rs +++ b/ops/op2/signature.rs @@ -1483,7 +1483,9 @@ fn parse_type_path( // the easiest way to work with the 'rules!' macro above. match res { // OpState and JsRuntimeState appears in both ways - CBare(TSpecial(Special::OpState | Special::JsRuntimeState)) => {} + CBare(TSpecial( + Special::OpState | Special::JsRuntimeState | Special::Isolate, + )) => {} CBare( TString(Strings::RefStr) | TSpecial(Special::HandleScope) | TV8(_), ) => { diff --git a/testing/checkin/runner/ops.rs b/testing/checkin/runner/ops.rs index dc349168c..ef4f11ecf 100644 --- a/testing/checkin/runner/ops.rs +++ b/testing/checkin/runner/ops.rs @@ -1,6 +1,5 @@ // Copyright 2018-2025 the Deno authors. MIT license. -use std::cell::Cell; use std::cell::RefCell; use std::rc::Rc; @@ -13,6 +12,7 @@ use deno_core::stats::RuntimeActivityStats; use deno_core::stats::RuntimeActivityStatsFactory; use deno_core::stats::RuntimeActivityStatsFilter; use deno_core::v8; +use deno_core::v8::cppgc::GcCell; use deno_error::JsErrorBox; use super::Output; @@ -74,7 +74,9 @@ pub fn op_stats_delete( pub struct TestObjectWrap {} -impl GarbageCollected for TestObjectWrap { +unsafe impl GarbageCollected for TestObjectWrap { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"TestObjectWrap" } @@ -161,7 +163,9 @@ impl TestObjectWrap { pub struct DOMPoint {} -impl GarbageCollected for DOMPoint { +unsafe impl GarbageCollected for DOMPoint { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"DOMPoint" } @@ -184,22 +188,24 @@ impl DOMPointReadOnly { } Ok(DOMPointReadOnly { - x: get(scope, other, "x").unwrap_or(0.0).into(), - y: get(scope, other, "y").unwrap_or(0.0).into(), - z: get(scope, other, "z").unwrap_or(0.0).into(), - w: get(scope, other, "w").unwrap_or(0.0).into(), + x: GcCell::new(get(scope, other, "x").unwrap_or(0.0)), + y: GcCell::new(get(scope, other, "y").unwrap_or(0.0)), + z: GcCell::new(get(scope, other, "z").unwrap_or(0.0)), + w: GcCell::new(get(scope, other, "w").unwrap_or(0.0)), }) } } pub struct DOMPointReadOnly { - x: Cell, - y: Cell, - z: Cell, - w: Cell, + x: GcCell, + y: GcCell, + z: GcCell, + w: GcCell, } -impl GarbageCollected for DOMPointReadOnly { +unsafe impl GarbageCollected for DOMPointReadOnly { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"DOMPointReadOnly" } @@ -208,23 +214,23 @@ impl GarbageCollected for DOMPointReadOnly { #[op2(base)] impl DOMPointReadOnly { #[getter] - fn x(&self) -> f64 { - self.x.get() + fn x(&self, isolate: &v8::Isolate) -> f64 { + *self.x.get(isolate) } #[getter] - fn y(&self) -> f64 { - self.y.get() + fn y(&self, isolate: &v8::Isolate) -> f64 { + *self.y.get(isolate) } #[getter] - fn z(&self) -> f64 { - self.z.get() + fn z(&self, isolate: &v8::Isolate) -> f64 { + *self.z.get(isolate) } #[getter] - fn w(&self) -> f64 { - self.w.get() + fn w(&self, isolate: &v8::Isolate) -> f64 { + *self.w.get(isolate) } } @@ -239,10 +245,10 @@ impl DOMPoint { w: Option, ) -> (DOMPointReadOnly, DOMPoint) { let ro = DOMPointReadOnly { - x: Cell::new(x.unwrap_or(0.0)), - y: Cell::new(y.unwrap_or(0.0)), - z: Cell::new(z.unwrap_or(0.0)), - w: Cell::new(w.unwrap_or(0.0)), + x: GcCell::new(x.unwrap_or(0.0)), + y: GcCell::new(y.unwrap_or(0.0)), + z: GcCell::new(z.unwrap_or(0.0)), + w: GcCell::new(w.unwrap_or(0.0)), }; (ro, DOMPoint {}) @@ -269,43 +275,63 @@ impl DOMPoint { } #[setter] - fn x(&self, x: f64, #[proto] ro: &DOMPointReadOnly) { - ro.x.set(x); + fn x( + &self, + isolate: &mut v8::Isolate, + x: f64, + #[proto] ro: &DOMPointReadOnly, + ) { + ro.x.set(isolate, x); } #[getter] - fn x(&self, #[proto] ro: &DOMPointReadOnly) -> f64 { - ro.x.get() + fn x(&self, isolate: &v8::Isolate, #[proto] ro: &DOMPointReadOnly) -> f64 { + *ro.x.get(isolate) } #[setter] - fn y(&self, y: f64, #[proto] ro: &DOMPointReadOnly) { - ro.y.set(y); + fn y( + &self, + isolate: &mut v8::Isolate, + y: f64, + #[proto] ro: &DOMPointReadOnly, + ) { + ro.y.set(isolate, y); } #[getter] - fn y(&self, #[proto] ro: &DOMPointReadOnly) -> f64 { - ro.y.get() + fn y(&self, isolate: &v8::Isolate, #[proto] ro: &DOMPointReadOnly) -> f64 { + *ro.y.get(isolate) } #[setter] - fn z(&self, z: f64, #[proto] ro: &DOMPointReadOnly) { - ro.z.set(z); + fn z( + &self, + isolate: &mut v8::Isolate, + z: f64, + #[proto] ro: &DOMPointReadOnly, + ) { + ro.z.set(isolate, z); } #[getter] - fn z(&self, #[proto] ro: &DOMPointReadOnly) -> f64 { - ro.z.get() + fn z(&self, isolate: &v8::Isolate, #[proto] ro: &DOMPointReadOnly) -> f64 { + *ro.z.get(isolate) } #[setter] - fn w(&self, w: f64, #[proto] ro: &DOMPointReadOnly) { - ro.w.set(w); + fn w( + &self, + isolate: &mut v8::Isolate, + w: f64, + #[proto] ro: &DOMPointReadOnly, + ) { + ro.w.set(isolate, w); } #[getter] - fn w(&self, #[proto] ro: &DOMPointReadOnly) -> f64 { - ro.w.get() + fn w(&self, isolate: &v8::Isolate, #[proto] ro: &DOMPointReadOnly) -> f64 { + *ro.w.get(isolate) } #[fast] @@ -333,7 +359,9 @@ pub enum TestEnumWrap { A, } -impl GarbageCollected for TestEnumWrap { +unsafe impl GarbageCollected for TestEnumWrap { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"TestEnumWrap" } diff --git a/testing/checkin/runner/ops_async.rs b/testing/checkin/runner/ops_async.rs index 4cbf0a78e..95277f4d2 100644 --- a/testing/checkin/runner/ops_async.rs +++ b/testing/checkin/runner/ops_async.rs @@ -67,7 +67,9 @@ pub struct TestResource { value: u32, } -impl GarbageCollected for TestResource { +unsafe impl GarbageCollected for TestResource { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"TestResource" } diff --git a/testing/checkin/runner/ops_worker.rs b/testing/checkin/runner/ops_worker.rs index 3ec323186..23fa983fc 100644 --- a/testing/checkin/runner/ops_worker.rs +++ b/testing/checkin/runner/ops_worker.rs @@ -11,6 +11,7 @@ use deno_core::OpState; use deno_core::PollEventLoopOptions; use deno_core::op2; use deno_core::url::Url; +use deno_core::v8; use deno_core::v8::IsolateHandle; use deno_error::JsErrorBox; use std::cell::RefCell; @@ -34,7 +35,9 @@ pub struct WorkerControl { shutdown_flag: Option>, } -impl GarbageCollected for WorkerControl { +unsafe impl GarbageCollected for WorkerControl { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"WorkerControl" } From 0f1eb7699fb4fb8a663a7518378fb0e9abba6c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 3 Sep 2025 23:05:49 +0200 Subject: [PATCH 02/36] some small progress --- core/cppgc.rs | 114 ++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 55 deletions(-) diff --git a/core/cppgc.rs b/core/cppgc.rs index 9c89e517c..b03bc5e73 100644 --- a/core/cppgc.rs +++ b/core/cppgc.rs @@ -352,7 +352,7 @@ pub fn wrap_object3< } pub struct UnsafePtr { - inner: v8::cppgc::Ptr>, + inner: v8::cppgc::UnsafePtr>, root: Option>>, } @@ -377,7 +377,7 @@ impl UnsafePtr { impl std::ops::Deref for UnsafePtr { type Target = T; fn deref(&self) -> &T { - &self.inner.member + &unsafe { self.inner.as_ref() }.member } } @@ -415,7 +415,7 @@ pub struct Ref { impl std::ops::Deref for Ref { type Target = T; fn deref(&self) -> &T { - &self.inner.borrow().unwrap().member + &self.inner.get().unwrap().member } } @@ -449,7 +449,13 @@ impl From> for Member { impl std::ops::Deref for Member { type Target = T; fn deref(&self) -> &T { - &self.inner.borrow().unwrap().member + &unsafe { self.inner.get().unwrap() }.member + } +} + +impl v8::cppgc::Traced for Member { + fn trace(&self, visitor: &mut v8::cppgc::Visitor) { + visitor.trace(&self.inner); } } @@ -556,54 +562,52 @@ impl FunctionTemplateData { } } -#[derive(Debug)] -pub struct SameObject { - cell: std::cell::OnceCell>, - _phantom_data: std::marker::PhantomData, -} - -impl SameObject { - #[allow(clippy::new_without_default)] - pub fn new() -> Self { - Self { - cell: Default::default(), - _phantom_data: Default::default(), - } - } - - pub fn get( - &self, - scope: &mut v8::HandleScope, - f: F, - ) -> v8::Global - where - F: FnOnce(&mut v8::HandleScope) -> T, - { - self - .cell - .get_or_init(|| { - let v = f(scope); - let obj = make_cppgc_object(scope, v); - v8::Global::new(scope, obj) - }) - .clone() - } - - pub fn set( - &self, - scope: &mut v8::HandleScope, - value: T, - ) -> Result<(), v8::Global> { - let obj = make_cppgc_object(scope, value); - self.cell.set(v8::Global::new(scope, obj)) - } - - pub fn try_unwrap( - &self, - scope: &mut v8::HandleScope, - ) -> Option> { - let obj = self.cell.get()?; - let val = v8::Local::new(scope, obj); - try_unwrap_cppgc_object(scope, val.cast()) - } -} +// pub struct SameObject { +// cell: std::cell::OnceCell>>, +// _phantom_data: std::marker::PhantomData, +// } + +// impl SameObject { +// #[allow(clippy::new_without_default)] +// pub fn new() -> Self { +// Self { +// cell: Default::default(), +// _phantom_data: Default::default(), +// } +// } + +// pub fn get( +// &self, +// scope: &mut v8::HandleScope, +// f: F, +// ) -> v8::Global +// where +// F: FnOnce(&mut v8::HandleScope) -> T, +// { +// let cell = self.cell.get_or_init(|| { +// let v = f(scope); +// let obj = make_cppgc_object(scope, v); +// GcCell::new(v8::Global::new(scope, obj)) +// }); +// cell.get(scope).clone() +// } + +// pub fn set( +// &self, +// scope: &mut v8::HandleScope, +// value: T, +// ) -> Result<(), v8::Global> { +// let obj = make_cppgc_object(scope, value); +// let global = v8::Global::new(scope, obj); +// self.cell.set(GcCell::new(global)) +// } + +// pub fn try_unwrap( +// &self, +// scope: &mut v8::HandleScope, +// ) -> Option> { +// let obj = self.cell.get()?; +// let val = obj.get(scope); +// try_unwrap_cppgc_object(scope, val.cast()) +// } +// } From dcc7c19ec41222717c3a410982aa958ae557849b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 5 Sep 2025 22:24:55 +0200 Subject: [PATCH 03/36] bump v8 --- Cargo.lock | 4 +++- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9d64be6a..3d487e5c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3406,7 +3406,9 @@ dependencies = [ [[package]] name = "v8" -version = "139.0.0" +version = "140.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0ad6613428e148bb814ee8890a23bb250547a8f837922ca1ea6eba90670514" dependencies = [ "bindgen", "bitflags", diff --git a/Cargo.toml b/Cargo.toml index 9a30e52cd..0ff9dbe1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ deno_error = { version = "0.7.0", features = ["serde_json", "serde", "url", "tok deno_ops = { version = "0.232.0", path = "./ops" } deno_unsync = "0.4.2" serde_v8 = { version = "0.265.0", path = "./serde_v8" } -v8 = { path = "../rusty_v8" } # version = "137.3.0", default-features = false } +v8 = { version = "140.0.0", default-features = false } anyhow = "1" bencher = "0.1" From ce10b6bc1dd9040ef8a044d15b1236b94200cdb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 5 Sep 2025 22:37:27 +0200 Subject: [PATCH 04/36] fix --- core/cppgc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/cppgc.rs b/core/cppgc.rs index b03bc5e73..0eccf18a2 100644 --- a/core/cppgc.rs +++ b/core/cppgc.rs @@ -357,6 +357,7 @@ pub struct UnsafePtr { } impl UnsafePtr { + #[allow(clippy::missing_safety_doc)] pub unsafe fn as_ref(&self) -> &T { unsafe { &self.inner.as_ref().member } } From 67fa22934ce2fcce0bcbcefa81002f4a7a14743d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 5 Sep 2025 22:38:38 +0200 Subject: [PATCH 05/36] revert --- core/cppgc.rs | 98 +++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/core/cppgc.rs b/core/cppgc.rs index 0eccf18a2..66b368bdc 100644 --- a/core/cppgc.rs +++ b/core/cppgc.rs @@ -563,52 +563,52 @@ impl FunctionTemplateData { } } -// pub struct SameObject { -// cell: std::cell::OnceCell>>, -// _phantom_data: std::marker::PhantomData, -// } - -// impl SameObject { -// #[allow(clippy::new_without_default)] -// pub fn new() -> Self { -// Self { -// cell: Default::default(), -// _phantom_data: Default::default(), -// } -// } - -// pub fn get( -// &self, -// scope: &mut v8::HandleScope, -// f: F, -// ) -> v8::Global -// where -// F: FnOnce(&mut v8::HandleScope) -> T, -// { -// let cell = self.cell.get_or_init(|| { -// let v = f(scope); -// let obj = make_cppgc_object(scope, v); -// GcCell::new(v8::Global::new(scope, obj)) -// }); -// cell.get(scope).clone() -// } - -// pub fn set( -// &self, -// scope: &mut v8::HandleScope, -// value: T, -// ) -> Result<(), v8::Global> { -// let obj = make_cppgc_object(scope, value); -// let global = v8::Global::new(scope, obj); -// self.cell.set(GcCell::new(global)) -// } - -// pub fn try_unwrap( -// &self, -// scope: &mut v8::HandleScope, -// ) -> Option> { -// let obj = self.cell.get()?; -// let val = obj.get(scope); -// try_unwrap_cppgc_object(scope, val.cast()) -// } -// } +pub struct SameObject { + cell: std::cell::OnceCell>>, + _phantom_data: std::marker::PhantomData, +} + +impl SameObject { + #[allow(clippy::new_without_default)] + pub fn new() -> Self { + Self { + cell: Default::default(), + _phantom_data: Default::default(), + } + } + + pub fn get( + &self, + scope: &mut v8::HandleScope, + f: F, + ) -> v8::Global + where + F: FnOnce(&mut v8::HandleScope) -> T, + { + let cell = self.cell.get_or_init(|| { + let v = f(scope); + let obj = make_cppgc_object(scope, v); + GcCell::new(v8::Global::new(scope, obj)) + }); + cell.get(scope).clone() + } + + pub fn set( + &self, + scope: &mut v8::HandleScope, + value: T, + ) -> Result<(), v8::Global> { + let obj = make_cppgc_object(scope, value); + let global = v8::Global::new(scope, obj); + self.cell.set(GcCell::new(global)) + } + + pub fn try_unwrap( + &self, + scope: &mut v8::HandleScope, + ) -> Option> { + let obj = self.cell.get()?; + let val = obj.get(scope); + try_unwrap_cppgc_object(scope, val.cast()) + } +} From f6879b38eaa92b7ec054699db5dd78013550c281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 5 Sep 2025 22:42:25 +0200 Subject: [PATCH 06/36] actual fixes --- core/cppgc.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/core/cppgc.rs b/core/cppgc.rs index 66b368bdc..df9e2f30d 100644 --- a/core/cppgc.rs +++ b/core/cppgc.rs @@ -563,8 +563,9 @@ impl FunctionTemplateData { } } +#[derive(Debug)] pub struct SameObject { - cell: std::cell::OnceCell>>, + cell: std::cell::OnceCell>, _phantom_data: std::marker::PhantomData, } @@ -576,7 +577,6 @@ impl SameObject { _phantom_data: Default::default(), } } - pub fn get( &self, scope: &mut v8::HandleScope, @@ -585,12 +585,14 @@ impl SameObject { where F: FnOnce(&mut v8::HandleScope) -> T, { - let cell = self.cell.get_or_init(|| { - let v = f(scope); - let obj = make_cppgc_object(scope, v); - GcCell::new(v8::Global::new(scope, obj)) - }); - cell.get(scope).clone() + self + .cell + .get_or_init(|| { + let v = f(scope); + let obj = make_cppgc_object(scope, v); + v8::Global::new(scope, obj) + }) + .clone() } pub fn set( @@ -599,8 +601,7 @@ impl SameObject { value: T, ) -> Result<(), v8::Global> { let obj = make_cppgc_object(scope, value); - let global = v8::Global::new(scope, obj); - self.cell.set(GcCell::new(global)) + self.cell.set(v8::Global::new(scope, obj)) } pub fn try_unwrap( @@ -608,7 +609,7 @@ impl SameObject { scope: &mut v8::HandleScope, ) -> Option> { let obj = self.cell.get()?; - let val = obj.get(scope); + let val = v8::Local::new(scope, obj); try_unwrap_cppgc_object(scope, val.cast()) } } From 63b1a74a257ea8046a007174808d1652bfec69fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 6 Sep 2025 00:04:02 +0200 Subject: [PATCH 07/36] don't lint on Windows for the time being --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f973b72..f5b02bda9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: jobs: [lint, test] windows: os: windows-2022 - jobs: [lint, test] + jobs: [test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main id: read-jobs-tag From dfbcb7e8eb7acf624a2082ad2c902e0fe1bbb173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 6 Sep 2025 10:27:28 +0200 Subject: [PATCH 08/36] turn off debug symbols --- .github/workflows/ci-test/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-test/action.yml b/.github/workflows/ci-test/action.yml index 2c8f46a7d..ba95b0e5f 100644 --- a/.github/workflows/ci-test/action.yml +++ b/.github/workflows/ci-test/action.yml @@ -4,12 +4,16 @@ runs: steps: - name: Cargo test shell: bash + env: + CARGO_PROFILE_RELEASE_DEBUG: false run: |- cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --examples --exclude deno_ops_compile_test_runner cargo test --doc - name: Run examples shell: bash + env: + CARGO_PROFILE_RELEASE_DEBUG: false # Only regression tests here for now. # Regression test for https://github.com/denoland/deno/pull/19615. run: |- From c1d78e866258b89793cf1dce61211c14b2326656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 6 Sep 2025 10:37:21 +0200 Subject: [PATCH 09/36] Try again --- .github/workflows/ci-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 28f0440aa..4231a874f 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -133,3 +133,4 @@ jobs: GH_ACTIONS: 1 RUST_BACKTRACE: full RUSTFLAGS: -D warnings + CARGO_PROFILE_RELEASE_DEBUG: false From 310ff73641c9873323fe75dc56d5f5372f75e941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 6 Sep 2025 10:49:27 +0200 Subject: [PATCH 10/36] again --- .github/workflows/ci-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 4231a874f..1d8d61118 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,5 +132,5 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - RUSTFLAGS: -D warnings + RUSTFLAGS: -D warnings -C debuginfo=0 CARGO_PROFILE_RELEASE_DEBUG: false From 3f60a84bb2f7a60648da28f003a251e336916a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 11:03:57 +0200 Subject: [PATCH 11/36] limit no of jobs --- .github/workflows/ci-job.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 1d8d61118..405cd2a67 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,5 +132,6 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - RUSTFLAGS: -D warnings -C debuginfo=0 + RUSTFLAGS: -D warnings CARGO_PROFILE_RELEASE_DEBUG: false + CARGO_BUILD_JOBS: 1 From 6c2f1c80c4e349c71920fab996b1ec881dadedda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 11:20:57 +0200 Subject: [PATCH 12/36] reset CI From 0d27b748dea0598a41a47048ac956f4f03adf2c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 11:37:39 +0200 Subject: [PATCH 13/36] always run cargo clean on windows --- .github/workflows/ci-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 405cd2a67..fa786ab83 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -67,7 +67,7 @@ jobs: save-if: ${{ inputs.is_main }} - name: Clean - if: inputs.is_main + if: ${{ inputs.is_main || inputs.os == 'windows-2022' }} run: cargo clean # ************************************************************************************************ From 99fa977664a538dc14d9633d7327bd7d4a86219f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 11:50:06 +0200 Subject: [PATCH 14/36] disable debug info altogether --- .github/workflows/ci-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index fa786ab83..e7de227b5 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,6 +132,6 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - RUSTFLAGS: -D warnings + RUSTFLAGS: -D warnings -C debuginfo=0 CARGO_PROFILE_RELEASE_DEBUG: false CARGO_BUILD_JOBS: 1 From 3defca6487252aa13c73f0ba6fbe1705774231a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 12:10:11 +0200 Subject: [PATCH 15/36] Try to use windows-2025 image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5b02bda9..b00b959f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: os: macOS-latest jobs: [lint, test] windows: - os: windows-2022 + os: windows-2025 jobs: [test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main From 307cf5cf8bc1ae77418300d0e92a2b1d6988b2dd Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 15:48:37 +0530 Subject: [PATCH 16/36] Try setting `/PDBPAGESIZE` --- .cargo/config.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..b6e4c18b4 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,5 @@ +[target.'cfg(windows)'] +rustflags = [ + "-C", + "link-arg=/PDBPAGESIZE:16384", # sets page size to 16 KiB (up to 16 GiB PDB) +] From 4ec8429e4645917c95542ae6a45270c74180fd9f Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 16:03:34 +0530 Subject: [PATCH 17/36] -Csymbol-mangling-version=v0 --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index b6e4c18b4..e1a090035 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.'cfg(windows)'] rustflags = [ "-C", - "link-arg=/PDBPAGESIZE:16384", # sets page size to 16 KiB (up to 16 GiB PDB) + "-Csymbol-mangling-version=v0" ] From 4b5108c3f7780ea5cec24cad5f5e7aadd01d2cf1 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 16:04:59 +0530 Subject: [PATCH 18/36] fmt --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index e1a090035..1b26e88c9 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.'cfg(windows)'] rustflags = [ "-C", - "-Csymbol-mangling-version=v0" + "-Csymbol-mangling-version=v0", ] From fbc786dc4f526f3f0f211b0ec7b63127b45d6687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 13:15:28 +0200 Subject: [PATCH 19/36] try to only test tests --- .github/workflows/ci-test/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-test/action.yml b/.github/workflows/ci-test/action.yml index ba95b0e5f..5c651aae8 100644 --- a/.github/workflows/ci-test/action.yml +++ b/.github/workflows/ci-test/action.yml @@ -7,7 +7,7 @@ runs: env: CARGO_PROFILE_RELEASE_DEBUG: false run: |- - cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --examples --exclude deno_ops_compile_test_runner + cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --exclude deno_ops_compile_test_runner cargo test --doc - name: Run examples From f3dc0b25e299e6ab6d6f48398f4c4b20aa4f2fd8 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 8 Sep 2025 04:46:19 -0700 Subject: [PATCH 20/36] try -Ctarget-feature=+crt-static --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 1b26e88c9..9968ea379 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [target.'cfg(windows)'] rustflags = [ - "-C", "-Csymbol-mangling-version=v0", + "-Ctarget-feature=+crt-static", ] From 180a31acb5eedf0487d9f2c3e9e10ea07c6e07a5 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 16:55:15 +0530 Subject: [PATCH 21/36] try /DEBUG:NONE --- .github/workflows/ci-job.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index e7de227b5..35011c058 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,6 +132,9 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - RUSTFLAGS: -D warnings -C debuginfo=0 + # note: this may be temporary + RUSTFLAGS: >- + -D warnings -Cdebuginfo=0 ${{ inputs.target == 'x86_64-pc-windows-msvc' && + '-Clink-arg=/DEBUG:NONE' || '' }} CARGO_PROFILE_RELEASE_DEBUG: false CARGO_BUILD_JOBS: 1 From 48d6e02e83007b5823b88821fd1b0d5856bae62e Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 17:31:27 +0530 Subject: [PATCH 22/36] x --- .github/workflows/ci-job.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 35011c058..025c4edbf 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -134,7 +134,7 @@ jobs: RUST_BACKTRACE: full # note: this may be temporary RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.target == 'x86_64-pc-windows-msvc' && + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022' && '-Clink-arg=/DEBUG:NONE' || '' }} CARGO_PROFILE_RELEASE_DEBUG: false CARGO_BUILD_JOBS: 1 From 0a63853c802392de4228548011b0cdb837381082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:10:13 +0200 Subject: [PATCH 23/36] try xl image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b00b959f7..63a75ab69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: os: macOS-latest jobs: [lint, test] windows: - os: windows-2025 + os: windows-2025-xl jobs: [test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main From 5a1ea0bd6b8919b38e012dec0cdc8c438e00dcf2 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 8 Sep 2025 17:41:21 +0530 Subject: [PATCH 24/36] x --- .github/workflows/ci-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 025c4edbf..88961c6ad 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -67,7 +67,7 @@ jobs: save-if: ${{ inputs.is_main }} - name: Clean - if: ${{ inputs.is_main || inputs.os == 'windows-2022' }} + if: ${{ inputs.is_main || inputs.os == 'windows-2025' }} run: cargo clean # ************************************************************************************************ @@ -134,7 +134,7 @@ jobs: RUST_BACKTRACE: full # note: this may be temporary RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022' && + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2025-xl' && '-Clink-arg=/DEBUG:NONE' || '' }} CARGO_PROFILE_RELEASE_DEBUG: false CARGO_BUILD_JOBS: 1 From fab6974c8a07c6a4256bee3357ad9023090e5a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:20:47 +0200 Subject: [PATCH 25/36] use 2022-xl --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63a75ab69..5c877f3ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: os: macOS-latest jobs: [lint, test] windows: - os: windows-2025-xl + os: windows-2022-xl jobs: [test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main From 8d9f90c22608c3229ea093f80e2d3ed5776dea76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:21:30 +0200 Subject: [PATCH 26/36] use 2022-xl 2 --- .github/workflows/ci-job.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 88961c6ad..840b30995 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -67,7 +67,7 @@ jobs: save-if: ${{ inputs.is_main }} - name: Clean - if: ${{ inputs.is_main || inputs.os == 'windows-2025' }} + if: ${{ inputs.is_main || inputs.os == 'windows-2022-xl' }} run: cargo clean # ************************************************************************************************ @@ -134,7 +134,7 @@ jobs: RUST_BACKTRACE: full # note: this may be temporary RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2025-xl' && + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && '-Clink-arg=/DEBUG:NONE' || '' }} CARGO_PROFILE_RELEASE_DEBUG: false CARGO_BUILD_JOBS: 1 From d875bd88e34cc348b7e7c8a67cacbc055a748ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:40:53 +0200 Subject: [PATCH 27/36] update expected output --- .github/workflows/ci.yml | 2 +- ops/op2/test_cases/async/async_cppgc.out | 4 ++-- ops/op2/test_cases/sync/cppgc_resource.out | 18 +++++++++--------- ops/op2/test_cases/sync/object_wrap.out | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c877f3ba..fdb40c15d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: jobs: [lint, test] windows: os: windows-2022-xl - jobs: [test] + jobs: [lint, test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main id: read-jobs-tag diff --git a/ops/op2/test_cases/async/async_cppgc.out b/ops/op2/test_cases/async/async_cppgc.out index 782a8b994..63c0cf235 100644 --- a/ops/op2/test_cases/async/async_cppgc.out +++ b/ops/op2/test_cases/async/async_cppgc.out @@ -180,7 +180,7 @@ const fn op_use_cppgc_object() -> ::deno_core::_ops::OpDecl { }; arg0.root(); async move { - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0).await } }; @@ -302,7 +302,7 @@ const fn op_use_optional_cppgc_object() -> ::deno_core::_ops::OpDecl { return 1; }; async move { - let arg0 = arg0.as_deref(); + let arg0 = unsafe { arg0.as_ref().map(|a| a.as_ref()) }; Self::call(arg0).await } }; diff --git a/ops/op2/test_cases/sync/cppgc_resource.out b/ops/op2/test_cases/sync/cppgc_resource.out index 000a0f24e..631eb5f21 100644 --- a/ops/op2/test_cases/sync/cppgc_resource.out +++ b/ops/op2/test_cases/sync/cppgc_resource.out @@ -118,7 +118,7 @@ const fn op_cppgc_object() -> ::deno_core::_ops::OpDecl { return unsafe { std::mem::zeroed() }; } }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; result as _ @@ -143,7 +143,7 @@ const fn op_cppgc_object() -> ::deno_core::_ops::OpDecl { deno_core::_ops::throw_error_one_byte_info(&info, "expected Wrap"); return 1; }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); @@ -310,12 +310,12 @@ const fn op_option_cppgc_object() -> ::deno_core::_ops::OpDecl { }; deno_core::_ops::throw_error_one_byte( &mut scope, - "expected Path { leading_colon: None, segments: [PathSegment { ident: Ident(Wrap), arguments: PathArguments::None }] }", + "expected Wrap", ); return unsafe { std::mem::zeroed() }; } }; - let arg0 = arg0.as_deref(); + let arg0 = unsafe { arg0.as_ref().map(|a| a.as_ref()) }; Self::call(arg0) }; result as _ @@ -344,7 +344,7 @@ const fn op_option_cppgc_object() -> ::deno_core::_ops::OpDecl { deno_core::_ops::throw_error_one_byte_info(&info, "expected Wrap"); return 1; }; - let arg0 = arg0.as_deref(); + let arg0 = unsafe { arg0.as_ref().map(|a| a.as_ref()) }; Self::call(arg0) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); @@ -606,7 +606,7 @@ const fn op_use_cppgc_object() -> ::deno_core::_ops::OpDecl { return unsafe { std::mem::zeroed() }; } }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; result as _ @@ -631,7 +631,7 @@ const fn op_use_cppgc_object() -> ::deno_core::_ops::OpDecl { deno_core::_ops::throw_error_one_byte_info(&info, "expected Wrap"); return 1; }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); @@ -896,7 +896,7 @@ const fn op_use_cppgc_object_option() -> ::deno_core::_ops::OpDecl { return unsafe { std::mem::zeroed() }; } }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; result as _ @@ -921,7 +921,7 @@ const fn op_use_cppgc_object_option() -> ::deno_core::_ops::OpDecl { deno_core::_ops::throw_error_one_byte_info(&info, "expected Wrap"); return 1; }; - let arg0 = &*arg0; + let arg0 = unsafe { arg0.as_ref() }; Self::call(arg0) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); diff --git a/ops/op2/test_cases/sync/object_wrap.out b/ops/op2/test_cases/sync/object_wrap.out index 3e02c0804..b577d2a7a 100644 --- a/ops/op2/test_cases/sync/object_wrap.out +++ b/ops/op2/test_cases/sync/object_wrap.out @@ -186,7 +186,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { Foo::call(self_) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); return 0; @@ -285,7 +285,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { let arg0 = args.get(0usize as i32); let Some(arg0) = deno_core::_ops::to_u32_option(&arg0) else { @@ -413,7 +413,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { let arg0 = args.get(0usize as i32); let Some(arg0) = deno_core::_ops::to_u32_option(&arg0) else { @@ -590,7 +590,7 @@ impl Foo { return unsafe { std::mem::zeroed() }; } }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { self_.call() }; result as _ } @@ -614,7 +614,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { Foo::call(self_) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); return 0; @@ -714,7 +714,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { let arg0 = Some(&args); Foo::call(self_, arg0) @@ -817,7 +817,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { Foo::call(self_) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); return 0; @@ -1003,7 +1003,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { Foo::call(self_) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); return 0; @@ -1169,7 +1169,7 @@ impl Foo { return unsafe { std::mem::zeroed() }; } }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { self_.call() }; result as _ } @@ -1204,7 +1204,7 @@ impl Foo { deno_core::_ops::throw_error_one_byte_info(&info, "expected Foo"); return 1; }; - let self_ = &*self_; + let self_ = unsafe { self_.as_ref() }; let result = { Foo::call(self_) }; deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv); return 0; From 7f2e8f5e8252820d27525e5bb25c0e3c4b25014c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:48:49 +0200 Subject: [PATCH 28/36] update expected output --- ops/op2/test_cases_fail/lifetimes.stderr | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ops/op2/test_cases_fail/lifetimes.stderr b/ops/op2/test_cases_fail/lifetimes.stderr index c6fbb899c..802e63a86 100644 --- a/ops/op2/test_cases_fail/lifetimes.stderr +++ b/ops/op2/test_cases_fail/lifetimes.stderr @@ -1,3 +1,15 @@ +error[E0200]: the trait `GarbageCollected` requires an `unsafe impl` declaration + --> $WORKSPACE/ops/op2/test_cases_fail/lifetimes.rs + | + | impl GarbageCollected for Wrap { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: the trait `GarbageCollected` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword +help: add `unsafe` to this trait implementation + | +8 | unsafe impl GarbageCollected for Wrap { + | ++++++ + error[E0716]: temporary value dropped while borrowed --> $WORKSPACE/ops/op2/test_cases_fail/lifetimes.rs | From 32cdfa97b13ef3b462a7b5b8d96ea990897cf57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 14:56:19 +0200 Subject: [PATCH 29/36] revert changes --- .cargo/config.toml | 5 ----- .github/workflows/ci-job.yml | 9 ++------- .github/workflows/ci-test/action.yml | 6 +----- 3 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 9968ea379..000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,5 +0,0 @@ -[target.'cfg(windows)'] -rustflags = [ - "-Csymbol-mangling-version=v0", - "-Ctarget-feature=+crt-static", -] diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 840b30995..28f0440aa 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -67,7 +67,7 @@ jobs: save-if: ${{ inputs.is_main }} - name: Clean - if: ${{ inputs.is_main || inputs.os == 'windows-2022-xl' }} + if: inputs.is_main run: cargo clean # ************************************************************************************************ @@ -132,9 +132,4 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - # note: this may be temporary - RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && - '-Clink-arg=/DEBUG:NONE' || '' }} - CARGO_PROFILE_RELEASE_DEBUG: false - CARGO_BUILD_JOBS: 1 + RUSTFLAGS: -D warnings diff --git a/.github/workflows/ci-test/action.yml b/.github/workflows/ci-test/action.yml index 5c651aae8..2c8f46a7d 100644 --- a/.github/workflows/ci-test/action.yml +++ b/.github/workflows/ci-test/action.yml @@ -4,16 +4,12 @@ runs: steps: - name: Cargo test shell: bash - env: - CARGO_PROFILE_RELEASE_DEBUG: false run: |- - cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --exclude deno_ops_compile_test_runner + cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --examples --exclude deno_ops_compile_test_runner cargo test --doc - name: Run examples shell: bash - env: - CARGO_PROFILE_RELEASE_DEBUG: false # Only regression tests here for now. # Regression test for https://github.com/denoland/deno/pull/19615. run: |- From eeccaac0f3a8e578c8bb2478c7a55118605e2cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 15:16:45 +0200 Subject: [PATCH 30/36] update --- ops/op2/test_cases/async/async_cppgc.rs | 5 ++++- ops/op2/test_cases/sync/cppgc_resource.rs | 5 ++++- ops/op2/test_cases/sync/object_wrap.rs | 4 +++- ops/op2/test_cases_fail/lifetimes.rs | 4 +++- ops/op2/test_cases_fail/lifetimes.stderr | 12 ++++-------- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ops/op2/test_cases/async/async_cppgc.rs b/ops/op2/test_cases/async/async_cppgc.rs index 8a35ed217..959ed9424 100644 --- a/ops/op2/test_cases/async/async_cppgc.rs +++ b/ops/op2/test_cases/async/async_cppgc.rs @@ -3,10 +3,13 @@ #![deny(warnings)] deno_ops_compile_test_runner::prelude!(); use deno_core::GarbageCollected; +use deno_core::v8; struct Wrap; -impl GarbageCollected for Wrap { +unsafe impl GarbageCollected for Wrap { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"Wrap" } diff --git a/ops/op2/test_cases/sync/cppgc_resource.rs b/ops/op2/test_cases/sync/cppgc_resource.rs index 7b3af0c7b..1f7d02fdb 100644 --- a/ops/op2/test_cases/sync/cppgc_resource.rs +++ b/ops/op2/test_cases/sync/cppgc_resource.rs @@ -3,10 +3,13 @@ #![deny(warnings)] deno_ops_compile_test_runner::prelude!(); use deno_core::GarbageCollected; +use deno_core::v8; struct Wrap; -impl GarbageCollected for Wrap { +unsafe impl GarbageCollected for Wrap { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"Wrap" } diff --git a/ops/op2/test_cases/sync/object_wrap.rs b/ops/op2/test_cases/sync/object_wrap.rs index d23bfada7..0c904b925 100644 --- a/ops/op2/test_cases/sync/object_wrap.rs +++ b/ops/op2/test_cases/sync/object_wrap.rs @@ -11,7 +11,9 @@ pub struct Foo { x: Cell, } -impl GarbageCollected for Foo { +unsafe impl GarbageCollected for Foo { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"Foo" } diff --git a/ops/op2/test_cases_fail/lifetimes.rs b/ops/op2/test_cases_fail/lifetimes.rs index 1998988c8..bdf4dea59 100644 --- a/ops/op2/test_cases_fail/lifetimes.rs +++ b/ops/op2/test_cases_fail/lifetimes.rs @@ -5,7 +5,9 @@ use deno_core::GarbageCollected; struct Wrap; -impl GarbageCollected for Wrap { +unsafe impl GarbageCollected for Wrap { + fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + fn get_name(&self) -> &'static std::ffi::CStr { c"Wrap" } diff --git a/ops/op2/test_cases_fail/lifetimes.stderr b/ops/op2/test_cases_fail/lifetimes.stderr index 802e63a86..1880c904c 100644 --- a/ops/op2/test_cases_fail/lifetimes.stderr +++ b/ops/op2/test_cases_fail/lifetimes.stderr @@ -1,14 +1,10 @@ -error[E0200]: the trait `GarbageCollected` requires an `unsafe impl` declaration +error[E0433]: failed to resolve: use of unresolved module or unlinked crate `v8` --> $WORKSPACE/ops/op2/test_cases_fail/lifetimes.rs | - | impl GarbageCollected for Wrap { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | fn trace(&self, _visitor: &mut v8::cppgc::Visitor) {} + | ^^ use of unresolved module or unlinked crate `v8` | - = note: the trait `GarbageCollected` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword -help: add `unsafe` to this trait implementation - | -8 | unsafe impl GarbageCollected for Wrap { - | ++++++ + = help: if you wanted to use a crate named `v8`, use `cargo add v8` to add it to your `Cargo.toml` error[E0716]: temporary value dropped while borrowed --> $WORKSPACE/ops/op2/test_cases_fail/lifetimes.rs From 37e06999ba23b92e118cee7a6392f6632281fe07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 15:26:51 +0200 Subject: [PATCH 31/36] skip debug info --- .github/workflows/ci-job.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 28f0440aa..46144914c 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,4 +132,6 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full - RUSTFLAGS: -D warnings + RUSTFLAGS: >- + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + '-Clink-arg=/DEBUG:NONE' || '' }} From ced44aae90490f6a0eb2034dd25541584880c8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 15:50:55 +0200 Subject: [PATCH 32/36] move doctests to next step --- .github/workflows/ci-test/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-test/action.yml b/.github/workflows/ci-test/action.yml index 2c8f46a7d..dbcecdd3a 100644 --- a/.github/workflows/ci-test/action.yml +++ b/.github/workflows/ci-test/action.yml @@ -6,6 +6,10 @@ runs: shell: bash run: |- cargo nextest run --workspace --release --features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_runtime_options deno_core/unsafe_use_unprotected_platform" --tests --examples --exclude deno_ops_compile_test_runner + + - name: Cargo test (docs) + shell: bash + run: |- cargo test --doc - name: Run examples From 00be939bcede28ca9f7d5e76e6a3e3e34c04868d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 15:53:25 +0200 Subject: [PATCH 33/36] env vars for rustdoc --- .github/workflows/ci-job.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 46144914c..4cbb70a69 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -135,3 +135,7 @@ jobs: RUSTFLAGS: >- -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && '-Clink-arg=/DEBUG:NONE' || '' }} + + RUSTDOCFLAGS: >- + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + '-Clink-arg=/DEBUG:NONE' || '' }} \ No newline at end of file From 7ec87db8a2bc5f526bdd3348f79ef5fc20fbd516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 18:21:59 +0200 Subject: [PATCH 34/36] try to use codegen-units=1 --- .github/workflows/ci-job.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 4cbb70a69..8e0c97bc1 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -133,9 +133,9 @@ jobs: GH_ACTIONS: 1 RUST_BACKTRACE: full RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && - '-Clink-arg=/DEBUG:NONE' || '' }} + -D warnings ${{ inputs.os == 'windows-2022-xl' && + '-Ccodegen-units=1' || '' }} RUSTDOCFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && - '-Clink-arg=/DEBUG:NONE' || '' }} \ No newline at end of file + -D warnings ${{ inputs.os == 'windows-2022-xl' && + '-Ccodegen-units=1' || '' }} \ No newline at end of file From e4a3da4affe1ad53cf55896bfe4ad172023ac71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 18:30:59 +0200 Subject: [PATCH 35/36] revert --- .github/workflows/ci-job.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 8e0c97bc1..94d4cd754 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -133,9 +133,9 @@ jobs: GH_ACTIONS: 1 RUST_BACKTRACE: full RUSTFLAGS: >- - -D warnings ${{ inputs.os == 'windows-2022-xl' && - '-Ccodegen-units=1' || '' }} + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + '-Clink-arg=/DEBUG:NONE' || '' }} - RUSTDOCFLAGS: >- - -D warnings ${{ inputs.os == 'windows-2022-xl' && - '-Ccodegen-units=1' || '' }} \ No newline at end of file + RUSTFLAGS: >- + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + '-Clink-arg=/DEBUG:NONE' || '' }} \ No newline at end of file From 01cdb50be1047e3f0fb725b737a8400e975f865b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 8 Sep 2025 19:49:26 +0200 Subject: [PATCH 36/36] add comments, revert windows XL --- .github/workflows/ci-job.yml | 9 +++++---- .github/workflows/ci.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 94d4cd754..08934fb96 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -132,10 +132,11 @@ jobs: CARGO_INCREMENTAL: 0 GH_ACTIONS: 1 RUST_BACKTRACE: full + # NOTE(bartlomieju): during upgrade to V8 14.0 we had to disable debug info + # because we were running into PDB errors. RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022' && '-Clink-arg=/DEBUG:NONE' || '' }} - - RUSTFLAGS: >- - -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022-xl' && + RUSTDOCFLAGS: >- + -D warnings -Cdebuginfo=0 ${{ inputs.os == 'windows-2022' && '-Clink-arg=/DEBUG:NONE' || '' }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdb40c15d..e6f973b72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: os: macOS-latest jobs: [lint, test] windows: - os: windows-2022-xl + os: windows-2022 jobs: [lint, test] - name: Read job configuration (tag) uses: cloudposse/github-action-yaml-config-query@main