www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - -cov and circular init deps

reply "Kris" <fu bar.com> writes:
Was trying out the -cov options, and ran into this gem again:

     Error: circular initialization dependency with module Appender

without -cov, there's no problem. I'd like to give you a concise example to 
fix it with, but I'm sure you'll understand that's rather difficult with 
this particular problem? To reconstruct the error, build 
mango.example.logging.d

- Kris 
Jan 23 2006
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Kris" <fu bar.com> wrote in message news:dr3pn4$cil$1 digitaldaemon.com...
 Was trying out the -cov options, and ran into this gem again:

     Error: circular initialization dependency with module Appender

 without -cov, there's no problem.
-cov adds a module initializer. What's likely happening is that Appender is importing module X, which is importing Appender. Hence, the circular dependency.
Jan 24 2006
parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Walter Bright wrote:
 "Kris" <fu bar.com> wrote in message news:dr3pn4$cil$1 digitaldaemon.com...
 Was trying out the -cov options, and ran into this gem again:

     Error: circular initialization dependency with module Appender

 without -cov, there's no problem.
-cov adds a module initializer. What's likely happening is that Appender is importing module X, which is importing Appender. Hence, the circular dependency.
Does this mean that the integrated code coverage should only be used, when there are no circular module dependencies. Are there any possible workarounds? This error only appears in the debug-build here. When compiled with -release -inline -O, the runtime binary segfaults. -- Jari-Matti
Mar 14 2006