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

Renamed BUILD and WORKSPACE files to BUILD.bazel and WORKSPACE.bazel #665

Merged
merged 2 commits into from
Mar 30, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions cargo/cargo_build_script.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ def cargo_build_script(
rustc_env (dict, optional): Environment variables to set in rustc when compiling the build script.
**kwargs: Forwards to the underlying `rust_binary` rule.
"""

# This duplicates the code in _build_script_impl because we need to make these available both when we invoke rustc (this code) and when we run the compiled build script (_build_script_impl).
# https://github.com/bazelbuild/rules_rust/issues/661 will hopefully remove this duplication.
rustc_env = dict(rustc_env)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/crate_universe/basic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ rust_binary(
sh_test(
name = "test",
srcs = ["test.sh"],
data = [":basic"],
args = ["$(location :basic)"],
data = [":basic"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rust_repositories()
# Need to have an http_file along the lines of:
#
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
#
#
# http_file(
# name = "crate_universe_resolver_darwin",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
# sha256 = "FILL_ME_IN",
# executable = True,
# )
#
#
# http_file(
# name = "crate_universe_resolver_linux",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "openssl",
build_file = "@examples//third_party/openssl:BUILD.openssl.bazel",
sha256 = "23011a5cc78e53d0dc98dfa608c51e72bcd350aa57df74c5d5574ba4ffb62e74",
strip_prefix = "openssl-OpenSSL_1_1_1d",
urls = ["https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz"],
sha256 = "23011a5cc78e53d0dc98dfa608c51e72bcd350aa57df74c5d5574ba4ffb62e74",
build_file = "@examples//third_party/openssl:BUILD.openssl.bazel",
)

load("@rules_rust//rust:repositories.bzl", "rust_repositories")
Expand All @@ -25,14 +25,14 @@ rust_repositories()
# Need to have an http_file along the lines of:
#
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
#
#
# http_file(
# name = "crate_universe_resolver_darwin",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
# sha256 = "FILL_ME_IN",
# executable = True,
# )
#
#
# http_file(
# name = "crate_universe_resolver_linux",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
Expand Down
1 change: 0 additions & 1 deletion examples/crate_universe/uses_proc_macro/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ load(
"@rules_rust//rust:rust.bzl",
"rust_binary",
)

load("@rust_deps//:defs.bzl", "crate")

rust_binary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rust_repositories()
# Need to have an http_file along the lines of:
#
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
#
#
# http_file(
# name = "crate_universe_resolver_darwin",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
# sha256 = "FILL_ME_IN",
# executable = True,
# )
#
#
# http_file(
# name = "crate_universe_resolver_linux",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rust_repositories()
# Need to have an http_file along the lines of:
#
# load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
#
#
# http_file(
# name = "crate_universe_resolver_darwin",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
# sha256 = "FILL_ME_IN",
# executable = True,
# )
#
#
# http_file(
# name = "crate_universe_resolver_linux",
# urls = ["file:///PATH/TO/rules_rust/cargo/crate_universe_resolver/target/release/crate_universe_resolver"],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _rust_test_common(ctx, toolchain, output):
root = crate.root,
srcs = depset(ctx.files.srcs, transitive = [crate.srcs]),
deps = depset(ctx.attr.deps, transitive = [crate.deps]),
proc_macro_deps = depset( ctx.attr.proc_macro_deps, transitive = [crate.proc_macro_deps]),
proc_macro_deps = depset(ctx.attr.proc_macro_deps, transitive = [crate.proc_macro_deps]),
aliases = ctx.attr.aliases,
output = output,
edition = crate.edition,
Expand Down
File renamed without changes.
9 changes: 4 additions & 5 deletions test/build_env/BUILD → test/build_env/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
load(
"//rust:rust.bzl",
"rust_test",
)

load(
"//cargo:cargo_build_script.bzl",
"cargo_build_script",
)
load(
"//rust:rust.bzl",
"rust_test",
)

package(default_visibility = ["//visibility:public"])

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.