Skip to content

Comments

fix: adding an external_test when an internal one exists#145

Merged
toastwaffle merged 2 commits intoplease-build:masterfrom
getevy:fix-mixed-tests-bug
Jan 30, 2026
Merged

fix: adding an external_test when an internal one exists#145
toastwaffle merged 2 commits intoplease-build:masterfrom
getevy:fix-mixed-tests-bug

Conversation

@antoine-evy
Copy link
Contributor

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.


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.

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.
Copy link
Contributor

@toastwaffle toastwaffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the lint error, but otherwise this looks good

@toastwaffle toastwaffle merged commit c1d91e4 into please-build:master Jan 30, 2026
3 checks passed
@toastwaffle
Copy link
Contributor

Thank you @antoine-evy!

Do you have any other fixes you're working on? If not, want to send another PR updating the PUKU_VERSION and ChangeLog files so this gets released?

@antoine-evy
Copy link
Contributor Author

Hey @toastwaffle, that's the only one for now.
Will do, thank you so much for the quick turnaround 🙏

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.

3 participants