[Scons-users] env[X'] and signatures
Tom Tanner
trtanner at btinternet.com
Thu Dec 29 13:57:54 EST 2016
On 29/12/16 17:50, Bill Deegan wrote:
> As a workaround, perhaps add an action string which does nothing, but
> uses the variables you depend on?
> Just a thought.
>
>
> Are the builders external python scripts which get run from the shell
> by SCons? or are the builders python logic run inside scons?
>
I don't know about the original poster, but ours are generally executing
other programs and if I can see an environment variable lurking, I make
sure it's used on the command line as all command lines currently go via
the shell, so putting 'MYVAR=$(MYVAR) ...' on the command line sorts
that (at the cost of scons not recognising the actual script you're
running being a dependency unless you tell it to). But there are those
that get missed and then as I previously commented it can cause fun
Having to pass the environment explicitly to an action would make it
clearer to people what they were doing (case in point: we have one
program that needs to have HOME set and I'm pretty sure I'm dealing with
that incorrectly, but it's slightly invisible and I'm not sure how to
pass what I need in an action, though I suspect I'm missing something
obvious)
> On Thu, Dec 29, 2016 at 8:54 AM, Tom Tanner <trtanner at btinternet.com
> <mailto:trtanner at btinternet.com>> wrote:
>
> On 27/12/16 18:22, Bill Deegan wrote:
>
> If every builder depends on all values in env['ENV'], then any
> change will rebuild everything.
> This is almost never warranted.
>
>
> But then why does scons clear out the supplied environment? It is
> precisely because everything behaves in a way that is unclear and
> not reproducable if you don't know exactly what the environment is.
>
> I think, ideally, a builder (Action really), would specify
> what parts of the Environment() it's sensitive too.
>
>
> This would be better. If every builder specified which parts of
> env['ENV'] it is interested in, and they (and nothing else) got
> passed through and added to the build signature
>
>
> Remember, while many users are only building source code which
> is fairly quick, SCons is used in other "build" systems where
> steps can take considerable time and resources so extraneous
> rebuilds are quite costly for them.
>
> -Bill
>
>
> I agree but specifying the correct dependencies are how you avoid
> costly rebuilds. Not rebuilding something that has changed can be
> just as costly because instead of finding out about it at the
> build stage, you find out about it when it is on a production
> machine.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org <mailto:Scons-users at scons.org>
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://pairlist4.pair.net/mailman/listinfo/scons-users>
>
>
>
>
> _______________________________________________
> 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/20161229/642191f3/attachment-0001.html>
More information about the Scons-users
mailing list