[Scons-users] Reducing toposort time for Java builds
Kenny, Jason L
jason.l.kenny at intel.com
Thu Jul 12 16:52:03 EDT 2012
I have not followed the whole thread.. but I will state this is going to be hard at best.
The information for a file node is stored in FileNodeInfo and FileBuildInfo class. These is pickle able, while the file node is not. I should be a little more clear what I stored is a (FileNodeInfo ,FileBuildInfo) tuple.
The main issue is that if you want to get new data stored you need to modify, or monkey patch these objects.
There is nothing you can do to your node object itself to get more data stored in the Scons DB file.
In case it matters.. what SCons checks for would be two thing mainly when it see if something is out of date.
1) it checks that the given node exists, and if the csig values matches.
2) it check the binfo matches.. this means:
a) the actions csig matches. This is done via a interesting set of stuff. Mainly the cli stuff get subst() and MD5ed to see if it matches the cli md5 values stored. If this is a function ( ie python code) the code block text is md5'ed and that is tested with what is stroed. ( this mean the actions function you set up can be changed and Scons will rebuild.. however functions you call in this API can change and it will not be seen)
b) it checks all the dependency file ( there are four groups of these.. just assume they are one big list). The check is that the stored ninfo for the node when this build action last worked, matches the nifo we currently have. Here there is a general functions that allows us to map is the test is a md5 test, or time check, or combination.. like the default time-md5 check ( which checks to see if the time stamp is different and if it is checks the MD5 to double check that it really is different to avoid false rebuilds). There is also a check to see that the dependent node is not being rebuilt for a different reason.
Hope this helps....
Jason
-----Original Message-----
From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of Dirk Bächle
Sent: Thursday, July 12, 2012 3:19 PM
To: scons-users at scons.org
Subject: Re: [Scons-users] Reducing toposort time for Java builds
Hi Greg,
On 12.07.2012 21:16, Greg Ward wrote:
> ....
>> So far so good, although I haven't actually done the BuildInfo
>> subclass yet, because I don't understand how it connects to .sconsign.
>> I mean, I can see from the docstrings that there is some connection
>> between BuildInfo and .sconsign, but how it works is a mystery.
>>
>> Obviously File makes it work somehow, but there is a lot of code in
>> File, and it's totally unclear to me which of that code is necessary
>> to make this build's signatures wind up in .sconsign.
>>
>> Any tips on where the magic lies? What do I have to do in my Node
>> subclass to make sure signatures from its NodeInfo object get saved
>> in .sconsign?
I started to write down the results of my own investigations for the signature subsystem in SCons. Please find it attached and see if it helps you in any way. It's neither complete , nor pretty ;).
Best regards,
Dirk
More information about the Scons-users
mailing list