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 Issue 23598 - Circular reference bug with static if and eponymous… #14838
Conversation
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14838" |
c29089f
to
1e32d26
Compare
It be really nice if the tester would run the compiler test suite before trying to build everything else first. |
The failure is not coming from any test. Druntime cannot be built with this patch. |
Can't run the compiler test suite without druntime. |
" src/core/lifetime.d(130): Error: static assert: "Don't know how to initialize an object of type AssertError with arguments (string, ulong)" | src/core/exception.d(873): instantiated from here: " |
Not always, but nearly always one can, by using the previous druntime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreeing with @BorisCarvajal
1e32d26
to
5ce4f6d
Compare
69c3f72
to
89a2719
Compare
The buildkite error appears to be here: The lines don't quite line up with line 3628. |
89a2719
to
5ce54a3
Compare
This seems to have fixed the original issue, but it didn't take me long to hit into another one, which will take a while to reduce. |
Please file separate issues with separate entries in Bugzilla. |
If it proves to be a different issue and not another manifestation of this same issue. |
If the original is fixed, then another manifestation is a different issue. Please do not append more issues to the same issue. It makes things very hard to manage. |
Related issues can be associated by adding to the [See Also] section. |
The fact that the original test case compiles doesn't necessarily mean the issue has been fixed. That's why I wrote "it seems to have been fixed". If it proves to be a different issue, I will file a different issue. If it's an incomplete or incorrect fix, I will reopen this bug report. |
You're looking at master, not the 0.4.3 release tag. |
I have a lot of experience with this. Please open a new report. The problem with reopening with something else is we lose the correspondence between issues and PRs. Also, what may appear to be the same problem may not actually be the same one. |
Anyone care to have a look at jmdavis' project to see what the actual problem is? |
My experience is non-existent compared to yours. I can hardly walk yet. Anyway, this time you are right. It must be a duplicate of multiple other reports: https://issues.dlang.org/show_bug.cgi?id=23646 |
@maxsamukha Thanks for isolating it and filing the report. I'll look into it after this one is fixed. |
Spent several hours boiling the problem down to this. Couldn't make it smaller.
Looks like I'll have to instrument the compiler next to see why |
I spun off https://issues.dlang.org/show_bug.cgi?id=23651 which is blocking this PR. The problem is different from the one this PR is trying to solve. |
5ce54a3
to
91b8716
Compare
91b8716
to
9295ea9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we are hitting here is a general problem: how are static if declarations supposed to be handled? The answer seems to be: before everything else. If that is the case, maybe we should strive to have a more general solution (a visitor that first looks for static if declarations, or maybe store static if declarations at parse time in a different tree) than just introducing special cases to fix particular bugs.
The more we add ad-hoc fixes the more complicated it's going to be to fix the general case.
We've struggled with that problem for a long time. There's no obvious solution that I can think of. In the meantime, we can't let perfection get in the way of progress. At the very least, we are building a test suite of cases that we need to work, to test against any new ideas. |
… templates