[Scons-users] Scanners

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Wed Jan 20 09:07:44 EST 2016


There are many things that can cause the generated lists of dependencies to change order. mostly these are concerned with getting lists from glob, but it also can happen if you change the scanners mechanism which can result in getting the same list but in a different order. I changed my python scanner recently to use the python ast library to determine imports, rather than regexes. This works great, but it finds and process things in a slightly different order to how it used to

From: wblevins001 at gmail.com At: Jan 20 2016 13:52:54
To: Tom Tanner (BLOOMBERG/ LONDON), scons-users at scons.org
Subject: Re: [Scons-users] Scanners

I don't believe there is a magic switch for this. I assume the real issue is that the order of the dependencies must always be the same, and not necessarily sorted alphabetically. What tool are you using that requires sorting? Is this related to caching?

V/R,
William


On Wed, Jan 20, 2016 at 11:22 AM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:

Is there any way to tell the Scanner class to sort the list of scanned dependencies? I have a hand written scanner and it has to sort the dependencies it returns so as not to get unexpected rebuilds depending on the vagaries of  todays choice of filing system and how python has decided to order dictionaries today.

But even that isn't always enough as the scanner is recursive so it can possibly build multiple lists which are individually sorted  but the total result isn't.

But at least specifically in my case, and possibly in others, the order of the dependencies isn't important.

Note: I'm using the scanner factory to create my scanner which I see is sort-of-deprecated, but it's the one I found the documentation when writing my scanner in the first place.


_______________________________________________
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/20160120/0dd49892/attachment.html>


More information about the Scons-users mailing list