Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

plobsing
Copy link
Contributor

These attributes were implemented for py_binary and py_test,1 but not their venv-based equivalents, where they were present, but not wired-up to anything. The semantics of these properties are established for native rules through the Build Encyclopedia's "Common Definitions";23 Starlark rules aren't required to follow this, but it is usually useful and least surprising for them to do so.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no(*)
    (*) Technically, this changes the semantics of user-controlled attributes of public symbols. However, these attributes were non-functional previously; users were getting the same behaviour as not setting these properties. This change makes these properties useful in satisfying the clear intent the user communicates when setting these attributes.
  • Suggested release notes appear below: yes
    feat(venv): implement env/env_inherit semantics for py_venv_binary/py_venv_test

Test plan

  • New test cases added

Footnotes

  1. https://github.com/aspect-build/rules_py/blob/c29d3d8911136dab2d01469a99a53b7e6cfa2b20/py/private/py_binary.bzl#L131

  2. https://bazel.build/reference/be/common-definitions#test.env

  3. https://bazel.build/reference/be/common-definitions#test.env_inherit

Copy link

aspect-workflows bot commented Jul 28, 2025

Test

All tests were cache hits

42 tests (100.0%) were fully cached saving 1m 10s.

…venv_test

These attributes were implemented for `py_binary` and `py_test`,[^1] but not
their venv-based equivalents, where they were present, but not wired-up
to anything. The semantics of these properties are established for
native rules through the Build Encyclopedia's "Common
Definitions";[^2][^3] Starlark rules aren't required to follow this, but
it is usually useful and least surprising for them to do so.

[^1]: https://github.com/aspect-build/rules_py/blob/c29d3d8911136dab2d01469a99a53b7e6cfa2b20/py/private/py_binary.bzl#L131
[^2]: https://bazel.build/reference/be/common-definitions#test.env
[^3]: https://bazel.build/reference/be/common-definitions#test.env_inherit
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