2

I have installed Erlang plugin in IntelliJ in Windows 10 as explained on the Jetbrain site.

I am looking for typical Code browsing features such as finding Call hierarchy, finding references, and generating call flow diagrams. I see many of these features are not working in IntelliJ as listed below. What could be the reason? Are there any alternatives preferably within IntelliJ for overcoming these issues?

  1. Navigate-->CallHiearchy-->CallerMethodHiearchy shows empty list. Whereas, Navigate-->CallHiearchy-->CalleeMethodHiearchy lists the data.
  2. "Navigate-->Declaration or usages" shows empty list. It throws a message "No usages found in Project Files", "No usages found in Project and Libraries".
  3. Code-->AnalyseCode-->Dependencies shows an empty page.
Bhuvan
  • 370
  • 9

1 Answers1

0

My advice: just forget about it. There never were good code completion plugins for Erlang and probably would never be because the language community is pretty much dead. Also it's very hard to make a good completion plugin considering dynamic nature of Erlang. Don't expect quality level of Java or C++ or Swift code completion.

Hardcore Erlang geeks were focused on Emacs support only when Erlang used to be popular. So if Emacs is not your thing (and I would never recommend learning both new programming language and Emacs at the same time) you'd better learn to code Erlang without code completion at all. Seriously.

Surprisingly the best experience I had was using Eclipse with Erlide plugin developed by Vlad Dumitrescu. See erlide - Erlang IDE. Eclipse was already dead and taken over by IntelliJ Idea like 10 years ago (don't expect pretty modern UX/UI) but surprisingly its Erlang plugin was the best. And I bet it still is!

You can even configure Erlang's type checker module called Dializer and bind it to a hotkey so that Erlide will "compile" (analyze) your code when you hit "build" hotkey and underline all "build" errors with a fancy red line!

https://erlide.org/

https://github.com/erlang/erlide_eclipse

Nik
  • 9,063
  • 7
  • 66
  • 81
  • Thanks Nik. I tried erlIde with OTP 25.0 and could not open the .erl files. The plugin author himself has responded to this issue in another discussion thread https://stackoverflow.com/questions/73923748/unable-to-open-erl-file-using-erlang-editor-in-eclipse. I moved to IntelliJ because of this issue. – Bhuvan Dec 12 '22 at 06:39
  • Ah, that's really sad... – Nik Dec 12 '22 at 15:42
  • Hi Nik, You said "..when Erlang used to be popular", "language community is pretty much dead". Why do you think so? While exploring a suitable language for developing massively scalable real-time applications, I have come across Erlang. Also, I see many success stories using Erlang. Do you suggest any other language for developing such an application? – Bhuvan Dec 12 '22 at 15:54
  • 1
    @Bhuvan peak of Erlang popularity during web 2.0 boom was during early 2010s You can still use it for sure and you can build scalable apps using Erlang. The ideas of OTP platform and the language itself are brilliant. But you won't find much modern day information on how to do things, won't have modern libraries, code recipes and so on. If you **need** to have other people (virtually) hanging around — try Elixir. I haven't used it myself because I'm more fan of pure Erlang — why add another layer on top of OTP? But I guess Elixir community has much more to offer to an aspiring developer. – Nik Dec 12 '22 at 16:21
  • 1
    @Bhuvan for example, I see many companies hiring Elixir developers, but I doubt anybody starts new projects in Erlang itself these days. Even if you find Erlang job it's gonna be a bugfix type of work with 10 years old legacy code. Another point, even though Erlang was meant to be used for scalable projects like websites and mmorpg, due to its elitistic reputation, lack of cheap workforce companies didn't use it in production back in the days. There are like 10 famous Erlang projects, some of them replaced Erlang with C++ eventually. And there are thousands and millions Java and C++ projects. – Nik Dec 12 '22 at 16:32
  • Thanks @Nik for the detailed clarification. I see Erlang syntax is cryptic compared to C/C++/Java. The learning curve is steep. But, Erlang features are meant to develop massively scalable, fault-tolerant applications. Whereas, multithreading in C/C++/Java is error-prone. I do not know how easy Elixir is to learn. Any thought? – Bhuvan Dec 13 '22 at 11:22
  • @Bhuvan Erlang is compiled to BEAM virtual machine code. Elixir is a third-party language that is compiled to BEAM virtual machine code too (i.e. Erlang virtual machine code). So in my opinion Elixir is an attempt to get some hype on Ruby-style syntax which was popular back in the days and build community around Erlang and OTP platform by doing a facelift and making better tooling and docs. Either way you can make same apps because you still program Erlang VM underneath and still using OTP patterns. Elixir promises to give you better tools, docs, libraries, more conferences, meetings, etc. – Nik Dec 14 '22 at 13:44
  • @Bhuvan I personally find Erlang much simpler and easier to use and I don't have any problems with its syntax because it is really simple. But it looks like today Elixir is much more popular and Erlang train is gone :) – Nik Dec 14 '22 at 13:45
  • Thanks @Nik for the clarification. Erlang provides ct_netconfc & ct_snmp module for the networking protocols Netconf & SNMP. I see one can develop a Netconf/SNMP client application by extracting the protocol aspect and by removing common_test aspect from these modules. I am not sure whether Elixir provides such modules. – Bhuvan Dec 15 '22 at 17:10