Skip to content

fix: clean build error output#79

Merged
Sunrisepeak merged 3 commits into
mainfrom
fix/build-error-output
May 26, 2026
Merged

fix: clean build error output#79
Sunrisepeak merged 3 commits into
mainfrom
fix/build-error-output

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

  • Keep default build failures focused on user diagnostics by filtering Ninja progress, failed command wrappers, private runtime env prefixes, and mcpp-injected Clang unused-argument warnings.
  • Move toolchain runtime library paths out of generated build.ninja and scope them onto the Ninja subprocess instead.
  • Preserve raw Ninja details in --verbose, and keep fast-path compile/link failures from falling back into a second full prepare.
  • Add an E2E regression covering default and verbose build-error output.

Closes #78

Test plan

  • mcpp build --no-cache
  • MCPP=$PWD/target/x86_64-linux-gnu/4d24c8b57fdbbbb4/bin/mcpp PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 bash tests/e2e/01_help_and_version.sh
  • MCPP=$PWD/target/x86_64-linux-gnu/4d24c8b57fdbbbb4/bin/mcpp PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 bash tests/e2e/05_errors.sh
  • MCPP=$PWD/target/x86_64-linux-gnu/4d24c8b57fdbbbb4/bin/mcpp PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 bash tests/e2e/48_build_error_output.sh
  • MCPP_HOME=/home/speak/.mcpp /home/speak/workspace/github/mcpp-community/mcpp/target/x86_64-linux-gnu/4d24c8b57fdbbbb4/bin/mcpp build --no-cache in /home/speak/test/mcpp/helloworld, verified source diagnostic appears once and no LD_LIBRARY_PATH=, FAILED:, Ninja progress, or unused-argument warning noise
  • temp successful project: verified generated build.ninja contains no toolenv/LD_LIBRARY_PATH, .build_cache records runtime env metadata, and the third build uses the fast path
  • git diff --check

@Sunrisepeak Sunrisepeak merged commit b047012 into main May 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: clean build error output

1 participant