Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use packages in Erlang?

Recently I found out about such thing as packages in Erlang language. The problem is I cannot compile module with package declaration. File main.erl with code represented below is located in directory /home/my_user/erl/update/src just like said in manual, but all my attempts to compile it failed. I use 18.0 version of erlang.

-module(update.src.main).
-author("legacy").

-export([start/0]).

start()->
  ok.

This is the result I got each time from erlang compiler:

5> c(main).
main.erl:9: syntax error before: '.'
main.erl:10: no module definition
error

Moreover, IntelliJ IDEA plugin for erlang language, which I use, reports an error in the string with module declaration and says that module update should be declared in file update.erl. I've tried to find something about problems with package usage, but all I've got was this question. So, haven't the packages in erlang been implemented yet or I missed something during compiling?

like image 451
legacy Avatar asked Nov 20 '25 14:11

legacy


1 Answers

http://www.erlang.org/news/35

The board decided to remove the unsupported 'packages' support from the product in R16.

For more details see also Why aren't erlang packages used?

like image 91
Hynek -Pichi- Vychodil Avatar answered Nov 22 '25 03:11

Hynek -Pichi- Vychodil