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

treewide: modify Kconfig symbol prefixes #14904

Merged

Conversation

leandrolanzieri
Copy link
Contributor

Contribution description

It was proposed by @aabadie to modify the current prefix conventions for Kconfig symbols while we are in migration, to reduce possible ambiguities. After some discussion, the proposal is the following:

Current prefix New prefix Symbol description
MODULE_ USEMODULE_ Symbols generated from USEMODULE variable. Needed only during migration.
KCONFIG_MODULE_ KCONFIG_USEMODULE_ Symbols used in menuconfigs to allow optional configuration of used modules. Depend on USEMODULE_ symbols.
PKG_ USEPKG_ Symbols generated from USEPKG variable. Needed only during migration.
KCONFIG_PKG_ KCONFIG_USEPKG_ Symbols used in menuconfigs to allow optional configuration of used packages. Depend onUSEPKG_ symbols.
MOD_ MODULE_ Symbols that model modules in Kconfig.
-- (no packages modelled yet) PACKAGE_ Symbols that model packages in Kconfig.

Testing procedure

  • Check that the naming convention makes sense and is understandable.
  • Configurations should be shown and applied as usual (the USEMODULE and USEPKG variables should generate the same symbols which activate the visibility of configurations).
  • Check that all symbols have been renamed and documentation has been updated, according the table above.
  • Green CI.

Issues/PRs references

Suggested in #14626

This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
This changes the prefix used for the symbols that reprensent modules
(not the ones generated from USEMODULE).

MOD_ => MODULE_
@leandrolanzieri leandrolanzieri added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR Area: Kconfig Area: Kconfig integration labels Aug 31, 2020
@cgundogan cgundogan added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Aug 31, 2020
@aabadie aabadie self-assigned this Sep 1, 2020
@aabadie
Copy link
Contributor

aabadie commented Sep 1, 2020

I have some comments, not strictly related to this PR but I'm wondering if there aren't some issues in master.

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Thanks for the clarifications. I couldn't find any problem so far. The new names seems more consistent to me.

ACK

@aabadie
Copy link
Contributor

aabadie commented Sep 1, 2020

@cgundogan, what do you think of the new naming scheme ?

Copy link
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

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

@cgundogan, what do you think of the new naming scheme ?

my honest opinion? (: ..

Nevertheless, the changes look good. There are a lot of changes here .. but since most of them come from a systematic search & replace, the margin for careless slips should be rather small.

@cgundogan cgundogan merged commit 538155c into RIOT-OS:master Sep 1, 2020
@leandrolanzieri leandrolanzieri deleted the pr/kconfig/change_prefix_convention branch September 1, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/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.

3 participants