Deterministic Build from different base paths

Erlang compile has deterministic. The thing that is most interesting for me is Omit the options and source tuples - especially the source part. What i would like to achieve is exact .beam files, when built with the same Erlang and Elixir versions, on the same arch and OS, but from different paths. Now there is full path to the source file in the .beam so if two beams are built from the same source with everything but the source file full path the same, the .beam differs.

Is there some solution in Elixir for this?

2 Likes

You can always set :erlc_options in project configuration to use that flag. Currently Elixir compile itself to the Erlang AST and then this is compiled to BEAM code, so you can use all available flags there. Unfortunately such “hack” isn’t guaranteed to work in future.

Looks like this doesn’t work as :erlc_options is probably used only for compiling .erl files not .ex.