[Scons-users] What to do when scanner is invoked for non-existing file?
Ilya
mephi42 at gmail.com
Fri Feb 28 17:48:01 EST 2014
On 03/01/2014 02:37 AM, Dirk Bächle wrote:
> Hi Ilya,
>
> On 28.02.2014 23:18, Ilya wrote:
>> Hello,
>>
>> SCons manual in "Scanner Objects" section says the following:
>>
>>> Note that the file is not guaranteed to exist before the scanner is
>>> called, so the scanner function should check that if there's any
>>> chance that the scanned file might not exist (for example, if it's
>>> built from other files).
>>
>> I have two questions about this:
>> 1. What to do if such condition is detected? Is returning an empty list
>> sufficient?
>
> yes, this is the best you can do in such a situation.
>
>> 2. Is scanner supposed to be called again once file is created?
>>
>
> Yes, during the build phase, files can get scanned several times. In
> fact, whenever source files get created by a builder, all internally
> cached info about implicit dependencies gets reset (for any remaining
> nodes!). As soon as one of these File nodes is visited again by the
> Taskmaster, it should get rescanned.
>
> Best regards,
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
Hi Dirk,
Thanks for the quick answer!
Ilya
More information about the Scons-users
mailing list