Use full requirement when serializing receipt (#5494)

## Summary

The current receipt doesn't capture quite enough information. For
example, it doesn't differentiate between editable and non-editable
requirements. This PR instead uses the full `Requirement` type. I think
we should use a custom representation like we do in the lockfile, but
I'm just using the default representation to demonstrate the idea.
This commit is contained in:
Charlie Marsh 2024-07-31 12:16:39 -04:00 committed by GitHub
parent bf8934e3e4
commit f266fb711c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 341 additions and 56 deletions

View file

@ -20,7 +20,9 @@ use crate::sha::GitOid;
const CHECKOUT_READY_LOCK: &str = ".ok";
/// A reference to commit or commit-ish.
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[derive(
Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
)]
pub enum GitReference {
/// A specific branch.
Branch(String),