| Age | Commit message (Collapse) | Author |
|
Adds a Kconfig extension contributed by RomaVis: aea0232 ("Implement
'rsource' statement ('source' with relative path)").
|
|
The 'rsource' statement works like 'source', but looks relative to the
Kconfig file that has the 'rsource' rather than relative to the base
Kconfig file. Using 'rsource' makes it possible to move subtrees with
Kconfig files around without breaking references to other Kconfig files.
So far, this is a Kconfiglib-exclusive feature.
|
|
The main purpose of _STRING_LEX is being able to tell strings from
constant symbol references during tokenization. The old comment was
implying that its only purpose is handling the "missing quotes" in e.g.
source foo/Kconfig
Update the comment to make _STRING_LEX clearer.
|
|
- Use generator expression rather than list comprehension
- Fix dubious English
|
|
|
|
Piggyback a small note to clarify that symbols defined without a type
are pretty obscure.
|
|
Only includes 2a88c0c ("Include direct deps. in
Symbol/Choice.__str__()").
|
|
Direct dependencies are significant for 'imply' even if the symbol has
no properties, so they need to be included to get semantically
equivalent output.
Making the direct dependencies clear is helpful in general too, even if
you can usually infer them from the properties they get propagated to.
|
|
|
|
|
|
The visibility of a symbol in an y-mode choice can only be n or y, so
it's sufficient to check that it's not n (0).
|
|
|
|
|
|
Might've sounded a bit snarky -- wasn't meant to.
|
|
It's the top-level Kconfig file that source's depending on $SRCARCH, not
the top-level Makefile.
|
|
|
|
- Only includes e8b4ecb ("Don't special-case user_value for choice
symbols set to y").
Since that's a tiny change to the behavior of the API, the major version
is bumped.
|
|
Previously, setting a choice symbol to y would only update
user_selection on the parent choice and not the symbol's own user_value.
Now both are updated.
The point of the old behavior was to remember the m mode selections of a
choice when it was switched back and forth between m and y mode, which
was a feature I thought the C implementation had. On closer inspection,
the C implementation never had that feature, though it might appear like
it if you only make "lucky" changes (if you never select any symbols in
y mode that were n in m mode).
The new behavior is simpler and easier to understand: Symbol.user_value
now always matches the value assigned in a .config file or via
set_value(), provided the value was well-formed. This might avoid some
special-casing in scripts too.
The loss in usability is pretty minimal.
|
|
|
|
It makes sense to prompt for a choice during oldconfig if it contains
new visible symbols, even if there is already an old visible user
selection.
|
|
Oversight during refactoring. defconfig files should be searched for in
in arch/$SRCARCH/ rather than arch/$ARCH/, to account for
$ARCH != $SRCARCH.
Adds a few tests to test_defconfig(). Some of the ARCH/defconfig
combinations might be nonsensical, but that's fine.
Make all test functions take $SRCARCH as well as $ARCH, which makes the
implementation straightforward.
|
|
Helpful for debugging.
Piggyback some small fixes:
- Don't imply that merge_config.py is an executable file or that it
only runs under Python 3. Remove the hashbang line and fix the
example in the overview.
- Add some #'s to the overview .config files that had accidentally been
left out.
- Fix a questionable sentence in oldconfig.py's name_and_loc_str()
docstring.
|
|
Just adds f66cd71 ("Allow "n"/"m"/"y" as aliases for 0/1/2 in
set_value()").
|
|
More experience working with the API convinced me that it's worth it.
Gets rid of ugly conversions in the menuconfig.py and oldconfig.py
examples, and streamlines some things internally as well.
Include two other small fixes as well:
- Make warnings generated by Choice.set_value() match those generated
by Symbol.set_value().
- Get rid of the input stripping in menuconfig.py. It's not like the
interface is usable as-is anyway, and it just complicates the
example.
|
|
Typing '??' displays the help text of the current item.
|
|
Not sure why anyone would want to oldconfig just a part of the
configuration tree, especially as there might be dependencies pointing
outside of it. Take a Kconfig object instead of a node.
|
|
The oldnoconfig operation needs to be rerun if the value of any symbol
changes, to catch cases where symbols depend on symbols defined after
them. Otherwise the earlier symbols will just get their default value
instead of being prompted for.
|
|
The examples had some leftovers from Kconfiglib 1.
|
|
Implements the standard 'make oldconfig' functionality, prompting the
user for the values of new symbols to update an old .config file.
This came up in
https://github.com/zephyrproject-rtos/zephyr/issues/5426.
|
|
Does a global search over all architectures in the kernel, which should
avoid false positives.
Referencing an undefined symbol in a particular architecture can be fine
in a Kconfig file that's shared by multiple architectures, but if the
symbol isn't defined by any architecture, it's likely to be an error (or
a potential cleanup).
|
|
List the ARCH/SRCARCH pairs that don't conform to the arch/$ARCH/Kconfig
pattern directly.
|
|
Don't think anything currently depends on it where it would matter for
the test suite, but might as well.
|
|
This release tightens up syntax checking and adds all the warnings
generated by the C implementation (plus a few extra ones), making
Kconfiglib more viable as a replacement for the C tools, rather than
just being an auxiliary library.
Syntax checking changes:
- a84848b ("Tighten up syntax checking")
- 8716316 ("Generate a parse error for extra tokens at EOL")
- 416083a ("Flag constant symbols where they're not allowed")
Warning changes:
- 9c309400 ("Add some post-parsing warnings")
- da0bfa3a ("Error out for malformed hex/int/string defaults")
- 5d2041a9 ("Add more choice type and prompt sanity checks")
- 67f825fc ("Warn if there's more than one help text")
- 990c780f ("Add some warnings related to selects and implies")
- 7432ade8 ("Warn if a symbol is defined with multiple types")
- 5eeea863 ("Improve int/hex sanity checking")
- ad94bb45 ("Sanity-check range values")
- e930c140 ("Warn if a symbol/choice has multiple prompts")
- 60d12911 ("Warn if help text is empty")
- d43d2e83 ("Warn if menuconfig statement has no prompt")
- 3db12f72 ("Warn if a choice symbol has defaults")
- 0eadd61c ("Warn if choice symbol has prompt outside choice")
Also includes various code nits.
|
|
Just to have clean output. The warnings themselves are accurate.
|
|
Defining a choice symbol in multiple places to add some properties to it
outside the choice seems to actually be done deliberately by MIPS, but
it's almost guaranteed to be an error if the definition(s) outside the
choice have a prompt (and so can be changed by the user there), so warn
for that.
|
|
Never has en affect.
|
|
Mirrors a warning in the C implementation.
|
|
The empty-help warning is pretty spammy at the moment.
|
|
Personal pet peeve. Should add a warning to the C implementation too.
|
|
Arrange by type, which works pretty neatly except for the pesky ranges
check. This also makes us do less work in the common BOOL/TRISTATE case.
Get rid of _check_select_imply_sanity().
|
|
More important stuff up front.
|
|
In a single location. Having multiple definitions with different prompts
is okay.
|
|
Must have a form compatible with the int/hex, like for defaults.
Also refactor a bit and use a single _int_hex_value_is_sane() helper.
Less duplication.
|
|
If a non-constant default is given, we can still check that it has the
right type.
Break out two int/hex value sanity checking functions.
|
|
|
|
Constant as well as undefined symbols lack menu nodes, so it's
sufficient to check 'nodes'.
|
|
Only bool and tristate symbols can select and be selected.
Also add docstrings to the sanity checking functions.
|
|
Mirrors a warning I added to the C implementation.
|
|
- Choices should have type bool or tristate
- Choice values should have a prompt
Also fix indentation mess-up.
|
|
Have separate functions for checking symbols and choices instead of
mixing them up. Easier to read, and avoids some isinstance() checks.
Add some comments too.
|