[Scons-users] Errors in "Using scanners with Builders" example

Andreas Gustafsson gson at gson.org
Tue Jan 30 09:58:30 EST 2024


Hi all,

I was going to file a bug report but was asked to bring the issue here
first.

If I copy and paste the example code from
https://scons.org/doc/production/HTML/scons-user/ch20s03.html
into a SConstruct and run it, I get a syntax error because
of unbalanced parentheses in

  kscan = Scanner(function=kfile_scan, skeys=['.k'], path_function=FindPathDirs('KPATH')

And after fixing that, I get a second error:

  scons: *** [file.foo] TypeError : kfile_scan() missing 1 required positional argument: 'arg'

As a meta-issue, given the emphasis the SCons project seems to place
on automated testing, how come these aren't caught by some automated
test?
-- 
Andreas Gustafsson, gson at gson.org


More information about the Scons-users mailing list