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

dependencies added for all components, also for unused components (PACMAN-991) #75

Closed
1 task done
morgana2313 opened this issue Sep 19, 2024 · 2 comments
Closed
1 task done
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@morgana2313
Copy link

The Component Manager version

v2.0.3

ESP-IDF Version

v5.3

python Version

3.12.6

Operating System

macOS

Browser (for https://components.espressif.com Issues)

No response

Description

idf-component-manager appears to add component dependencies for all components found in COMPONENT_DIRS and EXTRA_COMPONENT_DIRS , not just for the components that are actually used.

This causes problems when a component with a dependency that cannot build is in one of these directories. (example:TARGET=linux and espressif/onewire_bus)

To Reproduce

* add a dependency to an unused component
* this dependency is added to `managed-components` and thus compiled.

Expected behaviour

  • unused component's dependencies should not be added to managed-components.

Additional info

No response

I have checked existing issues and online Documentation

  • I confirm I have checked existing issues and online Documentation.
@morgana2313 morgana2313 added the Status: Awaiting triage Issue is waiting for triage label Sep 19, 2024
@github-actions github-actions bot changed the title dependencies added for all components, also for unused components dependencies added for all components, also for unused components (PACMAN-991) Sep 19, 2024
@igrr
Copy link
Member

igrr commented Sep 19, 2024

@morgana2313 That's right, the component manager downloads dependencies earlier than we know which components are actually used or not.

You probably can solve this problem by not adding onewire-bus dependency if the target is linux.

Please check this section for conditions in idf_component.yml: https://docs.espressif.com/projects/idf-component-manager/en/latest/reference/manifest_file.html#conditional-dependencies

Here's an example: https://github.com/espressif/idf-extra-components/blob/f16d432ef6d00fb9d48adde64f22aefc55bf16bc/esp_jpeg/examples/get_started/main/idf_component.yml#L8-L9

@morgana2313
Copy link
Author

Thanks that works for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

2 participants