intellij-erlang
intellij-erlang copied to clipboard
custom behaviours are unresolved
Custom behaviour declarations such as
-behaviour(gen_my_behaviour).
show warning as unresolved, though file with the behaviour exists. Erlang compiles the project with no warnings at all.
Thanks for reporting, could you please provide a small project for reproducing?
gen_testgen
and gen_testgen_impl
in https://github.com/brigadier/testgen
Erlang 19.0.2 Pycharm 2016.2
Can't reproduce
@brigadier Amy news? I can't reproduce the issue.
Always reproducible on my laptop, Erlang 19.1.6 (and other versions too), Pycharm 2016.2, plugin v.0.8.913 OTP is installed by kerl in /home/username/Apps/erlang/19.1.6 linux x64 gentoo
Do you need any other info about the box and settings?
Do you need any other info about the box and settings?
No, thanks, but will check it in PyCharm.
I can reproduce the issue as well in IntelliJ
Any update on a fix for this issue? It's a bit annoying to look at the error in intellij :)
@brigadier setting sources
in project settings
Happens to me from time to time. It would be great if the IDE (knowing that the file exists in the project) could inform me what can be done about it.
@kvakvs Do you have a stable repro?
Can reproduce if the Rebar app has multiple apps, apps/app1
and apps/app2
directories and the behaviour is defined in an another app.
https://imgur.com/T41W1qC.png
The error is "Unresolved behaviour"
@kvakvs Please share a sample project.
This bug occurs whenever the behaviour is in a location not marked as Sources
i.e;
- In a dep
- In another app within your release's umbrella
To fix this, you need to mark the containing folder as Sources
in the Project Structure
Window.
Happening on IntelliJ IDEA 2019.3.1 & IntelliJ-Erlang 0.11.1053
This happened to me because I didn't correctly use -callback
.
I was trying this pattern, which raised the error:
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{get_happy, 0}, {get_ecstatic, 0}];
behavior_info(_) ->
undefined.