-
Notifications
You must be signed in to change notification settings - Fork 7.9k
scripts: west_commands: build: Remove build warning #95308
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
scripts: west_commands: build: Remove build warning #95308
Conversation
When using non-pristine build with command "west build", it will report warning: WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work However, the "board" variable can be got from CMake Cache. This patch is trying to get board after "_update_cache". Signed-off-by: Felix Wang <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried reproducing this but could not. What kind of changes did you make between:
west build -b frdm_ke17z ./samples/hello_world -p
and
west build
so that you got that warning? for me it works just fine if I just change .c files
Hi @carlescufi Actually I have encountered this warning even without any code changes. Have you run "west config build.board_warn false" before? |
Something is off here, because:
I cannot reproduce your issue at all. @pdgendt can you reproduce it? |
I can reproduce it here. |
Yes, me too |
Do you have a board configured with $ west config build.board |
CC @nordic-krch $ git bisect bad
5718af02c522c195f24951d5e439b9638250a0f5 is the first bad commit
commit 5718af02c522c195f24951d5e439b9638250a0f5
Author: Krzysztof Chruściński <[email protected]>
Date: Thu Aug 7 16:39:31 2025 +0200
scripts: west_command: build: Support for conditional platform configs
extra_configs or extra_args can use additional filtering which was not
supported by the west build command. West is not aware of arch so that
filter type is not supported but platform (board) is known so it can
be used to apply expected configuration.
Signed-off-by: Krzysztof Chruściński <[email protected]>
scripts/west_commands/build.py | 46 ++++++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 15 deletions(-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing that. It was me, moving board finding to the earlier stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason that I wasn't seeing the warning is that I had board.build
defined in my config, which then provided a board for every build.
@nordic-krch I'm actually looking back to your change, with what you introduced the zephyr/scripts/west_commands/build.py Lines 271 to 272 in 6c1b1dc
EDIT: Adding DNM for now |
This issue will be fixed by #95383. Hence close this PR. |
For non-pristine build, there is warning, which is unnecessary. For example:
If I have run "west build -b frdm_ke17z ./samples/hello_world -p " before, after make some code changes, I want to run a non-pristine build:
(.venv) ➜ zephyr git:(main) ✗ west build
WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=.
Note: to silence the above message, run 'west config build.board_warn false'
ninja: no work to do.
It's not a fresh build and the "board" variable can be got from CMake Cache.
This patch is trying to get board after cmake cache is got by "self._update_cache()".
This is a regression introduced by #94231