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

Break up alternate registry documentation #11476

Closed
arlosi opened this issue Dec 12, 2022 · 0 comments · Fixed by #11480
Closed

Break up alternate registry documentation #11476

arlosi opened this issue Dec 12, 2022 · 0 comments · Fixed by #11480
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-registries Area: registries A-sparse-registry Area: http sparse registries C-enhancement Category: enhancement

Comments

@arlosi
Copy link
Contributor

arlosi commented Dec 12, 2022

The documentation for registries is getting long and should be broken up (content taken from PR comment by @ehuss).

There are two audiences here, users (who are serviced by the "using" and "publishing" sections), and implementers (everything else).

An outline that I'm thinking of is:

  • Registries
    This top-level chapter should be written for the perspective of users, not implementers. It should have sections:

    • The current introduction that exists. Add links to the new sub-chapters here.
    • Using an Alternate Registry
    • Publishing to an Alternate Registry
    • Registry Protocols — This new section should give a very brief explanation that there exists "git" and "sparse", why to use one over the other, and how cargo chooses which to use. That should include a description of the sparse+ prefix, and the registries.crates-io.protocol setting.

Then underneath the "Registries" chapter, I would add a new "Running a Registry" chapter with two sub-chapters of its own:

  • Running a Registry
    This should have the current "running a registry" section. The first sentence that mentions "implemented by having a git repository" should be rewritten to accommodate the two different ways to set up the index.

    • Registry Index
      This should include the current "Index Format" section.
      The sentence "The index is stored in a git repository" needs to be rewritten to accommodate the new ways to access the index.
      I would add separate sections for index protocols, "config.json", description of the file layout, and descriptions of each package listing.
      The section on sparse indexes should have a section (or note) discussing the current limitations of sparse indexes. In particular, sparse registries are not yet ready to be used concurrently with git indexes, or to support transitioning from an existing git index. Point the reader to towards sparse registry: determine UX and URL handling #10964 for following further developments. If possible, help the reader to understand why the limitations exist, such as the fact that sparse+ will end up in Cargo.lock files, index entries, and .crate files. Perhaps make it clear that sparse+ can be used in a new registry that does not support git.
      The sparse section should include as much detail from https://hackmd.io/uzpul3sETzSumD2uj-2gTQ as possible. In particular:

      • Examples are often helpful. Showing how things look with index.crates.io would be a good start.
      • The "HTTP Behavior" section, including recommendations about using http/2 and such. Caching and cache invalidation should have its own section.
      • The "Nonexistent responses" section should also be included.
    • Registry Web API
      This should have the current Web API sections.

@weihanglo weihanglo added A-documenting-cargo-itself Area: Cargo's documentation C-enhancement Category: enhancement A-registries Area: registries A-sparse-registry Area: http sparse registries labels Dec 13, 2022
@bors bors closed this as completed in a26de9e Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation A-registries Area: registries A-sparse-registry Area: http sparse registries C-enhancement Category: enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants