Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress Rust compilation output when Maven output is suppressed #4161

Open
patchwork01 opened this issue Jan 29, 2025 · 1 comment
Open
Milestone

Comments

@patchwork01
Copy link
Collaborator

patchwork01 commented Jan 29, 2025

Background

The Rust code is built as part of the Maven build in the module compaction/compaction-rust. This is done with exec-maven-plugin.

We have scripts that run the Maven build using scripts/build/build.sh. This runs a quiet Maven build in the quick profile with the tests disabled. This suppresses most output, but not currently the logging from the Rust build.

Description

We'd like the Maven build to suppress output from the Rust build if it's run in quiet mode.

Analysis

The Rust build is done with cross-rs:

https://docs.rs/crate/cross/latest

From that page: "cross has the exact same CLI as Cargo but relies on Docker or Podman".

Cargo has a command line argument similar to Maven, -q or --quiet:

https://doc.rust-lang.org/cargo/commands/cargo-build.html

It's also possible to set this in an environment variable, CARGO_TERM_QUIET:

https://doc.rust-lang.org/cargo/reference/config.html

If we use an environment variable we will need to configure Cross to pass this through, see the documentation linked above.

We may be able to propagate this setting through from Maven. See the documentation for the Maven plugin:

https://www.mojohaus.org/exec-maven-plugin/usage.html

@gaffer01
Copy link
Member

We could also make it a bit more user friendly. Currently it says

"-------------------------------------------------------------------------------
Building Project

Started at 2025-01-30..."

We could add a line saying "Running maven in quiet mode, this may take several minutes."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants