taylanbayi...@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
>>>>> After some tinkering around I realized that the problem is that our >>>>> workaround of loading files explicitly causes the package record >>>>> type to be redefined after some packages have already been defined. >>>>> More generally, we force the top-level of many files to be >>>>> re-executed after they've already been executed as a result of a >>>>> module import... > > Returning to this issue after a long pause, I suddenly had a new idea, > which is to use something akin to 'use-modules' instead of 'load' on the > files. (I need a procedure and not a macro, and don't actually need to > 'use' the modules, so I use 'resolve-interface' in the patch below. > Don't know if there's a better suited procedure for this purpose.) > > The tricky part is turning file names into module names, but so far all > seems unproblematic, so a straightforward transformation from the string > "$out/foo/bar.scm" to the list (foo bar) does the job. (Possible issues > would be when a file name doesn't match a module name, or a file doesn't > contain a module at all.) > > This entails the least amount of duplicated effort from all the variants > we had so far, and finishes in below 2 minutes on my machine. (I think > the only remaining duplication is the compilation of the modules during > 'resolve-interface' and their compilation via 'compile-file', and the > former cannot be done in parallel, so we could again cut the time to > below half of what it is now, if we solved that.) > > Tell me if you see any problems with this variant. Pinging this thread since it seems to have been forgotten. :-) Taylan