Skip to content

Conversation

@gylstorffq
Copy link

@gylstorffq gylstorffq commented Oct 31, 2025

This skips the transitional keyword to allow parsing of kernel config of Linux kernel => 6.18. It does not implement the transitional feature as this requires additional changes.

Also add the test files to .gitignore.

This fixes #25.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
This allows to parse configs with the transitional key
word. For a working version of the transitional feature it is
necessary to extend parsing of the default keyword to support
setting the value to a variable:
```
config NEW_BOOL
	bool "New bool option"
	default OLD_BOOL
```

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Copy link
Collaborator

@tejlmand tejlmand 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 this contribution.

However, i'm not immediately convinced that we should just silence / ignore the transitional keyword.

Skipping the transitional keyword means that the symbol holding this keyword suddenly becomes a valid symbol again, which potentially can enter the .config file.

Also it seems that this silencing will allow invalid config descriptions, such as having prompts on settings with the transitional keyword.

I do understand the wish for being able to parse Kconfig trees having transitional attribute, but when supporting / silencing this attribute then we should not allow invalid Kconfig files in that same process.

If not supporting the attribute but still allowing it to be present, then such implementation should still ensure the symbol does not become or behave like a regular Kconfig symbol, which unfortunately would be the case with this PR.

I hope to find time to look into proper support for transitional.

@gylstorffq
Copy link
Author

gylstorffq commented Nov 5, 2025

Proper support would be better. This was short fix to get our own use case working again.

The skip looked correct in my initial testing expect the missing assignment of value, which uses the default symbol mentioned in issue #31 :

E               config transitional
E               CONFIG_MODULES=y
E             - CONFIG_NEW_BOOL=y
E             - CONFIG_NEW_TRISTATE=m
E             + # CONFIG_NEW_BOOL is not set
E             + # CONFIG_NEW_TRISTATE is not set
E             - CONFIG_NEW_STRING="test string"
E             ?                    -----------
E             + CONFIG_NEW_STRING=""
E             - CONFIG_NEW_HEX=0x1234
E             ?                ------
E             + CONFIG_NEW_HEX=
E             - CONFIG_NEW_INT=42
E             ?                --
E             + CONFIG_NEW_INT=
E               # CONFIG_NEW_BOOL_PRECEDENCE is not set
E               CONFIG_NEW_STRING_PRECEDENCE="user value"
E               CONFIG_NEW_TRISTATE_PRECEDENCE=y
E               CONFIG_NEW_HEX_PRECEDENCE=0xABCD
E               CONFIG_NEW_INT_PRECEDENCE=100
E               # CONFIG_NEW_DISABLED is not set
E               # CONFIG_DEPENDENCY_TEST is not set
E               # CONFIG_NEW_CONDITIONAL_DEFAULT is not set
E             - # CONFIG_REGULAR_OPTION is not set
E             + # CONFIG_REGULAR_OPTION is not set
E             ? 

Comment: Fixed typo

@tejlmand
Copy link
Collaborator

tejlmand commented Nov 10, 2025

The skip looked correct in my initial testing expect the missing assignment of value

my main problem with the current PR as it stands is that it allows invalid Kconfig definition like this:

config FOO
	bool "Foo"
	transitional

according to the specification, this symbol definition is illegal, but with this PR this syntax is accepted because the transitional keyword is silently ignored.

I think it's worse to silently accept invalid Kconfig constructions, than it is to be lacking a feature.

Note, there might be other issues regarding the PR, but this is the main one I've found so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not parse Linux Kconfig >= 6.18. Missing support for transitional.

2 participants