[Scons-users] Question over scanners

RW garlicbready at googlemail.com
Sat Sep 9 19:57:18 EDT 2017


Thanks,
I think I've got the hang of using them now
it took me a bit of time to figure out the difference between the scanner
and the emitter
I assumed the scanner added to the list of sources for the builder but
that's not the case (the emitter can do, but the scanner just influences
dependencies for if the target should be rebuilt)

On 7 September 2017 at 15:41, Bill Deegan <bill at baddogconsulting.com> wrote:

> The documents are the supported API.
> When the supported API changes, there will be a deprecation cycle.
>
> So in general follow the documents.
>
> -Bill
>
> On Wed, Sep 6, 2017 at 11:48 AM, RW via Scons-users <scons-users at scons.org
> > wrote:
>
>> Hi,
>> I've noticed in the man page and the user docs the recommended way to
>> create scanners is to use something like this
>>
>>   def kfile_scan(node, env, path):
>>       contents = node.get_text_contents()
>>       includes = include_re.findall(contents)
>>       return env.File(includes)
>>
>>   kscan = Scanner(function = kfile_scan, skeys = ['.k'])
>>
>> However when looking at the code for scons I've noticed that a lot of
>> inbuilt scanners use / inherit from SCons.Scanner.Base
>> also there's a comment in the code of
>> "    TODO:  Deprecate this some day.  We've moved the functionality
>>     inside the Base class and really don't need this factory function
>>     any more.  It was, however, used by some of our Tool modules, so
>>     the call probably ended up in various people's custom modules
>>     patterned on SCons code."
>>
>> From an end users point of view does this mean they should be using the
>> base class, or is this for internal use only?
>>
>> Many Thanks
>> Richard
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170910/5ed4dac4/attachment.html>


More information about the Scons-users mailing list