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

Pull in my landed edition-related PRs from Bazel rules_rust #1040

Merged
merged 1 commit into from Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions WORKSPACE
Expand Up @@ -4,12 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_rust",
sha256 = "29954bced3e0d1a57ff8db816f5cd8a5856179fc657455729f1eb53b39611419",
strip_prefix = "rules_rust-6e1cbbfcd0d140baacc8ff1080f885d2a45296a9",
sha256 = "d39af65fc3b88c204e101d4ddc7dd7543be4e2509fa21c35a5d228f54821a2a9",
strip_prefix = "rules_rust-f7cb22efa64a6a07813e30e9f9d70d1fd18e463e",
urls = [
# PR https://github.com/bazelbuild/rules_rust/pull/1254
# on top of the main branch as of 2022-04-10
"https://github.com/bazelbuild/rules_rust/archive/6e1cbbfcd0d140baacc8ff1080f885d2a45296a9.tar.gz",
# Main branch as of 2022-04-25
"https://github.com/bazelbuild/rules_rust/archive/f7cb22efa64a6a07813e30e9f9d70d1fd18e463e.tar.gz",
],
)

Expand All @@ -18,7 +17,6 @@ load("@rules_rust//rust:repositories.bzl", "rust_repositories")
RUST_VERSION = "1.60.0"

rust_repositories(
edition = "required",
version = RUST_VERSION,
)

Expand Down
12 changes: 6 additions & 6 deletions tools/bazel/third_party.bzl
Expand Up @@ -5,14 +5,14 @@ load("@third-party//:vendor.bzl", "vendored")
def third_party_glob(include):
return vendored and native.glob(include)

def third_party_cargo_build_script(edition, rustc_flags = [], **kwargs):
def third_party_cargo_build_script(rustc_flags = [], **kwargs):
rustc_flags = rustc_flags + ["--cap-lints=allow"]
cargo_build_script(edition = edition, rustc_flags = rustc_flags, **kwargs)
cargo_build_script(rustc_flags = rustc_flags, **kwargs)

def third_party_rust_binary(edition, rustc_flags = [], **kwargs):
def third_party_rust_binary(rustc_flags = [], **kwargs):
rustc_flags = rustc_flags + ["--cap-lints=allow"]
rust_binary(edition = edition, rustc_flags = rustc_flags, **kwargs)
rust_binary(rustc_flags = rustc_flags, **kwargs)

def third_party_rust_library(edition, rustc_flags = [], **kwargs):
def third_party_rust_library(rustc_flags = [], **kwargs):
rustc_flags = rustc_flags + ["--cap-lints=allow"]
rust_library(edition = edition, rustc_flags = rustc_flags, **kwargs)
rust_library(rustc_flags = rustc_flags, **kwargs)