[Scons-users] Disambiguating Entry in variant directory
Ilya L
mephi42 at gmail.com
Thu Jan 29 07:01:21 EST 2015
Sorry, I used the *over*simplified example, that bumps into a different
issue due to variant directory being under source directory. The
following one is closer to reality:
$ cat sconstruct
VariantDir('#build', '#source')
Dir('#source/foo')
Dir('#build').glob('*')
$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** [build/foo] TypeError : Tried to lookup Dir 'source/foo' as a
File.
scons: building terminated because of errors.
Best regards,
Ilya
On Thu, Jan 29, 2015 at 2:20 PM, Ilya L <mephi42 at gmail.com> wrote:
> 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/8e92ff7b/attachment.html>
More information about the Scons-users
mailing list