build system: don't optionally use conflicting features#16012
build system: don't optionally use conflicting features#16012benpicco merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
Can we really avoid this? Dependency resolution is iterative. If in round one there is only |
Both blacklist and list of conflicts should do my understanding not grow. But transitive dependencies to modules might pull in a required feature too late, as an optional feature conflicting with that could be already used. Still, best effort is likely good enough here for all but a few rare cases. And these could be addressed by tweaking the dependency resolution so that the conflicting required feature gets added in the some round as the optional feature it conflicts with. (But I hope that such occurrences won't show up soon, so that we migrate away in time.) |
I think |
Yes, of course, just pointing it out. I doubled checked and mostly its |
Maybe those can be removed? Maybe just a doc comment? Or we stick with best effort? What do you think? |
I'm not sure if there is indeed so much to gain that it would justify the effort, having the migration to Kconfig in mind. (Just thinking about the amount of quirks in the build system that can be dropped afterwards make me smile :-)) |
|
Lets spin up the ci |
|
Please squash @maribu |
17b1a14 to
9f2581b
Compare
makefiles/features_check.inc.mk
Outdated
| # Update to account for change in FEATURES_OPTIONAL_USED | ||
| FEATURES_USED_SO_FAR := $(sort $(FEATURES_REQUIRED) $(FEATURES_OPTIONAL_USED)) | ||
|
|
There was a problem hiding this comment.
This change seems unneeded now (moving it up)
There was a problem hiding this comment.
Moved down again and squashed
If adding a provided but optional feature would result in a feature conflict, don't use it.
Make sure that optional features that would cause conflicts don't end up being used again.
9f2581b to
47414f8
Compare
Contribution description
As the title says: If a feature is optional and using it would cause a feature conflict, the expectation is that it doesn't end up being used. This adds the required testing.
An additional a unit test to cover this case was added, so that no a future regression would be detected.
Testing procedure
See #16008 (comment)
Issues/PRs references
Detected in #16008 (comment)