Definitely. I find that error message frustrating as well.

Sent from my iPhone

On Jun 22, 2010, at 6:24 AM, Steve Schveighoffer <[email protected]> wrote:

I just realized that this patch isn't good enough (it does not print modules which have no constructors/destructors but which import other modules), I'm working on a better one.

But it's definitely possible. So assume I will have a patch shortly, does the concept seem worthy?

-Steve



----- Original Message ----
From: Steve Schveighoffer <[email protected]>
To: Phobos <[email protected]>
Sent: Tue, June 22, 2010 8:59:23 AM
Subject: [phobos] Proposed feature: print cycle when a module cyclic dependency is detected

Hi all,

Recently, I had an issue when developing std.process.  I
inadvertently caused a cyclic dependency in modules. However, the error
was not enough to find the problem:

object.Exception: Cyclic dependency
in module std.stdio

The problem is, this is the *end* of the cycle, not
the source.  I actually hadn't changed the imports of std.stdio.

So
I improved the module constructor function to automatically print all modules involved in the cycle, in the order they were imported. Attached is the patch. The function should not adversely affect the runtime in normal operation, since the changes I made only occur when a terminating exception is about to be thrown anyways. Do people agree this is a worthy improvement to the runtime? Anyone see any issues with the patch? If everyone likes,
I'll commit.

-Steve



_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to