Thanks for the reply Jose! The dependency order makes sense as an issue with my initial thought - one other approach is that a project could define its own method of configuring IEx if there were a hook to allow that - looking at the IEx.Evaluator I was able to make a pretty small patch to allow for this type of configuration by adding a new public function and extending the `loop` function
```elixir
@spec load_dot_iex(pid, pid, String.t()) :: :ok | :error
def load_dot_iex(evaluator, server, path) do
ref = make_ref()
send(evaluator, {:load_dot_iex, server, ref, self(), path})
receive do
{^ref, result} -> result
after
5000 -> :error
end
end
...
defp loop(%{server: server, ref: ref} = state) do
receive do
{:eval, ^server, code, counter, parser_state} ->
{status, parser_state, state} = parse_eval_inspect(code, counter, parser_state, state)
send(server, {:evaled, self(), status, parser_state})
loop(state)
{:fields_from_env, ^server, ref, receiver, fields} ->
send(receiver, {ref, Map.take(state.env, fields)})
loop(state)
{:value_from_binding, ^server, ref, receiver, var_name, map_key_path} ->
value = traverse_binding(state.binding, var_name, map_key_path)
send(receiver, {ref, value})
loop(state)
{:variables_from_binding, ^server, ref, receiver, var_prefix} ->
value = find_matched_variables(state.binding, var_prefix)
send(receiver, {ref, value})
loop(state)
# NEW RECEIVE CASE TO LOAD A DOT IEX FILE PROGRAMMATICALY
{:load_dot_iex, ^server, ref, receiver, path} ->
next_state = load_dot_iex(state, path)
send(receiver, {ref, :ok})
loop(next_state)
{:done, ^server, next?} ->
{:ok, next?}
{:done, ^ref, next?} ->
{:ok, next?}
end
end
...
I think that combining this overriding the default mix task would allow for the type of configuration that I was hoping to achieve - or if there is desire for this functionality a small change could be incorporated into mix to do this as a feature using `project.cli()[:iex_configuration_file]` or something of the sort.
If you don't think any of this is necessary in Elixir proper I can move my work towards something at the project level, but wanted to see if there was any interest in upstreaming this concept