Track yanked versions as incompatibilities (#1290)

Moves yanked version filtering from `VersionMap::from_metadata` to the
resolver and tracks it as a PubGrub unavailable incompatibility so
yanked versions are reflected in error messages.

e.g. before
```
╰─▶ Because only albatross<=0.1.0 is available and you require albatross>0.1.0, 
       we can conclude that the requirements are unsatisfiable.
```

after

```
╰─▶ Because only the following versions of albatross are available:
            albatross<=0.1.0
            albatross==1.0.0
      and albatross==1.0.0 is unusable because it was yanked, we can conclude that albatross>0.1.0 cannot be used.
      And because you require albatross>0.1.0, we can conclude that the requirements are unsatisfiable.
```
This commit is contained in:
Zanie Blue 2024-02-12 22:01:17 -06:00 committed by GitHub
parent d8619f668a
commit b5dd8b7de2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 263 additions and 138 deletions

View file

@ -17,7 +17,7 @@ impl FilePins {
pub(crate) fn insert(&mut self, candidate: &Candidate) {
self.0.entry(candidate.name().clone()).or_default().insert(
candidate.version().clone(),
candidate.install().dist.clone(),
candidate.installation_dist().dist.clone(),
);
}