On Mon, 19 Dec 2011 14:22:10 +0100, Rainer Schuetze <r.sagita...@gmx.de> wrote:



On 19.12.2011 09:11, Adam Wilson wrote:
Currently, I feel that private imports should be stripped from the DI
file as they are intended to be internal to the module. However, I want
to put it to the community to decide, and I would especially appreciate
Mr. Bright's opinion on private imports in DI files.

I'd very much like the dependencies to be shrinked in the di file, but I think you can only remove private imports if you can guarantee that no symbols are referenced by the generated di file (e.g. function signatures, variable types, templates).

IIRC removing imports might also have an influence on generated static ctor execution order, because there are some optimizations that remove dependencies if no imports with static ctors are found in a referenced module.

No it should not, an import will not actually create the module info that
contains the import dependencies. So the initialization order will still rely
solely on the compiled module.
OTOH not declaring private static ctors can lead to unreferenced module infos
that would otherwise end up in the final executable.

Otherwise, having a version of the di file without any implementation sounds like a good idea.

Reply via email to