[Scons-dev] Scons 2.3.2 regression, D tool...

Dirk Bächle tshortik at gmx.de
Sat Aug 9 13:54:33 EDT 2014


On 09.08.2014 19:35, Russel Winder wrote:
> [...]
>> This happens, because the line
>>
>>        d_compiler = FindTool(d_compilers, env) or d_compilers[0]
>>
>> adds "dmd" to the tool list anyway. In the "default" Tool's generate()
>> method, the returned list is simply loaded without checking the
>> existence of tools again.
> Indeed as OP said. However all the Fortran tools are being brought in as
> well even though I have no Fortran compiler, why is this happening and
> should it be fixed?
I think the reasoning behind this is, that if a Fortran compiler isn't 
found during construction of the Environment (because PATH is not setup 
properly), it gives the user a chance to directly set "env['FORTRAN'] = 
/path/to/fc" and get things going for him.
Whether this was a good idea is quite debatable, but that would be my 
explanation for why things are as they are.

> [...]
>
> So I suggest the way forward is to remove the setting of this from the D
> tools and forget it for now — the reason I original set this a couple of
> years ago was due to a (mis-)feature of D that is changing very rapidly
> just now. How this is treated for D needs reviewing in a few months time
> when the next GDC and LDC compilers get formally released.

Another option would be to not completely remove it, but use 
env.Default() such that the variable is only set if it doesn't exist 
yet. That should do the trick too.

Thanks a lot for looking at this immediately.

Dirk



More information about the Scons-dev mailing list