ModuleInfo, factories, and unittesting

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 19 10:29:13 PST 2016


On 12/19/16 12:25 PM, Atila Neves wrote:
> On Monday, 19 December 2016 at 17:11:38 UTC, Adam D. Ruppe wrote:
>> On Monday, 19 December 2016 at 17:04:43 UTC, Atila Neves wrote:
>>> Nope, no magic. Just ModuleInfo.opApply in object.d.
>>
>> Well, it is kinda magical because combining all the ModuleInfo takes
>> some tricks from the linker. This method works with separate
>> compilation, whereas the compile time tricks don't... and that's
>> important to remember in any rewriting situations.
>
> I'd forgotten about separate compilation. The issue there is the
> algorithm for naming unittest blocks gives different results depending
> on how the code is compiled, so __traits(getUnitTests) unfortunately
> currently only works with "compile all the things!". I'd forgotten I
> wanted to change the compiler code responsible for the naming.

Interesting, could you please add a detailed issue to bugzilla? Thanks! 
-- Andrei



More information about the Digitalmars-d mailing list