https://issues.dlang.org/show_bug.cgi?id=7016
--- Comment #28 from Vladimir Panteleev <[email protected]> --- (In reply to RazvanN from comment #27) > -> add another compiler flag: "-rdeps" (or maybe a more inspired name) which > will recurs through all the dependencies, excluding druntime or phobos > imports. > The rationale behind this is that both druntime and phobos have circular > imports > which will cause the recursive implementation to fail; also having just 1 > phobos > import will lead to a cascade of imports which will be hard to follow. Hard-coding blacklists for druntime and phobos into the compiler sounds wrong. (People may need to build D against other libraries with the same issues, or build against Phobos from source - i.e. without linking to libphobos2.) If this is done, there would probably need to be ways to add to or remove from that list. Either way, it sounds like this will also result is a huge slowdown... > Any better ideas? Would it be a far stretch from this to add a switch to just do code generation whenever an import is done, whether it's in semantic3 or earlier? Meaning, move rdmd into dmd itself. I think all we need is a switch to enable this behavior (e.g. -r, for recursive compilation), and switches to add or remove from the list of packages that will be excluded from compilation (default being std.*, etc.* and core.*). This will make rdmd much faster, too, since it will no longer need to ask the compiler to perform semantics just to get a list of modules to compile and do it all over again during the real compilation. --
