diff --git a/Cargo.toml b/Cargo.toml index bf08d10919..9a47941621 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-tools" -version = "1.0.34" +version = "1.0.35" authors = ["The Wasmtime Project Developers"] edition.workspace = true description = "CLI tools for interoperating with WebAssembly files" @@ -43,19 +43,19 @@ url = "2.0.0" pretty_assertions = "1.3.0" semver = "1.0.0" -wasm-encoder = { version = "0.28.0", path = "crates/wasm-encoder"} -wasm-compose = { version = "0.2.16", path = "crates/wasm-compose"} -wasm-metadata = { version = "0.7.0", path = "crates/wasm-metadata" } -wasm-mutate = { version = "0.2.26", path = "crates/wasm-mutate" } -wasm-shrink = { version = "0.1.27", path = "crates/wasm-shrink" } -wasm-smith = { version = "0.12.9", path = "crates/wasm-smith" } -wasmparser = { version = "0.106.0", path = "crates/wasmparser" } -wasmprinter = { version = "0.2.58", path = "crates/wasmprinter" } -wast = { version = "59.0.0", path = "crates/wast" } -wat = { version = "1.0.65", path = "crates/wat" } -wit-component = { version = "0.10.0", path = "crates/wit-component" } -wit-parser = { version = "0.7.1", path = "crates/wit-parser" } -wit-smith = { version = "0.1.4", path = "crates/wit-smith" } +wasm-encoder = { version = "0.29.0", path = "crates/wasm-encoder"} +wasm-compose = { version = "0.2.17", path = "crates/wasm-compose"} +wasm-metadata = { version = "0.8.0", path = "crates/wasm-metadata" } +wasm-mutate = { version = "0.2.27", path = "crates/wasm-mutate" } +wasm-shrink = { version = "0.1.28", path = "crates/wasm-shrink" } +wasm-smith = { version = "0.12.10", path = "crates/wasm-smith" } +wasmparser = { version = "0.107.0", path = "crates/wasmparser" } +wasmprinter = { version = "0.2.59", path = "crates/wasmprinter" } +wast = { version = "60.0.0", path = "crates/wast" } +wat = { version = "1.0.66", path = "crates/wat" } +wit-component = { version = "0.11.0", path = "crates/wit-component" } +wit-parser = { version = "0.8.0", path = "crates/wit-parser" } +wit-smith = { version = "0.1.5", path = "crates/wit-smith" } [dependencies] anyhow = { workspace = true } diff --git a/crates/wasm-compose/Cargo.toml b/crates/wasm-compose/Cargo.toml index c0779143fa..6cfeb01468 100644 --- a/crates/wasm-compose/Cargo.toml +++ b/crates/wasm-compose/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-compose" -version = "0.2.16" +version = "0.2.17" edition.workspace = true authors = ["Peter Huene "] license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/wasm-encoder/Cargo.toml b/crates/wasm-encoder/Cargo.toml index 6900db9a4c..ad7dece388 100644 --- a/crates/wasm-encoder/Cargo.toml +++ b/crates/wasm-encoder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-encoder" -version = "0.28.0" +version = "0.29.0" authors = ["Nick Fitzgerald "] edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/wasm-metadata/Cargo.toml b/crates/wasm-metadata/Cargo.toml index f449e24a02..76bf9859a6 100644 --- a/crates/wasm-metadata/Cargo.toml +++ b/crates/wasm-metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-metadata" -version = "0.7.0" +version = "0.8.0" edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-metadata" diff --git a/crates/wasm-mutate/Cargo.toml b/crates/wasm-mutate/Cargo.toml index 1eb91bd839..32b443ae5d 100644 --- a/crates/wasm-mutate/Cargo.toml +++ b/crates/wasm-mutate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-mutate" -version = "0.2.26" +version = "0.2.27" edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-mutate" diff --git a/crates/wasm-shrink/Cargo.toml b/crates/wasm-shrink/Cargo.toml index 90786a7cb1..81bcbcdea2 100644 --- a/crates/wasm-shrink/Cargo.toml +++ b/crates/wasm-shrink/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0 WITH LLVM-exception" readme = "./README.md" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-shrink" name = "wasm-shrink" -version = "0.1.27" +version = "0.1.28" [dependencies] anyhow = { workspace = true } diff --git a/crates/wasm-smith/Cargo.toml b/crates/wasm-smith/Cargo.toml index a074be5d4d..5d2116a653 100644 --- a/crates/wasm-smith/Cargo.toml +++ b/crates/wasm-smith/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0 WITH LLVM-exception" name = "wasm-smith" readme = "./README.md" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasm-smith" -version = "0.12.9" +version = "0.12.10" exclude = ["/benches/corpus"] [[bench]] diff --git a/crates/wasmparser/Cargo.toml b/crates/wasmparser/Cargo.toml index 45202aa267..b1fbbd67a1 100644 --- a/crates/wasmparser/Cargo.toml +++ b/crates/wasmparser/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmparser" -version = "0.106.0" +version = "0.107.0" authors = ["Yury Delendik "] license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wasmparser" diff --git a/crates/wasmprinter/Cargo.toml b/crates/wasmprinter/Cargo.toml index 672c4b494c..9008c0d68b 100644 --- a/crates/wasmprinter/Cargo.toml +++ b/crates/wasmprinter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasmprinter" -version = "0.2.58" +version = "0.2.59" authors = ["Alex Crichton "] edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/wast/Cargo.toml b/crates/wast/Cargo.toml index 6024414b33..b8f6b1e466 100644 --- a/crates/wast/Cargo.toml +++ b/crates/wast/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wast" -version = "59.0.0" +version = "60.0.0" authors = ["Alex Crichton "] edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/wat/Cargo.toml b/crates/wat/Cargo.toml index 8238fb84ad..cbaec6cc6a 100644 --- a/crates/wat/Cargo.toml +++ b/crates/wat/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wat" -version = "1.0.65" +version = "1.0.66" authors = ["Alex Crichton "] edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/wit-component/Cargo.toml b/crates/wit-component/Cargo.toml index 1ddca87c75..36980f6ff5 100644 --- a/crates/wit-component/Cargo.toml +++ b/crates/wit-component/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wit-component" authors = ["Peter Huene "] -version = "0.10.0" +version = "0.11.0" edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" diff --git a/crates/wit-parser/Cargo.toml b/crates/wit-parser/Cargo.toml index 83915aea4a..b6c7103933 100644 --- a/crates/wit-parser/Cargo.toml +++ b/crates/wit-parser/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wit-parser" authors = ["Alex Crichton "] -version = "0.7.1" +version = "0.8.0" edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" diff --git a/crates/wit-parser/src/resolve.rs b/crates/wit-parser/src/resolve.rs index 125c3c7f29..d5f5cdfba1 100644 --- a/crates/wit-parser/src/resolve.rs +++ b/crates/wit-parser/src/resolve.rs @@ -7,7 +7,7 @@ use crate::{ use anyhow::{anyhow, bail, Context, Result}; use id_arena::{Arena, Id}; use indexmap::{IndexMap, IndexSet}; -use std::collections::{HashMap, HashSet}; +use std::collections::{BTreeMap, HashMap, HashSet}; use std::mem; use std::path::{Path, PathBuf}; @@ -83,7 +83,9 @@ impl Resolve { // this `Resolve`. let mut order = IndexSet::new(); let mut visiting = HashSet::new(); - visit(&pkg, &deps, &mut order, &mut visiting)?; + for pkg in deps.values().chain([&pkg]) { + visit(&pkg, &deps, &mut order, &mut visiting)?; + } // Using the topological ordering insert each package incrementally. // Additionally note that the last item visited here is the root @@ -100,8 +102,8 @@ impl Resolve { return Ok((last.unwrap(), files)); - fn parse_deps_dir(path: &Path) -> Result> { - let mut ret = HashMap::new(); + fn parse_deps_dir(path: &Path) -> Result> { + let mut ret = BTreeMap::new(); // If there's no `deps` dir, then there's no deps, so return the // empty set. if !path.exists() { @@ -122,7 +124,7 @@ impl Resolve { fn visit<'a>( pkg: &'a UnresolvedPackage, - deps: &'a HashMap, + deps: &'a BTreeMap, order: &mut IndexSet, visiting: &mut HashSet<&'a PackageName>, ) -> Result<()> { diff --git a/crates/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result b/crates/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result index 82d1af2645..e521685840 100644 --- a/crates/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result +++ b/crates/wit-parser/tests/ui/parse-fail/pkg-cycle2.wit.result @@ -1,5 +1,5 @@ package depends on itself - --> tests/ui/parse-fail/pkg-cycle2/deps/a2/root.wit:3:7 + --> tests/ui/parse-fail/pkg-cycle2/deps/a1/root.wit:3:7 | - 3 | use foo:a1/foo.{} + 3 | use foo:a2/foo.{} | ^----- \ No newline at end of file diff --git a/crates/wit-smith/Cargo.toml b/crates/wit-smith/Cargo.toml index 57853c5d65..892bc82c8a 100644 --- a/crates/wit-smith/Cargo.toml +++ b/crates/wit-smith/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license = "Apache-2.0 WITH LLVM-exception" name = "wit-smith" repository = "https://github.com/bytecodealliance/wasm-tools/tree/main/crates/wit-smith" -version = "0.1.4" +version = "0.1.5" [dependencies] arbitrary = { workspace = true, features = ["derive"] }