Skip to content

crates.io shows old documentation link when documentation field removed from Cargo.toml #945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
onur opened this issue Aug 8, 2017 · 11 comments · Fixed by #948
Closed
Labels
A-backend ⚙️ A-publish C-bug 🐞 Category: unintended, undesired behavior E-has-mentor

Comments

@onur
Copy link
Member

onur commented Aug 8, 2017

crates.io shows old documentation link when documentation field removed in the latest version of a crate.

take_mut crate has https://crates.fyi/crates/take_mut/0.1.3/ documentation link in the version 0.1.3. Documentation link is removed in the latest version. But crates.io shows old documentation link, used in 0.1.3.

@sgrif
Copy link
Contributor

sgrif commented Aug 9, 2017

I need to double check, but the fix for this should be as simple as putting #[treat_none_as_null = "true"] here

@sunjay
Copy link
Member

sunjay commented Aug 11, 2017

I've started to work on this in #948.

Any mentorship anyone can provide is welcome. I'll debug it more soon. 😄

@sunjay
Copy link
Member

sunjay commented Aug 12, 2017

I've fixed the issue in my PR and once it is merged any affected crates will need to publish before the webpage is updated. There are other larger issues which I've talked about in my PR which should be addressed at some point but I think are too big of a change for this issue.

@Sgeo
Copy link

Sgeo commented Aug 12, 2017

I was under the impression that removing the documentation link will cause crates.io to use docs.rs as a default. Will that still occur with this fix?

@sunjay
Copy link
Member

sunjay commented Aug 12, 2017

@Sgeo That behaviour seems to occur on the frontend and should continue to work as expected. Someone more familiar with the codebase should probably say more about that though. I'm just commenting based on what I saw when I looked just now.

@carols10cents
Copy link
Member

I was under the impression that removing the documentation link will cause crates.io to use docs.rs as a default. Will that still occur with this fix?

@Sgeo That behaviour seems to occur on the frontend and should continue to work as expected. Someone more familiar with the codebase should probably say more about that though. I'm just commenting based on what I saw when I looked just now.

Yes, @sunjay is correct: once this fix is deployed and new versions of the crates are published, the frontend will see that there is no documentation URL and will check docs.rs.

bors-voyager bot added a commit that referenced this issue Mar 14, 2018
948: Stop showing documentation link when documentation is removed from Cargo.toml r=carols10cents

Fixes #945 

This is exactly the fix suggested in #945 (comment) but applied to the `NewCrate` struct instead of the `Crate` struct since `NewCrate` is actually what gets stored in the DB.

Problems with this fix:

* The webpage for the crates that are affected by this will only get updated when they next publish
* The version specific webpages for the crate do not show a documentation link even if that crate once had a documentation key
    * This is because we do not track this metadata per version and should probably be a separate issue
bors-voyager bot added a commit that referenced this issue Mar 15, 2018
948: Stop showing documentation link when documentation is removed from Cargo.toml r=carols10cents

Fixes #945 

This is exactly the fix suggested in #945 (comment) but applied to the `NewCrate` struct instead of the `Crate` struct since `NewCrate` is actually what gets stored in the DB.

Problems with this fix:

* The webpage for the crates that are affected by this will only get updated when they next publish
* The version specific webpages for the crate do not show a documentation link even if that crate once had a documentation key
    * This is because we do not track this metadata per version and should probably be a separate issue
@Sgeo
Copy link

Sgeo commented Mar 17, 2018

When will the fix be deployed? I assume it hasn't been deployed yet, because I republished take_mut and the issue is still present.

@carols10cents
Copy link
Member

@Sgeo Just deployed, sorry about the delay!

@onur
Copy link
Member Author

onur commented Mar 18, 2018

@carols10cents it still shows old documentation link.

cc @sunjay

@carols10cents
Copy link
Member

@onur you will need to publish a new version since the deploy 20 hours ago.

@Sgeo
Copy link

Sgeo commented Mar 20, 2018

@carols10cents Thank you! Republished and it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ A-publish C-bug 🐞 Category: unintended, undesired behavior E-has-mentor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants