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

Patching to master fails on build #358

Closed
indexds opened this issue Dec 25, 2024 · 2 comments
Closed

Patching to master fails on build #358

indexds opened this issue Dec 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@indexds
Copy link
Contributor

indexds commented Dec 25, 2024

Bug description

Title

  • Would you like to work on a fix? no

To Reproduce

  1. Create new project for example using https://github.com/esp-rs/esp-idf-template (not exclusive) or cargo clean an existing project.
  2. Patch to master using:
[patch.crates-io]
esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys", branch = "master" }

See https://github.com/indexds/eth

Expected behavior

Build doesn't fail.

Environment

  • Crate (esp-idf-sys) version: [master]
  • ESP-IDF branch or tag: 5.2.3
  • Target device (MCU): esp32
  • OS: w10
   Compiling num_enum v0.7.3
   Compiling embedded-hal v0.2.7
   Compiling embedded-hal-async v1.0.0
   Compiling strum v0.25.0
   Compiling document-features v0.2.10
   Compiling uncased v0.9.10
   Compiling embedded-hal-nb v1.0.0
   Compiling embedded-can v0.4.1
   Compiling atomic-waker v1.1.2
   Compiling anyhow v1.0.95
   Compiling embedded-svc v0.28.0
error[E0432]: unresolved imports `embuild::espidf::NotActivatedError`, `embuild::espidf::SourceTree`
  --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:14:47
   |
14 |     EspIdfOrigin, EspIdfRemote, FromEnvError, NotActivatedError, SourceTree,
   |                                               ^^^^^^^^^^^^^^^^^  ^^^^^^^^^^ no `SourceTree` in `espidf`
   |                                               |
   |                                               no `NotActivatedError` in `espidf`

   Compiling eth v0.1.0 (C:\eth)
   Compiling embassy-futures v0.1.1
error[E0599]: no method named `path` found for reference `&Repository` in the current scope
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:148:30
    |
148 |                         repo.path().display(),
    |                              ^^^^ method not found in `&Repository`

error[E0164]: expected tuple struct or tuple variant, found struct variant `FromEnvError::NotActivated`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:209:18
    |
209 |             (Err(FromEnvError::NotActivated(NotActivatedError { source: err, .. })), true) |
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant

   Compiling embassy-time-driver v0.1.0
error[E0164]: expected tuple struct or tuple variant, found struct variant `FromEnvError::NotActivated`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:215:18
    |
215 |             (Err(FromEnvError::NotActivated(NotActivatedError { esp_idf_dir, .. })), _) => {
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a tuple struct or tuple variant

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:198:25
    |
198 |                     idf.esp_idf_dir.path().display()
    |                         ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:207:50
    |
207 |                 install(EspIdfOrigin::Custom(idf.esp_idf_dir))?
    |                                                  ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:297:55
    |
297 |             if let SourceTree::Git(repository) = &idf.esp_idf_dir {
    |                                                       ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:332:51
    |
332 |         if let SourceTree::Git(repository) = &idf.esp_idf_dir {
    |                                                   ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:445:14
    |
445 |         &idf.esp_idf_dir.path(),
    |              ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:461:34
    |
461 |             env=("IDF_PATH", idf.esp_idf_dir.path()))
    |                                  ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:502:30
    |
502 |         .env("IDF_PATH", idf.esp_idf_dir.path())
    |                              ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `exported_env_vars` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:509:30
    |
509 |     for (var, value) in &idf.exported_env_vars {
    |                              ^^^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

error[E0609]: no field `esp_idf_dir` on type `EspIdf`
   --> C:\Program Files\Rust\.cargo\git\checkouts\esp-idf-sys-d4c2e811b42d99d6\9cea14d\build\native\cargo_driver.rs:558:26
    |
558 |         esp_idf_dir: idf.esp_idf_dir.path().to_owned(),
    |                          ^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `repository`, `exported_path`, `venv_python`, `version`, `is_managed_espidf`

Some errors have detailed explanations: E0164, E0432, E0599, E0609.
For more information about an error, try `rustc --explain E0164`.
error: could not compile `esp-idf-sys` (build script) due to 13 previous errors
warning: build failed, waiting for other jobs to finish...

ps: I might be stupid, but I'm pretty that's the issue as removing the patch solves it.

@indexds indexds added the bug Something isn't working label Dec 25, 2024
@ivmarkov
Copy link
Collaborator

You need to also patch embuild: https://github.com/esp-rs/esp-idf-svc/blob/master/Cargo.toml#L22

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Dec 25, 2024
@indexds
Copy link
Contributor Author

indexds commented Dec 25, 2024

Alright thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants