Skip to content

refactor: convert py_test_main_validator build tool to Rust - #4518

Draft
rickeylev wants to merge 1 commit into
rickeylev/shrubbery/06-build-data-writerfrom
rickeylev/shrubbery/07-py-test-main-validator
Draft

rickeylev wants to merge 1 commit into
rickeylev/shrubbery/06-build-data-writerfrom
rickeylev/shrubbery/07-py-test-main-validator

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Validating py_test main files with Python requires an exec Python
toolchain even when only checking for __main__ or test harness usage.

Add ruff_python_ast and ruff_python_parser to crates/Cargo.toml
(pure Rust, so they build for every target platform) and
//crates/py_test_main_validator:py_test_main_validator_lib on top of
them; register py_test_main_validator on shrubbery and route
PyValidateTestMain through get_shrubbery_tool, skipping the exec
runtime requirement when the Rust tool is active.

@rickeylev

Copy link
Copy Markdown
Collaborator Author

This PR was prepared by an agent under human direction. Review comments are triaged by the human author; agent-drafted replies and changes are reviewed and approved by the author before posting.

This is an agent-generated comment reviewed and approved by the user.

@rickeylev
rickeylev added this pull request to stack #4513 November 16, 2026 05:11
Validating `py_test` main files with Python requires an exec Python
toolchain even when only checking for `__main__` or test harness usage.

Add `ruff_python_ast` and `ruff_python_parser` to `crates/Cargo.toml`
(pure Rust, so they build for every target platform) and
`//crates/py_test_main_validator:py_test_main_validator_lib` on top of
them; register `py_test_main_validator` on `shrubbery` and route
`PyValidateTestMain` through `get_shrubbery_tool`, skipping the exec
runtime requirement when the Rust tool is active.
@rickeylev
rickeylev force-pushed the rickeylev/shrubbery/07-py-test-main-validator branch from aa68b75 to 0954ae6 Compare November 16, 2026 05:23

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant