Conversation
|
Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
|
|
It would be interesting to bisect the dmd commit which fixed this bug. In any case, nice catch @ntrel! |
|
Hmm, I just saw that the second test case uses phobos. I think it's also likely that a change to phobos between v2.081 and v2.092.0 could have changed the outcome of the test case. @ntrel do you think you could try to minimize the second test case, so it doesn't depend on phobos? That way no changes to phobos could not affect this test in the future. |
|
I think the point is that nobody knows what causes the bug if it still exists. So it's difficult to find a test case that doesn't depend on Phobos when we can't get the bug to trigger with the actual code that used to trigger it. Technically I would think this test goes into Phobos, but I don't know if Phobos has infrastructure to run tests like DMD does. Are there no test cases in dmd that depend on Phobos? The point of this test is to prevent changes to Phobos causing this problem to reoccur. |
|
There are some tests but we are trying to get rid of Phobos inside of the test suite to make those tests reliable. |
MoonlightSentinel
left a comment
There was a problem hiding this comment.
No phobos addtions to the test suite
(I'll try to find a reduced test case using dustmite)
|
I'm happy to have someone change to a test that doesn't use phobos. But the problem I see is, the test doesn't fail, and we don't know what circumstances trigger the bug. So any test we add that isn't exactly like the original tests that failed gives us little chance to find the bug later if it happens to reoccur. If we are against tests that use Phobos more than testing for regressions, then we should simply remove the test, not insert a test that nobody knows whether it's effective. |
|
digger reports 2nd case was fixed by and first by (but not relevant as it's a phobos workaround) |
This is what dustmite is for. One can simply get an old version of dmd/phobos with the bug (in a container if need be) and reduce the test until it is stripped of all external dependencies. |
I don't think so. I had a look at porting
Great! |
|
given the dmd PR found by digger (#9636) and assuming its diagnostic is correct, my analysis is that speculative instantiation failed because of the bug that gave access to private members of public imports. So given a public and a private overload, the one actually used was not marked as necessary to be codegen-ed and the one that was not used was marked. If this is true then the tests proposed by this PR are not useful because for example a regression affecting 17712 would be detected if this test, added along with #9636, starts regressing. |
|
So I made a pull to put the test cases in Phobos: |
|
Also, Kagamin has a reduced test case for b17712.d, haven't tried it: |
|
Dustmite found a test case (using DMD 2.082.1) that still fails today: |
|
Nice. We should probably close this for now then. And I wonder if that shouldn't just be a new bug report to refocus energy on it. |
This bug seems to have been fixed, so this adds the 2 test cases to the test suite. Those test cases were causing a link error about missing symbols.
https://issues.dlang.org/show_bug.cgi?id=17712