Export: trimming enhancements#3530
Open
DuBento wants to merge 75 commits into
Open
Conversation
added 30 commits
April 29, 2026 19:28
setting subincludes at package level instead of at target level
- register subinclude statements in the package metadata - filter subincludes label - export all non build_target related statements
…dary build def with sources the updated test uses non-standard child naming to validate new trimming logic
added 27 commits
May 12, 2026 15:18
…s. Add fatal to no-op implementation
- export and trim for stmts: implementation and tests - remove unused indent level - trim if-else stmt by keeping clauses but writing a pass those not required - rework export to trim per stmt and include extra parsing info for if-else stmt
reworked activeSubincludes compute by relying on new logic
…ng export added a test case
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.
Enhancements to plz export, moving from a basic target-level trimming (using gc.RewriteFile) to build statement-level trimming, including only the required build rules and subincludes.
For consistency, we format all the exported BUILD files.
Changelog:
src/export/export.goto enforce better separation of the DefaultExporter (for trimming) and NoTrimExporter.