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

bindeps: Update crates.io to support binary dependencies #12555

Open
ehuss opened this issue Aug 24, 2023 · 0 comments
Open

bindeps: Update crates.io to support binary dependencies #12555

ehuss opened this issue Aug 24, 2023 · 0 comments
Labels
A-interacts-with-crates.io Area: interaction with registries S-triage Status: This issue is waiting on initial triage. Z-bindeps Nightly: binary artifact dependencies

Comments

@ehuss
Copy link
Contributor

ehuss commented Aug 24, 2023

This issue is a tracker for updating crates.io to support binary dependencies. I'm not sure when we should pull the trigger to add this, since this is not a reversible decision.

#12421 added support for bindeps in a registry. This requires adding 3 new fields to the index for dependencies, as well as the publish protocol.

Copying my notes from #10405, but I think these are now outdated. However, the general gist should still be the same.

Update crates.io

This should be done later, closer to when we are gearing up to stabilize bindeps. Adding the fields to the index is a permanent decision, so we need to be sure it has the right design.

  • Add fields to EncodableCrateDependency, this is the structure it receives from cargo.
  • Add fields to Dependency, this is the structure it uses for serializing to the index.
  • The v field here needs to be set to 3 if it contains a dependency with an artifact dependency. (See commentary above about possibly passing the v field in via the JSON API so that a registry does not need to process it.)
  • Consider adding some input validation. For example, it may want to put limits on the lengths of strings. I don't think it needs to otherwise be very restrictive, but crates.io people may have further ideas.
  • Add the appropriate tests. I think it would go somewhere in src/tests/krate/publish.rs.
  • Consider whether or not the artifact information should be displayed on the website. If the crates.io team would like to track this information, then it would also need to be stored in the database (which means also doing a schema update). The model is defined around here. I am no expert in diesel, so I can't provide much more guidance here. Talk with the crates.io team to see if this is something desired.
@ehuss ehuss added A-interacts-with-crates.io Area: interaction with registries Z-bindeps Nightly: binary artifact dependencies labels Aug 24, 2023
@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interacts-with-crates.io Area: interaction with registries S-triage Status: This issue is waiting on initial triage. Z-bindeps Nightly: binary artifact dependencies
Projects
None yet
Development

No branches or pull requests

2 participants