Some of the crates on docs.rs are blacklisted for legal reasons, but are still up on crates.io. Before #529 was merged we disabled them globally by blocking the route in nginx, but I'd like to move away from that model.
Deleting the old content is already covered by the delete-crate command, but even with that new releases would still be published. We need to add a blacklisted_crates table containing the names of those crates, and change the docbuilder to refuse building those crates.
Here are some mentoring instructions for this issue!
cratesfyi blacklist add CRATE and cratesfyi blacklist remove CRATE to the CLI. The logic to add or remove a crate should not be on the binary, but on the main docs.rs crate.You can learn how to contribute to docs.rs in the README, and feel free to ask questions here or on Discord (channel #docs-rs)! If you plan to work on this please leave a comment saying so, so we don't get multiple people working on the same issue.
Hi @pietroalbini, thank you for the clear instructions! I would like to work on this.
I have a question about how the filtering / blacklisting should function: if I understand this issue correctly, we want to prevent new versions of a known 'bad' crate to be built and added to doc.rs.
Q's:
The simple implementation I have working now only stores a crate name in blacklisted_crates and does not build a crate if the name exists in blacklisted_crates. Is this enough? (For now?)
Closed in #539
Most helpful comment
Hi @pietroalbini, thank you for the clear instructions! I would like to work on this.