serayuzgur / crates

crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).
https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
MIT License
238 stars 36 forks source link

Sparse Protocol Incompatibility #191

Closed VirxEC closed 1 year ago

VirxEC commented 1 year ago

Describe the bug This extension is incompatible with the new sparse protocol in stable Rust/Cargo.

See the blog post for more details on the upcoming protocol.

To Reproduce Steps to reproduce the behavior:

  1. Ensure you're running Rust 1.68+
  2. Go to Cargo.toml, everything is :heavy_check_mark:
  3. Enable using the sparse protocol as described in the blog post above
  4. Go to Cargo.toml
  5. All deps have ":exclamation: :exclamation: :exclamation:"
  6. See error:
    Errors
    once_cell: Error: Command failed: git --no-pager --git-dir="/home/virx/.cargo/registry/index/github.com-1ecc6299db9ec823/.git" show origin/master:on/ce/once_cell
    fatal: invalid object name 'origin/master'.

Expected behavior This extension should be compatible with the upcoming sparse protocol.

Desktop (please complete the following information):

GiyoMoon commented 1 year ago

I'm having the same issue. A workaround for now is to set setting crates.useLocalCargoIndex=false

VirxEC commented 1 year ago

This problem is now worse with Rust 1.70.0 where the sparse protocol for crates.io is the default protocol.

serayuzgur commented 1 year ago

Hi, thanks for the issue, I will deal with it when I got enough time but right now I can't.

BlackDex commented 1 year ago

An other option to workaround this for now is to run this:

CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git cargo update --dry-run
serayuzgur commented 1 year ago

Since there are many issues going related with this, we have our own index server now. No more local checks with v0.6.0

ZanderBrown commented 1 year ago

we have our own index server now

Not sure what this means?

BarbossHack commented 1 year ago

we have our own index server now

Not sure what this means?

see https://github.com/serayuzgur/crates/issues/197

daniel-pfeiffer commented 1 year ago

I am facing the same(?) issue since I activated the new protocol and it is not solved by this. I am behind a https-intercepting proxy. I have extracted its CAs into one pem file and export NODE_EXTRA_CA_CERTS to point to it. Neither with suffix .cer, nor .pem does crates pick it up.

I thought I needed to wait for your new version, to catch up, but to no avail.