The 'spec' loop variable was not captured, and this would result in
the lambda function only evaluating to the last value in the loop.
The issue could occur when loading extension commands from projects,
where the name conflicts with a builtin command or an already loaded
extension command.
Discovered with flake8-bugbear, see
https://docs.astral.sh/ruff/rules/function-uses-loop-variable/
Fix function-uses-loop-variable (B023)
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The deprecated delete_config function supports passing a list
of ConfigFile enumerations. Update argument typing accordingly.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Make deprecated calls explicit during testing or remove them if
unnecessary.
Change the update_config and delete_config helper methods to use a
Configuration class instead of the global deprecated config functions.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
In October 2024, a problem reported in #558 showed that some Windows
systems can be configured to allow directory and file creations but not
renames. Test this _before_ git cloning to "fail fast" and remove git
from the very confusing picture.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This will be useful as both a diagnostic tool and as a workaround; see
October 2024 comments in west issue #558 for examples and details.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Print a stack trace when debugging with -vvv or more. This is MUCH
faster than `git grep error_message` and it's even more useful when the
same error message is used in multiple places! Example: die_already() in
project.py
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It's not allowed to have projects inside the .west directory,
add a check when parsing the manifest.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the literal constant WEST_DIR instead of using the same string
value scattered around the project.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Omitting the artifact name changes the behavior, it will download all
artifacts and create subdirectories for each.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Fixes new `west diff --manifest` option added by commit
0d5ee4eb08 ("app: project: Allow to diff against manifest revision")
Do not pass `project.revision` to `git diff` because `project.revision`
is unresolved user input and does not always resolve to a commit. For
instance, `project.revision` can be the name of a remote branch like
`v3.7-branch` that does not exist locally; then `git diff` fails. Or
even worse: there could be a local branch of the same name which points
to a totally different commit.
This bug was found when discussing issue #747, see 7th comment there for
a longer description of what `manifest-rev` is and how it works.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Our release process documentation recommends getting passing tox
results on as many popular linux distributions as time allows. Doing
this by hand is cumbersome, redundant, and error prone.
Add a directory with a helper script that automates the entire process
using docker compose and document its use in MAINTAINERS.rst.
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This makes it trivial to inspect, line by line, what got covered.
That is useful when evaluating coverage for a new feature.
Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
Add a testcase to parse a manifest and validate the as_dict output.
Add an invalid manifest file for missing required submodule properties.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>