finding a circular dependency
Steven Schveighoffer
schveiguy at yahoo.com
Thu Jun 24 07:41:07 PDT 2010
On Thu, 24 Jun 2010 10:27:29 -0400, Ellery Newcomer
<ellery-newcomer at utulsa.edu> wrote:
> On 06/21/2010 01:51 PM, Steven Schveighoffer 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
>
>
> Hey Steve, if you haven't found your cycle yet, could you send me the
> source code? My utility is a bit of a mess, but I think it's working now.
I did find it, and I will eventually incorporate my code which prints the
cycle when it's found (it will be completely non-intrusive and not affect
the startup performance unless a cycle is found). However, in trying to
print the cycle, I've found a really disturbing bug that needs to be
addressed first http://d.puremagic.com/issues/show_bug.cgi?id=4384
Also, equally disappointing, I found that the reason the cycle was added
was to workaround a bug in dmd (specifically
http://d.puremagic.com/issues/show_bug.cgi?id=3979). Without the code
that creates the cycle, phobos doesn't compile. With the code, any
program linked with phobos fails. Lovely...
Great, I just gave myself more work when I was trying to just finish
std.process!
-Steve
More information about the Digitalmars-d
mailing list