[erlang-questions] Dialyzer HOME quirk

Kostis Sagonas kostis@REDACTED
Tue Jun 2 17:35:28 CEST 2015


On 06/02/2015 05:25 PM, Viacheslav V. Kovalev wrote:
> Hi folks.
>
> When working with dialyzer on windows I've noticed some strange (for
> me) behaviour. To find default PLT location dialyzer peeks into the
> HOME environment variable, which is... hm...*not always*  defined on
> windows:https://github.com/erlang/otp/blob/maint/lib/dialyzer/src/dialyzer_plt.erl#L230
>
> Erlexec, for example, knows about this fact:
> https://github.com/erlang/otp/blob/41f2a54d9fed232be06a3c4be06779e9455a62b4/erts/etc/common/erlexec.c#L1523
>
> I believe correct way to locate HOME is to use
> `init:get_argument(home)`. Does anybody know any reason not to do so?
> Why dialyzer use os:getenv("HOME") though?

Because we have never tried Dialyzer on windows (at least when this code 
was written), simply because we did not (and still do not) have such a 
machine.

The reason is as simple as that.  Feel free to submit a pull request 
that fixes this.  I would have done it but I have no way of testing 
whether the change works on Windows or not.

Kostis



More information about the erlang-questions mailing list