Skip to content

Commit 4d75577

Browse files
authored
fix cargo test wasmtime-wasi-http --no-default-features --features p3 (#12380)
Recently, the above stopped building. This fixes the damage and adds CI coverage.
1 parent 2326d65 commit 4d75577

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ jobs:
416416
- name: wasmtime-wasi-http
417417
checks: |
418418
-p wasmtime-wasi-http --no-default-features
419+
-p wasmtime-wasi-http --no-default-features --features p3
420+
-p wasmtime-wasi-http --no-default-features --features p3 --all-targets
419421
420422
- name: wasmtime-wasi
421423
checks: |

Cargo.lock

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

crates/wasi-http/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ rustls = { workspace = true, optional = true }
4343
webpki-roots = { workspace = true, optional = true }
4444

4545
[dev-dependencies]
46+
wasmtime-wasi-http = { path = ".", features = ['default-send-request'] }
4647
test-programs-artifacts = { workspace = true }
4748
test-log = { workspace = true }
4849
tracing-subscriber = { workspace = true }
49-
wasmtime = { workspace = true, features = ['cranelift'] }
50+
wasmtime = { workspace = true, features = ['cranelift', 'anyhow'] }
5051
tokio = { workspace = true, features = ['fs', 'macros'] }
5152
futures = { workspace = true, default-features = false, features = ['alloc', 'async-await'] }
5253
sha2 = "0.10.2"

crates/wasi-http/src/p3/conv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ impl ErrorCode {
2525
}
2626

2727
/// Translate a [`hyper::Error`] to a wasi-http [ErrorCode] in the context of a response.
28+
#[cfg(feature = "default-send-request")]
2829
pub(crate) fn from_hyper_response_error(err: hyper::Error) -> Self {
2930
if err.is_timeout() {
3031
return ErrorCode::HttpResponseTimeout;

0 commit comments

Comments
 (0)