Problem
The runCommand function in src/Package.zig has a hardcoded output_limit of 1 MB (1024 * 1024). If a build command produces more than 1 MB of stdout or stderr, it crashes with error.StreamTooLong.
Steps to Reproduce
- Run a build step that generates more than 1 MB of output
- The command fails with
error.StreamTooLong
Expected Behavior
- The limit should be configurable (e.g., via an environment variable like
BUZZ_BUILD_OUTPUT_LIMIT)
- Or the limit should be increased to a more reasonable default (e.g., 16 MB)
Link to Code
|
const output_limit = 1024 * 1024; |
Suggested Fix
const output_limit = std.process.getEnvVar("BUZZ_BUILD_OUTPUT_LIMIT") catch "16777216";
const limit = try std.fmt.parseInt(usize, output_limit, 10);
Labels
Problem
The
runCommandfunction insrc/Package.zighas a hardcodedoutput_limitof 1 MB (1024 * 1024). If a build command produces more than 1 MB of stdout or stderr, it crashes witherror.StreamTooLong.Steps to Reproduce
error.StreamTooLongExpected Behavior
BUZZ_BUILD_OUTPUT_LIMIT)Link to Code
buzz/src/Package.zig
Line 494 in e8dbd1c
Suggested Fix
Labels