From 4f79a79400713cd68d5df4943476f6fe4507bbd2 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Thu, 1 Jul 2021 14:56:28 -0700 Subject: [PATCH] Update Bazel tools and dependencies. (#113) Signed-off-by: Piotr Sikora --- .bazelversion | 2 +- README.md | 2 +- WORKSPACE | 7 +- bazel/cargo/BUILD.bazel | 2 +- bazel/cargo/Cargo.raze.lock | 16 ++--- bazel/cargo/crates.bzl | 40 +++++------ ...sh-0.7.2.bazel => BUILD.ahash-0.7.4.bazel} | 8 +-- bazel/cargo/remote/BUILD.chrono-0.4.19.bazel | 2 +- ....2.2.bazel => BUILD.getrandom-0.2.3.bazel} | 70 +------------------ .../cargo/remote/BUILD.hashbrown-0.11.2.bazel | 2 +- ...c-0.2.91.bazel => BUILD.libc-0.2.97.bazel} | 4 +- ....7.2.bazel => BUILD.once_cell-1.8.0.bazel} | 2 +- bazel/cargo/remote/BUILD.time-0.1.43.bazel | 2 +- bazel/repositories.bzl | 6 +- 14 files changed, 49 insertions(+), 116 deletions(-) rename bazel/cargo/remote/{BUILD.ahash-0.7.2.bazel => BUILD.ahash-0.7.4.bazel} (97%) rename bazel/cargo/remote/{BUILD.getrandom-0.2.2.bazel => BUILD.getrandom-0.2.3.bazel} (56%) rename bazel/cargo/remote/{BUILD.libc-0.2.91.bazel => BUILD.libc-0.2.97.bazel} (97%) rename bazel/cargo/remote/{BUILD.once_cell-1.7.2.bazel => BUILD.once_cell-1.8.0.bazel} (98%) diff --git a/.bazelversion b/.bazelversion index fcdb2e10..ee74734a 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.0.0 +4.1.0 diff --git a/README.md b/README.md index bbe3a5d1..eb7886da 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,6 @@ When updating dependencies, you need to regenerate Bazel `BUILD` files to match updated `Cargo.toml`: ``` -cargo install cargo-raze --version 0.11.0 +cargo install cargo-raze --version 0.12.0 cargo raze --generate-lockfile ``` diff --git a/WORKSPACE b/WORKSPACE index d409f914..f0a3cad8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -14,10 +14,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "cargo_raze", - sha256 = "73c5cea8ad3f4ef7788116d491070eeb27819fe0f923dbb6f451f69dd5fa752c", - # v0.11.0 with a few Bazel fixes. - strip_prefix = "cargo-raze-7614085d2748e55ad3032c9b1dca78f6011cb40e", - url = "https://github.com/google/cargo-raze/archive/7614085d2748e55ad3032c9b1dca78f6011cb40e.tar.gz", + sha256 = "0a7986b1a8ec965ee7aa317ac61e82ea08568cfdf36b7ccc4dd3d1aff3b36e0b", + strip_prefix = "cargo-raze-0.12.0", + url = "https://github.com/google/cargo-raze/archive/v0.12.0.tar.gz", ) load("@cargo_raze//:repositories.bzl", "cargo_raze_repositories") diff --git a/bazel/cargo/BUILD.bazel b/bazel/cargo/BUILD.bazel index 83824d0b..02ce1ac9 100644 --- a/bazel/cargo/BUILD.bazel +++ b/bazel/cargo/BUILD.bazel @@ -32,7 +32,7 @@ alias( alias( name = "getrandom", - actual = "@raze__getrandom__0_2_2//:getrandom", + actual = "@raze__getrandom__0_2_3//:getrandom", tags = [ "cargo-raze", "manual", diff --git a/bazel/cargo/Cargo.raze.lock b/bazel/cargo/Cargo.raze.lock index 29166ccd..5df44113 100644 --- a/bazel/cargo/Cargo.raze.lock +++ b/bazel/cargo/Cargo.raze.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "ahash" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" dependencies = [ "getrandom", "once_cell", @@ -44,9 +44,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ "cfg-if 1.0.0", "libc", @@ -64,9 +64,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.91" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" +checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "log" @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" [[package]] name = "proxy-wasm" diff --git a/bazel/cargo/crates.bzl b/bazel/cargo/crates.bzl index b75dcb71..bb5bdf40 100644 --- a/bazel/cargo/crates.bzl +++ b/bazel/cargo/crates.bzl @@ -13,12 +13,12 @@ def raze_fetch_remote_crates(): """This function defines a collection of repos and should be called in a WORKSPACE file""" maybe( http_archive, - name = "raze__ahash__0_7_2", - url = "https://crates.io/api/v1/crates/ahash/0.7.2/download", + name = "raze__ahash__0_7_4", + url = "https://crates.io/api/v1/crates/ahash/0.7.4/download", type = "tar.gz", - sha256 = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957", - strip_prefix = "ahash-0.7.2", - build_file = Label("//bazel/cargo/remote:BUILD.ahash-0.7.2.bazel"), + sha256 = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98", + strip_prefix = "ahash-0.7.4", + build_file = Label("//bazel/cargo/remote:BUILD.ahash-0.7.4.bazel"), ) maybe( @@ -53,12 +53,12 @@ def raze_fetch_remote_crates(): maybe( http_archive, - name = "raze__getrandom__0_2_2", - url = "https://crates.io/api/v1/crates/getrandom/0.2.2/download", + name = "raze__getrandom__0_2_3", + url = "https://crates.io/api/v1/crates/getrandom/0.2.3/download", type = "tar.gz", - sha256 = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8", - strip_prefix = "getrandom-0.2.2", - build_file = Label("//bazel/cargo/remote:BUILD.getrandom-0.2.2.bazel"), + sha256 = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753", + strip_prefix = "getrandom-0.2.3", + build_file = Label("//bazel/cargo/remote:BUILD.getrandom-0.2.3.bazel"), ) maybe( @@ -73,12 +73,12 @@ def raze_fetch_remote_crates(): maybe( http_archive, - name = "raze__libc__0_2_91", - url = "https://crates.io/api/v1/crates/libc/0.2.91/download", + name = "raze__libc__0_2_97", + url = "https://crates.io/api/v1/crates/libc/0.2.97/download", type = "tar.gz", - sha256 = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7", - strip_prefix = "libc-0.2.91", - build_file = Label("//bazel/cargo/remote:BUILD.libc-0.2.91.bazel"), + sha256 = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6", + strip_prefix = "libc-0.2.97", + build_file = Label("//bazel/cargo/remote:BUILD.libc-0.2.97.bazel"), ) maybe( @@ -113,12 +113,12 @@ def raze_fetch_remote_crates(): maybe( http_archive, - name = "raze__once_cell__1_7_2", - url = "https://crates.io/api/v1/crates/once_cell/1.7.2/download", + name = "raze__once_cell__1_8_0", + url = "https://crates.io/api/v1/crates/once_cell/1.8.0/download", type = "tar.gz", - sha256 = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3", - strip_prefix = "once_cell-1.7.2", - build_file = Label("//bazel/cargo/remote:BUILD.once_cell-1.7.2.bazel"), + sha256 = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56", + strip_prefix = "once_cell-1.8.0", + build_file = Label("//bazel/cargo/remote:BUILD.once_cell-1.8.0.bazel"), ) maybe( diff --git a/bazel/cargo/remote/BUILD.ahash-0.7.2.bazel b/bazel/cargo/remote/BUILD.ahash-0.7.4.bazel similarity index 97% rename from bazel/cargo/remote/BUILD.ahash-0.7.2.bazel rename to bazel/cargo/remote/BUILD.ahash-0.7.4.bazel index 2228b82e..7588449f 100644 --- a/bazel/cargo/remote/BUILD.ahash-0.7.2.bazel +++ b/bazel/cargo/remote/BUILD.ahash-0.7.4.bazel @@ -53,7 +53,7 @@ cargo_build_script( "cargo-raze", "manual", ], - version = "0.7.2", + version = "0.7.4", visibility = ["//visibility:private"], deps = [ "@raze__version_check__0_9_3//:version_check", @@ -114,7 +114,7 @@ rust_library( "cargo-raze", "manual", ], - version = "0.7.2", + version = "0.7.4", # buildifier: leave-alone deps = [ ":ahash_build_script", @@ -141,8 +141,8 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", ): [ - "@raze__getrandom__0_2_2//:getrandom", - "@raze__once_cell__1_7_2//:once_cell", + "@raze__getrandom__0_2_3//:getrandom", + "@raze__once_cell__1_8_0//:once_cell", ], "//conditions:default": [], }) + selects.with_or({ diff --git a/bazel/cargo/remote/BUILD.chrono-0.4.19.bazel b/bazel/cargo/remote/BUILD.chrono-0.4.19.bazel index e7f7c763..0a338006 100644 --- a/bazel/cargo/remote/BUILD.chrono-0.4.19.bazel +++ b/bazel/cargo/remote/BUILD.chrono-0.4.19.bazel @@ -62,7 +62,7 @@ rust_library( version = "0.4.19", # buildifier: leave-alone deps = [ - "@raze__libc__0_2_91//:libc", + "@raze__libc__0_2_97//:libc", "@raze__num_integer__0_1_44//:num_integer", "@raze__num_traits__0_2_14//:num_traits", "@raze__time__0_1_43//:time", diff --git a/bazel/cargo/remote/BUILD.getrandom-0.2.2.bazel b/bazel/cargo/remote/BUILD.getrandom-0.2.3.bazel similarity index 56% rename from bazel/cargo/remote/BUILD.getrandom-0.2.2.bazel rename to bazel/cargo/remote/BUILD.getrandom-0.2.3.bazel index ae4616f0..a5c69631 100644 --- a/bazel/cargo/remote/BUILD.getrandom-0.2.2.bazel +++ b/bazel/cargo/remote/BUILD.getrandom-0.2.3.bazel @@ -29,71 +29,6 @@ licenses([ ]) # Generated Targets -# buildifier: disable=out-of-order-load -# buildifier: disable=load-on-top -load( - "@rules_rust//cargo:cargo_build_script.bzl", - "cargo_build_script", -) - -cargo_build_script( - name = "getrandom_build_script", - srcs = glob(["**/*.rs"]), - build_script_env = { - }, - crate_features = [ - ], - crate_root = "build.rs", - data = glob(["**"]), - edition = "2018", - rustc_flags = [ - "--cap-lints=allow", - ], - tags = [ - "cargo-raze", - "manual", - ], - version = "0.2.2", - visibility = ["//visibility:private"], - deps = [ - ] + selects.with_or({ - # cfg(all(target_arch = "wasm32", target_os = "unknown")) - ( - "@rules_rust//rust/platform:wasm32-unknown-unknown", - ): [ - ], - "//conditions:default": [], - }) + selects.with_or({ - # cfg(target_os = "wasi") - ( - "@rules_rust//rust/platform:wasm32-wasi", - ): [ - ], - "//conditions:default": [], - }) + selects.with_or({ - # cfg(unix) - ( - "@rules_rust//rust/platform:aarch64-apple-darwin", - "@rules_rust//rust/platform:aarch64-apple-ios", - "@rules_rust//rust/platform:aarch64-linux-android", - "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", - "@rules_rust//rust/platform:arm-unknown-linux-gnueabi", - "@rules_rust//rust/platform:i686-apple-darwin", - "@rules_rust//rust/platform:i686-linux-android", - "@rules_rust//rust/platform:i686-unknown-freebsd", - "@rules_rust//rust/platform:i686-unknown-linux-gnu", - "@rules_rust//rust/platform:powerpc-unknown-linux-gnu", - "@rules_rust//rust/platform:s390x-unknown-linux-gnu", - "@rules_rust//rust/platform:x86_64-apple-darwin", - "@rules_rust//rust/platform:x86_64-apple-ios", - "@rules_rust//rust/platform:x86_64-linux-android", - "@rules_rust//rust/platform:x86_64-unknown-freebsd", - "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", - ): [ - ], - "//conditions:default": [], - }), -) # Unsupported target "mod" with type "bench" omitted @@ -115,10 +50,9 @@ rust_library( "cargo-raze", "manual", ], - version = "0.2.2", + version = "0.2.3", # buildifier: leave-alone deps = [ - ":getrandom_build_script", "@raze__cfg_if__1_0_0//:cfg_if", ] + selects.with_or({ # cfg(all(target_arch = "wasm32", target_os = "unknown")) @@ -155,7 +89,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-freebsd", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", ): [ - "@raze__libc__0_2_91//:libc", + "@raze__libc__0_2_97//:libc", ], "//conditions:default": [], }), diff --git a/bazel/cargo/remote/BUILD.hashbrown-0.11.2.bazel b/bazel/cargo/remote/BUILD.hashbrown-0.11.2.bazel index 6b577211..633ff7b4 100644 --- a/bazel/cargo/remote/BUILD.hashbrown-0.11.2.bazel +++ b/bazel/cargo/remote/BUILD.hashbrown-0.11.2.bazel @@ -54,7 +54,7 @@ rust_library( version = "0.11.2", # buildifier: leave-alone deps = [ - "@raze__ahash__0_7_2//:ahash", + "@raze__ahash__0_7_4//:ahash", ], ) diff --git a/bazel/cargo/remote/BUILD.libc-0.2.91.bazel b/bazel/cargo/remote/BUILD.libc-0.2.97.bazel similarity index 97% rename from bazel/cargo/remote/BUILD.libc-0.2.91.bazel rename to bazel/cargo/remote/BUILD.libc-0.2.97.bazel index 6ec44239..cab6a534 100644 --- a/bazel/cargo/remote/BUILD.libc-0.2.91.bazel +++ b/bazel/cargo/remote/BUILD.libc-0.2.97.bazel @@ -55,7 +55,7 @@ cargo_build_script( "cargo-raze", "manual", ], - version = "0.2.91", + version = "0.2.97", visibility = ["//visibility:private"], deps = [ ], @@ -79,7 +79,7 @@ rust_library( "cargo-raze", "manual", ], - version = "0.2.91", + version = "0.2.97", # buildifier: leave-alone deps = [ ":libc_build_script", diff --git a/bazel/cargo/remote/BUILD.once_cell-1.7.2.bazel b/bazel/cargo/remote/BUILD.once_cell-1.8.0.bazel similarity index 98% rename from bazel/cargo/remote/BUILD.once_cell-1.7.2.bazel rename to bazel/cargo/remote/BUILD.once_cell-1.8.0.bazel index d3a24768..31a732e7 100644 --- a/bazel/cargo/remote/BUILD.once_cell-1.7.2.bazel +++ b/bazel/cargo/remote/BUILD.once_cell-1.8.0.bazel @@ -63,7 +63,7 @@ rust_library( "cargo-raze", "manual", ], - version = "1.7.2", + version = "1.8.0", # buildifier: leave-alone deps = [ ], diff --git a/bazel/cargo/remote/BUILD.time-0.1.43.bazel b/bazel/cargo/remote/BUILD.time-0.1.43.bazel index 1aa9bdd9..477c665d 100644 --- a/bazel/cargo/remote/BUILD.time-0.1.43.bazel +++ b/bazel/cargo/remote/BUILD.time-0.1.43.bazel @@ -51,7 +51,7 @@ rust_library( version = "0.1.43", # buildifier: leave-alone deps = [ - "@raze__libc__0_2_91//:libc", + "@raze__libc__0_2_97//:libc", ] + selects.with_or({ # cfg(windows) ( diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 9a82a47d..bcd5ea0b 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -19,7 +19,7 @@ def proxy_wasm_rust_sdk_repositories(): maybe( http_archive, name = "rules_rust", - sha256 = "0044473997e40c5467aa410912ae8771aa328e2d44d71df073b87f147ab5cfcf", - strip_prefix = "rules_rust-76c44206c4d37491767446c6ccdf1a98274a0887", - url = "https://github.com/bazelbuild/rules_rust/archive/76c44206c4d37491767446c6ccdf1a98274a0887.tar.gz", + sha256 = "d54b379559f3fe6ff0cd251be216a5e35acf241451eec8144455482e8f4748f8", + strip_prefix = "rules_rust-7e7246f6c48a5d4e69744cd79b9ccb8886966ee2", + url = "https://github.com/bazelbuild/rules_rust/archive/7e7246f6c48a5d4e69744cd79b9ccb8886966ee2.tar.gz", )