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

Offline mode does not see path dependency changes #154

Open
detly opened this issue Aug 2, 2023 · 1 comment
Open

Offline mode does not see path dependency changes #154

detly opened this issue Aug 2, 2023 · 1 comment

Comments

@detly
Copy link

detly commented Aug 2, 2023

This is based on an example project that uses local path dependencies.

If I start bacon (no options) in project one and make a change to two/src/lib.rs that breaks compilation, bacon's display automatically updates.

If I start bacon with the --offline flag in project one and break project two, bacon does not update.

It might be that you don't want to support this, but it surprised me because it seems like bacon is capable of watching for the appropriate changes locally and it's not obvious why --offline affects that. Even if cargo is being called with --frozen or --locked under the hood, those only affect network-based behaviour, not local path-based access.

Versions:

  • bacon 2.12.1
  • cargo 1.71.0 (cfd3bbd8f 2023-06-08)
  • rustc 1.71.0 (8ede3aae2 2023-07-12)
  • OS: Ubuntu 23.04 (lunar)

Rust toolchain installed via Rustup, default is stable. Bacon installed via Cargo.

@Canop
Copy link
Owner

Canop commented Aug 2, 2023

Right now, passing --offline to bacon makes it tell cargo-metadata not only to stay offline but also to ignore all dependencies out of the workspace (using no_deps).

The reason is that asking for --offline but allowing external dependencies most often just makes cargo break with an error.

Some use cases could maybe be solved with first trying without no_deps then retrying with no_deps in case of error? We'd have to experiment.

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