proxy-wasm-cpp-host icon indicating copy to clipboard operation
proxy-wasm-cpp-host copied to clipboard

deps: bump wasmtime -> 1.0.0

Open RiverPhillips opened this issue 3 years ago • 13 comments

Upgrade wasmtime to v1.0.0

RiverPhillips avatar Sep 27 '22 19:09 RiverPhillips

I was sent here from the Envoy repo and followed the steps here.

Let me know if they've changed and I need to do something different

RiverPhillips avatar Sep 27 '22 19:09 RiverPhillips

Thanks @RiverPhillips ! Hope you changed the cargo version to 0.14.1 as the steps I pointed to was a bit older one with version 0.12

kfaseela avatar Sep 27 '22 20:09 kfaseela

Cheers @kfaseela - I tried 16 but will try it again with 14

RiverPhillips avatar Sep 27 '22 21:09 RiverPhillips

Looks like I'm still getting the following error. Seems like this is a transient reference - not sure the best way to resolve

 Target '@wasmtime__rustix__0_35_10//:rustix' contains an error and its package is in error and referenced by '@wasmtime__wasmtime_runtime__1_0_0//:wasmtime_runtime'

RiverPhillips avatar Sep 27 '22 21:09 RiverPhillips

You need to manually remove duplicate dependencies from errno and rustix crates (see: https://github.com/google/cargo-raze/issues/451).

It should be pretty obvious what to remove when you compare the diff to the current version.

PiotrSikora avatar Sep 28 '22 03:09 PiotrSikora

Apologies for the force push, forgot the DCO.

I believe that should resolve it

RiverPhillips avatar Sep 30 '22 07:09 RiverPhillips

Hi @RiverPhillips, the latest commit in the series is wrong. It removes a legitimate dependency. You need to manually remove duplicate select statements from Bazel rules for errno and rustix crates (see: https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/285/commits/f8f1c0706f59e02441004bc0bb13a26e44c79874).

PiotrSikora avatar Sep 30 '22 23:09 PiotrSikora

Cheers @PiotrSikora I'll revisit ths when I can. I moved this weekend and don't yet have an Internet connection

RiverPhillips avatar Oct 02 '22 16:10 RiverPhillips

You need to manually remove duplicate select statements from Bazel rules for errno and rustix crates (see: f8f1c07).

This is still missing and results in test failing. You might be able to apply that patch directly after updating the crate versions.

PiotrSikora avatar Oct 06 '22 19:10 PiotrSikora

Hi @PiotrSikora, sorry it's taken me a while to get this done

bazel query 'deps(//bazel/cargo/...)'
cd wasmsign && cargo raze && cd ..
cd wasmtime && cargo raze && cd ..
# Ignore manual changes in "errno" and "rustix" crates until fixed in cargo-raze.
# See: https://github.com/google/cargo-raze/issues/451
git diff --exit-code -- ':!wasmtime/remote/BUILD.errno-0.*.bazel' ':!wasmtime/remote/BUILD.rustix-0.*.bazel'

Is now running for me locally so it appears I've finally resolved this

RiverPhillips avatar Oct 08 '22 09:10 RiverPhillips

You need to remove the include_str! macro from the failing crates (see error log), since it doesn't work with Bazel.

PiotrSikora avatar Oct 11 '22 05:10 PiotrSikora

All looks good on my end now @PiotrSikora

RiverPhillips avatar Oct 11 '22 07:10 RiverPhillips

Almost there!

You need to add the wasmtime-bumpalo.patch to bazel/cargo/wasmtime/Cargo.toml instead of bazel/cargo/wasmtime/crates.bzl (which is a generated artifact). There are existing patch examples in that file already.

Also, could you merge with master branch? Thanks!

PiotrSikora avatar Oct 12 '22 04:10 PiotrSikora

Hi @RiverPhillips, you need to again remove the duplicate select statements from Bazel rules for errno and rustix crates (see: https://github.com/proxy-wasm/proxy-wasm-cpp-host/commit/f8f1c0706f59e02441004bc0bb13a26e44c79874), since they were re-added in the bump to v1.0.1.

PiotrSikora avatar Oct 25 '22 02:10 PiotrSikora

:man_facepalming: I've been overwriting my changes when I've tried validating them.

RiverPhillips avatar Oct 25 '22 07:10 RiverPhillips

Sure, hopefully I know what I'm doing now :sweat_smile:

RiverPhillips avatar Oct 27 '22 06:10 RiverPhillips