Fork me on GitHub

It seems that when using the macro cljs.core/resolve with code splitting (:modules functionality) that there are conditions where it is possible that a module (A) that triggers the load of another module (B) is compiled before the defs of module B have been processed into cljs.env/*compiler*. This results in the defs in module B being empty at this point ( during the compilation of module A and causes the attempt at cljs.core/resolve to fail here . The attempt of module A to invoke the function in module B after load then fails at runtime. I have only encountered the issue with 1.10.238 (1.9.946 works correctly). Unfortunately, I have not been able to create a minimal case after several hours. Any ideas?


I have also tried master and the issue occurs in the same way as with 1.10.238


@symfrog resolve does indeed generate unusable code. repro here