[Scons-users] Catching 'None' dependencies

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Apr 28 13:07:09 EDT 2014


On Sun, Apr 27, 2014 at 07:42:32PM +0200, Dirk Bächle wrote:

> Hi,

>

> On 27.04.2014 06:35, H. S. Teoh wrote:

[...]

> >Is there any way for SCons to abort immediately upon seeing a

> >dependency on 'None' so that it's easier to track down this bug?

> >Currently, it goes ahead and inserts it into the dependency graph,

> >and only halfway into the build it aborts because it can't find the

> >non-existent file.

>

> the "--taskmastertrace=FILE" option might help to see where the "None"

> comes from (see MAN page). Other than that, you'll probably have to

> use the debugger (pdb) or do a binary search by

> commenting/uncommenting parts of your SConstruct and narrowing the

> place of the error down.

[...]

Unfortunately this didn't help. All it does is to indicate which
sequence of nodes lead to the node that depends on 'None', but by this
point the dependency graph has already been constructed. What I need to
know is which part of the SConscript / SConstruct is responsible for
adding this wrong dependency into the graph in the first place.

Is there a way, inside an SConscript, to extract the current list of
dependencies for a particular node? One idea I have is to insert checks
at various points in the subroutines I use heavily to see if a
particular node has acquired a dependency on 'None'. That would help
narrow down what is introducing it.

Another strange thing I found, is that if I run scons with -n, then the
dependency on 'None' doesn't occur, and the sequence of build commands
is actually correct. Could this be a bug in scons? Or perhaps somewhere
in my SConscript I'm depending on an undocumented quirk that worked in a
previous version of scons but fails in the current version (I'm
currently using 2.3.0, btw)?


T

--
If you think you are too small to make a difference, try sleeping in a closed room with a mosquito. -- Jan van Steenbergen


More information about the Scons-users mailing list