question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Let `west` determine revision for modules when the `import` is not declared

See original GitHub issue

Can west determines modules revision when import is not specified?

From zephyr doc:

The main advantage to using import is not having to track the revisions of imported projects separately. In the above example, using import means Zephyr’s module versions are automatically determined from the zephyr/west.yml revision, instead of having to be copy/pasted (and maintained) on their own.

Any interest in patching this limitation?

My use-case:

I would want to specify the required modules. It is possible as of now, but it would be nice if west could figure the revision of the specified module.

Example west.yml:

manifest:
  remotes:
    - name: zephyrproject-rtos
      url-base: https://github.com/zephyrproject-rtos
  defaults:
    remote: zephyrproject-rtos
  projects:
    - name: zephyr
      remote: zephyrproject-rtos
      revision: v2.5.0
      west-commands: scripts/west-commands.yml
    - name: hal_st
      path: modules/hal/st
      groups:
        - hal
    - name: hal_stm32
      path: modules/hal/stm32
      groups:
        - hal
    - name: cmsis
      path: modules/hal/cmsis
      groups:
        - hal

  self:
    path: NUCLEOH723

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
tejlmandcommented, Oct 27, 2021

Can west determines modules revision when import is not specified?

@manoj153 Why don’t you want to use import ?

I think what you’re asking for in terms of reusing revision from Zephyr can be achieved with this:

manifest:
  remotes:
    - name: zephyrproject-rtos
      url-base: https://github.com/zephyrproject-rtos
  defaults:
    remote: zephyrproject-rtos
  projects:
    - name: zephyr
      remote: zephyrproject-rtos
      revision: v2.5.0
      west-commands: scripts/west-commands.yml
      import:
        name-allowlist:
        - hal_st
        - hal_stm32
        - cmsis

  self:
    path: NUCLEOH723

that will import those three specific projects from Zephyr exactly at the revision specified in the Zephyr manifest, and no other projects.

What I fail to understand is why you want to avoid import with name-allowlist ?

1reaction
manoj153commented, Nov 3, 2021
import:
        name-allowlist:

works thus closing this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

List not defined when importing a function - python
When I import Module 2 (module with functions), I get a Name Error. NameError: name 'x' is not defined. where x is the...
Read more >
5. The import system — Python 3.11.1 documentation
This protocol consists of two conceptual objects, finders and loaders. A finder's job is to determine whether it can find the named module...
Read more >
Updated YANG Module Revision Handling - IETF
A YANG extension statement allowing YANG module imports to specify an earliest module revision that may satisfy the import dependency.
Read more >
Application Development - Zephyr Project Documentation
An application located within the zephyr folder in a Zephyr west ... it must be a complete list of all modules to use,...
Read more >
Understanding C++ Modules: Part 2: export, import, visible ...
The first declaration of an exported entity must be an exported declaration. Subsequent declarations and definitions need not have the export ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found