"iex -S mix" - no library paths defined in ERL_LIBS are added, is this a bug/feature?

When “iex” is started by itself, then the code loader properly loads all paths stated in ERL_LIBS environment variable.

However, when you execute iex -S mix, then no library paths defined in ERL_LIBS are added. Is this a bug/feature? Is there an option to preserve ERL_LIBS variable checking by the code loader when the mix application is started?

I’m interested in passing ERL_FLAGS to iex -S mix and it might be related to your question.

ERL_AFLAGS should work. Mix prune code paths though, you can disable it with prune_code_paths: false in def project, but it will slow down compilation.

Thank you! @josevalim, perhaps the :prune_code_paths option should be documented in Mix.Project — Mix v1.15.0?

It should be added here: mix compile — Mix v1.15.0

Can you please send a PR?