<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/tests, branch v7.0.0</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v7.0.0</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v7.0.0'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2018-06-22T04:02:47Z</updated>
<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>
<entry>
<title>Add MenuNode function that returns referenced items</title>
<updated>2018-06-12T23:39:36Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-12T23:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=68043b21a2fdf09d91996977d5408e92a23fe3e8'/>
<id>urn:sha1:68043b21a2fdf09d91996977d5408e92a23fe3e8</id>
<content type='text'>
MenuNode.referenced() returns all symbols (and choices, for choice
symbols) referenced in the properties (prompt, defaults, selects,
ranges, etc.) and property conditions of the menu node.

Handy e.g. when generating cross-references.
</content>
</entry>
<entry>
<title>Add a function for getting all items in an expression</title>
<updated>2018-06-11T16:30:51Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-06-11T15:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=506e3fb211d22f62115ce83e9247266c5d87ea24'/>
<id>urn:sha1:506e3fb211d22f62115ce83e9247266c5d87ea24</id>
<content type='text'>
Handy e.g. when searching.
</content>
</entry>
<entry>
<title>Provide lists with all menus and comments</title>
<updated>2018-05-27T21:58:47Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-05-27T21:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=fc73c461f1a8acf3e09670e8f9429c7ef9d0b71f'/>
<id>urn:sha1:fc73c461f1a8acf3e09670e8f9429c7ef9d0b71f</id>
<content type='text'>
Handy e.g. when implementing advanced search features.
</content>
</entry>
<entry>
<title>Micro-optimize _parse_help() loop</title>
<updated>2018-05-26T13:04:35Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-05-26T12:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=ab2431ca36139c6d450adfe275d1e14088633eed'/>
<id>urn:sha1:ab2431ca36139c6d450adfe275d1e14088633eed</id>
<content type='text'>
Shaves ~6% off the _parse_help() runtime for the x86 Kconfigs in
cProfile.
</content>
</entry>
<entry>
<title>Record which MenuNode has each property</title>
<updated>2018-05-16T17:58:22Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-05-14T12:48:22Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=63a44186137e2706afec0aef278cd5d123fc98dc'/>
<id>urn:sha1:63a44186137e2706afec0aef278cd5d123fc98dc</id>
<content type='text'>
This allows accurate documentation to be generated for symbols and
choices defined in multiple locations. There are now MenuNode.defaults,
MenuNode.selects, etc., lists that mirror the corresponding
Symbol/Choice lists.

Symbol/Choice.__str__() now correctly show property locations as well,
by simply concatenating the strings returned by MenuNode.__str__() for
each node.

_parse_properties() was modified to add all properties directly to the
menu node instead of adding them to the contained symbol or choice. The
properties are then copied up to symbols and choices in
_finalize_tree(). Dependency propagation is handled at the same time.

As a side effect, this cleans up the code a bit and de-bloats
_parse_properties().

Update the menuconfig implementation to use the new functionality. It
now lists the menu nodes for symbols and choices with the correct
properties for each node (previously, all defaults, selects, implies,
and ranges appeared on the first definition).
</content>
</entry>
<entry>
<title>Expand environment variables in strings directly</title>
<updated>2018-05-16T17:42:56Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-05-14T16:00:40Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=cbf32e29a130d22bc734b7778e6304ac9df2a3e8'/>
<id>urn:sha1:cbf32e29a130d22bc734b7778e6304ac9df2a3e8</id>
<content type='text'>
Make "$FOO" directly reference the environment variable $FOO in e.g.
'source' statements, instead of the symbol FOO. Use os.path.expandvars()
to expand strings (which preserves "$FOO" as-is if no environment
variable FOO exists).

This gets rid of the 'option env' "bounce" symbols, which are mostly
just spam and are buggy in the C tools (dependencies aren't always
respected, due to parsing and evaluation getting mixed up). The same
change will probably appear soon in the C tools as well.

Keep accepting 'option env' to preserve some backwards compatibility,
but ignore it when expanding strings. For compatibility with the C
tools, bounce symbols will need to be named the same as the environment
variables they reference (which is the case for the Linux kernel).

This is a compatibility break, so the major version will be bumped to 6
at the next release.

The main motivation for adding this now is to allow recording properties
on each MenuNode in a clean way. 'option env' symbols interact badly
with delayed dependency propagation.

Side note: I have a feeling that recording environment variable values
might be redundant to trigger rebuilds if sync_deps() is run at each
compile. It should detect all changes to symbol values due to
environment variables changing value.
</content>
</entry>
</feed>
