-
Notifications
You must be signed in to change notification settings - Fork 2k
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
build system: Improve failure mode for FEAUTRES_REQUIRED_ANY #20408
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maribu
added
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Area: build system
Area: Build system
labels
Feb 21, 2024
maribu
added
the
Type: cleanup
The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
label
Feb 21, 2024
mguetschow
reviewed
Feb 22, 2024
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.
Soft-ACK as I'm not very familiar with RIOT's make system, but looks sensible to me. Just two comment nits.
Failing to provide any of the required features can provide a message such as: There are unsatisfied feature requirements: periph_uart|periph_lpuart This can be confusing and may hide the actual. E.g. above message was generated when using SPI on the `msb-430` and `stdio_uart`. However, the MSB-430 board *does* provide `periph_uart`, so this looks like a bug in the feature resolution. This changes the failure mode of `FEATURES_REQUIRED_ANY` to just pick the first of the alternatives given if none of the alternative is usable, which gives in the example the following message instead: The following features may conflict: periph_spi periph_uart Rationale: Both SPI and UART are provided by the same USART peripheral The output is less surprising and can provide non-obvious reasons why `FEATURES_REQUIRED_ANY` failed to pick a feature. The downside is that the alternatives are no longer visible. However, that output likely was so confusing this might be for the best. Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
maribu
force-pushed
the
makefiles/features_check.inc.mk
branch
from
February 22, 2024 13:03
01389ba
to
d296523
Compare
Thanks. I applied the suggestions and squashed. |
benpicco
approved these changes
Feb 22, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Type: cleanup
The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
Failing to provide any of the required features can provide a message such as:
This can be confusing and may hide the actual. E.g. above message was generated when using SPI on the
msb-430
andstdio_uart
. However, the MSB-430 board does provideperiph_uart
, so this looks like a bug in the feature resolution. This changes the failure mode ofFEATURES_REQUIRED_ANY
to just pick the first of the alternatives given if none of the alternative is usable, which gives in the example the following message instead:The output is less surprising and can provide non-obvious reasons why
FEATURES_REQUIRED_ANY
failed to pick a feature. The downside is that the alternatives are no longer visible. However, that output likely was so confusing this might be for the best.Testing procedure
The build system unit tests have been updated to match the new failure mode.
Issues/PRs references
Needed for #20366, as the current failure mode of requiring
periph_uart|periph_lpuart
when neitherperiph_uart
norperiph_lpuart
is usable will trigger the test for requiring unknown features.