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

west failed due to empty value in self.path #28925

Closed
sdalu opened this issue Oct 5, 2020 · 5 comments
Closed

west failed due to empty value in self.path #28925

sdalu opened this issue Oct 5, 2020 · 5 comments
Assignees
Labels
area: Build System area: Modules area: West West utility bug The issue is a bug, or the PR is fixing a bug

Comments

@sdalu
Copy link
Contributor

sdalu commented Oct 5, 2020

Tested with west 0.8.0 on FreeBSD system

If self.path is changed to use manifest-repo, everything is working fine

Error message

-- west build: generating a build system
-- Application: ....
-- Zephyr version: 2.4.0 (/home/sdalu/ZephyrProjects/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
CMake Error at /home/sdalu/ZephyrProjects/zephyr/cmake/zephyr_module.cmake:48 (message):
  Traceback (most recent call last):

    File "/home/sdalu/ZephyrProjects/zephyr/scripts/zephyr_module.py", line 326, in <module>
      main()
    File "/home/sdalu/ZephyrProjects/zephyr/scripts/zephyr_module.py", line 266, in main
      meta = process_module(project)
    File "/home/sdalu/ZephyrProjects/zephyr/scripts/zephyr_module.py", line 99, in process_module
      module_path = PurePath(module)
    File "/usr/local/lib/python3.7/pathlib.py", line 642, in __new__
      return cls._from_parts(args)
    File "/usr/local/lib/python3.7/pathlib.py", line 674, in _from_parts
      drv, root, parts = self._parse_args(args)
    File "/usr/local/lib/python3.7/pathlib.py", line 658, in _parse_args
      a = os.fspath(a)

  TypeError: expected str, bytes or os.PathLike object, not NoneType

Call Stack (most recent call first):
  /home/sdalu/ZephyrProjects/zephyr/cmake/app/boilerplate.cmake:150 (include)
  CMakeLists.txt:6 (include)

Manifest used in T3 configuration. manifest is put in it's own manifest-repo directory

manifest:
  remotes:
    - name: zephyrproject-rtos
      url-base: https://github.com/zephyrproject-rtos

  projects:
    - name: zephyr
      remote: zephyrproject-rtos
      revision: v2.4.0
      import: true    

  self:
    path:

.west/config file

[manifest]
path = manifest-repo
[zephyr]
base = zephyr
@mbolivar-nordic mbolivar-nordic transferred this issue from zephyrproject-rtos/west Oct 5, 2020
@mbolivar-nordic
Copy link
Contributor

  self:
    path:

Can you explain why this is here? The semantics of self: path: foo are to place the manifest repository at path foo during west init, so leaving this as an empty string is not going to lead to good results.

Do you still see this if you delete this entire self: map?

@mbolivar-nordic
Copy link
Contributor

@tejlmand either way I think we need to avoid a stack trace here. Need to see if it's a zephyr_module.py issue or if west.manifest should reject this manifest completely

@mbolivar-nordic mbolivar-nordic added area: Build System area: Modules area: West West utility bug The issue is a bug, or the PR is fixing a bug labels Oct 5, 2020
@sdalu
Copy link
Contributor Author

sdalu commented Oct 5, 2020

Building fine without the self: section.

For the:

  self:
    path:

I don't remember exactly where I got it but I think it was the recommended way in previous (2.0 ?) documentation for T3 forest topology, and it was working fine that way before 2.4

@mbolivar-nordic
Copy link
Contributor

I don't remember exactly where I got it but I think it was the recommended way in previous (2.0 ?) documentation for T3 forest topology, and it was working fine that way before 2.4

This manifest is not well-formed; if you can point to some documentation that recommends doing it that way, I will fix it. I don't see any in master.

I think this is therefore not a bug, but a malformed manifest. I've sent a PR to west which rejects this kind of manifest so it doesn't cause confusion in the future: zephyrproject-rtos/west#446

@mbolivar-nordic
Copy link
Contributor

Since zephyrproject-rtos/west#446 is merged, I'm going to close this. I think I've answered the questions about best practices around self: path: in the PR comments there as well -- there's no "one size fits all" answer; it's really up to the user. Please LMK if you think any docs are still missing and I will send an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Modules area: West West utility bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

3 participants