Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update rules_rust to fix the issue with repinning the rust crates (so…
…urcegraph#49698) This PR updates `rules_rust` to `v0.19.0`, as we're using Rust `1.68.0` which is only supported in that version. I suspect that's what caused the strange errors when repinning. Quoting @tjdevries explanation on the fix: > Pinned explicitly with features that match the features > required by rocket. Once bazel rules correctly roll up all the features, > we can remove this, but until then, this works just fine for building > with bazel (and we rarely update rocket, so this is fine). The whole issue are coming from: bazelbuild/rules_rust#1884 and bazelbuild/rules_rust#1885 which are addressing the problem upstream. --- Still, this now circles back to a compilation error what we've previously seen. To reproduce it ``` bazel build //docker-images/syntax-highlighter/... ``` Which in turn leads to the following errors: ``` ERROR: /private/var/tmp/_bazel_tech/3eea80c6015362974b7d423d1f30cb62/external/crate_index__futures-util-0.3.21/BUILD.bazel:22:13: Compiling Rust rlib futures_util v0.3.21 (180 files) [for tool] failed: (Exit 1): process_wrapper failed: error executing command (from target @crate_index__futures-util-0.3.21//:futures_util) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper --env-file ... (remaining 82 arguments skipped) Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging error[E0432]: unresolved imports `futures_task::waker`, `futures_task::ArcWake` --> external/crate_index__futures-util-0.3.21/src/stream/stream/flatten_unordered.rs:21:20 | 21 | use futures_task::{waker, ArcWake}; | ^^^^^ ^^^^^^^ no `ArcWake` in the root | | | no `waker` in the root | help: a similar name exists in the module (notice the capitalization): `Waker` error[E0432]: unresolved import `futures_task::ArcWake` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:23:9 | 23 | pub use futures_task::ArcWake; | ^^^^^^^^^^^^^^^^^^^^^ no `ArcWake` in the root error[E0432]: unresolved import `futures_task::waker` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:27:9 | 27 | pub use futures_task::waker; | ^^^^^^^^^^^^^^----- | | | | | help: a similar name exists in the module (notice the capitalization): `Waker` | no `waker` in the root error[E0432]: unresolved imports `futures_task::waker_ref`, `futures_task::WakerRef` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:31:24 | 31 | pub use futures_task::{waker_ref, WakerRef}; | ^^^^^^^^^ ^^^^^^^^ no `WakerRef` in the root | | | no `waker_ref` in the root error: aborting due to 4 previous errors For more information about this error, try `rustc --explain E0432`. ERROR: /private/var/tmp/_bazel_tech/3eea80c6015362974b7d423d1f30cb62/external/crate_index__futures-util-0.3.21/BUILD.bazel:22:13: Compiling Rust rlib futures_util v0.3.21 (180 files) failed: (Exit 1): process_wrapper failed: error executing command (from target @crate_index__futures-util-0.3.21//:futures_util) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_rust/util/process_wrapper/process_wrapper --env-file ... (remaining 82 arguments skipped) Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging error[E0432]: unresolved imports `futures_task::waker`, `futures_task::ArcWake` --> external/crate_index__futures-util-0.3.21/src/stream/stream/flatten_unordered.rs:21:20 | 21 | use futures_task::{waker, ArcWake}; | ^^^^^ ^^^^^^^ no `ArcWake` in the root | | | no `waker` in the root | help: a similar name exists in the module (notice the capitalization): `Waker` error[E0432]: unresolved import `futures_task::ArcWake` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:23:9 | 23 | pub use futures_task::ArcWake; | ^^^^^^^^^^^^^^^^^^^^^ no `ArcWake` in the root error[E0432]: unresolved import `futures_task::waker` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:27:9 | 27 | pub use futures_task::waker; | ^^^^^^^^^^^^^^----- | | | | | help: a similar name exists in the module (notice the capitalization): `Waker` | no `waker` in the root error[E0432]: unresolved imports `futures_task::waker_ref`, `futures_task::WakerRef` --> external/crate_index__futures-util-0.3.21/src/task/mod.rs:31:24 | 31 | pub use futures_task::{waker_ref, WakerRef}; | ^^^^^^^^^ ^^^^^^^^ no `WakerRef` in the root | | | no `waker_ref` in the root error: aborting due to 4 previous errors ``` ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> Green CI. ## App preview: - [Web](https://sg-web-jh-bzl-fix-rust.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more. --------- Co-authored-by: TJ DeVries <devries.timothyj@gmail.com> Co-authored-by: Jason Bedard <jason@aspect.dev>
- Loading branch information