cycle dependencies

Neia Neutuladh neia at ikeran.org
Sat Jun 2 17:17:02 UTC 2018


On Friday, 1 June 2018 at 17:59:21 UTC, Steven Schveighoffer 
wrote:
> The .di file is just an interface, it doesn't know what's 
> actually compiled in the binary.
>
> To put it another way, the compiler only generates a ModuleInfo 
> (or dependency modules) for .d files. .di files are simply a 
> public API for the .d files.

Yes, this is my point. (Communication is much harder than I 
thought.)

When you encounter a .di file, you can't rely on an automated 
tool to tell you what modules need to be initialized or figure 
out an order for them. You have to do it manually, and if you 
mess it up, you get undefined behavior.

This is why I called it "here be dragons" -- it's fraught.

Unless your goal was to omit the depth-first search in the common 
case while preserving the rest of the current logic. I'm curious 
how much time that would save.


More information about the Digitalmars-d mailing list