Skip to content

Imported west-commands don't resolve when module manifest isn't in module root #725

@urob

Description

@urob

When manifest isn't in the root of a module, then custom west-commands don't resolve when imported from another Zephyr workspace.

Example: https://github.com/zmkfirmware/zmk

The manifest file is located at /app/west.yml. The manifest adds custom commands from /app/scripts/west-commands.yml:

# ZMK manifest
manifest:
  # ...
  self:
    west-commands: scripts/west-commands.yml

When zmk is the topdir of the workspace, both the path to west-commands.yml and the paths to any script defined therein are interpreted relative to /app.

However, when zmk is imported from another Zephyr workspaces as follows, the paths won't resolve correctly:

# Main manifest of Zephyr workspace
manifest:
  projects:
    - name: zmk
      # ...
      import: app/west.yml

In this case, both the west-commands from the imported ZMK manifest as well as the paths to any script defined therein are interpreted as relative to /zmk (rather than /zmk/app), resulting in none of the commands being found.


Note that overwriting west-commands from the topdir manifest with west-commands: app/scripts/west-commands.yml resolves the first problem of /zmk/app/scripts/west-commands.yml being found, but still interprets the paths to any script therein relative to /zmk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions