Bug 5053 – Better error message for cyclic dependencies.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2010-10-14T07:59:00Z
Last change time
2010-11-08T06:36:51Z
Assigned to
sean
Creator
doob

Attachments

IDFilenameSummaryContent-TypeSize
784object_.d.patchPatch for giving better cyclic dependency error messagestext/plain2867

Comments

Comment #0 by doob — 2010-10-14T07:59:35Z
I created a patch which gives a better error message when a cyclic dependency occurs between two modules due to both having module constructors and importing each other. When two modules "A" and "B" importing each other and having module constructors the error message with the patch will look like this: "Cyclic dependency in module B for import A" instead of "Cyclic dependency in module A".
Comment #1 by doob — 2010-10-14T08:01:20Z
Created attachment 784 Patch for giving better cyclic dependency error messages
Comment #2 by schveiguy — 2010-11-08T06:36:51Z
This bug is obsolete in light of the fixes I just checked in. See bug 4384. The runtime will now print the full cycle when a cyclic dependency is detected.