-
Notifications
You must be signed in to change notification settings - Fork 645
Display most recently published version next to "last updated" time on crate show page #953
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
Comments
The documentation URL that's provided to crates.io is http://bluss.github.io/petgraph, without any version information. Since crates.io doesn't have anything to do with the generation of those docs, I don't think there's anything to be done here about that. I do think perhaps we could improve cargo tooling on that front, as I mused in this issue.
Categories are per-crate, not per-version, so the latest published version is what takes effect. Is there a use case for wanting a crate to be categorized differently based on the version?
This seems correct to me.
It seems like you're saying "last updated" should be 0.4.5 and should say something like "highest version published at", is that correct? It doesn't seem that strange to me to have the last time the entire crate was updated shown here.... what if we labeled this as "crate last updated at"? |
The crate information page says "petgraph 0.4.5" — then it should use the documentation link from the 0.4.5 version of the package. |
I think the core of the problem is that the latest published version 0.2.10 is not visible anywhere on the page, so the information about "Last Updated" becomes very puzzling and hard to put together with the other information on the page. It would help to just put the version of the last update in this spot, if it's different from the "main" version that crates.io is displaying. |
Then you would need to change your documentation link for each version that you publish, that would be annoying, wouldn't it? That's why I think we need better tooling on the cargo side, to make it easy to have a "main docs url", then encourage publishing at
That makes sense! |
I want to clarify. I'm not asking to have the version of the package in the URL of the documentation. I'm asking that crates.io, if it's displaying information for petgraph 0.4.5, it should use the documentation URL from that version of the package. The expected documentation in this case is (This can be verified by downloading petgraph 0.4.5 and reading Cargo.toml.) The actual documentation URL visible right now is something different, it's taken from version 0.2.10 of the package. |
I don't change the documentation URL every time I publish a package, do you? That's what would need to happen in order to make each version's doc urls go to that version's docs. |
Again, that's not what I'm requesting. |
I am primarily reporting what I saw as an error. Developers will decide how to fix it. As formulated originally, “Inconsistent crate info display (mixing versions)” ; it is inconsistent because on a crate's page, the information displayed is patched together from multiple different versions of a crate. That fact is not exactly obvious to the user of crates.io. There are multiple way to fix it, and any consistent result is fine. I propose that all fields of information should come from the greatest version (in this example as of this writing, version 0.4.5). It will only become more common that there are multiple active branches of crates that receive releases. In this example it was because there was a breaking change in Rust, so the most recent version on the 0.2 branch was broken, hence it got an upgrade. There are more things crates.io could do to support this phenomenon better, but that's another issue. |
If I'm understanding this correctly, the issue is that the documentation field (and probably others) may be overwritten with old data when fixes are backported to an old release and then published. The two petgraph releases in question are:
When 0.2.10 was published, the old documentation links were pulled from the TOML file and overwrote the crate level information in the database. Even a page such as https://crates.io/crates/petgraph/0.4.5, which I would expect to be version specific, shows the stale data that was written when 0.2.10 was published. We could either track this information separately for each release, or update these crate level fields only when publishing the most recent crate based on semver. |
So another fix could be, since you're publishing a new version in the 0.2 branch, and you've since changed where your docs are, the 0.2 branch should have gotten an update to its Cargo.toml to point to the same location as the 0.4.5 release does. Can you elaborate on why that's not an option? That seems most accurate to me-- are you still publishing docs at the 0.2 branch's URL? I think the reason I'm confused is that I interpreted this:
as "the version 0.2.10 is not visible anywhere on the documentation page when you click through", which is similar to this issue and this issue. It seemed to me that this was the root problem you were talking about, but now I see that you meant "the version 0.2.10 is not visible anywhere on the crates.io page for petgraph". I'm sorry for misunderstanding.
Please file more issues! |
#894 looks like the same issue, actually. It's certainly the heart of it, even if the documentation field doesn't seem to be alone. I should have found that before filing. |
Uh oh!
There was an error while loading. Please reload this page.
(Original issue title: Inconsistent crate info display (mixing versions) )
About: https://crates.io/crates/petgraph
The most recently released version of petgraph is 0.2.10.
The greatest version is petgraph 0.4.5.
This is inconsistent, it should show all the information from the same version:
Unknown because they are the same across versions: License, Authors, Keywords, Repository, etc.
The text was updated successfully, but these errors were encountered: