-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
kconfig: add support for warnings when using experimental features #33566
kconfig: add support for warnings when using experimental features #33566
Conversation
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 like the idea, but I don't think we should be modifying scripts/kconfig/kconfig.py to do this. Maybe a separate script similar to scripts/kconfig/hardenconfig.py?
Except that The The motivation for updating |
fd94886
to
b2e34ff
Compare
@galak also notice, zephyr/scripts/kconfig/kconfig.py Line 57 in 16d2ab7
zephyr/scripts/kconfig/kconfig.py Line 62 in 16d2ab7
zephyr/scripts/kconfig/kconfig.py Line 63 in 16d2ab7
|
In a very limited set of places we have constructs like:
I would assume that we need to rewrite those to something similar to
Otherwise Would it be possible to make a similar construct that fails the configuration, as opposed to printing a warning, if an experimental feature is selected? |
We discussed this, but I actually think this might well belong in this file. It is, after all, our bridge to Kconfig, and this is pretty much an extension to Kconfig that we are adding. |
Let me take a second look. The disadvantage is of course that a symbol marked Main point: we need to consider best user experience on this.
It would, but then you should take this issue into consideration #9573 |
@rugeGerritsen you probably need to take a look at that Kconfig snippet anyway, cause if |
we could revert back to the original experimental support in Kconfig where each experimental Kconfig would select EXPERIMENTAL and then just print something out if any experimental features are enabled.... |
if we did have something like this back in time, then it might be worth knowing why it was removed. With this PR, users would be informed about the symbol
|
b2e34ff
to
865598a
Compare
6de6c22
to
95eba76
Compare
This adds two new Kconfig settings. The first setting `EXPERIMENTAL` which is a promptless symbol. This symbol must be selected by any setting which is used to enable an experimental feature. The second setting is `WARN_EXPERIMENTAL` which is a user controlled setting that configures the build system to print a warning when experimental features are enabled. Signed-off-by: Torsten Rasmussen <[email protected]>
95eba76
to
8807006
Compare
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.
- need to see some documentation about this and how this can be used. We do not want people depending on this kconfig and this is not documented anywhere, this can have negative results.
- I remember seeing a change that had all experimental features converted to use this, we need to have at least few places use this, consider it a test and a reference to be added in the docs.
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in Zephyr all subsys/bluetooth and drivers/bluetooth/hci settings having `[EXPERIMENTAL]` in their prompt has has been updated to include `select EXPERIMENTAL` so that developers can enable warnings when experimental features are enabled. Signed-off-by: Torsten Rasmussen <[email protected]>
With the introduction of `EXPERIMENTAL` and `WARN_EXPERIMENTAL` in Zephyr all subsys/canbus, subsys/net/l2/canbus, and drivers/can settings having `[EXPERIMENTAL]` in their prompt has has been updated to include `select EXPERIMENTAL` so that developers can enable warnings when experimental features are enabled. Signed-off-by: Torsten Rasmussen <[email protected]>
This commit adds description of the `WARN_EXPERIMENTAL` Kconfig setting to the application development guide. It describes the use of `CONFIG_WARN_EXPERIMENTAL` along with an example of the warning output when experimental features are enabled. Signed-off-by: Torsten Rasmussen <[email protected]>
Done, see commit: 05c22eb
Done, I have taken bluetooth and canbus that uses |
This PR allows a user to have a warning printed if any experimental features are used in Zephyr.
As example, building
samples/hello_world
withTHREAD_MONITOR
which is experimental will look as:Enabling this new warning together with
THREAD_MONITOR
, will give:This adds a new setting which allows a user to print a warning when
a feature that is marked
[EXPERIMENTAL]
is enabled.Signed-off-by: Torsten Rasmussen [email protected]