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

POC: Sparse protocol support #488

Closed
wants to merge 2 commits into from

Conversation

inflation
Copy link

@inflation inflation commented Jul 11, 2023

Quick and dirty way to support sparse protocol and set it by default.

The proper way is to support registry selection and protocol type detection.

@obi1kenobi
Copy link
Owner

Very interesting, thanks for putting this POC together!

Regarding the protocol type detection, is there a good way for us to use crates_index to do that? Or is that something that crates_index will have to build and expose to us?

Also, by using sparse protocol by default, are we likely to expose Windows users to this bug? frewsxcv/rust-crates-index#126

@obi1kenobi obi1kenobi added A-cli Area: engine around the lints C-enhancement Category: raise the bar on expectations labels Jul 11, 2023
@inflation
Copy link
Author

I guess it's one of the internal things that cargo should "cratelize" for reusing. It need to parse through the hierarchy of config.toml to figure out the index URL of the specified registry. Then we can determine if it's sparse or not by checking the sparse+ prefix.

Windows should be fine since reqwest handles it anyway.

- Maybe parallelize fetches?
@obi1kenobi
Copy link
Owner

Since this PR, the crates_index became unmaintained but then thanks to the author of tame-index, we switched to that crate and gained sparse index support in #506.

The next release of cargo-semver-checks will have sparse index support 🎉 Thanks for the help and for your patience on this!

@obi1kenobi obi1kenobi closed this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: engine around the lints C-enhancement Category: raise the bar on expectations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants