[Scons-users] How to restart a scanner if it cannot provide all dependencies.

Dirk Bächle tshortik at gmx.de
Tue Sep 16 14:44:05 EDT 2014


Hi Michael,

On 16.09.2014 18:48, Michael Hasling wrote:
> Hi Dirk,
>
> I'm following up an email I sent back in April about restarting scanners. But given the time it's taken me to get back to this maybe it's worth restating the problems afresh.
>
> [...]
>
> In your reply back in April you suggested that, if an initial scan of a source reported a non-existing dependency then the scanner would be run again when the target was revisited before the builder would get invoked:
>
>> [...]
> My investigations suggest that is not happening with our custom Tcl builder/scanner. What I see is:
>
>      scons: Building targets ...
>      my_tcl_tool_scancheck: node=first.tcl
>      my_tcl_tool_scancheck: returning: None
>      Creating 'first.tcl'
>      my_tcl_tool_scancheck: node=first.tcl
>      my_tcl_tool_scancheck: returning: True
>      my_tcl_tool_scanner: node=first.tcl
>      my_tcl_tool_scanner: returning ['second.tcl']
>      Creating 'second.tcl'
>      my_tcl_tool: target=final.xml source=first.tcl
>      couldn't read file "third.tcl": no such file or directory
>          while executing
your build simply breaks, because there is no way for SCons to detect 
that second.tcl depends on third.tcl, and first.tcl depends on 
second.tcl. This has to get fixed first, then we can continue to talk 
about scanners. ;)
Did you expect SCons to call your Tcl scanner automagically for 
"second.tcl" (-> detect third.tcl as dependency)?

Note, how in your build 'first.tcl' gets created first, although it 
probably should depend on 'second.tcl'. This can't be right...

Best regards,

Dirk



More information about the Scons-users mailing list