Reputation: 1836
It's been a while since I've done any Erlang and I wanted to get back into it and use rebar
to do it. I have a simple module-test combo that I've verified compiles okay, but when I try and compile it through rebar, nothing happens:
PS C:\Users\Magnus\Programming\binlog_parser_demo> rebar co -vv
DEBUG: Consult config file "c:/Users/Magnus/Programming/binlog_parser_demo/rebar.config"
DEBUG: Rebar location: "c:/Users/Magnus/Programming/rebar/rebar"
DEBUG: is_rel_dir(C:/Users/Magnus/Programming/binlog_parser_demo) -> false
DEBUG: Available deps: []
DEBUG: Missing deps : []
DEBUG: Plugins requested while processing C:/Users/Magnus/Programming/binlog_parser_demo: []
DEBUG: Predirs: []
==> binlog_parser_demo (compile)
DEBUG: Matched required ERTS version: 7.0 -> .*
DEBUG: Matched required OTP release: 18 -> .*
DEBUG: Min OTP version unconfigured
DEBUG: Postdirs: []
PS C:\Users\Magnus\Programming\binlog_parser_demo> ls -r
Directory: C:\Users\Magnus\Programming\binlog_parser_demo
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 3/9 15:42 src
d---- 3/9 14:42 test
Directory: C:\Users\Magnus\Programming\binlog_parser_demo\src
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 3/9 14:43 2293 binlog_parser_demo.erl
Directory: C:\Users\Magnus\Programming\binlog_parser_demo\test
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 3/9 14:51 2662 binlog_parser_demo_tests.erl
What am I doing wrong? The file structure is what I got when I ran the template rebar create template=simplemod modid=binlog_parser_demo
(and replaced the generated files with my old prewritten ones). I've verified that erlc
is in the path and available and that erlc
can compile the files okay when run independently.
Upvotes: 2
Views: 838
Reputation: 20004
You need to add a .app.src
file to your src
directory to define your application. The contents might look something like the following, but you'll need to adjust it to make it work properly for your case.
{application, binlog_parser, [
{description, "Binlog Parser"},
{vsn, "0.1"},
{registered, []},
{applications, [kernel, stdlib]}
]}.
See the rebar "Getting Started" docs for more information.
Upvotes: 2