Code.get_docs returning nil - beam file does not exist

Hi,

Your time is appreciated :slight_smile:

I’d already tried sleeping inside the defmodule but not outside. (Since the parallel compile works with files not modules, and there is only one module in the file, the inside/outside distinction is moot in this case?).

But I tried outside: I put a Process.sleep(:infinity) outside the defmodule in ModuleB, touched both .ex files and did a mix compile. As you’d expect the mix just hung.

While the mix was hanging, I had a look at ebin and looked for the beam file for ModuleA which was surely compiled by then. There was no file.

It suggests that the parallelcompiler only writes the beam files late in the compilation, after (all?) the spawned compiler processes have completed.

Which begs the question as to the use case for Code.get_docs i.e. when can you use it?