Description
Problem
Currently packaging verification process run by cargo package
and cargo publish
runs 2 tasks:
- Metadata verification.
- Build a package
First task is just cargo build
, the second may emit warnings about some metadata is missing
Good practice on CI is to run sequentially or in parallel
- Run fast metadata verification, as this process will take short time and it's important. No build required.
- Build project and run all checks to verify if even some wrong commit was merged, release would be clean
The metadata verification is done by cargo package
and if critical field is missing, a warning is emitted. There's no control on which metadata is critical, which is not and there's no way to enforce it.
Additionally, building a package in most cases is a duplication of responsibility of a user to run at least cargo build
first.
I understand historical reasons of this solution in cargo package
, and I'd like to have an ability to alter this behaviour on demand/company policies, but not remove this step completely
Previous discussion was here: #15398
Proposed Solution
For making build
optional I'd like to have configuration variable to be set to control behaviour of cargo verification process.
Notes
No response