add --nocapture for build-scripts
Problem
Directly output the output of build-script to stdout/stderr.
I do this because sometimes the error log is very large, which can easily exceed 4GB of cargo memory usage
But sometimes I only need the error header quickly and terminate when I see the required error But for the current cargo, I need to wait for its output to be completed before outputting it uniformly, which may take a very long time
Proposed Solution
No response
Notes
No response
But sometimes I only need the error header quickly and terminate when I see the required error
Did you mean terminating manually by yourself, or Cargo terminates when build script exits with non-zero code?
I do this because sometimes the error log is very large, which can easily exceed 4GB of cargo memory usage
An alternative way to deal with high memory usage is Cargo parses build script directives while streaming the output, instead of capturing it and parsing it after build script execution. (See the code here)
Did you mean terminating manually by yourself, or Cargo terminates when build script exits with non-zero code?
Yes, I mean manually terminate it
If I'm understanding this, a single build scripts output is over 4GB? What is the situation leading to that?
If I'm understanding this, a single build scripts output is over 4GB? What is the situation leading to that?
I use the lalrpop library to build a complex language parser, which outputs an extremely large state table when I make modifications that cause conflicts
I have a project that uses a cargo build script to compile some C++ code with make that is then linked to the rest of the project, and this feature would be useful to me if implemented. I just discovered that I had a bunch of compiler warnings from GCC that I never saw when building, because the C++ still compiled without errors, so the cargo build script never errored, and thus the warning messages were never shown.
I'm still pretty new to Rust, so I don't know if there's some way to tell Cargo to display stderr that it captures regardless of the build script's exit status or not. But regardless I think this is an important feature to implement.