willcrichton / flowistry

Flowistry is an IDE plugin for Rust that helps you focus on relevant code.
https://marketplace.visualstudio.com/items?itemName=wcrichton.flowistry
MIT License
1.88k stars 44 forks source link

Feature-gate error when `CARGO_REGISTRIES_CRATES_IO_PROTOCOL` is set in the environment #73

Closed jyn514 closed 1 year ago

jyn514 commented 1 year ago

Problem

Flowistry is based off a toolchain from 1.67 (cargo +nightly-2022-12-07), which doesn't support sparse registries (they were stabilized in 1.68). Would it be possible to base this off a more recent toolchain instead?

Logs

OS: darwin (22.4.0) VSCode: 1.74.2 Error message

error: usage of sparse registries requires `-Z sparse-registry`

Full log: https://paste.rs/MFp

jyn514 commented 1 year ago

As a workaround, manually running cargo +nightly-2022-12-07 install flowistry_ide --version 0.5.35 --force -Z sparse-registry gets flowistry far enough that it doesn't try to install the binary itself.

jyn514 commented 1 year ago

ah no, that just delays the error 😞

Flowistry could not run because your project failed to build with error:
error: failed to get `aho-corasick` as a dependency of package `redacted v0.0.0 (/Users/jyn/src/redacted)`

Caused by:
  failed to load source for dependency `aho-corasick`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  usage of sparse registries requires `-Z sparse-registry`
willcrichton commented 1 year ago

I will 0.5.36 soon which is on nightly-2023-04-12, is that recent enough?

jyn514 commented 1 year ago

That should work great! 1.68 branched in January so April is more than late enough :) actually at that point I think this will be on by default so I won't need the environment variable.

mrnossiom commented 1 year ago

I will 0.5.36 soon which is on nightly-2023-04-12, is that recent enough?

Do you know when v0.5.36 will be released ?

willcrichton commented 1 year ago

I just released 0.5.36, so this should be fixed now.