Named unittests and __traits(getModules)

Johannes Pfau nospam at example.com
Tue May 21 17:54:36 UTC 2019


Am Sun, 19 May 2019 19:13:31 +0000 schrieb Andre Pany:

> On Sunday, 19 May 2019 at 18:56:33 UTC, Jacob Carlborg wrote:
>> I'm staring a new thread here on the topic of Name unittests because
>> the existing one is getting too long [1].
>>
>> [...]
> 
> As far as i remember there was another suggestion of Andrei (in another
> context). By importing a module B in module A, the module B can specify
> coding which is executed and gets the module A as info.
> 
> This might could also solve this issue.
> 
> Kind regards Andre

Do you happen to have a link for that original post?

@Andrei how exactly should something like this be implemented, do you 
agree that mixin templates are the right tool for this (e.g. as described 
here: https://forum.dlang.org/post/qbr7dd$16fd$1@digitalmars.com)? If so, 
I could write a DIP and the compiler implementation for that. Of course 
the DIP would have to adress the details (selective imports, public 
imports, ...), but I'd like to have some feedback on the general idea* 
first.

* annotate template mixin with import, then automatically add 
mixin(template(thisModule))) in every importing module

-- 
Johannes


More information about the Digitalmars-d mailing list