asdf-erlang
asdf-erlang copied to clipboard
Respecting the `~/.kerlrc` file
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
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?
Looking at the code, it seems like the plugin set the
KERL_CONFIGto~/.asdf/plugins/erlang/kerl-home. Does this mean the user is supposed to add customizations in there? Is this the standardasdfway?
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
kerlbehind the scenes, it doesn't take into account the.kerlrcfile, so all customizations (eg to theCFLAGS) 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.kerlrcfile
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 ?
Sounds like a good plan.