Closed
Description
If a crate is deleted again with the first 72 hours, and if it already has reverse dependencies (i.e. another crate has a dependency on it), then these reverse dependencies are currently automatically deleted from the database (and the index) due to the corresponding foreign key constraints.
There are a couple of options how we can handle this:
- do nothing and keep everything as-is
- the cargo team indicated that cargo does not expect dependency declarations of existing versions in the index to change and throws errors when this happens
- change the crate deletion rules to require zero reverse dependencies also within the first 72 hours
- if an author publishes crate A and a new version of existing crate B that uses crate A, then the author has no way to ever delete crate A again since version deletions were never implemented and removed from the crate deletions RFC
- in addition to the
dependencies.crate_id
column we can have adependencies.crate_name
column with the former being set toNULL
if the corresponding crate is deleted- this would allow us to keep the dependency declarations in the database and index alive, but pointing at nothing
- ... or pointing to another crate that was later published with the same name
- this seems to match what npm is doing
- the dependencies table is already one of our largest tables. adding a mostly redundant text column might increase the size quite a bit and could affect query performance. it might be possible to only fill the column once the crate is actually deleted though.
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog