% cargo build --features espidf
# .. snip
Compiling embuild v0.29.1 (/Users/kevin/src/embuild)
error: there is no argument named `IDF_PATH_VAR`
--> src/espidf.rs:140:65
|
140 | FromEnvError::NoRepo(anyhow!("environment variable `{IDF_PATH_VAR}` not found"))
| ^^^^^^^^^^^^^^
error: there is no argument named `IDF_PATH_VAR`
--> src/espidf.rs:177:36
|
177 | given by ${IDF_PATH_VAR} ('{}')",
| ^^^^^^^^^^^^^^
error: there is no argument named `v`
--> src/espidf.rs:262:32
|
262 | Ok(v) => format!("v{v}"),
| ^^^
error: there is no argument named `MANAGED_ESP_IDF_REPOS_DIR_BASE`
--> src/espidf.rs:321:22
|
321 | format!("{MANAGED_ESP_IDF_REPOS_DIR_BASE}-{hash}")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: there is no argument named `hash`
--> src/espidf.rs:321:55
|
321 | format!("{MANAGED_ESP_IDF_REPOS_DIR_BASE}-{hash}")
| ^^^^^^
error: there is no argument named `IDF_PYTHON_ENV_PATH_VAR`
--> src/espidf.rs:482:58
|
482 | let python_env_var_prefix = format!("{IDF_PYTHON_ENV_PATH_VAR}=");
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: there is no argument named `IDF_PYTHON_ENV_PATH_VAR`
--> src/espidf.rs:490:72
|
490 | ... "`idf_tools.py export` result contains no `{IDF_PYTHON_ENV_PATH_VAR}` item \
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: expected a `Fn<(char,)>` closure, found `[char; 2]`
--> src/espidf.rs:375:45
|
375 | let mut ref_name = ref_name.replace(&['/', '\\'], "-");
| ------- ^^^^^^^^^^^^ expected an `Fn<(char,)>` closure, found `[char; 2]`
| |
| required by a bound introduced by this call
|
= help: the trait `Fn<(char,)>` is not implemented for `[char; 2]`
= note: required because of the requirements on the impl of `FnOnce<(char,)>` for `&[char; 2]`
= note: required because of the requirements on the impl of `Pattern<'_>` for `&[char; 2]`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `embuild` due to 8 previous errors
If embuild is compiled with:
espidf
feature enabledthen compilation fails with:
This is because
embuild
uses captured identifiers in format strings, and support for this was added in Rust 1.58.Ideally compilation would require the correct toolchain or fail early and with a clear error message.
I am aware of two approaches to improve this:
channel
field of a rust-toolchain fileI've added a PR for the
rust-version
field here: #45.