That one last frontend feature to obsolete rebuild

Gregor Richards Richards at codu.org
Wed Mar 12 12:51:39 PDT 2008


Believe it or not, I'd really like to obsolete rebuild. I'd love to have 
a tiny little script that just reads the output of [g]dmd -v and gets 
the list of files (and everything else) from that. At this point, I'm 
very close to being able to accomplish this feat, as the recent(ish) 
addition of outputting every file that's imported got my 90% of the way 
there, but there's one problem. rebuild supports nonstandard pragmas, 
and the compiler chokes on them.

I would like to see a flag (-print-unsupported-pragmas or something else 
obscure, doesn't need to be short or simple) that changed the frontend's 
default behavior from choking on unrecognized pragmas to printing them 
out with the verbose output, e.g.:
pragma	link	"(argument to the pragma)"

Clearly this wouldn't work for pragmas which wrap declarations, but for 
simple pragmas it would - and simple pragmas are all I need, and 
probably all that most frontend-extending tools would need. With this 
one, comparably simple change, I could scrap rebuild and write a simple 
script that would be incapable of becoming outdated. Heck, if you'd 
like, I could even write it and submit a patch :)

  - Gregor Richards



More information about the Digitalmars-d mailing list