Skip to content

Commit 624eb96

Browse files
authored
fix: include subprojects' ignore and output directories to prevent rebuild loops in watch when using broadcast (#482)
1 parent 238b2c0 commit 624eb96

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/beet/toolchain/project.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,21 @@ def cache(self) -> ProjectCache:
104104

105105
@property
106106
def ignore(self) -> List[str]:
107-
ignore = list(self.config.ignore)
107+
ignore = set(self.config.ignore)
108108
if self.output_directory and self.directory in self.output_directory.parents:
109-
ignore.append(
109+
ignore.add(
110110
f"{self.output_directory.relative_to(self.directory).as_posix()}/"
111111
)
112-
return ignore
112+
for entry in self.config.pipeline:
113+
if isinstance(entry, ProjectConfig):
114+
ignore.update(entry.ignore)
115+
if entry.output:
116+
output_directory = Path(entry.output)
117+
if entry.directory in output_directory.parents:
118+
ignore.add(
119+
f"{output_directory.relative_to(entry.directory).as_posix()}/"
120+
)
121+
return list(ignore)
113122

114123
@property
115124
def worker_pool(self):

0 commit comments

Comments
 (0)