Bug 16211 – [REG 2.058] Cyclic dependencies broken again
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-06-27T20:22:00Z
Last change time
2017-01-16T23:24:48Z
Keywords
pull
Assigned to
nobody
Creator
schveiguy
Comments
Comment #0 by schveiguy — 2016-06-27T20:22:58Z
The code that triggered https://issues.dlang.org/show_bug.cgi?id=4384 is once again compiling. Since a long time (2011).
We currently have cycles in Phobos without realizing it because of this. We need to rethink how we do cycle detection. It was reworked in this PR: https://github.com/dlang/druntime/pull/114
However, one problem with this is a module with no ctors is once again marked as being "visited", so if it's needed 2+ times for a cycle, the cycle goes undetected.
I don't want to necessarily go back to the alloca version, but perhaps we can remove the stack-based search and use recursion once again. I'm almost certain we will need at least 2x number of modules, but I'm not sure the limit. We also have to prevent infinite loops, which is why the original code was so weird.
CC'ing Martin as he wrote the pull causing this.