-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: print abstract
modifier once and with proper spaces
#4318
Conversation
@MartinWitt @slarse have a look at this when you get time. |
51b6584
to
496a4d1
Compare
Cool and worrying screenshot :) |
I have absolutely no idea how anything works but this issue seems to stem from the undefined order of modifiers in The order seems to depend on the order of an unspecified set in the Hashcodes, you must love em! Maybe this can serve as a starting point for Slarse or Martin :) |
conflict here |
@monperrus I have reproduced the issue in this PR. I have not worked on a fix for this. |
I will restart work on this when I feel it's blocking something because it is a tough one to deal with. |
Reference: ASSERT-KTH/sorald#601
This is a bizarre issue because of the randomness involved (found a Heisenbug).
If you directly run this test, it will fail because it modifies the file as such:
However, when you want to debug why this happens, the test gets a bit flaky. In other words, sometimes it passes, and sometimes it fails.
If you directly press debug, without setting any breakpoints in code, the tests sometimes fail, and it passes the other times. I haven't been able to figure out what is going wrong simply because of the random behaviour.
Now if you set a breakpoint at here, the program will stop there twice - 1) for printing modifiers of
PrintAbstractOnceWithProperSpacing
2) for printing modifiers ofAbstractFoo
. Just press "Resume Program (F9)" twice and this test will pass 🤯 .@khaes-kth is suggesting that it probably has to do with how the program is split into threads. Could you please elaborate?