Stream: git-wasmtime

Topic: wasmtime / issue #3025 update WASI submodule


view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 18:43):

alexcrichton commented on issue #3025:

Thanks! FWIW the location of the WASI submodule is pretty finnicky especially when it comes to publishing to crates.io. For the easiest time updating I'd recommend updating it in-place if possible

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 18:56):

github-actions[bot] commented on issue #3025:

Subscribe to Label Action

cc @kubkon

<details>
This issue or pull request has been labeled: "wasi"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 19:58):

cratelyn commented on issue #3025:

Thanks! FWIW the location of the WASI submodule is pretty finnicky especially when it comes to publishing to crates.io. For the easiest time updating I'd recommend updating it in-place if possible

Thanks @alexcrichton! I'll give that another go, moving the submodule was motivated by errors I was seeing that looked like a variation of rust-lang/cargo#6745. I wasn't able to exclude that directory from the root workspace, so commands like cargo build were failing due to multiple workspace roots being found.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 20:26):

cratelyn commented on issue #3025:

error: multiple workspace roots found in the same workspace:
  /home/katelyn/fsly/wasmtime/crates/wasi-common/WASI/tools/witx
  /home/katelyn/fsly/wasmtime

For reference, this is the error I am seeing after updating the WASI submodule. I believe it's because of the witx-cli changes in WebAssembly/WASI#398 playing poorly with structure of this project.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 20:27):

cratelyn edited a comment on issue #3025:

error: multiple workspace roots found in the same workspace:
  /home/katelyn/fsly/wasmtime/crates/wasi-common/WASI/tools/witx
  /home/katelyn/fsly/wasmtime

For reference, this is the error I am seeing after updating the WASI submodule. I believe it's because of the witx-cli changes in WebAssembly/WASI#398 playing poorly with structure of this project.

As alluded in my comment above, adding an exclude = ["crates/wasi-common/WASI/tools/witx"] to the root manifest doesn't end up working, because "crates/wasi-common" is a member of the workspace.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 20:38):

alexcrichton commented on issue #3025:

Oh dear... I think there's probably three ways to fix this:

  1. Remove the workspace changes to the WASI repository, enabling integration here the same as before.
  2. Fix the issues after moving this vendor dir around (I don't know off-hand how hard this would be)
  3. Depend on the crates.io version of witx, not a git submodule. I think that this would require doing the same steps from (2), but we could just avoid a git submodule.

The easiest is probably the first one here, and the best is probably the 3rd, but that requires changes of how we integrate the WASI spec updates into this repository, since I think we rely on them existing in the wasi-common crate but now they'd be stored in the witx crate itself (I think?) published to crates.io

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 20:41):

alexcrichton commented on issue #3025:

Hm actually scratch that I don't think the witx crate as published to crates.io contains the wasi snapshot witx files. Sorry for this mess :(

I'd probably recommend just hacking around this by removing the [workspace] in the witx crate for now? Ideally we'll fix this in the long term by separating the tooling and the *.witx files since we want tooling as a crates.io dep and the *.witx files as a submodule.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 21:41):

cratelyn commented on issue #3025:

Run rustc scripts/publish.rs
thread 'main' panicked at 'failed to find "witx-cli" in whitelist or blacklist', scripts/publish.rs:135:13

This shouldn't be _too_ hard to fix, but I see some special logic around witx and that'll have to wait until tomorrow morning for me.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 21:42):

cratelyn commented on issue #3025:

Oh I'm going to mark this as "ready for review" since we're kinda already in the process of reviewing this work. :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 15:39):

cratelyn commented on issue #3025:

error: current package believes it's in a workspace when it's not:
current:   /home/runner/work/wasmtime/wasmtime/crates/wasi-common/WASI/tools/witx-cli/Cargo.toml
workspace: /home/runner/work/wasmtime/wasmtime/Cargo.toml

this may be fixable by adding `crates/wasi-common/WASI/tools/witx-cli` to the `workspace.members` array of the manifest located at: /home/runner/work/wasmtime/wasmtime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

Oh no :fearful: It seems it's our old friend again. I'm trying to find a way around this...

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 15:58):

cratelyn edited a comment on issue #3025:

error: current package believes it's in a workspace when it's not:
current:   /home/runner/work/wasmtime/wasmtime/crates/wasi-common/WASI/tools/witx-cli/Cargo.toml
workspace: /home/runner/work/wasmtime/wasmtime/Cargo.toml

this may be fixable by adding `crates/wasi-common/WASI/tools/witx-cli` to the `workspace.members` array of the manifest located at: /home/runner/work/wasmtime/wasmtime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

Oh no :fearful: It seems it's our old friend again. I'm trying to find a way around this. I've tried...

Add witx-cli to root workspace

This fails, with an error that looks like:

error: no matching package named `diff` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
perhaps you meant: ff, der, half, ...
required by package `witx-cli v0.9.1 (/home/katelyn/fsly/wasmtime/crates/wasi-common/WASI/tools/witx-cli)`

Not entirely sure why this happens, honestly? But it seems... wrong.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 16:00):

cratelyn edited a comment on issue #3025:

error: current package believes it's in a workspace when it's not:
current:   /home/runner/work/wasmtime/wasmtime/crates/wasi-common/WASI/tools/witx-cli/Cargo.toml
workspace: /home/runner/work/wasmtime/wasmtime/Cargo.toml

this may be fixable by adding `crates/wasi-common/WASI/tools/witx-cli` to the `workspace.members` array of the manifest located at: /home/runner/work/wasmtime/wasmtime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

Oh no :fearful: It seems it's our old friend again. I'm trying to find a way around this. I've tried...

:one: Add witx-cli to root workspace.members

This fails, with an error that looks like:

error: no matching package named `diff` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
perhaps you meant: ff, der, half, ...
required by package `witx-cli v0.9.1 (/home/katelyn/fsly/wasmtime/crates/wasi-common/WASI/tools/witx-cli)`

Not entirely sure why this happens, honestly? But it seems... wrong.

:two: Add witx-cli to root workspace.exclude

This doesn't change the error, AIUI this is the cargo issue I linked in a comment above.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 16:26):

cratelyn edited a comment on issue #3025:

error: current package believes it's in a workspace when it's not:
current:   /home/runner/work/wasmtime/wasmtime/crates/wasi-common/WASI/tools/witx-cli/Cargo.toml
workspace: /home/runner/work/wasmtime/wasmtime/Cargo.toml

this may be fixable by adding `crates/wasi-common/WASI/tools/witx-cli` to the `workspace.members` array of the manifest located at: /home/runner/work/wasmtime/wasmtime/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

Oh no :fearful: It seems it's our old friend again. I'm trying to find a way around this. I've tried...

:one: Add witx-cli to root workspace.members

This fails, with an error that looks like:

error: no matching package named `diff` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
perhaps you meant: ff, der, half, ...
required by package `witx-cli v0.9.1 (/home/katelyn/fsly/wasmtime/crates/wasi-common/WASI/tools/witx-cli)`

Not entirely sure why this happens, honestly? But it seems... wrong.

:two: Add witx-cli to root workspace.exclude

This doesn't change the error, AIUI this is the cargo issue I linked in a comment above.

:three: Make crates/wasi-common a workspace

This one feels like a non-starter, as we're instantly in a state of multiple workspace roots.


Last updated: Nov 22 2024 at 16:03 UTC