That one last frontend feature to obsolete rebuild

Bill Baxter dnewsgroup at billbaxter.com
Wed Mar 12 17:01:15 PDT 2008


Gregor Richards wrote:
> 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 :)

Sounds great to me.  I was pondering just the other day why Rebuild 
hasn't switched to using the -v output rather than embedding the entire 
DMD front end.  So pragmas are the only thing, huh?

One little thing -- I'd say just enhance -v output all pragmas.  No new 
switch.  Tools that don't need them will just ignore them, tools which 
do can grep for the ones they care about.

--bb



More information about the Digitalmars-d mailing list