You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks again for this awesome crate, cargo-semver-checks wouldn't have been possible without it! I have a question that I couldn't figure out the answer to by looking at the docs and some of the source code.
In this cargo-semver-checks issue, a user is using an index mirror that is sparse-only and therefore our usual trick of "ignore the sparse config and use the old protocol anyway" doesn't work. How should cargo-semver-checks load crate info so as to be maximally compatible with users' local configurations?
Ideally, there would be a way for cargo-semver-checks to just load a Crate struct for a given crate name without needing to check cargo index information before deciding between Index and SparseIndex. Is this possible already, or if not, is it feasible to implement?
Barring that, is there a good and reliable way within this crate to figure out whether the configured index is sparse or not? Asking because right now in cargo-semver-checks I don't know which of Index and SparseIndex to attempt to use when. I even don't mind an approach like "try making a sparse index, and if it doesn't work, try again with non-sparse" so long as we can get a predictable error variant to match on that corresponds to this case and this case alone (as opposed to matching on a generic Error::Io or Error::Git).
Thanks again for looking into this!
The text was updated successfully, but these errors were encountered:
Thanks again for this awesome crate,
cargo-semver-checks
wouldn't have been possible without it! I have a question that I couldn't figure out the answer to by looking at the docs and some of the source code.In this
cargo-semver-checks
issue, a user is using an index mirror that is sparse-only and therefore our usual trick of "ignore the sparse config and use the old protocol anyway" doesn't work. How shouldcargo-semver-checks
load crate info so as to be maximally compatible with users' local configurations?Ideally, there would be a way for
cargo-semver-checks
to just load aCrate
struct for a given crate name without needing to check cargo index information before deciding betweenIndex
andSparseIndex
. Is this possible already, or if not, is it feasible to implement?Barring that, is there a good and reliable way within this crate to figure out whether the configured index is sparse or not? Asking because right now in
cargo-semver-checks
I don't know which ofIndex
andSparseIndex
to attempt to use when. I even don't mind an approach like "try making a sparse index, and if it doesn't work, try again with non-sparse" so long as we can get a predictable error variant to match on that corresponds to this case and this case alone (as opposed to matching on a genericError::Io
orError::Git
).Thanks again for looking into this!
The text was updated successfully, but these errors were encountered: