| Age | Commit message (Collapse) | Author |
|
Just adds a new warning: 0087b40 ("Warn if a symbol with unsatisfied
deps is selected")
|
|
Mirrors a warning in the C implementation. Make it a bit more
informative and simpler to decode for people who aren't super familiar
with Kconfig.
The warning is printed when/if the symbol is evaluated, e.g. when
writing a .config or C header or accessing Symbol.str/tri_value. It is
not printed if the symbol value has already been calculated and is
cached and up-to-date, which avoids warning spam.
Example:
config Y_SYMBOL_1
def_bool y
config Y_SYMBOL_2
def_bool y
config SELECTED
bool
depends on !Y_SYMBOL_1
config SELECTING_1
def_bool y
select SELECTED
# Skipped in warning, because n
config SELECTING_2
def_bool n
select SELECTED
config SELECTING_3
def_bool y
select SELECTED if Y_SYMBOL_1
depends on Y_SYMBOL_2
# Defined in multiple locations
config SELECTING_3
Generated warning:
warning: SELECTED (defined at Kconfig:7) has unsatisfied direct dependencies (!Y_SYMBOL_1), but is currently being selected by the following symbols:
SELECTING_3 (value: y, defined at Kconfig:20, Kconfig:26), with direct dependencies "y" (value: y) and select condition Y_SYMBOL_1 && Y_SYMBOL_2 (value: y)
SELECTING_1 (value: y, defined at Kconfig:11), with direct dependencies "y" (value: y)
Real-world example from test suite:
warning: NOT_COHERENT_CACHE (defined at arch/powerpc/platforms/Kconfig.cputype:381) has unsatisfied direct dependencies (4xx || PPC_8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON), but is currently being selected by the following symbols:
AMIGAONE (value: y, defined at arch/powerpc/platforms/amigaone/Kconfig:2), with direct dependencies 6xx && BROKEN_ON_SMP (value: y) and select condition 6xx && BROKEN_ON_SMP (value: y)
|
|
|
|
Small docstring improvements:
- 1c37079 ("Add more detail to the write_config() docstring")
- 121d4a7 ("Add more detail to the write_autoconf() docstring")
- 27fbded ("Fix outdated comments referencing user_str/tri_value")
- e01cb49 ("Mention user_value in the load_config() docstring")
- ed32010 ("Add some more detail to the module docstring")
Code nit:
- 532b561 ("Simplify escape()")
|
|
Clarify how to fetch help texts and prompts, mention the no-prompt
warning.
|
|
The fancy regex isn't really justified. Much faster with replace() too,
though this is an unlikely hotspot.
Could have used a \g<0> backreference to refer to the entire match
instead of using a capturing group too. Hadn't discovered that.
Add some selftests for escape() and unescape() too.
|
|
Can be handy to check which symbols got set, like merge_config.py does.
|
|
Ended up with just user_value in the end before releasing Kconfiglib 2.
|
|
Same order as for .config files.
|
|
Can be handy to know that the order of the assignments matches the
Kconfig files.
|
|
|
|
|
|
Parsing performance improvements related to help texts:
- c800f70 ("Simplify _deindent()")
- 707204a ("Get rid of _next_help_line()")
- f0a87cc ("Micro-optimize _T_HELP parsing")
Also includes various code nits.
Brings 'make scriptconfig' with allyesconfig.py down to 1.3 seconds,
including the 'make' overhead.
|
|
|
|
Shaves a few % more from _parse_properties().
|
|
Speeds things up a bit further.
Rework the unget handling to save the ungotten line directly instead of
using a flag.
Add some help texts to tests/Klocation to make sure the line number is
updated properly for those.
|
|
Bit easier to read.
|
|
Factors out some code and makes the logic a bit more transparent. It's
only used for help text lines.
|
|
Bit clearer.
|
|
Old code. Can't remember why it kept lines shorter than the indent as-is
instead of clearing them, but it's pointless for help texts, which is
the only place where _deindent() is used. s[n:] is safe even if
n >= len(s).
Help text parsing is pretty hot code too, so every bit helps.
|
|
|
|
- 97c7501 ("Fix 'source "missing"' error message for Python 3") makes
the hint re. environment variables display properly for Python 3 when
a sourced file can't be opened.
- 8574dc5 ("Make PyPI's README formatter happy") makes PyPI format the
README properly.
|
|
IOError() generates an OSError in Python 3.6. OSError does not have a
'message' attribute, which caused the following error when trying to add
the hint re. environment variables (the rest of the message was still
displayed):
AttributeError: 'OSError' object has no attribute 'message'
Use str(exception) instead, which seems to work for both Python 2 and
Python 3.
|
|
No longer displayed as an unformatted blob of text.
|
|
- 7dc5b74 ("Detect recursive 'source' and print backtrace") makes
debugging recursive 'source's a bit easier.
- Various minor code nits.
|
|
Try to unbreak PyPI display.
|
|
See if this unbreaks the display on PyPI.
|
|
"Active user value" might have been a bit unclear. The symbol needs to
be visible.
|
|
Bit neater.
|
|
|
|
Check for incorrect exceptions instead of propagating them, and get rid
of the flag.
|
|
Easier to debug than a RecursionError.
Point out in the exception message that a common cause is environment
variables not being set correctly.
|
|
|
|
And rename it to _rec_invalidate_if_has_prompt(). Always used in this
way in practice.
|
|
- 94c63de ("Support disabling warnings for redundant assignments")
adds support for disabling warnings in the case where a symbol is
assigned more than once within a .config file but always assigned the
same value.
Contributed by Sebastian Bøe.
- Various other minor code nits.
|
|
Saves a tiny bit of bytecode too.
|
|
|
|
Implicit submenus are created after parsing, in _finalize_tree(), so the
parent can never be a symbol in _parse_block().
|
|
Old code.
|
|
It's set to -1 in every return path, so we can just do it at the
beginning instead.
|
|
|
|
Choice symbols without prompts are pointless and probably nonexistent in
practice, so it's a bit silly to run the no-prompt optimization for
them.
Piggyback copyright year update.
|
|
Saves a tiny bit of bytecode too.
|
|
Already know the value.
|
|
|
|
Also switch to a faster local lookup for the second _T_HELP.
Micro-optimization -- shaves a % or two of the _tokenize() runtime. We
expect a token for valid Kconfig files, so the naming is still fine.
|
|
Support disabling warnings for redundant assignments
|
|
The Linux Kernel's merge_config.sh defaults to disabling warnings for
redundant assignments and has support for enabling them
specifically. This patch reproduces this behaviour in kconfiglib
except that we retaing kconfiglib's default behaviour of enabling the
warnings.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
|
|
|
|
Piggyback some cleanup and redundant comment removal.
|