DMD test suite not runnable on Debian/Linux

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 9 17:16:13 PDT 2017


On Sat, Jun 10, 2017 at 02:27:13AM +0300, ketmar via Digitalmars-d wrote:
> H. S. Teoh wrote:
> 
> > On a tangential note, now that I finally got the miserable test
> > suite running, I've managed to figure out that the problem in my dmd
> > PR was caused by src/ddmd/globals.h not being auto-generated from
> > src/ddmd/globals.d, so when I added new fields to the Global struct,
> > the C++ code that use globals.h with the old definition crashed. I
> > suppose this is just a relic from the pre-self-hosting days, but it
> > would be nice if these last .h files were gotten rid of in the near
> > future.
> > 
> > That, or we should (ab)use the .di generation facility or some sed
> > script to generate these .h files, so that they won't go out-of-sync
> > inadvertently.
> 
> we can use UDAs to do that! just make the generator import the
> relevand dmd parts, and then use compile-time introspection to build
> tables, so generator can just write 'em to file in runtime. ;-)

Sure!  But ... uhm... what has UDAs gotta do with that? A straight
`foreach (memb; __traits(allMembers, T))` should do the trick.


T

-- 
A mathematician is a device for turning coffee into theorems. -- P. Erdos


More information about the Digitalmars-d mailing list