pietroppeter/nimib

Handle multiple documents being built in parallel

Closed this issue · 0 comments

When working with the async in nimiBook today, I stumbled upon a bug. In nbJs we write our nim code to unique filenames, but the output of the all is temp/nimib/out.js. So if multiple documents are compiling their nbJs at the same time, they will clash with each other. So we create a unique output filename as well. I'm thinking of doing something like:

let outfile = &"out{hash(doc.thisFile)}.js"

so we are sure that no two documents will have the same filename.