gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CA broken; how do I differentiate NSValues for size and point?


From: Ivan Vučica
Subject: Re: CA broken; how do I differentiate NSValues for size and point?
Date: Sun, 27 May 2018 20:17:23 +0100

On Sun, May 27, 2018 at 7:47 PM Fred Kiefer <address@hidden> wrote:
Hi Ivan,

great analysis and nice code to reproduce this, but you seem to have missed my mail on the issue (even though it is included in your mail) and the work around I added to base.

I saw it, but it was not clear how deeply you've looked into it. That is why I mentioned that I use the revision from May 20. :-)
 
I was already fully aware of this and the patch I added should prevent your test code from throwing the exception.

It indeed has; after figuring out what the cause is, I wrote this to be able to check whether your fixes which you mentioned in the email work:
  https://github.com/ivucica/libs-base/commit/4771a84f7fd4d8b1536b9f52ef30ec524ec6357d

Test that no longer fails is setting the size using KVC.

I'm also pleased that I can probably remove "KVO notification does not get triggered for setting struct properties", as well -- I think you told me years ago that this was fixed, but only now did I check :-)

If you tell me this test is useful, I can open a PR and we can do a code review there.
 
Of course this is not the real solution. We may have to add the same checks for known types in GSObjCSetVal that we already have in other places. This is rather ugly code which I would prefer to avoid. I hope to see Richard in two weeks time and we may come up with a better solution together.

I am in favor of leaving the bug open on Savannah and Github, then? I can no longer reproduce the original issue after updating to the latest fixes, but if you believe the solution that's in place is hacky, maybe the bugs can be repurposed.

Otherwise, I am fine with them being closed (as the immediate NSSize/NSPoint problem no longer persists).

If the issue persists even with my work around in place it would be good to know. I have a few ideas for better work arounds but would prefer a cleaner solution.

Fred

PS: In your test code the second PASS is missing a „!“.

It doesn't;address@hidden(NSPoint) should be different address@hidden(NSSize).

I actually added comments to the new test case I pushed to my personal repo, so it should be clearer what's going on.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]