all.d file generator

Bill Baxter dnewsgroup at billbaxter.com
Mon Jun 25 16:45:34 PDT 2007


Clay Smith wrote:
> Hi,
> 
> I just wanted to post about a little side project of mine that I was 
> able to successfully use in my own project. I wrote a little program 
> that, given a project source path, will generate appropriate all.d 
> files. To my knowledge, no other code like this exists.
> 
> http://svn.dsource.org/projects/arclib/trunk/codingtools/alldgenerator/alldgenerator.d 
> 
> 
> You can browse my source to see what the generated all.d files look 
> like: http://www.dsource.org/projects/arclib/browser/trunk/arc
> 
> The code is kind of ugly, but I wrote it for utility. I've tested it on 
> derelict/ , arc/ , phobos std/ , and tango / (just this night). 
> Unfortunately when I tested it on tango, I learned it has a critical bug 
> in that if there are two subdirectories with the same name, one of those 
> directories will import non-existant files from the other directory 
> thinking that they are in its current directory. I'll get around to 
> fixing this bug eventually, as I only learned of it tonight.
> 
> The reason for this utility is that I wanted all.d files for my project, 
> but do not have the time or desire to maintain them as the project 
> changes and grows. So, I came up with a solution to automatically 
> generate all.d files for me and save me hours from working on a mundane 
> task.
> 
> My hope is that this will inspire others into the virtue of all.d file 
> generation, namely DSSS and build, or that someone out there may find it 
> useful.

Do you allow for changing the name?  I'm not so fond of 'all' since 
often 'all' ends up being more like the 'standard exposed api' and not 
really literally 'all'.  In Python I've seen people use 'api' to 
represent this top level import that just imports sub-packages.  That 
makes more sense to me than calling it 'all'.

--bb



More information about the Digitalmars-d-announce mailing list