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

Include package name/version in build script warnings. #8018

Closed
ehuss opened this issue Mar 18, 2020 · 0 comments · Fixed by #12799
Closed

Include package name/version in build script warnings. #8018

ehuss opened this issue Mar 18, 2020 · 0 comments · Fixed by #12799
Labels
A-build-scripts Area: build.rs scripts A-console-output Area: Terminal output, colors, progress bar, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 18, 2020

Describe the problem you are trying to solve
In some situations, it is not clear where a warning is coming from when emitted from a build script. For example, a build script like this:

fn main() {
    println!("cargo:warning=this is a warning");
}

displays:

warning: this is a warning

Describe the solution you'd like
I think it might be helpful to prefix the warning with the package name and version (similar to how -vv output is). Perhaps something like this:

warning: [pkg_name 1.2.3] this is a warning

Notes
Warnings are emitted here. The package name/version should be accessible from the unit.

@ehuss ehuss added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` A-build-scripts Area: build.rs scripts A-console-output Area: Terminal output, colors, progress bar, etc. labels Mar 18, 2020
@epage epage added E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review labels Sep 20, 2023
@bors bors closed this as completed in 71de58d Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-scripts Area: build.rs scripts A-console-output Area: Terminal output, colors, progress bar, etc. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` E-easy Experience: Easy S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants