Skip to content

Moving components locally for development purposes can cause wrong dependency resolution (PACMAN-1203) #100

@Delzye

Description

@Delzye

The Component Manager version

v2.4.2

ESP-IDF Version

v6,0 Beta (e8ba1ed59a2b227809aa1d222db6bc8bb0045312)

python Version

3.11

Operating System

Windows 11

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

Firefox

Description

I have a component A v0.1.0 as a dependency in the idf_component.yml of my project. A depends on B, which is v1.5.0. Both are downloaded from the esp-registry. Now I want do change something in B, a fix or whatever, so I move B locally to the components directory and change the version to v1.5.1. This works as expected, the new version is found and used in the compilation process.

But if I then want to change something in A as well and move it to the components directory also, the problems start. Note that this also happens if I do not change anything in A, just moving it from managed_compoents to components leads to this issue:

When recompiling now (deleting dependencies.lock and build artifacts and building) it picks up both B v1.5.0 and v1.5.1, which leads to A using v1.5.0 and not using the fix I implemented in v1.5.1.

I was wondering if I did something wrong, but just moving a dependency from managed to local should not influence the dependency resolution, or does it?

To Reproduce

Create a new project, add espressif/bmi270_sensor: "^0.1.0" as a dependency in the idf_component.yml of the main component. 
Let it build, then move espressif__i2c_bus from managed_components to components and change the Version from 1.5.0 to 1.5.1. Delete dependencies.lock, remove build-artifacts, recompile. It picks up 1.5.1.

NOTICE: [3/4] espressif/i2c_bus (1.5.1) (C:\esp32\Projects\CCON\remote_management_test\components\espressif__i2c_bus)

Then move espressif__bmi270_sensor from managed_components to components.  Delete dependencies.lock, remove build-artifacts, recompile.
It picks up both espressif__i2c_bus v1.5.1 and 1.5.0. 

NOTICE: [3/5] espressif/i2c_bus (1.5.1) (C:\esp32\Projects\CCON\remote_management_test\components\espressif__i2c_bus)
NOTICE: [4/5] espressif/i2c_bus (1.5.0)

I had this happen with other components as well, but some are proprietary so I put together this example using official components.

Expected behaviour

A (espressif/bmi270_sensor) should use the local version 1.5.1 of espressif/i2c_bus and not download a second, older version from the registry.

Additional info

No response

I have checked existing issues and online Documentation

  • I confirm I have checked existing issues and online Documentation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions