From 512c8a0995ea4085435699d4deb82578cf8e40c2 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Thu, 10 Oct 2024 01:12:33 +0200 Subject: [PATCH] [#439] Use maybe in WORKSPACE file --- WORKSPACE.bazel | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 5ab0a6623..efb0ba46d 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -47,8 +47,9 @@ rust_register_toolchains( # Load prebuilt bindgen -http_archive( +maybe( name = "bindgen", + repo_rule = http_archive, sha256 = "b7e2321ee8c617f14ccc5b9f39b3a804db173ee217e924ad93ed16af6bc62b1d", strip_prefix = "bindgen-cli-x86_64-unknown-linux-gnu", urls = ["https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.5/bindgen-cli-x86_64-unknown-linux-gnu.tar.xz"], @@ -62,8 +63,9 @@ filegroup( ) # Load prebuilt cbindgen -http_file( +maybe( name = "cbindgen", + repo_rule = http_file, sha256 = "521836d00863cb129283054e5090eb17563614e6328b7a1610e30949a05feaea", urls = ["https://github.com/mozilla/cbindgen/releases/download/0.26.0/cbindgen"], executable = True, @@ -76,8 +78,9 @@ crate_universe_dependencies() load("@rules_rust//crate_universe:defs.bzl", "crates_repository") -crates_repository( +maybe( name = "crate_index", + repo_rule = crates_repository, cargo_lockfile = "//:Cargo.lock", lockfile = "//:Cargo.Bazel.lock", manifests = [