Skip to content
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

make: handle blacklisted features separately from missing requirements #12453

Merged
merged 3 commits into from
Oct 15, 2019

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Oct 15, 2019

Contribution description

This PR addresses the several comments (#9081 (comment), #9081 (comment)) made in #9081 but kept unadressed about moving the management of blacklisted features in a dedicated variable.

The current behavior is to say a blacklisted features used is a missing non blacklisted requirements. This is far from obvious.

We can discuss on the name of the new variable introduced by this PR. But at least the error message displayed when one wants to use a blacklisted feature in an application is much more easy to understand.

Testing procedure

  • make info-board-supported should not differ from master
  • A green CI is also a good indicator

Issues/PRs references

Cleanup of #9081

@aabadie aabadie added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 15, 2019
@aabadie aabadie requested a review from fjmolinas October 15, 2019 06:02
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for addressing this @aabadie. Some minor naming comment's,

I also think it would be good to have a variable that aggregates FEATURES_BLACKLISTED and FEATURES_MISSING, something like FEATURES_REQUIREMENTS_MISSING

# "!<feature>" ("not feature")
_features_used_blacklisted = $(addprefix !,$(sort $(filter $(FEATURES_USED), $(FEATURES_BLACKLIST))))
# Features that are used by the application but blacklisted by the BSP.
# Having blacklisted features may case the build to fail.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Having blacklisted features may case the build to fail.
# Having blacklisted features may cause the build to fail.

_features_used_blacklisted = $(addprefix !,$(sort $(filter $(FEATURES_USED), $(FEATURES_BLACKLIST))))
# Features that are used by the application but blacklisted by the BSP.
# Having blacklisted features may case the build to fail.
FEATURES_BLACKLISTED = $(sort $(filter $(FEATURES_USED), $(FEATURES_BLACKLIST)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be FEATURES_USED_BLACKLISTED

@aabadie
Copy link
Contributor Author

aabadie commented Oct 15, 2019

I also think it would be good to have a variable that aggregates FEATURES_BLACKLISTED and FEATURES_MISSING, something like FEATURES_REQUIREMENTS_MISSING

I don't think so. We will go back to the double negation crappy thing that this PR is trying to avoid.

@fjmolinas
Copy link
Contributor

I don't think so. We will go back to the double negation crappy thing that this PR is trying to avoid.

True!

@kaspar030 kaspar030 changed the title make: handle blacklisted features separatly from missing requirements make: handle blacklisted features separately from missing requirements Oct 15, 2019
@aabadie
Copy link
Contributor Author

aabadie commented Oct 15, 2019

True!

May I squash ?

@fjmolinas
Copy link
Contributor

fjmolinas commented Oct 15, 2019

The double negation is no longer present, can you also add FEATURES_USED_BLACKLISTED to info-build

FEATURES_MISSING (only non optional features):
         -none-
FEATURES_BLACKLIST (blacklisted features):
         arch_esp8266

Otherwise I ran the following testing procedure after rebasing on master.

for app in $(make info-applications); do echo "$app"; make --no-print-directory -C ${app} info-boards-supported;echo " "; done > [pr12453/master].txt
diff pr12453.txt master.txt
# no diff

If you agree with my change suggestion squash immediatly.

@aabadie aabadie force-pushed the pr/make/features_blacklisted branch from bae08ed to f55a16f Compare October 15, 2019 09:39
@aabadie aabadie force-pushed the pr/make/features_blacklisted branch from f55a16f to ba0eb79 Compare October 15, 2019 09:40
@aabadie
Copy link
Contributor Author

aabadie commented Oct 15, 2019

If you agree with my change suggestion squash immediatly.

Done

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, lets see what murdock says.

@aabadie
Copy link
Contributor Author

aabadie commented Oct 15, 2019

lets see what murdock says.

Murdock agrees

@aabadie aabadie merged commit 6c7acf4 into RIOT-OS:master Oct 15, 2019
@aabadie aabadie deleted the pr/make/features_blacklisted branch October 15, 2019 17:15
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
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 CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants