ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 121 forks source link

Support for parametrized modules #297

Open brigadier opened 11 years ago

brigadier commented 11 years ago

This feature was deprecated and does not exist in newer versions of Erlang anymore, but lots of libraries still use pmodules via special parse transform. At the moment the plugin shows module:new(...) as unresolved function.

andrzejsliwa commented 11 years ago

@brigadier @ignatov from version R16 parametrized modules are available as parse_transform:

https://github.com/erlang/pmod_transform

so I would rather concentrate on handling correctly parse transforms... the problem is that in emacs warnings are based on flymake output, so if parse_transform is defined everything is ok, when is missing as dependency then you have marked as error (same for syntax errors)

just few examples of using erlang-flymake (I using BLUE for warnings and ORANGE for errors, last line is just warning or error text... based on cursor position):

screen shot 2013-09-13 at 9 05 54 pm screen shot 2013-09-13 at 9 06 04 pm screen shot 2013-09-13 at 9 06 14 pm

in my emacs configuration I have added handling deps: https://github.com/andrzejsliwa/prelude/blob/master/personal/modules/personal-erlang.el#L47-99

to have same effect we should use same way of checking based on real output from compiler. to be honest I prefer this method because is less complicated, and much more accurate than syntax analyses made by IDE.