www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16211] New: [REG 2.058] Cyclic dependencies broken again

https://issues.dlang.org/show_bug.cgi?id=16211

          Issue ID: 16211
           Summary: [REG 2.058] Cyclic dependencies broken again
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com
                CC: code dawg.eu

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.

--
Jun 27 2016