garret-smith / aeon

Another Erlang to Object Notation translator
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

Error: undefined parse transform 'runtime_types' #2

Closed aseidlitz closed 7 years ago

aseidlitz commented 7 years ago

I am trying to compile the test provided in README and getting "undefined parse transform 'runtime_types'" compile time error. What am I missing?

-module(aeon_test).
-compile({parse_transform, runtime_types}).
-compile({parse_transform, exprecs}).
-type privilege() :: login | create | delete | grant.

-record(user, {
          name :: binary(),
          age :: integer(),
          height :: float(),
          birthday :: {Year :: integer(),
                       Month :: integer(),
                       Day :: integer()},
          privileges :: [privilege()]
         }).

-export_type([privilege/0]).
-export_records([user]).

User = #user{
          name = <<"Garret Smith">>,
          age = 34,
          height = 6.0,
          birthday = {1982, 06, 29},
          privileges = [login, create, delete, grant]
         },
Json = jsx:encode(aeon:record_to_jsx(User, test)),
io:fwrite("~s~n", [Json]),

User1 = aeon:to_record(jsx:decode(Json), test, user).
aseidlitz commented 7 years ago

Never mind, I forgot to update the dependencies!