Skip to content
Closed
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
9 changes: 0 additions & 9 deletions cargo/private/cargo_toml_info/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""BUILD file for cargo info helper binary."""

load("@rules_python//python:defs.bzl", "py_test")
load("//rust:defs.bzl", "rust_binary", "rust_test")

rust_binary(
Expand All @@ -15,11 +14,3 @@ rust_test(
name = "unit_test",
crate = ":cargo_toml_info",
)

py_test(
name = "declared_manifests_test",
srcs = ["declared_manifests_test.py"],
args = ["$(rlocationpath :cargo_toml_info)"],
data = [":cargo_toml_info"],
deps = ["@rules_python//python/runfiles"],
)
10 changes: 10 additions & 0 deletions cargo/tests/cargo_toml_info/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
load("@rules_python//python:defs.bzl", "py_test")

# Keep dev-only test rules out of the helper package loaded by downstream users.
py_test(
name = "declared_manifests_test",
srcs = ["declared_manifests_test.py"],
args = ["$(rlocationpath //cargo/private/cargo_toml_info)"],
data = ["//cargo/private/cargo_toml_info"],
deps = ["@rules_python//python/runfiles"],
)
9 changes: 9 additions & 0 deletions test/integration/cargo_lints/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
load("@rules_rust//cargo:defs.bzl", "extract_cargo_lints")

# Building this from a downstream module must not load rules_rust's dev dependencies.
# Manual check from this directory: bazel build --lockfile_mode=off //:lints
# Root-module tests cannot reproduce the pruning of dependency dev_dependencies.
extract_cargo_lints(
name = "lints",
manifest = "Cargo.toml",
)
7 changes: 7 additions & 0 deletions test/integration/cargo_lints/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "cargo-lints-consumer"
version = "0.1.0"
edition = "2021"

[lints.rust]
unsafe_code = "forbid"
7 changes: 7 additions & 0 deletions test/integration/cargo_lints/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(name = "cargo_lints_consumer")

bazel_dep(name = "rules_rust", version = "0.0.0")
local_path_override(
module_name = "rules_rust",
path = "../../..",
)