Skip to content
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

If a given crate has a repository in its meta-data, then generate a link to it on deps.rs #29

Open
cipriancraciun opened this issue Jun 19, 2018 · 3 comments
Labels
feature good first issue Good for newcomers

Comments

@cipriancraciun
Copy link

I've seen that deps.rs also supports repository URL's in addition to published crates. However at the moment on a crate's dashboard there isn't a link to repository status (and vice-versa).

For example I have the following published crate and related repository:

It would be nice to have on each of these dashboards a link to:

  • the latest published crate dashboard;
  • the repository dashboard;
  • a list of previous releases dashboards; (if one needs an older version of a crate an wants to asses its dependencies;)
@Feliix42
Copy link
Member

Sounds like an interesting proposition! I'm not 100% sure if such a feature would make sense, but we could think about it. :)

Question is: How do we place the links? The dashboard is intentionally kept minimalistic, so placing links is challenging.

@cipriancraciun
Copy link
Author

Question is: How do we place the links? The dashboard is intentionally kept minimalistic, so placing links is challenging.

Perhaps add a separate page, say "history", where you can list at the top the repository as a "development" version, then the "latest" published crate, and so on with published versions.

This way you keep the main dashboard simple, but still have the "extended" report if one wants.

Although there remains the open question of what to do if the repository has multiple branches? Perhaps add one line for each of these, and separate the "development" versions from the "published" versions by a divider or heading.

@Feliix42
Copy link
Member

After further investigation, it turns out that our current way of processing crates allows such a linking in neither direction, unfortunately.

Github -> Crates.io

A Cargo.toml yields no information as to whether a crate has been published to crates.io. You could of course conjecture that if a crate with matching name exists in the registry, it's the same, but that's not necessarily correct and could lead to wrong information displayed on the web page.

Crates.io -> Github

We use crates-index to look up crates in the registry and also to for retrieving the dependencies of a crate. Unfortunately, the index does not store meta-information such as the repository field, meaning that we also cannot generate a link the other way around.

The only thing that can work is pointing to other releases on crates.io when looking up a crate, which could certainly be added as a feature.

@Feliix42 Feliix42 added the good first issue Good for newcomers label Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants