[Scons-dev] How to traverse the graph after files are read

anatoly techtonik techtonik at gmail.com
Wed May 20 10:25:16 EDT 2015


On Wed, May 20, 2015 at 4:59 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:
>>>Are there two separate FS objects for that?
>
> No there is one global fs that is shared with all environment objects.
>
> After the Sconstruct are read in this will hold all nodes that are known to the SCons and their relationships. The scanner have not been run yet, so there might be some node that are still to be added as dependent children. I think a call to get_children() will call the scanners however and return all explicit and implicit node dependents for a given node.

So, I thought that FS object is just used to access filesystem.  Not
it looks like an FS is not only a namespace and cache for filesystem
access, but also a data/state storage for the build graph. Perhaps
that makes SCons more memory efficient, but it is hard to wrap my head
around it. Now the parsing code from Main.py start to make sense:

            SCons.Script._SConscript._SConscript(fs, script)

So, this one parses the script and updates fs tree, right?


More information about the Scons-dev mailing list