Syntax error rebar3 compile
Closed this issue · 2 comments
monkeyfdude commented
Please help me with issue.
I changed rebar.config for min OTP version 18
Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-64-generic x86_64)
{minimum_otp_vsn, "18"}.
./rebar3 compile
===> Package base64url-0.0.1 not found. Fetching registry updates and trying again...
===> Updating package registry...
===> Writing registry to /home/ubuntu/.cache/rebar3/hex/default/registry
===> Generating package index...
===> Writing index to /home/ubuntu/.cache/rebar3/hex/default/packages.idx
===> Verifying dependencies...
===> Fetching base64url ({pkg,<<"base64url">>,<<"0.0.1">>})
===> Downloaded package, caching at /home/ubuntu/.cache/rebar3/hex/default/packages/base64url-0.0.1.tar
===> Fetching gun ({git,"https://github.com/ninenines/gun.git",
{ref,"bc733a2ca5f7d07f997ad6edf184f775b23434aa"}})
===> Fetching jsx ({pkg,<<"jsx">>,<<"2.8.1">>})
===> Downloaded package, caching at /home/ubuntu/.cache/rebar3/hex/default/packages/jsx-2.8.1.tar
===> Fetching cowlib ({git,"https://github.com/ninenines/cowlib",
{ref,
"07cde7c6def6eeed0174b270229e7d5175673d87"}})
===> Fetching ranch ({git,"https://github.com/ninenines/ranch",
{ref,"a004ad710eddd0c21aaccc30d5633a76b06164b5"}})
===> Compiling cowlib
===> Compiling base64url
===> Compiling ranch
===> Compiling gun
===> Compiling jsx
===> Compiling apns
===> Compiling src/apns_connection.erl failed
src/apns_connection.erl:63: syntax error before: ':='
src/apns_connection.erl:71: syntax error before: ':='
src/apns_connection.erl:245: type state() undefined
src/apns_connection.erl:289: type connection() undefined
elbrujohalcon commented
@monkeyfdude you can't just change min version to 18… you also have to adapt the code to compile on 18. That means, for starters, changing those :=
the compiler warns you about to =>
:
src/apns_connection.erl:63: syntax error before: ':='
src/apns_connection.erl:71: syntax error before: ':='
monkeyfdude commented
After doing changes, I get
./rebar3 compile
===> Verifying dependencies...
===> Compiling apns
I assume it built successfully.