<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/tests, branch v10.0.0</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v10.0.0</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v10.0.0'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2018-07-20T20:09:51Z</updated>
<entry>
<title>Fix detection of hex literals</title>
<updated>2018-07-20T20:09:51Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-20T20:03:43Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=2d391d8f369a40b438a1b246c888bb42b2e14278'/>
<id>urn:sha1:2d391d8f369a40b438a1b246c888bb42b2e14278</id>
<content type='text'>
Missing 'not'. Add some literals to the Kstrict testcase.
</content>
</entry>
<entry>
<title>Add KCONFIG_STRICT flag for flagging refs. to undefined syms</title>
<updated>2018-07-20T19:15:23Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-20T02:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=ca89d02ca1639b72c7b74834ff432ab10df58fe9'/>
<id>urn:sha1:ca89d02ca1639b72c7b74834ff432ab10df58fe9</id>
<content type='text'>
Settings KCONFIG_STRICT to y in the environment turns on warnings for
all references to undefined symbols within Kconfig files (with the only
gotcha that hex literals must be prefixed by 0x or 0X, to make it
possible to distinguish them from undefined references).

Always flagging undefined references gets awkward, as some projects
(e.g. the Linux kernel) use multiple Kconfig trees with shared files,
leading to some safe undefined references. It's helpful for other
projects though.

Having KCONFIG_STRICT as an environment variable is handy when multiple
tools are involved.

Piggyback a small README change re. warnings. Kconfiglib now has many
more warnings than the C tools.
</content>
</entry>
<entry>
<title>Add def_int, def_hex, and def_string keywords</title>
<updated>2018-07-18T01:23:43Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-18T01:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=e08b6957ca935fc97eddd1afda933715016b9b11'/>
<id>urn:sha1:e08b6957ca935fc97eddd1afda933715016b9b11</id>
<content type='text'>
Analogous to def_bool and def_tristate, setting the type and adding a
default at the same time.

This is a Kconfiglib extension. These keywords can be useful in projects
that make use of symbols defined in multiple locations, and remove some
Kconfig inconsistency.
</content>
</entry>
<entry>
<title>Switch to more sensible globbing statements (w/ backwards compatibility)</title>
<updated>2018-07-15T14:15:43Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-15T11:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=7a428aa415606820a44291f475248b08e3952c4b'/>
<id>urn:sha1:7a428aa415606820a44291f475248b08e3952c4b</id>
<content type='text'>
Instead of having 'source' and 'gsource', have 'source' always glob, but
require the pattern to match at least one file, throwing KconfigError
otherwise.

Have separate 'osource' and 'orsource' statements (the o is for
"optional") for cases where it's okay for the pattern to not match any
files.

This is analogous to 'include' and '-include' in Make.

The biggest flaw with 'gsource' was that there was no way to do a
globbing match while requiring something to match, possibly leading to
subtle failures.

Preserve backwards compatibility by having "gsource" and "grsource" be
aliases for "osource" and "orsource", respectively.

Also include some related changes:

 - Kconfig.srctree is now set to the empty string if $srctree is unset,
   rather than to None. This gives nice behavior with os.path.join() and
   os.path.relpath(), which treat the empty string as the current
   directory (without adding './', for os.path.join()).

 - When $srctree is set, Kconfig files in the current directory will no
   longer override Kconfig files in $srctree when the relative paths
   match. This was likely a bug all along in the C tools, and probably
   only makes sense for .config files.

   I've seen it cause breakage in Zephyr.

 - Clarify the behavior of $srctree in the Kconfig.__init__() docstring.

 - Make MenuNode.filename be relative to $srctree for the Kconfig file
   passed to Kconfig.__init__(). This makes it consistent.

The major version will be bumped later due to the small Kconfig.srctree
API change.
</content>
</entry>
<entry>
<title>Add Kconfig preprocessor</title>
<updated>2018-07-10T05:56:37Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-03T16:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=2433deba7889931c4bae679f116887fe49a2ce04'/>
<id>urn:sha1:2433deba7889931c4bae679f116887fe49a2ce04</id>
<content type='text'>
Implement the Kconfig preprocessor described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt
(which is now in linux-next and will appear in Linux 4.18).

A new Kconfig.variables property holds all the preprocessor variables so
that they can be inspected programmatically. Preprocessor variables are
represented by a new Variable class.

With the preprocessor, environment variables are referenced with $(FOO)
instead of $FOO. For backwards compatibility, $FOO is accepted as well
for now (and leaves "$FOO" as-is if FOO doesn't exist). The $FOO syntax
might be dropped at some point in the future (together with a major
version increase). It should be supported for a few months at least.

Some internals were cleaned up too, mostly related to parsing. Some
outdated documentation was fixed as well.
</content>
</entry>
<entry>
<title>Drop some compatibility and tighten up lexing</title>
<updated>2018-07-01T21:14:14Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-07-01T20:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=c19fc11355b13d75d97286402c7a933fb23d3b70'/>
<id>urn:sha1:c19fc11355b13d75d97286402c7a933fb23d3b70</id>
<content type='text'>
Old versions of the C tools used to ignore unhandled characters in some
contexts due to sloppy lexing, which Kconfiglib emulated for
compatibility (things like "---help---" used to depend on it).

This was improved in the C tools by commit c2264564 ("kconfig: warn of
unhandled characters in Kconfig commands"), committed in July 2015.

Remove the compatibility hack and tighten up the lexing in Kconfiglib as
well. It will make implementing the new preprocessor stuff smoother.

The major version will be bumped.
</content>
</entry>
<entry>
<title>Add Symbol/Choice.referenced() convenience methods</title>
<updated>2018-06-22T04:02:47Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-22T03:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=f6eb4f435bc594aa58b8f8c066a9e2243c5c8330'/>
<id>urn:sha1:f6eb4f435bc594aa58b8f8c066a9e2243c5c8330</id>
<content type='text'>
Returns the union of the MenuNode.referenced() sets for all the menu
nodes of the symbol/choice.
</content>
</entry>
<entry>
<title>Add dependency loop detection</title>
<updated>2018-06-19T20:14:09Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-18T16:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=db92bb76fb9f2bb3f565d13a6213d30cb0fc31d7'/>
<id>urn:sha1:db92bb76fb9f2bb3f565d13a6213d30cb0fc31d7</id>
<content type='text'>
Pretty long overdue.

Until now, dependency loops have raised a hard-to-debug Python
RecursionError during evaluation. A Kconfiglib exception is raised now
instead, with a message that lists all the items in the loop.

See the comment at the start of _check_dep_loop_sym() for an overview of
the algorithm. At a high level, it's loop detection in a directed graph
by keeping track of unvisited/visited nodes during depth-first search.
(A third "visited, known to not be in a dependency loop" state is used
as well.)

Choices complicate things, as they're inherently loopy: The choice
depends on the choice symbols and vice versa, and the choice symbols in
a sense all depend on each other.

Add the choice-to-choice-symbol dependencies separately after dependency
loop detection, so that there's just the choice-symbol-to-choice
dependencies to deal with. It simplifies things, as it makes it possible
to tell dependencies from 'prompt' and 'default' conditions on the
choice from choice symbol dependencies.

Do some flag shenanigans to prevent the choice from being "re-entered"
while looping through the choice symbols. Maybe this could be cleaned up
a bit somehow...

Example exception message:

Dependency loop
===============

A (defined at tests/Kdeploop10:1), with definition...

config A
	bool
	depends on B

...depends on B (defined at tests/Kdeploop10:5), with definition...

config B
	bool
	depends on C = 7

...depends on C (defined at tests/Kdeploop10:9), with definition...

config C
	int
	range D 8

...depends on D (defined at tests/Kdeploop10:13), with definition...

config D
	int
	default 3 if E
	default 8

...depends on E (defined at tests/Kdeploop10:18), with definition...

config E
	bool

(select-related dependencies: F &amp;&amp; G)

...depends on G (defined at tests/Kdeploop10:25), with definition...

config G
	bool
	depends on H

...depends on the choice symbol H (defined at tests/Kdeploop10:32), with definition...

config H
	bool
	prompt "H" if I &amp;&amp; &lt;choice&gt;
	depends on I &amp;&amp; &lt;choice&gt;

...depends on the choice symbol I (defined at tests/Kdeploop10:41), with definition...

config I
	bool
	prompt "I" if &lt;choice&gt;
	depends on &lt;choice&gt;

...depends on &lt;choice&gt; (defined at tests/Kdeploop10:38), with definition...

choice
	bool
	prompt "choice" if J

...depends on J (defined at tests/Kdeploop10:46), with definition...

config J
	bool
	depends on A

...depends again on A (defined at tests/Kdeploop10:1)
</content>
</entry>
<entry>
<title>Test property ordering on nested multi.def. choices</title>
<updated>2018-06-14T17:17:40Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-14T17:17:40Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=cd96604f4fbbb88347e043919714a0428e159bc8'/>
<id>urn:sha1:cd96604f4fbbb88347e043919714a0428e159bc8</id>
<content type='text'>
This case wasn't covered.
</content>
</entry>
<entry>
<title>Fix incorrectly ordered properties for some nested multi.def. symbols</title>
<updated>2018-06-14T16:42:01Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-14T14:47:21Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=c8801514d63aaa6ad78ee62930ca5160fb52f74a'/>
<id>urn:sha1:c8801514d63aaa6ad78ee62930ca5160fb52f74a</id>
<content type='text'>
_propagate_deps() visits menu nodes roughly breadth-first, meaning
properties on symbols and choices defined in multiple locations could
end up in the wrong order when copied from the menu node for some
unlucky if/menu nestings.

Fix it by moving the menu-node-to-symbol/choice property copying in
_finalize_tree() so that it's guaranteed to happen in definition order.

This bug was introduced by commit 63a4418 ("Record which MenuNode has
each property").
</content>
</entry>
</feed>
