[Issue 8858] DMD's -v option doesn't output dependencies with imports inside functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 5 22:01:21 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=8858

Jonathan Marler <johnnymarler at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johnnymarler at gmail.com

--- Comment #4 from Jonathan Marler <johnnymarler at gmail.com> ---
>From what I understand, getting all dependencies for a module requires more
overhead than it takes to just compile the file.  Compiling a single file only
requires loading the imports that the file references directly, the compiler
also loads indirect imports so long as they are global, but it isn't required
to do this.  That leaves local imports inside other imports to go unnocited. 
To force the compiler to load all the imports even when it just needs to
compile a single file would have a bad performance impact, therefore, it makes
sense to make this an option to be passed to the compiler.  This command line
option "-deps" already exists and already signals the compiler to load all the
modules.

Given this, I would mark this as "not a bug" saying that if you need to get all
the imports you should include the "-deps" flag to the compiler.

--


More information about the Digitalmars-d-bugs mailing list