Skip to content

Commit

Permalink
Remove cargo metadata --frozen and --offline flags
Browse files Browse the repository at this point in the history
cargo metadata resolves all dependencies even ones that are disabled (known as weak dependencies)
which cargo build doesn't do (see issue rust-lang/cargo#10801). These unresolved dependencies require
network access to load their package metadata.
As the `--frozen` flag itself blocks network access (in addition to blocking changes to the Cargo.lock)
too, we need to remove both the `--frozen` and `--offline` flags. Doing this allows cargo the change the
`Cargo.lock` though, which is undesirable (as we're in the process of building the same dependencies that
rely on the `Cargo.lock` in the first place).
  • Loading branch information
N3xed authored and Jakob Lachermeier committed Aug 26, 2022
1 parent 33674e4 commit 1082dfc
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion build/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 105,6 @@ impl BuildConfig {
pub fn with_cargo_metadata(&mut self) -> Result<()> {
let metadata = cargo_metadata::MetadataCommand::new()
.current_dir(workspace_dir()?)
.other_options(vec!["--frozen".into(), "--offline".into()])
.exec()?;

let root_package = match (metadata.root_package(), &self.esp_idf_sys_root_crate) {
Expand Down

0 comments on commit 1082dfc

Please sign in to comment.