-
Notifications
You must be signed in to change notification settings - Fork 655
Closed as not planned
Closed as not planned
Copy link
Labels
A-backend ⚙️C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature worksCategory: Adding new behavior or a change to the way an existing feature worksE-has-mentor
Description
In search results and on the crate's page, we should be displaying crates with all of their versions yanked (henceforth referred to as "yanked crates") differently (#145), but the backend needs to tell the frontend that a crate is in this state.
Instructions for fixing this:
- Add a field named
all_versions_yanked
toEncodableCrate
and everywhere we createEncodableCrate
instances, set that field to false if there exists any non-yanked versions for this crate. I'd recommend doing aselect(exists())
query using diesel similar to this query - If we're constructing an
EncodableCrate
instance for a yanked crate, these fields should be changed too:badges
,description
,homepage
,documentation
, andrepository
should beNone
max_version
should be"0.0.0"
Some other fields, like keywords and categories, are used for search/crate lists, and this issue isn't going to change search results, so I think we should still display why a crate showed up in a particular list of crates.
Metadata
Metadata
Assignees
Labels
A-backend ⚙️C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature worksCategory: Adding new behavior or a change to the way an existing feature worksE-has-mentor