Skip to content

add sparse url in cargo package guide #26937

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

Merged
merged 11 commits into from
Sep 13, 2023

Conversation

merlleu
Copy link
Contributor

@merlleu merlleu commented Sep 6, 2023

Hello,

The current package guide for cargo gives you only the git index, with the HTTP Index stabilized being used as default for crates.io and being better for most use-cases.

However, it's not documented that gitea supports the sparse spec, and it does not require the _crates-index git repo for the sparse api.

I personally think we should push users to use the sparse instead of the git repository. (Even let users disable crates-index repos if they only want to use sparse)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 6, 2023
@merlleu merlleu changed the title add sparse url in cargo package header add sparse url in cargo package guide Sep 6, 2023
@lunny lunny added the type/docs This PR mainly updates/creates documentation label Sep 6, 2023
@lunny lunny requested a review from KN4CK3R September 6, 2023 09:27
@KN4CK3R
Copy link
Member

KN4CK3R commented Sep 6, 2023

Could you write an additional sentence what's the difference?

@merlleu
Copy link
Contributor Author

merlleu commented Sep 6, 2023

Yep, Sparse replaces the cloning of the repo by simple http requests to each file supposed to be in the repo. It's faster and on gitea it's using directly packages api instead of the cargo-index repo, so this means we can remove some complexity from the cargo index integration:

  • No longer need to give write perms on cargo index repository to user to deploy to cargo registry
  • Better for granular permissions (anyone with read access to the repo will see all the crates)

https://blog.rust-lang.org/inside-rust/2023/01/30/cargo-sparse-protocol.html
https://rust-lang.github.io/rfcs/2789-sparse-index.html

@KN4CK3R
Copy link
Member

KN4CK3R commented Sep 6, 2023

Sry, not to me, into the docs 😄 I know what it is, I implemented it 😏

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Sep 6, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 6, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 13, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 13, 2023
@lunny lunny merged commit e6a059a into go-gitea:main Sep 13, 2023
@GiteaBot GiteaBot added this to the 1.22.0 milestone Sep 13, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 13, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 13, 2023
* giteaofficial/main:
  fix media description render for orgmode (go-gitea#26895)
  Show OpenID Connect and OAuth on signup page (go-gitea#20242)
  Update status and code index after changing the default branch (go-gitea#27018)
  add sparse url in cargo package guide (go-gitea#26937)
  Add missing 404 response to Swagger (go-gitea#27038)
  Fix object storage path handling (go-gitea#27024)
  [skip ci] Updated translations via Crowdin
  bump rootful to 16gb
  setup go in the nightly release pipeline
  Speed up nightly builds (go-gitea#27045)
  Improve repo/user/org search  (go-gitea#27030)
  Use Actuated.dev runner for nightly builds
  update snap package (go-gitea#27021)
  resolve issue with sort icons on admin/users and admin/runners (go-gitea#24360)
@delvh delvh modified the milestones: 1.22.0, 1.21.0 Sep 13, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants