Skip to content
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
5 changes: 5 additions & 0 deletions .agents/rules/rules_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ description: rules_python-specific Bzlmod, PyPI, and rule usage invariants
`repr()` for Starlark calls; use `json.encode_indent()` for data constants.
* **`@bazel_tools` `bzl_library` Deps**: Use `"//python/private:bazel_tools"` in
`bzl_library` `deps` for files loading `@bazel_tools//...`.
* **`# buildifier: disable=bzl-visibility` on Internal `/private/` Loads**:
Add trailing `# buildifier: disable=bzl-visibility` comments when `tests/` or
internal non-`python/` packages (such as `crates/**` and `tools/**`) load
repo-internal `/private/` helpers like
`//python/private:distribution_filegroup.bzl`.

## WORKSPACE & Bzlmod Parity
* **Extend Existing Rules Over Adding Parallel Rules**: When bringing a Bzlmod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ thresholds across `git diff`, comments, PR descriptions, and review replies:
`sys.path` manipulation to run a script via raw `python3` outside Bazel
when a binary target exists).
- Lint, type, or formatter suppressions (`# buildifier: disable=...` outside
test `/private/` loads, `# pyrefly: ignore[...]`, `# ruff: noqa`,
`# type: ignore`).
authorized `/private/` loads in `tests/` or internal non-`python/` packages
such as `crates/` and `tools/` loading `distribution_filegroup.bzl`,
`# pyrefly: ignore[...]`, `# ruff: noqa`, `# type: ignore`).
- Custom timeouts or retry counts.
- Review thread replies claiming a rule or convention does not apply.
3. Classify every exception into one of three outcomes:
Expand Down
5 changes: 3 additions & 2 deletions .agents/skills/review-code/review-starlark-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ in `git diff` against the project's Starlark coding rules and conventions:
2. Verify iterative algorithms are used (no recursion, no `while` loops).
3. Ensure every `.bzl` file outside `tests/` has a corresponding `bzl_library`
target in its `BUILD` file with proper dependencies.
4. Ensure loads from `/private/` in test files have
`# buildifier: disable=bzl-visibility`.
4. Ensure loads from `/private/` in test files and internal non-`python/`
packages (e.g., `//python/private:distribution_filegroup.bzl` in `crates/`
or `tools/`) have `# buildifier: disable=bzl-visibility`.
5. Check multi-line rule/macro doc arguments: use triple-quoted strings
(`"""`), and do NOT use trailing backslashes (`\`) on opening triple-quotes.
6. Verify analysis tests use `rules_testing` (not `bazel_skylib`), use
Expand Down
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,11 @@ Dependabot alerts):
When building `//docs:docs`, ignore an error about exit code 2; this is a flake,
so try building again.

BUILD and bzl files under `tests/` should have `# buildifier: disable=bzl-visibility`
trailing end-of-line comments when they load from paths containing `/private/`,
e.g.
BUILD and bzl files under `tests/` (and internal non-`python/` packages such as
`crates/` and `tools/` loading repo-internal helpers like
`//python/private:distribution_filegroup.bzl`) should have
`# buildifier: disable=bzl-visibility` trailing end-of-line comments when they
load from paths containing `/private/`, e.g.

```
load("//python/private:foo.bzl", "foo") # buildifier: disable=bzl-visibility
Expand Down
237 changes: 236 additions & 1 deletion crates/Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "bfd96f7f72752644dc2fe47b6acdae808884857b765d1a28115a0f4004754152",
"checksum": "269e4f7e54f04390547ffeddbf8945aa1cc32a2730cccd1792ad1ad16239b24b",
"crates": {
"adler2 2.0.1": {
"name": "adler2",
Expand Down Expand Up @@ -116,6 +116,103 @@
],
"license_file": "LICENSE-APACHE"
},
"argfile 1.0.0": {
"name": "argfile",
"version": "1.0.0",
"package_url": "https://github.com/rust-cli/argfile.git",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/argfile/1.0.0/download",
"sha256": "99489a733dea0d2930bfa59c243146a8513ce7b0991b9d006647687cc61f53e7"
}
},
"targets": [
{
"Library": {
"crate_name": "argfile",
"crate_root": "src/lib.rs",
"srcs": {
"allow_empty": true,
"include": [
"**/*.rs"
]
}
}
}
],
"library_target_name": "argfile",
"common_attrs": {
"compile_data_glob": [
"**"
],
"crate_features": {
"common": [
"default"
],
"selects": {}
},
"deps": {
"common": [
{
"id": "fs-err 3.3.2",
"target": "fs_err"
},
{
"id": "os_str_bytes 7.2.1",
"target": "os_str_bytes"
}
],
"selects": {}
},
"edition": "2021",
"version": "1.0.0"
},
"license": "MIT OR Apache-2.0",
"license_ids": [
"Apache-2.0",
"MIT"
],
"license_file": "LICENSE-APACHE"
},
"autocfg 1.5.1": {
"name": "autocfg",
"version": "1.5.1",
"package_url": "https://github.com/cuviper/autocfg",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/autocfg/1.5.1/download",
"sha256": "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
}
},
"targets": [
{
"Library": {
"crate_name": "autocfg",
"crate_root": "src/lib.rs",
"srcs": {
"allow_empty": true,
"include": [
"**/*.rs"
]
}
}
}
],
"library_target_name": "autocfg",
"common_attrs": {
"compile_data_glob": [
"**"
],
"edition": "2015",
"version": "1.5.1"
},
"license": "Apache-2.0 OR MIT",
"license_ids": [
"Apache-2.0",
"MIT"
],
"license_file": "LICENSE-APACHE"
},
"bitflags 2.13.2": {
"name": "bitflags",
"version": "2.13.2",
Expand Down Expand Up @@ -686,6 +783,83 @@
],
"license_file": "LICENSE-APACHE"
},
"fs-err 3.3.2": {
"name": "fs-err",
"version": "3.3.2",
"package_url": "https://github.com/andrewhickman/fs-err",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/fs-err/3.3.2/download",
"sha256": "b5c95b673b8f6f7235229ae11c5642d81b04c2e64c1e2fb417bc0cf73ca45f29"
}
},
"targets": [
{
"Library": {
"crate_name": "fs_err",
"crate_root": "src/lib.rs",
"srcs": {
"allow_empty": true,
"include": [
"**/*.rs"
]
}
}
},
{
"BuildScript": {
"crate_name": "build_script_build",
"crate_root": "build.rs",
"srcs": {
"allow_empty": true,
"include": [
"**/*.rs"
]
}
}
}
],
"library_target_name": "fs_err",
"common_attrs": {
"compile_data_glob": [
"**"
],
"extra_deps": {
"common": [
":build_script_build"
],
"selects": {}
},
"edition": "2018",
"version": "3.3.2"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"compile_data_glob_excludes": [
"**/*.rs"
],
"data_glob": [
"**"
],
"deps": {
"common": [
{
"id": "autocfg 1.5.1",
"target": "autocfg"
}
],
"selects": {}
}
},
"license": "MIT OR Apache-2.0",
"license_ids": [
"Apache-2.0",
"MIT"
],
"license_file": "LICENSE-APACHE"
},
"hashbrown 0.17.1": {
"name": "hashbrown",
"version": "0.17.1",
Expand Down Expand Up @@ -1161,6 +1335,62 @@
],
"license_file": "LICENSE"
},
"os_str_bytes 7.2.1": {
"name": "os_str_bytes",
"version": "7.2.1",
"package_url": "https://github.com/dylni/os_str_bytes",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/os_str_bytes/7.2.1/download",
"sha256": "73b489f051c9d2f4299ddf8d55e33c65c86a7b76f49359af15f79ebe541d1595"
}
},
"targets": [
{
"Library": {
"crate_name": "os_str_bytes",
"crate_root": "src/lib.rs",
"srcs": {
"allow_empty": true,
"include": [
"**/*.rs"
]
}
}
}
],
"library_target_name": "os_str_bytes",
"common_attrs": {
"compile_data_glob": [
"**"
],
"crate_features": {
"common": [
"default",
"memchr",
"raw_os_str"
],
"selects": {}
},
"deps": {
"common": [
{
"id": "memchr 2.8.3",
"target": "memchr"
}
],
"selects": {}
},
"edition": "2021",
"version": "7.2.1"
},
"license": "MIT OR Apache-2.0",
"license_ids": [
"Apache-2.0",
"MIT"
],
"license_file": "LICENSE-APACHE"
},
"rules_python_crates 0.0.1": {
"name": "rules_python_crates",
"version": "0.0.1",
Expand Down Expand Up @@ -1191,6 +1421,10 @@
"id": "anyhow 1.0.104",
"target": "anyhow"
},
{
"id": "argfile 1.0.0",
"target": "argfile"
},
{
"id": "flate2 1.1.11",
"target": "flate2"
Expand Down Expand Up @@ -1589,6 +1823,7 @@
},
"direct_deps": [
"anyhow 1.0.104",
"argfile 1.0.0",
"flate2 1.1.11",
"lexopt 0.3.2",
"sha2 0.11.1",
Expand Down
35 changes: 35 additions & 0 deletions crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ path = "shrubbery/src/lib.rs"
[dependencies]
# keep-sorted start
anyhow = "1.0.104"
argfile = "1.0.0"
# Transitive dep of zip: zip's `deflate-flate2` leaves the backend unset, so a
# top-level pin keeps flate2 on its default pure-Rust backend.
flate2 = "1.1.11"
Expand Down
Loading
Loading