On Wednesday, 12 August 2015 at 20:39:31 UTC, Ola Fosheim Grøstad wrote:
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.

I am not sure if I understand your idea correctly:
The compiler would in case of an export(name, content) write the content both to a internal database and the filesystem and then only use the internal one? Or could the content of the internal database be copied to the file system at the end of the compilation process? Or is only the output bundle written to the file system?

Reply via email to