project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.43k stars 1.99k forks source link

MBedOs does not build: updates in python dependences cause pdoc3 conflict #9272

Closed andy31415 closed 2 years ago

andy31415 commented 3 years ago

Problem

Bootstrap started failing today apparently due to pip package updates.

A refetch of dependencies seems to have worked, expect mbedos builds fail due to some pdoc dependencies.

Proposed Solution

Figure out the cause of the error and fix (actual cause unclear).

andy31415 commented 3 years ago

Error looks like:

Traceback (most recent call last):
  File "/home/vscode/pigweed/env/pigweed-venv/bin/mbed-tools", line 5, in <module>
    from mbed_tools.cli.main import cli
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/cli/__init__.py", line 7, in <module>
    from mbed_tools.cli.main import cli, LOGGER
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/cli/main.py", line 16, in <module>
    from mbed_tools.cli.configure import configure
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/cli/configure.py", line 11, in <module>
    from mbed_tools.build import generate_config
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/build/__init__.py", line 14, in <module>
    from mbed_tools.build.config import generate_config
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/build/config.py", line 12, in <module>
    from mbed_tools.targets import get_target_by_name
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/targets/__init__.py", line 28, in <module>
    from mbed_tools.targets.get_board import (
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/targets/get_board.py", line 13, in <module>
    from mbed_tools.targets.env import env
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/mbed_tools/targets/env.py", line 76, in <module>
    env_variables = pdoc.Class("Env", pdoc.Module("mbed_tools.targets.env"), Env).instance_variables()
  File "/home/vscode/pigweed/env/pigweed-venv/lib/python3.8/site-packages/pdoc/__init__.py", line 551, in __init__
    name = getattr(module, "__pdoc_module_name", module.__name__)
AttributeError: 'str' object has no attribute '__name__'

I attempted to use a previous pdoc3 build and that failed.

andy31415 commented 3 years ago

Changing pdoc/__init__.py to say 'name=modue' seems to make compilation work (based on the error claiming it is a str). Unsure what the correct module and values are and where they come from.

andy31415 commented 3 years ago

see #9271 - we had to disable mbedos since it was the only failing build after a constraints update.

woody-apple commented 2 years ago

Given this is an older issue, is this complete at this point? If not, please re-open.