[Scons-users] Disambiguating Entry in variant directory

Ilya L mephi42 at gmail.com
Thu Jan 29 06:20:41 EST 2015


Hi All,

Consider the following sconstruct:

$ cat sconstruct
VariantDir('#build', '#')
Dir('#foo')
Dir('#build').glob('*')

This is the minimal repro of the issue with the far more complex build.

Here, I end up with the Dir node in source directory, for which there is
no physical directory on disk. Let's assume for now that this situation
is beyond my control.

By itself it's harmless, but then glob() within variant directory fails,
because #build/foo is disambiguate()d into a File, rather than a Dir:

$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [build/build] TypeError : Tried to lookup Dir 'build' as a File.
scons: building terminated because of errors.

Is this a bug in SCons?

I would expect that since there is a sanity check in srcnode():
srcnode.must_be_same(self.__class__), disambiguate() should act
consistently with this check.

Best regards,
Ilya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150129/347e749d/attachment.html>


More information about the Scons-users mailing list