Skip to content
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

Add --notrim flag to plz export #3340

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

Conversation

Tatskaari
Copy link
Member

@Tatskaari Tatskaari commented Jan 24, 2025

Please tries to trim a BUILD file down when exporting so that we only have the targets that are actually needed by the exported target. Build definitions can produce multiple targets, so when we depend on a target, Please needs to figure out which build rule produced it. The way plz export figures this out is through the parent/child naming convention i.e. :_{name}#{tag} is a child of :{name}. When we depend on :_foo#tag, we know we need to keep `xxx_xxx(name="foo").

When the build definition doesn't follow this convention, Please will erroneously trim out targets. This flag allows us to opt out of this behaviour. We may end up with more targets that necessary, and they won't build because we don't export their deps, but at least the targets we do export are guaranteed to work.

@Tatskaari Tatskaari requested a review from toastwaffle January 24, 2025 16:18
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