feat: implement testonly dependency generation - #294
Merged
Conversation
jvolkman
force-pushed
the
dev/testonly
branch
6 times, most recently
from
July 19, 2026 00:02
b51bec4 to
e7ef883
Compare
- Parse testonly and transitive entries from dependency_groups across all translation backends (uv, poetry, pdm, pylock). - Implement BFS reachability in lock_resolver.bzl to compute packages exclusively reachable from testonly groups. - Apply testonly = True to pycross_library_proxy targets in thin repos. - Replace create_transitive_aliases with dependency_groups = ["transitive"].
jvolkman
force-pushed
the
dev/testonly
branch
8 times, most recently
from
July 19, 2026 04:57
35b2eb5 to
954c8dd
Compare
- Extract compute_requested_dependency_groups to translator_common.bzl - Accept a single flat list of prefixed available groups (e.g. 'optional:foo', 'group:dev') instead of separate bucket lists, letting translators decide the prefix taxonomy - Extract project_name once per translator instead of inline - Use shared canonicalize_name in pylock instead of private copy - Add create_transitive_aliases removal to CHANGELOG breaking changes
testonly is only applied to proxy aliases (@pypi//...:pkg), not to the underlying package targets in __pkgs. Since a testonly proxy can freely point at a non-testonly actual target, there is no need for reachability analysis. When transitive;testonly is set, simply mark all transitive pins as testonly.
Tests now use include_transitive=True and verify that all transitive pins are marked testonly when transitive_testonly is set, without reachability analysis. TAG=agy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create_transitive_aliasesboolean with inclusion of atransitiveentry independency_groups.;testonlysuffixFor #228