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

"Could not find requested crate" unless I revert to the git index #641

Open
kpreid opened this issue Sep 2, 2023 · 7 comments
Open

"Could not find requested crate" unless I revert to the git index #641

kpreid opened this issue Sep 2, 2023 · 7 comments

Comments

@kpreid
Copy link

kpreid commented Sep 2, 2023

I attempted to begin a review:

$ cargo crev open embedded-sprites -uv 0.1.2
    Updating crates.io index
Could not find requested crate. Try updating cargo's registry index cache?

On a suspicion that the problem has to do with Cargo's new sparse index protocol, I tried:

$ CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git cargo crev open embedded-sprites -uv 0.1.2

and it succeeded. So, it seems that cargo-crev is making some assumption that depends on the old protocol.

  • Version: 0.24.3
  • How did you install crev: cargo install
  • What OS/platform: macOS 12.6.8
@kornelski
Copy link
Member

I think we need to update Cargo to a version that defaults to the sparse index.

@kornelski
Copy link
Member

is it better in 0.25?

@kpreid
Copy link
Author

kpreid commented Sep 7, 2023

There doesn't seem to be a 0.25 published to crates.io yet.

@kpreid
Copy link
Author

kpreid commented Sep 11, 2023

I've updated to 0.25.0 and it still behaves exactly as shown above:

$ CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git cargo crev open embedded-sprites -uv 0.1.2
[success; editor opens]
$ cargo crev open embedded-sprites -uv 0.1.2
    Updating crates.io index
Could not find requested crate. Try updating cargo's registry index cache?
$ cargo crev --version
cargo-crev 0.25.0

@kpreid
Copy link
Author

kpreid commented Sep 11, 2023

Oh, and in case it's useful, here are the dependency versions the install used (retrieved from cargo install's progress output):

adler v1.0.2
aead v0.5.2
aes v0.8.3
aes-siv v0.7.0
ahash v0.8.3
aho-corasick v0.7.20
aho-corasick v1.0.5
ansi_term v0.12.1
anstream v0.5.0
anstyle v1.0.3
anstyle-parse v0.2.1
anstyle-query v1.0.0
anyhow v1.0.75
arc-swap v1.6.0
arrayref v0.3.7
arrayvec v0.5.2
arrayvec v0.7.4
atty v0.2.14
autocfg v1.1.0
base16ct v0.2.0
base64 v0.13.1
base64 v0.21.4
base64ct v1.6.0
bitflags v1.3.2
bitflags v2.4.0
bitmaps v2.1.0
blake2 v0.10.6
blake2b_simd v1.0.2
block-buffer v0.10.4
block-buffer v0.9.0
bstr v1.6.2
btoi v0.4.3
bytecount v0.6.3
byteorder v1.4.3
bytes v1.5.0
bytesize v1.3.0
cargo v0.73.1
cargo-crev v0.25.0
cargo-geiger-serde v0.2.5
cargo-platform v0.1.3
cargo-util v0.2.5
cc v1.0.83
cfg-if v1.0.0
chrono v0.4.30
chrono-tz v0.8.3
chrono-tz-build v0.2.0
cipher v0.4.4
clap v2.34.0
clap v4.4.2
clap_builder v4.4.2
clap_lex v0.5.1
clru v0.6.1
cmac v0.7.2
colorchoice v1.0.0
const-oid v0.9.5
constant_time_eq v0.3.0
core-foundation v0.9.3
core-foundation-sys v0.8.4
cpufeatures v0.2.9
crates-io v0.37.0
crates_io_api v0.8.1
crc32fast v1.3.2
crev-common v0.25.0
crev-data v0.25.0
crev-lib v0.25.0
crev-recursive-digest v0.6.0
crev-wot v0.25.0
crossbeam v0.8.2
crossbeam-channel v0.5.8
crossbeam-deque v0.8.3
crossbeam-epoch v0.9.15
crossbeam-queue v0.3.8
crossbeam-utils v0.8.16
crypto-bigint v0.5.3
crypto-common v0.1.6
ct-codecs v1.1.1
ctr v0.9.2
curl v0.4.44
curl-sys v0.4.65+curl-8.2.1
curve25519-dalek v3.2.0
darling v0.14.4
darling_core v0.14.4
darling_macro v0.14.4
dashmap v4.0.2
dbl v0.3.2
default v0.1.2
der v0.7.8
deranged v0.3.8
derive_builder v0.12.0
derive_builder_core v0.12.0
derive_builder_macro v0.12.0
deunicode v0.4.4
digest v0.10.7
digest v0.9.0
directories-next v2.0.0
dirs v3.0.2
dirs-next v2.0.0
dirs-sys v0.3.7
dirs-sys-next v0.1.2
ecdsa v0.16.8
ed25519 v1.5.3
ed25519-compact v2.0.4
ed25519-dalek v1.0.1
either v1.9.0
elliptic-curve v0.13.5
encoding_rs v0.8.33
encoding_rs_io v0.1.7
env_logger v0.10.0
env_logger v0.8.4
equivalent v1.0.1
errno v0.3.3
faster-hex v0.8.1
fastrand v2.0.0
ff v0.13.0
fiat-crypto v0.1.20
filetime v0.2.22
fixedbitset v0.4.2
flate2 v1.0.27
fnv v1.0.7
form_urlencoded v1.2.0
futures v0.3.28
futures-channel v0.3.28
futures-core v0.3.28
futures-executor v0.3.28
futures-io v0.3.28
futures-macro v0.3.28
futures-sink v0.3.28
futures-task v0.3.28
futures-util v0.3.28
geiger v0.4.12
generic-array v0.14.7
getrandom v0.1.16
getrandom v0.2.10
git2 v0.17.2
git2-curl v0.18.0
gix v0.45.1
gix-actor v0.21.0
gix-attributes v0.13.1
gix-bitmap v0.2.7
gix-chunk v0.4.4
gix-command v0.2.9
gix-commitgraph v0.16.0
gix-config v0.23.0
gix-config-value v0.12.5
gix-credentials v0.15.0
gix-date v0.5.1
gix-diff v0.30.1
gix-discover v0.19.0
gix-features v0.30.0
gix-fs v0.2.0
gix-glob v0.8.0
gix-hash v0.11.4
gix-hashtable v0.2.4
gix-ignore v0.3.0
gix-index v0.17.0
gix-lock v6.0.0
gix-mailmap v0.13.0
gix-negotiate v0.2.1
gix-object v0.30.0
gix-odb v0.46.0
gix-pack v0.36.0
gix-packetline v0.16.6
gix-path v0.8.4
gix-prompt v0.5.5
gix-protocol v0.33.2
gix-quote v0.4.7
gix-ref v0.30.0
gix-refspec v0.11.0
gix-revision v0.15.2
gix-revwalk v0.1.0
gix-sec v0.8.4
gix-tempfile v6.0.0
gix-trace v0.1.3
gix-transport v0.32.0
gix-traverse v0.26.0
gix-url v0.19.0
gix-utils v0.1.5
gix-validate v0.7.7
gix-worktree v0.18.0
glob v0.3.1
globset v0.4.13
globwalk v0.8.1
grep-matcher v0.1.6
grep-searcher v0.1.11
group v0.13.0
h2 v0.3.21
half v1.8.2
hashbrown v0.12.3
hashbrown v0.14.0
heck v0.3.3
hex v0.4.3
hkdf v0.12.3
hmac v0.12.1
home v0.5.5
http v0.2.9
http-auth v0.1.8
http-body v0.4.5
httparse v1.8.0
httpdate v1.0.3
humansize v2.1.3
humantime v2.1.0
hyper v0.14.27
hyper-tls v0.5.0
iana-time-zone v0.1.57
ident_case v1.0.1
idna v0.4.0
ignore v0.4.20
im-rc v15.1.0
imara-diff v0.1.5
indexmap v1.9.3
indexmap v2.0.0
inout v0.1.3
instant v0.1.12
io-close v0.3.7
io-lifetimes v1.0.11
ipnet v2.8.0
is-terminal v0.4.9
itertools v0.10.5
itertools v0.11.0
itoa v1.0.9
jobserver v0.1.26
kstring v2.0.0
lazycell v1.3.0
lazy_static v1.4.0
libc v0.2.147
libgit2-sys v0.15.2+1.6.4
libm v0.2.7
libnghttp2-sys v0.1.8+1.55.1
libssh2-sys v0.3.0
libz-sys v1.1.12
lock_api v0.4.10
log v0.4.20
maybe-async v0.2.7
memchr v2.6.3
memmap2 v0.5.10
memoffset v0.9.0
mime v0.3.17
minimal-lexical v0.2.1
miniz_oxide v0.7.1
mio v0.8.8
native-tls v0.2.11
nom v7.1.3
num-format v0.4.4
num-traits v0.2.16
num_cpus v1.16.0
num_threads v0.1.6
once_cell v1.18.0
opaque-debug v0.3.0
opener v0.5.2
openssl-src v300.1.3+3.1.2
openssl-sys v0.9.93
ordered-float v2.10.0
orion v0.17.5
os_info v3.7.0
p384 v0.13.0
parking_lot v0.11.2
parking_lot v0.12.1
parking_lot_core v0.8.6
parking_lot_core v0.9.8
parse-zoneinfo v0.3.0
pasetors v0.6.7
pathdiff v0.2.1
pem-rfc7468 v0.7.0
percent-encoding v2.3.0
pest v2.7.3
pest_derive v2.7.3
pest_generator v2.7.3
pest_meta v2.7.3
petgraph v0.6.4
phf v0.11.2
phf_codegen v0.11.2
phf_generator v0.11.2
phf_shared v0.11.2
pin-project-lite v0.2.13
pin-utils v0.1.0
pkcs8 v0.10.2
pkg-config v0.3.27
ppv-lite86 v0.2.17
primeorder v0.13.2
proc-macro-error v1.0.4
proc-macro-error-attr v1.0.4
proc-macro2 v1.0.66
prodash v25.0.2
pulldown-cmark v0.9.3
quote v1.0.33
rand v0.7.3
rand v0.8.5
rand_chacha v0.2.2
rand_chacha v0.3.1
rand_core v0.5.1
rand_core v0.6.4
rand_xoshiro v0.6.0
rayon v1.7.0
rayon-core v1.11.0
regex v1.9.5
regex-automata v0.3.8
regex-syntax v0.7.5
reqwest v0.11.20
resiter v0.5.0
rfc6979 v0.4.0
rpassword v7.2.0
rprompt v2.0.2
rtoolbox v0.0.1
rust-argon2 v1.0.1
rustfix v0.6.1
rustix v0.37.23
rustix v0.38.13
ryu v1.0.15
same-file v1.0.6
scopeguard v1.2.0
sec1 v0.7.3
security-framework v2.9.2
security-framework-sys v2.9.1
semver v1.0.18
serde v1.0.188
serde-value v0.7.0
serde_cbor v0.11.2
serde_derive v1.0.188
serde_ignored v0.1.9
serde_json v1.0.106
serde_path_to_error v0.1.14
serde_spanned v0.6.3
serde_urlencoded v0.7.1
serde_yaml v0.9.25
sha1 v0.10.5
sha1_smol v1.0.0
sha2 v0.10.7
sha2 v0.9.9
shell-escape v0.1.5
signal-hook v0.3.17
signal-hook-registry v1.4.1
signature v1.6.4
signature v2.1.0
siphasher v0.3.11
sized-chunks v0.6.5
slab v0.4.9
slug v0.1.4
smallvec v1.11.0
socket2 v0.4.9
socket2 v0.5.3
spki v0.7.2
static_assertions v1.1.0
strip-ansi-escapes v0.1.1
strsim v0.10.0
strsim v0.8.0
structopt v0.3.26
structopt-derive v0.4.18
subtle v2.5.0
syn v1.0.109
syn v2.0.32
syn-inline-mod v0.6.0
tar v0.4.40
tempfile v3.8.0
tera v1.19.1
term v0.7.0
termcolor v1.2.0
terminal_size v0.2.6
term_size v0.3.2
textwrap v0.11.0
thiserror v1.0.48
thiserror-impl v1.0.48
thread_local v1.1.7
time v0.3.28
time-core v0.1.1
time-macros v0.2.14
tinyvec v1.6.0
tinyvec_macros v0.1.1
tokei v12.1.2
tokio v1.32.0
tokio-native-tls v0.3.1
tokio-util v0.7.8
toml v0.5.11
toml v0.7.8
toml_datetime v0.6.3
toml_edit v0.19.15
tower-service v0.3.2
tracing v0.1.37
tracing-core v0.1.31
try-lock v0.2.4
typed-builder v0.16.0
typed-builder-macro v0.16.0
typenum v1.16.0
ucd-trie v0.1.6
unic-char-property v0.9.0
unic-char-range v0.9.0
unic-common v0.9.0
unic-segment v0.9.0
unic-ucd-segment v0.9.0
unic-ucd-version v0.9.0
unicase v2.7.0
unicode-bidi v0.3.13
unicode-bom v2.0.2
unicode-ident v1.0.11
unicode-normalization v0.1.22
unicode-segmentation v1.10.1
unicode-width v0.1.10
unicode-xid v0.2.4
unsafe-libyaml v0.2.9
url v2.4.1
utf8parse v0.2.1
vcpkg v0.2.15
vec_map v0.8.2
version_check v0.9.4
vte v0.10.1
vte_generate_state_changes v0.1.1
walkdir v2.4.0
want v0.3.1
winnow v0.5.15
zeroize v1.6.0
zeroize_derive v1.4.2

@kornelski
Copy link
Member

Ok, I was able to reproduce it. There must be something wrong in our Cargo integration.

The workaround is to add the crate you want as a dependency and run cargo fetch.

@kpreid
Copy link
Author

kpreid commented Sep 13, 2023

(This comment is only to provide use-case context.)

The workaround is to add the crate you want as a dependency and run cargo fetch.

Indeed that would also be more convenient. The reason I don't is that the goal I am working towards is “not personally vulnerable to malware in packages”, so I'm practicing a workflow that doesn't run any of the code before I've reviewed it, and having it set as a dependency makes it much more likely to be run (certain, if rust-analyzer is open on the package with the dependency).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants