D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5053 - Better error message for cyclic dependencies.
Summary: Better error message for cyclic dependencies.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 normal
Assignee: Sean Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 07:59 UTC by Jacob Carlborg
Modified: 2010-11-08 06:36 UTC (History)
1 user (show)

See Also:


Attachments
Patch for giving better cyclic dependency error messages (2.80 KB, patch)
2010-10-14 08:01 UTC, Jacob Carlborg
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Jacob Carlborg 2010-10-14 07:59:35 UTC
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 Jacob Carlborg 2010-10-14 08:01:20 UTC
Created attachment 784 [details]
Patch for giving better cyclic dependency error messages
Comment 2 Steven Schveighoffer 2010-11-08 06:36:51 UTC
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.