fix: adding an external_test when an internal one exists#145
Merged
toastwaffle merged 2 commits intoplease-build:masterfrom Jan 30, 2026
Merged
fix: adding an external_test when an internal one exists#145toastwaffle merged 2 commits intoplease-build:masterfrom
toastwaffle merged 2 commits intoplease-build:masterfrom
Conversation
And vice versa. When an existing BUILD file exists with an internal test rule, and a new external test file is added, puku silently ignores the new test file. Code-wise, `generate.updater.allocateSources` does detect the new file and creates a new external test rule, but gives it the same name as the existing internal test rule, which results in `generate.updater.updateSources` to ignore the new rule. This fixes the issue by looking at existing rule names, and adding `external_` to the new test rule name if a rule with the desired name already exists.
toastwaffle
requested changes
Jan 30, 2026
Contributor
toastwaffle
left a comment
There was a problem hiding this comment.
Please fix the lint error, but otherwise this looks good
toastwaffle
approved these changes
Jan 30, 2026
Contributor
|
Thank you @antoine-evy! Do you have any other fixes you're working on? If not, want to send another PR updating the |
Contributor
Author
|
Hey @toastwaffle, that's the only one for now. |
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.
And vice versa.
When an existing BUILD file exists with an internal test rule, and a new external test file is added, puku silently ignores the new test file.
Code-wise,
generate.updater.allocateSourcesdoes detect the new file and creates a new external test rule, but gives it the same name as the existing internal test rule, which results ingenerate.updater.updateSourcesto ignore the new rule.This fixes the issue by looking at existing rule names, and adding
external_to the new test rule name if a rule with the desired name already exists.Sorry, this is a bit out of the blue, let me know if this change is not desired :)
I think this mimicks what wollemi did in this situation.