Support build constraints (#5639)

## Summary

Partially resolves #5561. Haven't added overrides support yet but I can
add it tomorrow if the current approach for constraints is ok.

## Test Plan

`cargo test`

Manually checked trace logs after changing the constraints.
This commit is contained in:
Ahmed Ilyas 2024-08-02 04:15:58 +02:00 committed by GitHub
parent c558d70690
commit ff9f3dede1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 360 additions and 4 deletions

View file

@ -86,6 +86,12 @@ impl Manifest {
}
}
#[must_use]
pub fn with_constraints(mut self, constraints: Constraints) -> Self {
self.constraints = constraints;
self
}
/// Return an iterator over all requirements, constraints, and overrides, in priority order,
/// such that requirements come first, followed by constraints, followed by overrides.
///