It seems one possible fix for this bug could be a warning/error if the user 
tries to Install() a side-effect file, and expanding/clarifying the docs for 
SideEffect(). Also, if Install() is permitted with a warning, the current 
behaviour (silently ignoring the file) must be fixed.

A few other comments/questions come to mind:

1) If the contents of a side-effect file are indeterminate, how does telling 
SCons about this file help to have a deterministic (or "convergent") build? 
What purpose does SideEffect() have at all? What would be the remaining valid 
use-cases, if Install() is not permitted?

2) The example given in docs of .pdb file is an interesting one. It looks like 
SideEffect() is not actually used in msvc.py.

In fact, this "indeterminate" behaviour depends on whether the option -Fd [1] 
is used, what filename is specified with -Fd, and the debug information format 
option [2]. 

It is both possible and desirable, particularly in a parallel build, to either 
use -Z7 (foo.cc => foo.obj; no .pdb), or to use -Zi / -ZI with -Fd and a 
suitably unique filename (foo.cc => foo.obj, foo.pdb). However, using -Zi 
without explicit -Fd gives something like (foo.cc => foo.obj, vc100.pdb).

(There are probably multiple bugs in the MSVC support described above...)


For me, the interesting question is 1), and whether a "one size fits all" 
side-effect concept can ever be really useful in complex cases such as 2).

It seems clear that for a convergent build, the builder needs to fully 
understand the complexities of such issues and do the "right thing" in all 
cases. The "right thing" may be to mark the file vc100.pdb as unstable, or just 
ignore it - but SideEffect() doesn't help there. While foo.pdb should be a 
target along with foo.obj, so it can be installed.

Regards
Ben

[1] http://msdn.microsoft.com/en-us/library/9wst99a9.aspx
[2] http://msdn.microsoft.com/en-us/library/958x11bc.aspx
_______________________________________________
Scons-dev mailing list
Scons-dev@scons.org
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to