Skip to content

Commit fc81349

Browse files
committed
Remove cargo metadata --frozen and --offline flags
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).
1 parent db3254a commit fc81349

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

build/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl BuildConfig {
105105
pub fn with_cargo_metadata(&mut self) -> Result<()> {
106106
let metadata = cargo_metadata::MetadataCommand::new()
107107
.current_dir(workspace_dir()?)
108-
.other_options(vec!["--frozen".into(), "--offline".into()])
109108
.exec()?;
110109

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

0 commit comments

Comments
 (0)