[Scons-users] Possible bug with Value objects

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Mar 2 04:25:11 EST 2015


Much fiddling later: That else block


+                else:
+                    # Seems to be a signature already?
+                    lines.append("`%s' changed\n" % stringify(old_bkids[idx]))
+                    

appears to be spurious? at least it's triggering the message.

I've ended up with the change to __eq__ in Python.py: 

+    def __eq__(self, other):
+        return type(self) == type(other) and str(self.value) == str(other)
+

(paranoia)

and 

-            elif k.changed_since_last_build(self, osig[k]):
-            elif k in osig and k.changed_since_last_build(self, osig[k]):


which seems to do what I expect

From: dl9obn at darc.de At: Feb 28 2015 10:42:35
To: scons-users at scons.org
Subject: Re: [Scons-users] Possible bug with Value objects

Hi Tom,

On 27.02.2015 17:48, Tom Tanner (BLOOMBERG/ LONDON) wrote:
> I've been trying to get my head round this, but it appears that the code to 
explain why a build has happened has problems with Value
> objects.
>

after some debugging of your example, I share your concerns. There are two 
basic problems, appearing for strange reasons that I 
still didn't fully understand:

1.) The default "__eq__" for Values doesn't work, so "x in l" fails...even if x 
is a member of the seq l, but of type Value!
2.) In the list of children (old_bkids/new_bkids, in Node.explain()), instances 
of the NodeInfo class may exist when Value nodes are 
involved.

Attached you can find a preliminary patch that seems to fix the problem. Do you 
think this is the right way to go, meaning: does 
this look reasonable to you?

Please open a ticket for this issue in the Tigris bug tracker, thanks a lot in 
advance.

Best regards,

Dirk


----------------------------

_______________________________________________
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/20150302/e149e32e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sig_value.txt
Type: application/octet-stream
Size: 2905 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150302/e149e32e/attachment-0001.obj>


More information about the Scons-users mailing list