How to safely read contents of mix.lock?

Take look at credos config loader.

https://github.com/rrrene/credo/blob/master/lib/credo/exs_loader.ex

It’s safe variant basically does load the file and parses it into AST via elixir tooling, but then manually traverses the AST to get the actual value.

I really miss an elixir equivalent of erlangs :file.consult.