DIP81: Writing files at compile time
via Digitalmars-d
digitalmars-d at puremagic.com
Wed Aug 12 13:39:29 PDT 2015
On Wednesday, 12 August 2015 at 20:21:06 UTC, JDemler wrote:
> Maybe a combination of both could work? A central database that
> tracks which files have been generated and which have not, but
> the imported code still lies on the file system.
> Although that seems overly complex and would imply a
> differantiation in the import syntax between generated and non
> generated files.
I think you should forget that there is a filesystem. You may
have at least 4 storage areas:
1. a source bundle
2. generated source bundle
3. an output bundle
4. perhaps a temporary storage area
So you need to differentiate between those. You don't have to
differentiate between generated and non-generated if you only
allow keys in 2 that do not exist in 1.
When you reference a module you simply look at 1. first, if it
does not exist you try 2.
If you can write files to the output bundle (like .ini or .xml
files etc) you might also need specify the mime-type.
More information about the Digitalmars-d
mailing list