" include imported modules in the compilation " should exclude di file

Calvin P changlon at gmail.com
Mon Mar 9 13:59:19 UTC 2020


On Monday, 9 March 2020 at 13:55:08 UTC, Calvin P wrote:
> The current compiler "-i=module_name" option will  include 
> imported modules as source code.
>
> When the module define from di file extension, I think compiler 
> should avoid treat it as source file.
>
> What do you think?

The use case:

If I want to define a collection function only use for ctfe, I 
can put them into di file to avoid binary bloat.


It also can be used create helper module for BetterC library,  so 
you can use "new Struct" in the di and import it from betterC 
module.  without use "-I=-lib_helper" to exclude every helper 
module in the library.




More information about the Digitalmars-d-learn mailing list