On Mon, Jun 17, 2013 at 5:11 PM, bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com" target="_blank">bearophileHUGS@lycos.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Andrej Mitrovic:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No idea, but I've wondered this myself too. After all "imports" are a static feature and all are known at compile-time.<br>
</blockquote>
<br></div>
rdmd is used often in a situation where it knows all the modules of a program. So it must be able to detect those cycles. It seems an enhancement request for rdmd. Maybe a similar enhancement is possible for dmd, because there are plans to make the D compiler able to find all the modules it needs to compile a program.<br>

<br>
Bye,<br>
bearophile<br>
</blockquote></div><br><div>why do the email threads keep splitting up again? </div><div>Anyways, on the original thread 'can we detect at compile time module ctor/dtor cycles ?', Steven Schveighoffer raised the concern that di files may have certain private imports not written in the di file, to which I answered we can at least attempt cycle detection at compile time (which won't catch all cases) followed by cycle detection at runtime.</div>