Skip to content

Commit 911ef76

Browse files
authored
refactor handling of multiple WIT paths and/or worlds (#213)
This primarily addresses an issue introduced in v0.22.0 such that targeting a specific WIT path and world via the CLI failed if a Python dependency with a `componentize-py.toml` file was found in the specified search path which also had its own WIT path. In that case, we'd return an error because we couldn't find the CLI-specified world in the `componentize-py.toml`-specified WIT path, without bothering to look in the CLI-specified path. We had a test for a similar scenario, but it wasn't covering this exact case. Addressing the issue required significant refactoring of how multiple WIT paths and/or worlds are juggled. Hopefully the result is a bit easier to follow, although it's still pretty hairy.
1 parent 81d582a commit 911ef76

File tree

18 files changed

+441
-227
lines changed

18 files changed

+441
-227
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "componentize-py"
3-
version = "0.22.1"
3+
version = "0.23.0"
44
edition = "2024"
55
exclude = ["cpython"]
66

examples/cli-p3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ run a Python-based component targetting version `0.3.0-rc-2026-03-15` of the
1111
## Prerequisites
1212

1313
* `Wasmtime` 43.0.0
14-
* `componentize-py` 0.22.1
14+
* `componentize-py` 0.23.0
1515

1616
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1717
you don't have `cargo`, you can download and install from
1818
https://github.com/bytecodealliance/wasmtime/releases/tag/v43.0.0.
1919

2020
```
2121
cargo install --version 43.0.0 wasmtime-cli
22-
pip install componentize-py==0.22.1
22+
pip install componentize-py==0.23.0
2323
```
2424

2525
## Running the demo

examples/cli/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ run a Python-based component targetting the [wasi-cli] `command` world.
1010
## Prerequisites
1111

1212
* `Wasmtime` 38.0.0 or later
13-
* `componentize-py` 0.22.1
13+
* `componentize-py` 0.23.0
1414

1515
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1616
you don't have `cargo`, you can download and install from
1717
https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.0.
1818

1919
```
2020
cargo install --version 38.0.0 wasmtime-cli
21-
pip install componentize-py==0.22.1
21+
pip install componentize-py==0.23.0
2222
```
2323

2424
## Running the demo

examples/http-p3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ run a Python-based component targetting version `0.3.0-rc-2026-03-15` of the
1111
## Prerequisites
1212

1313
* `Wasmtime` 43.0.0
14-
* `componentize-py` 0.22.1
14+
* `componentize-py` 0.23.0
1515

1616
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1717
you don't have `cargo`, you can download and install from
1818
https://github.com/bytecodealliance/wasmtime/releases/tag/v43.0.0.
1919

2020
```
2121
cargo install --version 43.0.0 wasmtime-cli
22-
pip install componentize-py==0.22.1
22+
pip install componentize-py==0.23.0
2323
```
2424

2525
## Running the demo

examples/http/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ run a Python-based component targetting the [wasi-http] `proxy` world.
1010
## Prerequisites
1111

1212
* `Wasmtime` 38.0.0 or later
13-
* `componentize-py` 0.22.1
13+
* `componentize-py` 0.23.0
1414

1515
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1616
you don't have `cargo`, you can download and install from
1717
https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.0.
1818

1919
```
2020
cargo install --version 38.0.0 wasmtime-cli
21-
pip install componentize-py==0.22.1
21+
pip install componentize-py==0.23.0
2222
```
2323

2424
## Running the demo

examples/matrix-math/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ within a guest component.
1111
## Prerequisites
1212

1313
* `wasmtime` 38.0.0 or later
14-
* `componentize-py` 0.22.1
14+
* `componentize-py` 0.23.0
1515
* `NumPy`, built for WASI
1616

1717
Note that we use an unofficial build of NumPy since the upstream project does
@@ -23,7 +23,7 @@ https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.0.
2323

2424
```
2525
cargo install --version 38.0.0 wasmtime-cli
26-
pip install componentize-py==0.22.1
26+
pip install componentize-py==0.23.0
2727
curl -OL https://github.com/dicej/wasi-wheels/releases/download/v0.0.2/numpy-wasi.tar.gz
2828
tar xf numpy-wasi.tar.gz
2929
```

examples/sandbox/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ versions have a different API for working with components, and this example has
1212
not yet been updated to use it.
1313

1414
* `wasmtime-py` 38.0.0
15-
* `componentize-py` 0.22.1
15+
* `componentize-py` 0.23.0
1616

1717
```
18-
pip install componentize-py==0.22.1 wasmtime==38.0.0
18+
pip install componentize-py==0.23.0 wasmtime==38.0.0
1919
```
2020

2121
## Running the demo

examples/tcp-p3/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ run a Python-based component targetting version `0.3.0-rc-2026-03-15` of the
1212
## Prerequisites
1313

1414
* `Wasmtime` 43.0.0
15-
* `componentize-py` 0.22.1
15+
* `componentize-py` 0.23.0
1616

1717
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1818
you don't have `cargo`, you can download and install from
1919
https://github.com/bytecodealliance/wasmtime/releases/tag/v43.0.0.
2020

2121
```
2222
cargo install --version 43.0.0 wasmtime-cli
23-
pip install componentize-py==0.22.1
23+
pip install componentize-py==0.23.0
2424
```
2525

2626
## Running the demo

examples/tcp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ making an outbound TCP request using `wasi-sockets`.
1111
## Prerequisites
1212

1313
* `Wasmtime` 38.0.0 or later
14-
* `componentize-py` 0.22.1
14+
* `componentize-py` 0.23.0
1515

1616
Below, we use [Rust](https://rustup.rs/)'s `cargo` to install `Wasmtime`. If
1717
you don't have `cargo`, you can download and install from
1818
https://github.com/bytecodealliance/wasmtime/releases/tag/v38.0.0.
1919

2020
```
2121
cargo install --version 38.0.0 wasmtime-cli
22-
pip install componentize-py==0.22.1
22+
pip install componentize-py==0.23.0
2323
```
2424

2525
## Running the demo

0 commit comments

Comments
 (0)