From 46f451452c87943935cfae45d85414e52b7bbe68 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 27 Jun 2024 17:46:20 -0500 Subject: [PATCH] Bump wasm-tools deps (#990) * Bump wasm-tools deps * Disable test with 64 flags * Fix macos/go --- Cargo.lock | 66 +++++++++---------- Cargo.toml | 10 +-- tests/codegen/flags.wit | 12 ---- tests/runtime/records.rs | 4 +- tests/runtime/records/wasm.c | 11 +--- tests/runtime/records/wasm.cs | 11 ++-- tests/runtime/records/wasm.go | 6 +- tests/runtime/records/wasm.rs | 13 ++-- .../wit_exports_test_records_TestImpl.java | 8 +-- .../records/wit_worlds_RecordsImpl.java | 7 +- tests/runtime/records/world.wit | 14 +--- 11 files changed, 62 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b32de2b7d..7b7a51939 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1438,10 +1438,10 @@ name = "test-helpers" version = "0.0.0" dependencies = [ "codegen-macro", - "wasm-encoder 0.211.0", + "wasm-encoder 0.212.0", "wit-bindgen-core", "wit-component", - "wit-parser 0.211.0", + "wit-parser 0.212.0", ] [[package]] @@ -1716,19 +1716,19 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.211.0" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4edac552f5404c9083b446afddf3f1b9e2eb35950e8f5155fa3d7b460b4835be" +checksum = "501940df4418b8929eb6d52f1aade1fdd15a5b86c92453cb696e3c906bd3fc33" dependencies = [ "leb128", - "wasmparser 0.211.0", + "wasmparser 0.212.0", ] [[package]] name = "wasm-metadata" -version = "0.211.0" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e56c3d0178b926f44e7b6cddeaeb0f6269b505c5c6ac36cb107a8fe68cf0a" +checksum = "8a1849fac257fd76c43268555e73d74848c8dff23975c238c2cbad61cffe5045" dependencies = [ "anyhow", "indexmap", @@ -1736,8 +1736,8 @@ dependencies = [ "serde_derive", "serde_json", "spdx", - "wasm-encoder 0.211.0", - "wasmparser 0.211.0", + "wasm-encoder 0.212.0", + "wasmparser 0.212.0", ] [[package]] @@ -1756,9 +1756,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.211.0" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdc36907b68eb391c201401b3e342e175610dae14566e61b6b317216d531355" +checksum = "8d28bc49ba1e5c5b61ffa7a2eace10820443c4b7d1c0b144109261d14570fdf8" dependencies = [ "ahash", "bitflags 2.5.0", @@ -2073,24 +2073,24 @@ dependencies = [ [[package]] name = "wast" -version = "211.0.0" +version = "212.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01019afce6a03155ce7cda8f7eeb4b846a114d0978e16e1a32f7cd9932e282c3" +checksum = "4606a05fb0aae5d11dd7d8280a640d88a63ee019360ba9be552da3d294b8d1f5" dependencies = [ "bumpalo", "leb128", "memchr", "unicode-width", - "wasm-encoder 0.211.0", + "wasm-encoder 0.212.0", ] [[package]] name = "wat" -version = "1.211.0" +version = "1.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779365ca4640d48cd714788626bb622b4f491d7cd3d3ecb1a48bad4082f420ac" +checksum = "c74ca7f93f11a5d6eed8499f2a8daaad6e225cab0151bc25a091fff3b987532f" dependencies = [ - "wast 211.0.0", + "wast 212.0.0", ] [[package]] @@ -2350,11 +2350,11 @@ dependencies = [ "clap", "heck 0.5.0", "test-helpers", - "wasm-encoder 0.211.0", + "wasm-encoder 0.212.0", "wasm-metadata", "wit-bindgen-core", "wit-component", - "wit-parser 0.211.0", + "wit-parser 0.212.0", ] [[package]] @@ -2365,8 +2365,8 @@ dependencies = [ "clap", "heck 0.5.0", "test-artifacts", - "wasm-encoder 0.211.0", - "wasmparser 0.211.0", + "wasm-encoder 0.212.0", + "wasmparser 0.212.0", "wasmtime", "wasmtime-wasi", "wit-bindgen-c", @@ -2377,7 +2377,7 @@ dependencies = [ "wit-bindgen-rust", "wit-bindgen-teavm-java", "wit-component", - "wit-parser 0.211.0", + "wit-parser 0.212.0", ] [[package]] @@ -2386,7 +2386,7 @@ version = "0.26.0" dependencies = [ "anyhow", "heck 0.5.0", - "wit-parser 0.211.0", + "wit-parser 0.212.0", ] [[package]] @@ -2398,9 +2398,9 @@ dependencies = [ "heck 0.5.0", "indexmap", "test-helpers", - "wasm-encoder 0.211.0", + "wasm-encoder 0.212.0", "wasm-metadata", - "wasmparser 0.211.0", + "wasmparser 0.212.0", "wit-bindgen-core", "wit-component", ] @@ -2483,9 +2483,9 @@ dependencies = [ [[package]] name = "wit-component" -version = "0.211.0" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527854bf3c712340abdb71f2e44aea9c8a98c13fdd32e67efff3c27ee6775fe6" +checksum = "8ed5b0f9fc3d6424787d2a49e1142bf954ae4f26ee891992c144f0cfd68c4b7f" dependencies = [ "anyhow", "bitflags 2.5.0", @@ -2494,11 +2494,11 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder 0.211.0", + "wasm-encoder 0.212.0", "wasm-metadata", - "wasmparser 0.211.0", + "wasmparser 0.212.0", "wat", - "wit-parser 0.211.0", + "wit-parser 0.212.0", ] [[package]] @@ -2521,9 +2521,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.211.0" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cafc0ef6c5b790a3df1ec53dee41c37ebe560bc465e509e8a5ed9fe620ef1865" +checksum = "ceeb0424aa8679f3fcf2d6e3cfa381f3d6fa6179976a2c05a6249dd2bb426716" dependencies = [ "anyhow", "id-arena", @@ -2534,7 +2534,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser 0.211.0", + "wasmparser 0.212.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f84b4384e..0eacb4fac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,11 +30,11 @@ indexmap = "2.0.0" prettyplease = "0.2.20" syn = { version = "2.0", features = ["printing"] } -wasmparser = "0.211.0" -wasm-encoder = "0.211.0" -wasm-metadata = "0.211.0" -wit-parser = "0.211.0" -wit-component = "0.211.0" +wasmparser = "0.212.0" +wasm-encoder = "0.212.0" +wasm-metadata = "0.212.0" +wit-parser = "0.212.0" +wit-component = "0.212.0" wit-bindgen-core = { path = 'crates/core', version = '0.26.0' } wit-bindgen-c = { path = 'crates/c', version = '0.26.0' } diff --git a/tests/codegen/flags.wit b/tests/codegen/flags.wit index 2993ebe12..0a6c799d3 100644 --- a/tests/codegen/flags.wit +++ b/tests/codegen/flags.wit @@ -29,17 +29,6 @@ interface %flags { b24, b25, b26, b27, b28, b29, b30, b31, } - flags flag64 { - b0, b1, b2, b3, b4, b5, b6, b7, - b8, b9, b10, b11, b12, b13, b14, b15, - b16, b17, b18, b19, b20, b21, b22, b23, - b24, b25, b26, b27, b28, b29, b30, b31, - b32, b33, b34, b35, b36, b37, b38, b39, - b40, b41, b42, b43, b44, b45, b46, b47, - b48, b49, b50, b51, b52, b53, b54, b55, - b56, b57, b58, b59, b60, b61, b62, b63, - } - flags withdashes { with-dashes, } @@ -50,7 +39,6 @@ interface %flags { roundtrip-flag8: func(x: flag8) -> flag8; roundtrip-flag16: func(x: flag16) -> flag16; roundtrip-flag32: func(x: flag32) -> flag32; - roundtrip-flag64: func(x: flag64) -> flag64; } world the-flags { diff --git a/tests/runtime/records.rs b/tests/runtime/records.rs index 4fd31f570..58de8e4c2 100644 --- a/tests/runtime/records.rs +++ b/tests/runtime/records.rs @@ -32,14 +32,12 @@ impl test_imports::Host for MyImports { a: test_imports::Flag8, b: test_imports::Flag16, c: test_imports::Flag32, - d: test_imports::Flag64, ) -> ( test_imports::Flag8, test_imports::Flag16, test_imports::Flag32, - test_imports::Flag64, ) { - (a, b, c, d) + (a, b, c) } fn roundtrip_record1(&mut self, a: test_imports::R1) -> test_imports::R1 { diff --git a/tests/runtime/records/wasm.c b/tests/runtime/records/wasm.c index 979327f0f..be6f024b4 100644 --- a/tests/runtime/records/wasm.c +++ b/tests/runtime/records/wasm.c @@ -31,13 +31,11 @@ void records_test_imports() { test_records_test_flag8_t flag8; test_records_test_flag16_t flag16; test_records_test_flag32_t flag32; - test_records_test_flag64_t flag64; - test_records_test_roundtrip_flags3(TEST_RECORDS_TEST_FLAG8_B0, TEST_RECORDS_TEST_FLAG16_B1, TEST_RECORDS_TEST_FLAG32_B2, TEST_RECORDS_TEST_FLAG64_B3, - &flag8, &flag16, &flag32, &flag64); + test_records_test_roundtrip_flags3(TEST_RECORDS_TEST_FLAG8_B0, TEST_RECORDS_TEST_FLAG16_B1, TEST_RECORDS_TEST_FLAG32_B2, + &flag8, &flag16, &flag32); assert(flag8 == TEST_RECORDS_TEST_FLAG8_B0); assert(flag16 == TEST_RECORDS_TEST_FLAG16_B1); assert(flag32 == TEST_RECORDS_TEST_FLAG32_B2); - assert(flag64 == TEST_RECORDS_TEST_FLAG64_B3); { test_records_test_r1_t a, b; @@ -85,15 +83,12 @@ void exports_test_records_test_roundtrip_flags3( exports_test_records_test_flag8_t a, exports_test_records_test_flag16_t b, exports_test_records_test_flag32_t c, - exports_test_records_test_flag64_t d, exports_test_records_test_flag8_t *ret0, exports_test_records_test_flag16_t *ret1, - exports_test_records_test_flag32_t *ret2, - exports_test_records_test_flag64_t *ret3) { + exports_test_records_test_flag32_t *ret2) { *ret0 = a; *ret1 = b; *ret2 = c; - *ret3 = d; } void exports_test_records_test_roundtrip_record1(exports_test_records_test_r1_t *a, exports_test_records_test_r1_t *ret0) { diff --git a/tests/runtime/records/wasm.cs b/tests/runtime/records/wasm.cs index 7cfd2f627..9d2090b90 100644 --- a/tests/runtime/records/wasm.cs +++ b/tests/runtime/records/wasm.cs @@ -30,11 +30,10 @@ public static void TestImports() { var result = TestInterop.RoundtripFlags3(ITest.Flag8.B0, ITest.Flag16.B1, - ITest.Flag32.B2, ITest.Flag64.B3); + ITest.Flag32.B2); Debug.Assert(result.Item1 == ITest.Flag8.B0); Debug.Assert(result.Item2 == ITest.Flag16.B1); Debug.Assert(result.Item3 == ITest.Flag32.B2); - Debug.Assert(result.Item4 == ITest.Flag64.B3); } { @@ -89,14 +88,12 @@ public static ITest.F2 RoundtripFlags2( public static (ITest.Flag8, ITest.Flag16, - ITest.Flag32, - ITest.Flag64) RoundtripFlags3( + ITest.Flag32) RoundtripFlags3( ITest.Flag8 a, ITest.Flag16 b, - ITest.Flag32 c, - ITest.Flag64 d) + ITest.Flag32 c) { - return (a, b, c, d); + return (a, b, c); } public static ITest.R1 RoundtripRecord1( diff --git a/tests/runtime/records/wasm.go b/tests/runtime/records/wasm.go index 7732b8730..948b95afa 100644 --- a/tests/runtime/records/wasm.go +++ b/tests/runtime/records/wasm.go @@ -43,7 +43,7 @@ func (r *RecordImpl) TestImports() { panic("TestRecordsTestRoundtripFlags2") } - if a, b, c, d := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2, TestRecordsTestFlag64_B3); a != TestRecordsTestFlag8_B0 && b != TestRecordsTestFlag16_B1 && c != TestRecordsTestFlag32_B2 && d != TestRecordsTestFlag64_B3 { + if a, b, c := TestRecordsTestRoundtripFlags3(TestRecordsTestFlag8_B0, TestRecordsTestFlag16_B1, TestRecordsTestFlag32_B2); a != TestRecordsTestFlag8_B0 && b != TestRecordsTestFlag16_B1 && c != TestRecordsTestFlag32_B2 { panic("TestRecordsTestRoundtripFlags3") } @@ -78,8 +78,8 @@ func (r *RecordImpl) RoundtripFlags2(a ExportsTestRecordsTestF2) ExportsTestReco return a } -func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32, d ExportsTestRecordsTestFlag64) (ExportsTestRecordsTestFlag8, ExportsTestRecordsTestFlag16, ExportsTestRecordsTestFlag32, ExportsTestRecordsTestFlag64) { - return a, b, c, d +func (r *RecordImpl) RoundtripFlags3(a ExportsTestRecordsTestFlag8, b ExportsTestRecordsTestFlag16, c ExportsTestRecordsTestFlag32) (ExportsTestRecordsTestFlag8, ExportsTestRecordsTestFlag16, ExportsTestRecordsTestFlag32) { + return a, b, c } func (r *RecordImpl) RoundtripRecord1(a ExportsTestRecordsTestR1) ExportsTestRecordsTestR1 { diff --git a/tests/runtime/records/wasm.rs b/tests/runtime/records/wasm.rs index 7812b9c59..1ce6f4c11 100644 --- a/tests/runtime/records/wasm.rs +++ b/tests/runtime/records/wasm.rs @@ -26,8 +26,8 @@ impl Guest for Component { assert_eq!(roundtrip_flags2(F2::C | F2::E), F2::C | F2::E); assert_eq!( - roundtrip_flags3(Flag8::B0, Flag16::B1, Flag32::B2, Flag64::B3), - (Flag8::B0, Flag16::B1, Flag32::B2, Flag64::B3) + roundtrip_flags3(Flag8::B0, Flag16::B1, Flag32::B2), + (Flag8::B0, Flag16::B1, Flag32::B2) ); let r = roundtrip_record1(R1 { @@ -65,13 +65,8 @@ impl exports::test::records::test::Guest for Component { a } - fn roundtrip_flags3( - a: Flag8, - b: Flag16, - c: Flag32, - d: Flag64, - ) -> (Flag8, Flag16, Flag32, Flag64) { - (a, b, c, d) + fn roundtrip_flags3(a: Flag8, b: Flag16, c: Flag32) -> (Flag8, Flag16, Flag32) { + (a, b, c) } fn roundtrip_record1(a: R1) -> R1 { diff --git a/tests/runtime/records/wit_exports_test_records_TestImpl.java b/tests/runtime/records/wit_exports_test_records_TestImpl.java index 604795b0c..ae26a849a 100644 --- a/tests/runtime/records/wit_exports_test_records_TestImpl.java +++ b/tests/runtime/records/wit_exports_test_records_TestImpl.java @@ -2,7 +2,7 @@ import wit.worlds.Records.Tuple1; import wit.worlds.Records.Tuple2; -import wit.worlds.Records.Tuple4; +import wit.worlds.Records.Tuple3; public class TestImpl { public static Tuple2 multipleResults() { @@ -21,10 +21,10 @@ public static Test.F2 roundtripFlags2(Test.F2 a) { return a; } - public static Tuple4 roundtripFlags3 - (Test.Flag8 a, Test.Flag16 b, Test.Flag32 c, Test.Flag64 d) + public static Tuple3 roundtripFlags3 + (Test.Flag8 a, Test.Flag16 b, Test.Flag32 c) { - return new Tuple4<>(a, b, c, d); + return new Tuple3<>(a, b, c); } public static Test.R1 roundtripRecord1(Test.R1 a) { diff --git a/tests/runtime/records/wit_worlds_RecordsImpl.java b/tests/runtime/records/wit_worlds_RecordsImpl.java index c4f1aa8e1..e9b48f65f 100644 --- a/tests/runtime/records/wit_worlds_RecordsImpl.java +++ b/tests/runtime/records/wit_worlds_RecordsImpl.java @@ -2,7 +2,7 @@ import wit.worlds.Records.Tuple1; import wit.worlds.Records.Tuple2; -import wit.worlds.Records.Tuple4; +import wit.worlds.Records.Tuple3; import wit.imports.test.records.Test; public class RecordsImpl { @@ -34,13 +34,12 @@ public static void testImports() { == (byte) (Test.F2.C.value | Test.F2.E.value)); { - Tuple4 results = - Test.roundtripFlags3(Test.Flag8.B0, Test.Flag16.B1, Test.Flag32.B2, Test.Flag64.B3); + Tuple3 results = + Test.roundtripFlags3(Test.Flag8.B0, Test.Flag16.B1, Test.Flag32.B2); expect(results.f0.value == Test.Flag8.B0.value); expect(results.f1.value == Test.Flag16.B1.value); expect(results.f2.value == Test.Flag32.B2.value); - expect(results.f3.value == Test.Flag64.B3.value); } { diff --git a/tests/runtime/records/world.wit b/tests/runtime/records/world.wit index d85ed0a07..fcf093ad5 100644 --- a/tests/runtime/records/world.wit +++ b/tests/runtime/records/world.wit @@ -27,19 +27,9 @@ interface test { b24, b25, b26, b27, b28, b29, b30, b31, } - flags flag64 { - b0, b1, b2, b3, b4, b5, b6, b7, - b8, b9, b10, b11, b12, b13, b14, b15, - b16, b17, b18, b19, b20, b21, b22, b23, - b24, b25, b26, b27, b28, b29, b30, b31, - b32, b33, b34, b35, b36, b37, b38, b39, - b40, b41, b42, b43, b44, b45, b46, b47, - b48, b49, b50, b51, b52, b53, b54, b55, - b56, b57, b58, b59, b60, b61, b62, b63, - } - roundtrip-flags3: func(a: flag8, b: flag16, c: flag32, d: flag64) -> - (f8: flag8, f16: flag16, %f32: flag32, %f64: flag64); + roundtrip-flags3: func(a: flag8, b: flag16, c: flag32) -> + (f8: flag8, f16: flag16, %f32: flag32); record r1 { a: u8, b: f1 } roundtrip-record1: func(a: r1) -> r1;