Skip to content

Commit ea82cdd

Browse files
katelyn martinalexcrichton
andcommitted
adjust root workspace members
This commit removes some items from the root manifest's workspace members array, and adds `witx-cli` to the root `workspace.exclude` array. The motivation for this stems from a cargo bug described in rust-lang/cargo#6745: `workspace.exclude` does not work if it is nested under a `workspace.members` path. See WebAssembly/WASI#438 for the underlying change to the WASI submodule which reorganized the `witx-cli` crate, and WebAssembly/WASI#398 for the original PR introducing `witx-cli`. See [this comment](bytecodealliance#3025 (comment)) for more details about the compilation errors, and failed alternative approaches that necessitated this change. N.B. This is not a functional change, these crates are still implicitly workspace members as transitive dependencies, but this will allow us to side-step the aforementioned cargo bug. Co-Authored-By: Alex Crichton <[email protected]>
1 parent ef23b7e commit ea82cdd

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

Cargo.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,13 @@ members = [
7373
"cranelift",
7474
"crates/bench-api",
7575
"crates/c-api",
76-
"crates/fuzzing",
7776
"crates/misc/run-examples",
78-
"crates/wiggle",
79-
"crates/wiggle/generate",
80-
"crates/wiggle/macro",
81-
"crates/wasi-common",
82-
"crates/wasi-common/cap-std-sync",
83-
"crates/wasi-common/tokio",
8477
"examples/fib-debug/wasm",
8578
"examples/wasi/wasm",
8679
"examples/tokio/wasm",
8780
"fuzz",
8881
]
82+
exclude = ['crates/wasi-common/WASI/tools/witx-cli']
8983

9084
[features]
9185
default = ["jitdump", "wasmtime/wat", "wasmtime/parallel-compilation", "wasi-nn"]

scripts/publish.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,13 @@ fn verify(crates: &[Crate]) {
302302
fs::create_dir_all(".cargo").unwrap();
303303
fs::write(".cargo/config.toml", vendor.stdout).unwrap();
304304

305-
// Vendor 'witx' and 'witx-cli'. These were not vendored because they are a path dependencies,
306-
// but they will need to be in our directory registry for crates that depend on them.
307-
for krate in crates
305+
// Vendor witx which wasn't vendored because it's a path dependency, but
306+
// it'll need to be in our directory registry for crates that depend on it.
307+
let witx = crates
308308
.iter()
309-
.filter(|Crate { name, .. }| (name == "witx" || name == "witx-cli"))
310-
.filter(|c| c.manifest.iter().any(|p| p == "wasi-common"))
311-
{
312-
verify_and_vendor(&krate);
313-
}
309+
.find(|c| c.name == "witx" && c.manifest.iter().any(|p| p == "wasi-common"))
310+
.unwrap();
311+
verify_and_vendor(&witx);
314312

315313
// Vendor wasi-crypto which is also a path dependency
316314
let wasi_crypto = crates.iter().find(|c| c.name == "wasi-crypto").unwrap();

0 commit comments

Comments
 (0)