[Issue 16211] New: [REG 2.058] Cyclic dependencies broken again

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 27 13:22:58 PDT 2016


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 at puremagic.com
          Reporter: schveiguy at yahoo.com
                CC: code at 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.

--


More information about the Digitalmars-d-bugs mailing list