finding a circular dependency

Rory McGuire rmcguire at neonova.co.za
Tue Jun 22 04:35:15 PDT 2010


On Tue, 22 Jun 2010 13:02:53 +0200, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> On Tue, 22 Jun 2010 03:14:38 -0400, Rory McGuire  
> <rmcguire at neonova.co.za> wrote:
>
>> On Mon, 21 Jun 2010 20:51:01 +0200, Steven Schveighoffer  
>> <schveiguy at yahoo.com> wrote:
>>
>>> I've been trying to get a modified version of std.process to compile  
>>> (with Lars K's changes) for windows, and phobos finally compiled.
>>>
>>> So I built a little test program, compiled it, and I get the following  
>>> error message:
>>>
>>> object.Exception: circular dependency in module std.stdio.
>>>
>>> Great.  How did that happen?  Being that I didn't write std.stdio,  
>>> only modified it slightly (and certainly didn't change any imports), I  
>>> haven't the foggiest where this problem is.  Given that the runtime  
>>> can prove there is a circular dependency, and apparently knows the  
>>> names of the modules, how about showing me the cycle?
>>>
>>> :P
>>>
>>> I do not look forward to tracking this one down...
>>>
>>> -Steve
>>
>> doesn't -verbose list the modules dmd is importing? Perhaps it stops at  
>> the offending module?
>
> It's a runtime issue, not a compiler issue.
>
> -Steve

Doh! now I remember, its because of the static constructors having a  
specific order (from tdpl).
And it only does construction when you run the app, not when compiling.  
(elaborating on your reply).

Thanks


More information about the Digitalmars-d mailing list