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 cargo-raze and bazelisk #10

Merged
merged 4 commits into from Oct 11, 2020
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
2 changes: 1 addition & 1 deletion BUILD.bazel
@@ -1,6 +1,6 @@
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("//rules:shellcheck.bzl", "shellcheck", "shellcheck_test")
load("@com_github_aignas_rules_shellcheck//:def.bzl", "shellcheck", "shellcheck_test")

# gazelle:build_file_name BUILD.bazel
gazelle(name = "gazelle")
Expand Down
18 changes: 9 additions & 9 deletions WORKSPACE
Expand Up @@ -42,21 +42,21 @@ protobuf_deps()

http_archive(
name = "com_github_bazelbuild_buildtools",
sha256 = "fdb328a2831d82503755fed2e1c7899bb8b9746ff0992e0d74e7b77d658c8903",
sha256 = "f5b666935a827bc2b6e2ca86ea56c796d47f2821c2ff30452d270e51c2a49708",
strip_prefix = "buildtools-3.5.0",
url = "https://github.com/bazelbuild/buildtools/archive/3.5.0.zip",
)

http_archive(
name = "shellcheck",
build_file_content = """
exports_files(["shellcheck"])
""",
sha256 = "64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8",
strip_prefix = "shellcheck-v0.7.1",
urls = ["https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz"],
git_repository(
name = "com_github_aignas_rules_shellcheck",
commit = "94b231c8475f067c60f77459b2b54f4bcacc5e73",
remote = "https://github.com/aignas/rules_shellcheck.git",
)

load("@com_github_aignas_rules_shellcheck//:deps.bzl", "shellcheck_dependencies")

shellcheck_dependencies()

git_repository(
name = "io_bazel_rules_rust",
commit = "3dffbabb3ab65a41056228b5c387d4b78331eaec",
Expand Down
7 changes: 6 additions & 1 deletion cargo/BUILD.bazel
@@ -1,4 +1,5 @@
"""
@generated
cargo-raze workspace build file.

DO NOT EDIT! Replaced on runs of cargo-raze
Expand All @@ -10,8 +11,12 @@ licenses([
"notice", # See individual crates for specific licenses
])

# Aliased targets
alias(
name = "regex",
actual = "@raze__regex__1_3_9//:regex",
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
)
33 changes: 17 additions & 16 deletions cargo/crates.bzl
@@ -1,22 +1,18 @@
"""
@generated
cargo-raze crate workspace functions

DO NOT EDIT! Replaced on runs of cargo-raze
"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")

def _new_http_archive(name, **kwargs):
if not native.existing_rule(name):
http_archive(name = name, **kwargs)

def _new_git_repository(name, **kwargs):
if not native.existing_rule(name):
new_git_repository(name = name, **kwargs)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") # buildifier: disable=load

def raze_fetch_remote_crates():
_new_http_archive(
"""This function defines a collection of repos and should be called in a WORKSPACE file"""
maybe(
http_archive,
name = "raze__aho_corasick__0_7_13",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/aho-corasick/aho-corasick-0.7.13.crate",
type = "tar.gz",
Expand All @@ -25,7 +21,8 @@ def raze_fetch_remote_crates():
build_file = Label("//cargo/remote:aho-corasick-0.7.13.BUILD.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__lazy_static__1_4_0",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/lazy_static/lazy_static-1.4.0.crate",
type = "tar.gz",
Expand All @@ -34,7 +31,8 @@ def raze_fetch_remote_crates():
build_file = Label("//cargo/remote:lazy_static-1.4.0.BUILD.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__memchr__2_3_3",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/memchr/memchr-2.3.3.crate",
type = "tar.gz",
Expand All @@ -43,7 +41,8 @@ def raze_fetch_remote_crates():
build_file = Label("//cargo/remote:memchr-2.3.3.BUILD.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__regex__1_3_9",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/regex/regex-1.3.9.crate",
type = "tar.gz",
Expand All @@ -52,7 +51,8 @@ def raze_fetch_remote_crates():
build_file = Label("//cargo/remote:regex-1.3.9.BUILD.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__regex_syntax__0_6_18",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/regex-syntax/regex-syntax-0.6.18.crate",
type = "tar.gz",
Expand All @@ -61,7 +61,8 @@ def raze_fetch_remote_crates():
build_file = Label("//cargo/remote:regex-syntax-0.6.18.BUILD.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__thread_local__1_0_1",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/thread_local/thread_local-1.0.1.crate",
type = "tar.gz",
Expand Down
34 changes: 20 additions & 14 deletions cargo/remote/aho-corasick-0.7.13.BUILD.bazel
@@ -1,29 +1,33 @@
"""
@generated
cargo-raze crate build file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"unencumbered", # Unlicense from expression "Unlicense OR MIT"
])

# buildifier: disable=load
load(
"@io_bazel_rules_rust//rust:rust.bzl",
"rust_library",
"rust_binary",
"rust_library",
"rust_test",
)

package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"unencumbered", # Unlicense from expression "Unlicense OR MIT"
])

# Generated targets

# buildifier: leave-alone
rust_library(
name = "aho_corasick",
crate_type = "lib",
Expand All @@ -37,10 +41,12 @@ rust_library(
"--cap-lints=allow",
],
version = "0.7.13",
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
crate_features = [
"default",
"std",
],
)

34 changes: 20 additions & 14 deletions cargo/remote/lazy_static-1.4.0.BUILD.bazel
@@ -1,29 +1,33 @@
"""
@generated
cargo-raze crate build file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"notice", # MIT from expression "MIT OR Apache-2.0"
])

# buildifier: disable=load
load(
"@io_bazel_rules_rust//rust:rust.bzl",
"rust_library",
"rust_binary",
"rust_library",
"rust_test",
)

package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"notice", # MIT from expression "MIT OR Apache-2.0"
])

# Generated targets

# buildifier: leave-alone
rust_library(
name = "lazy_static",
crate_type = "lib",
Expand All @@ -36,10 +40,12 @@ rust_library(
"--cap-lints=allow",
],
version = "1.4.0",
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
crate_features = [
],
)

# Unsupported target "no_std" with type "test" omitted
# Unsupported target "test" with type "test" omitted
43 changes: 28 additions & 15 deletions cargo/remote/memchr-2.3.3.BUILD.bazel
@@ -1,37 +1,44 @@
"""
@generated
cargo-raze crate build file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"unencumbered", # Unlicense from expression "Unlicense OR MIT"
])

# buildifier: disable=load
load(
"@io_bazel_rules_rust//rust:rust.bzl",
"rust_library",
"rust_binary",
"rust_library",
"rust_test",
)

package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"unencumbered", # Unlicense from expression "Unlicense OR MIT"
])

# Generated targets
# buildifier: disable=load-on-top
load(
"@io_bazel_rules_rust//cargo:cargo_build_script.bzl",
"cargo_build_script",
)

# buildifier: leave-alone
cargo_build_script(
name = "memchr_build_script",
srcs = glob(["**/*.rs"]),
crate_root = "build.rs",
edition = "2015",
# buildifier: leave-alone
deps = [
],
rustc_flags = [
Expand All @@ -45,12 +52,16 @@ cargo_build_script(
build_script_env = {
},
data = glob(["**"]),
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
version = "2.3.3",
visibility = ["//visibility:private"],
)


# buildifier: leave-alone
rust_library(
name = "memchr",
crate_type = "lib",
Expand All @@ -64,11 +75,13 @@ rust_library(
"--cap-lints=allow",
],
version = "2.3.3",
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
crate_features = [
"default",
"std",
"use_std",
],
)