Thread overview | |||||
---|---|---|---|---|---|
|
March 09, 2020 " include imported modules in the compilation " should exclude di file | ||||
---|---|---|---|---|
| ||||
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? |
March 09, 2020 Re: " include imported modules in the compilation " should exclude di file | ||||
---|---|---|---|---|
| ||||
Posted in reply to Calvin P | 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.
|
March 19, 2020 Re: " include imported modules in the compilation " should exclude di file | ||||
---|---|---|---|---|
| ||||
Posted in reply to Calvin P | 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?
Sounds sensible. Can you raise a bug report ?
|
Copyright © 1999-2021 by the D Language Foundation