Fixed that build outputs are infinitely recursively processed#2740
Open
SanjeetBalamurugan wants to merge 3 commits into
Open
Fixed that build outputs are infinitely recursively processed#2740SanjeetBalamurugan wants to merge 3 commits into
SanjeetBalamurugan wants to merge 3 commits into
Conversation
Jarod42
approved these changes
Jul 22, 2026
Author
|
May I know if there is any problem with my pull request? @Jarod42 |
Contributor
|
I'm a simple contributor to Premake, like you. I am not a member of Premake. |
Author
|
@Jarod42, Sanjeet here. Thanks for your review regarding my pull request. As for the tests, i still have doubts about how to add them. If its a really needed, I would try to add them. But i dont know how tests work in premake-core. Thanks |
nickclark2016
requested changes
Jul 25, 2026
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.
What does this PR do?
Fixes infinite recursion when a custom rule generates a file with the same extension as its input. Previously, generated files could be treated as new inputs for the same rule, causing the rule to be applied repeatedly.
How does this PR change Premake's behavior?
Generated files from custom rules are now tracked with the rule that created them. Before applying a rule, Premake checks whether the file was already generated by that same rule and skips it if so.
This prevents recursive rule application while keeping existing custom rule behavior unchanged. No breaking changes are introduced.
Closes #1940
Anything else we should know?
This addresses issue 1940.
The fix was verified with a regression case where a custom rule generates another file with the same extension as its input. The generated output is created once and is not recursively processed.
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)