I have a bit of an unconventional situation.
I have an app that generates files at runtime. Those files contain valid elixir code (modules basically). I need to compile them and load them at runtime.
I am able to do most of that with
Code.require_file, and friends.
However, I need to be able to check what new modules have been compiled (or all the modules currently loaded in my app).
:application.get_key(:my_app, :modules) which lists all modules correctly when the app starts, but this doesn’t include the newly compiled modules at runtime.
Any idea how to achieve that?
All I care about is, I need to compile random modules at runtime and I need to know about all the newly generated modules that were compiled randomly at runtime.