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
We have a situation where we'd really like for our Rust project to be able to build completely offline without accessing crates.io. We'd also like to be able to run cargo test --offline in our GitHub CI workflows. Unfortunately, this doesn't work. We have one single dependency on the capstone library which is clearly marked as optional, and even with the --offline flag, we get this error:
Run cargo test --offline
error: no matching package named `capstone` found
location searched: registry `crates-io`
required by package `yjit v0.1.0 (/home/runner/work/ruby/ruby/yjit)`
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.
IMO this is clearly a bug. It violates user intuition as to how the --offline switch should behave. The error message even recommends just... Not using the offline switch because it might be too confusing (!?). Well, you're right, it is confusing. The dependency is optional, and we haven't enabled the feature requiring it. Therefore there should be no need to fetch said dependency. It really should be that simple.
We have a situation where we'd really like for our Rust project to be able to build completely offline without accessing
crates.io
. We'd also like to be able to runcargo test --offline
in our GitHub CI workflows. Unfortunately, this doesn't work. We have one single dependency on thecapstone
library which is clearly marked as optional, and even with the--offline
flag, we get this error:IMO this is clearly a bug. It violates user intuition as to how the
--offline
switch should behave. The error message even recommends just... Not using the offline switch because it might be too confusing (!?). Well, you're right, it is confusing. The dependency is optional, and we haven't enabled the feature requiring it. Therefore there should be no need to fetch said dependency. It really should be that simple.I also tried
Cargo.lock
(doesn't help)cargo test --locked --offline
(doesn't help)Linking the
Cargo.toml
file for the project in case someone can spot something wrong with our setup: https://github.com/Shopify/ruby/blob/70fee18c9947ab50b93ec0018f0d6cf4c6c2772f/yjit/Cargo.tomlThe text was updated successfully, but these errors were encountered: