Closed
Description
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.