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

Print unmet Kconfig dependency #21888

Closed
oyvindronningstad opened this issue Jan 14, 2020 · 1 comment · Fixed by #22052
Closed

Print unmet Kconfig dependency #21888

oyvindronningstad opened this issue Jan 14, 2020 · 1 comment · Fixed by #22052
Assignees
Labels
area: Kconfig Enhancement Changes/Updates/Additions to existing features

Comments

@oyvindronningstad
Copy link
Collaborator

Is your enhancement proposal related to a problem? Please describe.
When the following is printed

warning: MY_CONFIG (defined at ...) was assigned the value 'y' but got the value 'n'.

It's often to figure out manually what Kconfig dependency is not met, especially if cmake fails so there's no menuconfig to run.

Describe the solution you'd like

Print which dependency was not met.

See also ulfalizer/Kconfiglib#86

@oyvindronningstad oyvindronningstad added the Enhancement Changes/Updates/Additions to existing features label Jan 14, 2020
@ulfalizer
Copy link
Collaborator

ulfalizer commented Jan 14, 2020

Will get #20742 in first, because it changes some stuff in scripts/kconfig/kconfig.py.

ulfalizer added a commit to ulfalizer/zephyr that referenced this issue Jan 22, 2020
Show which dependencies are unsatisfied when symbols don't get their
assigned value.

For example, assume that FOO below is assigned with CONFIG_FOO=y. Note
that BAR, BAZ, and STR = "hmm" are 'n'.

    config FOO
           bool "foo"
           depends on BAR && BAZ && QAZ && STR = "hmm"

    config BAR
           def_bool n

    config BAZ
           def_bool n

    config QAZ
           def_bool y

    config STR
           def_string "zmh"

This now prints this warning:

    warning: FOO (defined at /home/ulf/z/z/Kconfig:10) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied
    dependencies: BAR (=n), BAZ (=n), STR = "hmm" (=n). See ...

Fixes: zephyrproject-rtos#21888

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Jan 23, 2020
Show which dependencies are unsatisfied when symbols don't get their
assigned value.

For example, assume that FOO below is assigned with CONFIG_FOO=y. Note
that BAR, BAZ, and STR = "hmm" are 'n'.

    config FOO
           bool "foo"
           depends on BAR && BAZ && QAZ && STR = "hmm"

    config BAR
           def_bool n

    config BAZ
           def_bool n

    config QAZ
           def_bool y

    config STR
           def_string "zmh"

This now prints this warning:

    warning: FOO (defined at /home/ulf/z/z/Kconfig:10) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied
    dependencies: BAR (=n), BAZ (=n), STR = "hmm" (=n). See ...

Fixes: #21888

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Kconfig Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants