[erlang-questions] Emacs + Flycheck + rebar3 + proper

Frans Schneider fchschneider@REDACTED
Mon Nov 26 20:14:55 CET 2018



On 11/26/18 7:29 PM, Kostis Sagonas wrote:
> On 11/26/2018 10:18 AM, Frans Schneider wrote:
>> Hi all,
>>
>> In emacs while editing PropEr tests, flycheck complains about not 
>> being able to find "proper/include/proper.hrl" which is obvious since 
>> that lib is somewhere sitting in the _build directory and not defined 
>> in ERL_LIBS.
>> How do you guys configure emacs in a situation like this?
>> PropEr is part of the test profile in rebar3.
> 
> I have never used flycheck in emacs, and consequently I have no idea of 
> what is involved in its use, but why isn't ERL_LIBS set in your 
> environment?
> 
> One of the first things that PropEr's user guide specifies is to either 
> set ERL_LIBS or add PropEr’s base directory to your Erlang library path 
> by adding an appropriate code:load_abs/1 call to your ~/.erlang file 
> (see https://proper-testing.github.io/userguide.html).
> 
> Can it be that this will solve your problem?
> 

Rebar3 will fetch and install PropEr per project. I used to have PropEr 
installed and had ERL_LIBS point to that as you suggest, but ran into 
trouble as rebar3 would install a newer version under _build.


> Should this be something that rebar3 does automatically when it runs or 
> detects PropEr tests?
> 

Rebar3's as test path command already knows about PropEr and that might 
be useful somehow, but I have no idea how to do that.

> Hope this helps.
> Kostis
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list