Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rules_rust to v0.38.0 (with Rust v1.75.0). #221

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

mikegrass
Copy link
Contributor

Our rust wasm extensions builds are currently blocked with a dependency failure because the latest ahash wants rustc 1.72 or later:

11:54:16  error: package `ahash v0.8.8` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc version is 1.67.0
11:54:16  Either upgrade to rustc 1.72.0 or newer, or use
11:54:16  cargo update -p [email protected] --precise ver
11:54:16  where `ver` is the latest version of `ahash` supporting rustc 1.67.0

Pulling in rules_rust-v0.38.0 (rustc 1.75) and updating deps.

@PiotrSikora
Copy link
Member

Our rust wasm extensions builds are currently blocked with a dependency failure because the latest ahash wants rustc 1.72 or later:

11:54:16  error: package `ahash v0.8.8` cannot be built because it requires rustc 1.72.0 or newer, while the currently active rustc version is 1.67.0
11:54:16  Either upgrade to rustc 1.72.0 or newer, or use
11:54:16  cargo update -p [email protected] --precise ver
11:54:16  where `ver` is the latest version of `ahash` supporting rustc 1.67.0

I'm slightly confused, because if you're using Bazel, then ahash should be pinned to v0.8.3 (even with this PR), and if you're not, then rules_rust shouldn't matter.

@mikegrass
Copy link
Contributor Author

I'm slightly confused, because if you're using Bazel, then ahash should be pinned to v0.8.3 (even with this PR), and if you're not, then rules_rust shouldn't matter.

That's a good point. We are using bazel, and all the references in our repo and this one are to v0.8.3. I'm new to bazel; is there an easy way to query how a particular version of a dependency is being pulled in?

@PiotrSikora
Copy link
Member

We are using bazel, and all the references in our repo and this one are to v0.8.3. I'm new to bazel; is there an easy way to query how a particular version of a dependency is being pulled in?

bazel query "deps(//:your_target)"

@PiotrSikora
Copy link
Member

But regardless of your issues with ahash, this PR is a good change to make (I already have this in my local tree, but didn't get around to pushing it yet).

@mikegrass
Copy link
Contributor Author

@PiotrSikora Hmm so it turns out our repo is using a bit of a frankenbuild, some parts building with bazel and the rust wasm filters not.

I'll look at cleaning that up so we don't hit surprise dependency upgrade issues like the error above in our build.

We are using this repo to generate portions of our build tooling though, so getting this PR merged will help us unblock while doing the larger build tooling cleanup.

Sounds like it's ready to merge?

@antonengelhardt
Copy link

Just ran into the same issue and for me it helped to upgrade Rust to 1.75 in the Dockerfile (in case you are building with Docker)...

@PiotrSikora
Copy link
Member

Sounds like it's ready to merge?

Almost. Could you also update bazel-skylib, since it's only used by rules_rust?

@mikegrass
Copy link
Contributor Author

Almost. Could you also update bazel-skylib, since it's only used by rules_rust?

Done in the latest commit.

I checked on why our build is structured the way it is for rust extensions (I'm new to this project) -- it turns out that we used to build with bazel but ran into this issue with debuginfo not being stripped: #149. The workaround decided on at the time was to pull in this sdk and use the rustc / cargo versions from it for the build outside of bazel, but now we are hitting this problem with dependency pinning.

I noticed this comment from that issue:

However, Cargo is the preferred method of building plugins using Proxy-Wasm Rust SDK, and Bazel integration exists only to make it easier to integrate with other Bazel projects (e.g. Envoy) when running tests, etc.

Is that still the case? Do you happen to know of a way we could use Bazel builds while also stripping debuginfo?

@PiotrSikora
Copy link
Member

Done in the latest commit.

Thanks! Will get this in after #222.

@PiotrSikora
Copy link
Member

Is that still the case? Do you happen to know of a way we could use Bazel builds while also stripping debuginfo?

It looks like you can strip it with rustc_flags = ["-Cstrip=debuginfo"].

@PiotrSikora PiotrSikora changed the title Update to latest rules_rust-v0.38.0 (rustc 1.75) Update rules_rust to v0.38.0 (with Rust v1.75.0). Feb 14, 2024
@mikegrass
Copy link
Contributor Author

@PiotrSikora I pulled in the changes from the now-merged #222. Can you please review?

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@PiotrSikora PiotrSikora merged commit 7906f6b into proxy-wasm:master Feb 14, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants