Skip to content

do not index py_binary unless in file mode #2989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

linzhp
Copy link
Contributor

@linzhp linzhp commented Jun 15, 2025

This is yet another implementation of #2822. Based on this:

// Remove the file from srcs if we're doing per-file library generation so
// that we don't also generate a py_library target for it.
if cfg.PerFileGeneration() {
srcs.Remove(name)
}

The only case when a python file does not exist in py_library is in file mode. Stop indexing py_binary in other mode to avoid ambiguous dependency resolution.

@linzhp
Copy link
Contributor Author

linzhp commented Jun 23, 2025

This PR is ready for review. The failing CI is an infra issue

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