Skip to content

Commit a1995b6

Browse files
authored
fix: stdout buffer overflow and excessive logs accumulation when building for iOS (#499)
* fix: stdout buffer overflow and excessive logs accumulation when building ios * changeset * add comment
1 parent ef3acc6 commit a1995b6

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.changeset/strong-zebras-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rnef/platform-apple-helpers': patch
3+
---
4+
5+
fix: stdout buffer overflow and excessive logs accumulation when building ios

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
dist/
33
coverage/
44
pnpm-lock.yaml
5-
build/
5+
website/build/
66
ios/

packages/platform-apple-helpers/src/lib/commands/build/buildProject.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ Configuration ${color.bold(configuration)}`);
134134
cwd: sourceDir,
135135
});
136136

137-
// Process the output from the AsyncIterable
138-
for await (const chunk of process) {
139-
commandOutput += chunk + '\n';
140-
reportProgress(chunk, loader, message);
137+
if (!logger.isVerbose()) {
138+
// Process the output from the AsyncIterable
139+
for await (const chunk of process) {
140+
commandOutput += chunk + '\n';
141+
reportProgress(chunk, loader, message);
142+
}
141143
}
142144

143145
await process;
@@ -150,7 +152,8 @@ Configuration ${color.bold(configuration)}`);
150152
);
151153
}
152154
if (commandOutput) {
153-
logger.error(`xcodebuild output: ${commandOutput}`);
155+
// Use lightweight console.error instead of logger.error to avoid stack overflow issues when Xcode logs go crazy
156+
console.error(color.red(`xcodebuild output: ${commandOutput}`));
154157
throw new RnefError(
155158
'Running xcodebuild failed. See error details above.',
156159
);

0 commit comments

Comments
 (0)