Skip to content

Local dependency with absolute path fails when project and SDK are on different drives #111

Description

@sheng-ri

The Component Manager version

v3.0.3

ESP-IDF Version

v6.0.2

python Version

3.13.2

Operating System

Windows 11

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

No response

Description

I try new version idf with v6.0.2, I create project with blecent example.
It fall with

NOTICE: Manifest files have changed, solving dependencies.
NOTICE: Using component placed at C:\esp\v6.0.2\esp-idf\examples\bluetooth\nimble\common\nimble_central_utils for dependency "nimble_central_utils", specified in F:\C\blecent\main\idf_component.yml
.CMake Error at C:/esp/v6.0.2/esp-idf/tools/cmake/build.cmake:697 (message):
  Traceback (most recent call last):

    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\prepare_components\__main__.py", line 6, in <module>
      main()
      ~~~~^^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 337, in main
      args.func(args)
      ~~~~~~~~~^^^^^^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 157, in prepare_dep_dirs
      ).prepare_dep_dirs(
        ~~~~~~~~~~~~~~~~^
          managed_components_list_file=args.managed_components_list_file,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          component_list_file=_component_list_file(build_dir),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          local_components_list_file=local_components_list_file,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      )
      ^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\core.py", line 113, in wrapper
      return func(self, *args, **kwargs)
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\core.py", line 751, in prepare_dep_dirs
      downloaded_components = download_project_dependencies(
          project_requirements,
          str(self.lock_path),
          str(self.managed_components_path),
      )
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_manager\dependencies.py", line 508, in download_project_dependencies
      lock_manager.dump(solution)
      ~~~~~~~~~~~~~~~~~^^^^^^^^^^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_tools\lock\manager.py", line 67, in dump
      lock = LockFile(**solution.model_dump(context=context))
                        ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\idf_component_tools\utils.py", line 252, in model_dump
      return super().model_dump(
             ~~~~~~~~~~~~~~~~~~^
          exclude_none=exclude_none,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
          by_alias=by_alias,
          ^^^^^^^^^^^^^^^^^^
          **kwargs,
          ^^^^^^^^^
      )
      ^
    File "C:\Espressif\tools\python\v6.0.2\venv\Lib\site-packages\pydantic\main.py", line 475, in model_dump
      return self.__pydantic_serializer__.to_python(
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
          self,
          ^^^^^
      ...<13 lines>...
          polymorphic_serialization=polymorphic_serialization,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      )
      ^

  pydantic_core._pydantic_core.PydanticSerializationError: Error calling
  function `serialize_model`: ValueError: path is on mount 'C:', start on
  mount 'F:'

Call Stack (most recent call first):
  C:/esp/v6.0.2/esp-idf/tools/cmake/project.cmake:773 (idf_build_process)
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!

To Reproduce

1. Create a project using the blecent example (bluetooth/nimble/blecent) on a different drive from where the ESP-IDF SDK is located.
2. run `idf.py build`

Expected behaviour

Build successful

Additional info

docs:
https://docs.espressif.com/projects/idf-component-manager/en/latest/reference/manifest_file.html#local-directory-dependencies
here says The path to the local directory containing the dependency. You can use either a path relative to the idf_component.yml manifest file or an absolute path.

idf_component.yml:

dependencies:
  nimble_central_utils:
    path: ${IDF_PATH}/examples/bluetooth/nimble/common/nimble_central_utils

I have checked existing issues and online Documentation

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions