Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion kconfiglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3462,6 +3462,9 @@ def _parse_props(self, node):

node.item.is_optional = True

elif t0 is _T_TRANSITIONAL:
node.item.is_transitional = True

else:
# Reuse the tokens for the non-property line later
self._reuse_tokens = True
Expand Down Expand Up @@ -4514,6 +4517,9 @@ class Symbol(object):
is_constant:
True if the symbol is a constant (quoted) symbol.

is_transitional:
True if config is in transition to a new name, hide from user

kconfig:
The Kconfig instance this symbol is from.
"""
Expand All @@ -4536,6 +4542,7 @@ class Symbol(object):
"implies",
"is_allnoconfig_y",
"is_constant",
"is_transitional",
"kconfig",
"name",
"nodes",
Expand Down Expand Up @@ -5171,6 +5178,7 @@ def __init__(self):
# Symbol gets a .config entry.

self.is_allnoconfig_y = self._was_set = self._write_to_conf = False
self.is_transitional = False

# See Kconfig._build_dep()
self._dependents = set()
Expand Down Expand Up @@ -5729,6 +5737,9 @@ def __repr__(self):
if self.is_optional:
add("optional")

if self.is_transitional:
add("transitional")

for node in self.nodes:
add("{}:{}".format(*node.loc))

Expand Down Expand Up @@ -7555,10 +7566,11 @@ def _rustc_option_fn(kconf, _, option):
_T_SELECT,
_T_SOURCE,
_T_STRING,
_T_TRANSITIONAL,
_T_TRISTATE,
_T_UNEQUAL,
_T_VISIBLE,
) = range(1, 51)
) = range(1, 52)

# Keyword to token map, with the get() method assigned directly as a small
# optimization
Expand Down Expand Up @@ -7604,6 +7616,7 @@ def _rustc_option_fn(kconf, _, option):
"select": _T_SELECT,
"source": _T_SOURCE,
"string": _T_STRING,
"transitional": _T_TRANSITIONAL,
"tristate": _T_TRISTATE,
"visible": _T_VISIBLE,
}.get
Expand Down
8 changes: 8 additions & 0 deletions tests/Kreferenced
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ config JUST_DEPENDS_ON_REFS
bool
depends on A && B

config FEATURE
bool
default FEATURE_OLD

config FEATURE_OLD
bool
transitional

if A

menu "menu"
Expand Down
Loading