asdf-erlang icon indicating copy to clipboard operation
asdf-erlang copied to clipboard

Respecting the `~/.kerlrc` file

Open robertoaloi opened this issue 4 years ago • 3 comments

Hi!

It looks like the plugin, even if it uses kerl behind the scenes, it doesn't take into account the .kerlrc file, so all customizations (eg to the CFLAGS) need to be explicitly configured. I wonder if this is the expected behaviour and if there's a way for the plugin to consult and respect the .kerlrc file

robertoaloi avatar Jan 04 '21 16:01 robertoaloi

Looking at the code, it seems like the plugin set the KERL_CONFIG to ~/.asdf/plugins/erlang/kerl-home. Does this mean the user is supposed to add customizations in there? Is this the standard asdf way?

robertoaloi avatar Jan 04 '21 17:01 robertoaloi

Looking at the code, it seems like the plugin set the KERL_CONFIG to ~/.asdf/plugins/erlang/kerl-home. Does this mean the user is supposed to add customizations in there? Is this the standard asdf way?

No, that was an internal directory we tried to hide from users that we allow kerl to write its data to.

It looks like the plugin, even if it uses kerl behind the scenes, it doesn't take into account the .kerlrc file, so all customizations (eg to the CFLAGS) need to be explicitly configured. I wonder if this is the expected behaviour and if there's a way for the plugin to consult and respect the .kerlrc file

I guess this depends on whether or not we want to expose .kerlrc to asdf-erlang users or not. Right now as you've pointed out we set KERL_CONFIG to an internal directory to discourage users from configuring kerl directly. Although, I suppose we could give the file a different name (e.g. .asdf-erlangrc) and tell curl to read it from the home directory. This should be possible as we can set KERL_CONFIG to anything we want, and then we can set KERL_BASE to an internal directory for all other kerl data. What do you think @robertoaloi ?

Stratus3D avatar Jan 13 '21 16:01 Stratus3D

Sounds like a good plan.

robertoaloi avatar Feb 01 '21 10:02 robertoaloi