Fix: include subprojects' ignore and output directories to prevent rebuild loops in watch when using broadcast #482
  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.
  
    
  
    
This PR fixes an issue where only the main project’s ignore patterns and output directory were considered when building the final ignore list.
As a result, subprojects’ ignore rules and outputs were not excluded properly when using
broadcast.Why it matters
The ignore list is used by the --watch option to determine which files should trigger rebuilds.
Previously, since subproject build directories were not ignored, any file changes inside them would cause infinite rebuild loops, showing the build triggered repeatedly warning.
This fix prevents that by correctly ignoring all subprojects’ output and ignore paths.
Changes
Example
Project structure
Configs
packs/foo/beet.ymlpacks/bar/beet.ymlbeet.ymlBefore
Changes in any of the following directories would cause an infinite rebuild loop:
After
All subprojects’
ignoreandoutputdirectories are properly ignored, and the watch now behaves as expected.