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

Add links information to the crates.io api response #2685

Closed
slugclub opened this issue Aug 11, 2020 · 6 comments · Fixed by #8945
Closed

Add links information to the crates.io api response #2685

slugclub opened this issue Aug 11, 2020 · 6 comments · Fixed by #8945
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@slugclub
Copy link

The index files in rust-lang/crates.io-index have a links field which contains the name of the native library a package links with. However, this information is not exposed via the crates.io API.

For example, the bcc-sys package has a links field in its index file but that information is not available via the api.

Can you please add it?

@Turbo87
Copy link
Member

Turbo87 commented Feb 11, 2021

for future reference, this got implemented in #1248, but was only added to the index there, but not to our database. we would need to add a new column to the versions table and save this data in the database too. we might also have to build a small script to backfill the links from the index into the database for already existing versions.

@Turbo87 Turbo87 added the C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works label Feb 11, 2021
@Turbo87
Copy link
Member

Turbo87 commented Jun 25, 2024

The links column in the database exists at this point and has already been backfilled.

The remaining issue is that the version model of the API already contains a links property with a bunch of related URLs (see e.g. https://crates.io/api/v1/crates/libz-sys/1.1.18). Changing the meaning of the existing links field would be a breaking change, so we will have to come up with a different name to correspond to the links field in the index.

@rust-lang/crates-io any suggestions? links_? Links? links2? the_real_links? cargo_links?

@LawnGnome
Copy link
Contributor

links_2_3_4, but I may have listened to too much Rammstein back in the day.

That's definitely an unfortunate name clash that we should fix if there's ever a v2 of the API.

More serious suggestion: links_to_library?

@Turbo87
Copy link
Member

Turbo87 commented Jun 27, 2024

More serious suggestion: links_to_library?

lib_links?

@LawnGnome
Copy link
Contributor

lib_links?

That works too.

@eth3lbert
Copy link
Contributor

lib_links?

I favor this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants