| Age | Commit message (Collapse) | Author |
|
|
|
Made more sense when the code was part of _build_dep(). The same thing
is explained in the function docstring now.
|
|
Turn the _check_dep_loop_sym lookup into a LOAD_FAST inside the loop.
|
|
Adds commit 699fd81 ("Support enabling the assignment-to-undef. symbol
warning via the environment"). This makes it possible to enable the
warning for assigning an undefined symbol within a .config file, while
using the bundled tools.
Previously, enabling the warning required modifying the tools to call
Kconfig.enable_undef_warnings().
|
|
This makes it possible to enable it for the bundled tools, by setting
KCONFIG_WARN_UNDEF_ASSIGN=y. Previously, the code had to be modified to
call Kconfig.enable_undef_warnings().
Also rename KCONFIG_STRICT to KCONFIG_WARN_UNDEF, for consistency. Keep
supporting KCONFIG_STRICT as an alias for backwards compatibility.
|
|
_check_undef_syms() is the only caller.
|
|
- Commit 85ba6b2 ("menuconfig: Mention jump-to in info dialog help")
makes it a bit easier to discover that jump-to can be entered from
the info dialog.
- Commit d920dbe ("Use standard_sc_expr_str() in _name_and_loc()")
makes named choices show up as '<choice NAME>' in warnings, instead
of just as 'NAME'.
Some small parsing optimizations are included as well.
|
|
Makes choices show up as <choice (name, if any)>, which is nice.
Previously, just the name was shown for named choices.
|
|
Might be hard to discover that [/] works inside the info dialog
otherwise.
|
|
This makes the calls to Kconfig._warn() a bit less awkward (self._warn()
instead of sym/choice.kconfig._warn()).
Also move the loops over the symbols/choices into the functions, as a
small optimization.
|
|
Store the function in a local variable outside the loop in _build_dep().
|
|
- Commit 9a4127a ("Allow programmatically expanding preprocessor
functions with args") adds a Variable.expanded_value_w_args()
function for calling preprocessor functions programmatically.
Not being able to pass arguments to Variable.expanded_value was an
oversight.
- Commit 516deb4 ("menuconfig: Show the selected symbol for promptless
choices") makes menuconfig show the selected symbol next to
promptless choices in show-all mode. This is relevant for named
choices defined in multiple locations.
Some minor parsing optimizations are included as well.
|
|
Add a Variable.expanded_value_w_args() function for expanding a
preprocessor function with particular arguments. This is what
expanded_value should have been, because expanded_value_w_args() is more
general (expanded_value corresponds to zero arguments). Keep
expanded_value for backwards compatibility though.
Also add a simple __repr__() to Variable. It could show the expanded
value, but that might mean calling shell functions or user-defined
functions as a side effect (possibly with missing arguments). Not sure
that's a good idea, so just show the unexpanded value.
|
|
Can be treated as just another case, and moved later so that the cases
become sorted by frequency.
|
|
Use the Linux x86 Kconfig frequencies.
Most cases were already sorted, but the blank line case was treated
specially. 'imply' was checked too early too (though it's used more in
some other projects).
|
|
Turn _add_props_to_sc() into _add_props_to_sym(), and handle choices
separately, as they're trivial.
This gets rid of some if's too.
|
|
If a choice is defined in multiple locations to add symbols, and
show-all mode is turned on to reveal one of the promptless definitions,
then it doesn't hurt to show the selected symbol next to it.
|
|
|
|
Adds commit 98af94d ("Make Kconfig.choices match its description").
Previously, Kconfig.choices was accidentally identical to
Kconfig.unique_choices. It's now crappy as advertised, and keeps
duplicates.
Removing duplicates (while preserving order) was the original reason for
adding Kconfig.unique_defined_syms and Kconfig.unique_choices. It'd be
rare to need Kconfig.choices.
|
|
Kconfig.choices has accidentally been identical to
Kconfig.unique_choices all along, because named choices defined in
multiple locations (which are pretty obscure) were only added once.
Fix Kconfig.choices to match its description. This simplifies the code a
bit too.
Kconfig.unique_choices is usually what you want.
|
|
Use Kconfig.unique_choices instead of Kconfig.choices in the jump-to
dialog, as choices defined in multiple locations should only get their
menu nodes added once (to avoid redundant entries).
I noticed a related Kconfiglib issue while working on this:
Kconfig.choices has been identical to Kconfig.unique_choices all long,
so things were never actually broken.
That means Kconfig.choices should be fixed to match its description
though. The next commit will do that.
|
|
Can use the same function for both sort keys, and the logic
can be simplified a bit too.
The += is deliberate, to do in-place modification.
|
|
|
|
Adds two small menuconfig improvements/fixes:
- Commit 9a7b374 ("menuconfig: Fix some minor resizing jumpiness on
gnome-terminal")
- Commit 3d0dc9f ("menuconfig: Switch back to "very visible" cursor
after Ctrl-F")
|
|
gnome-terminal jerks a bit whenever the terminal is shrunk so that the
row with the cursor on it disappears. This is probably gnome-terminal
shoddiness, but it's pretty easy to work around by drawing stuff at the
top last, so do it.
No need to do it for the jump-to dialog, because the cursor is already
in the edit box at the top there.
|
|
Was set back to "normal" instead due to a typo, which is inconsistent
with the rest of the code.
|
|
|
|
|
|
Can jump to choices, menus, and comments now as well.
|
|
|
|
Adds commit 63bbecb ("menuconfig: Fix crash when pressing Ctrl-F with no
matches in jump-to dialog").
Ctrl-F is the view-help shortcut in the jump-to dialog.
|
|
Ctrl-F is the jump-to dialog view-help shortcut. It needs to check
whether there are any matches, like Enter/jump-to does.
|
|
Adds two menuconfig improvements and a documentation improvement:
- Commit 96682d7 ("menuconfig: Add jump-to for choices, menus, and
comments") generalizes the jump-to feature so that choices, menus,
and comments can be jumped to in addition to symbols (or into, in the
case of choices and menus).
- Commit fae2e70 ("menuconfig: Do not show range hint for symbols
without ranges") despams the menuconfig interface and could
potentially avoid some confusion.
- Commit bde4cc7 ("Add some hints re. generating custom configuration
output") adds some documentation hints re. using the
Symbol.config_string field when generating custom output. It can be
useful for pruning symbols even when the output format isn't
.config-like.
|
|
For choices, search the name and the prompt. This is the same as for
symbols, except names are optional (and rare) for choices.
For menus and comments, search the prompt (title text).
When jumping to a non-empty choice or menu, jump into it instead of
jumping to its menu node. If show-all mode is off and there are visible
items in the choice/menu, then jump to the first visible node.
Otherwise, enable show-all and jump to the first node.
|
|
The 'no range constraints' input dialog hint for int/hex symbols might
be more confusing than helpful, especially if you assume it was
something the symbol author put there.
Only show the range hint for symbols with active ranges instead, and
show nothing for other symbols.
|
|
It's not obvious that Symbol.config_string can be useful even when
generating other output formats, as it provides a hook for
_write_to_conf. Mention it in the 'config_string' documentation and in
relevant parts of the README.
|
|
Adds commit a247f3f ("menuconfig: Improve/fix promptless choice
handling"), which fixes an obscure menuconfig crash involving symbols in
promptless choices, and improves how choices are displayed in
show-all/show-name mode a bit ('<choice (name, if any)>' instead of
either nothing or '<name>').
|
|
|
|
The code assumed that all parent (interface) menus always have a prompt,
which is false for items in promptless choices. This lead to a crash
e.g. when viewing the symbol information for a symbol within a
promptless choice.
Promptless choices with children can show up "legitimately" when people
define choices in multiple locations to add symbols, though this is
broken in the C tools.
Use standard_sc_expr_str(node.item) instead of the non-existing prompt
for promptless choices. That way they show up as
<choice (name if any>)>, which is consistent with how they're shown
elsewhere.
This commit also changes how choices names are displayed in
show-name/show-all mode, to the standard_sc_expr_str() format.
|
|
|
|
Leftover from assigning a 'res' variable.
|
|
Not sure how I missed that one so long...
|
|
Adds commit f1e4d04 ("menuconfig: Remove "Value for " prefix from input
dialog titles"), which de-spams the menuconfig interface a bit.
Some documentation fixes and improvements are included as well:
- Commit 631c51f ("Point to IS_ENABLED() is README")
- Commit f594975 ("Add hints on incremental building to 'getting
started'")
- Commit d044ee9 ("Clarify --config-out description a bit")
- Commit 358b77a ("Hint that load_config() with replace=False is for
merging")
- Commit 5d15df9 ("Update genconfig usage description")
The naming in some internal evaluation functions was cleaned up too.
|
|
|
|
|
|
Might be tricky to discover.
|
|
Reuse the v1/v2 naming for the operands for the relation case, and call
the relation variable 'rel' instead of 'op'.
Piggy-back removal of the 'res' variable. Just as readable without it.
Indirectly strips some locals.
|
|
Might clarify the scopes a bit.
|
|
Didn't mention --config-out.
|
|
|