From 8797ff6d9b6357acfcb6c1e78e53a661a4ee1c25 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Tue, 9 Dec 2014 14:41:30 -0800 Subject: [PATCH] disable maps on R14, R15 and R16 --- config/maps | 1 - rebar.config | 6 ++---- rebar.config.script | 9 --------- 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 config/maps delete mode 100644 rebar.config.script diff --git a/config/maps b/config/maps deleted file mode 100644 index 8aa3993..0000000 --- a/config/maps +++ /dev/null @@ -1 +0,0 @@ -maps:keys(#{0 => false, 1 => true}) == [0,1]. \ No newline at end of file diff --git a/rebar.config b/rebar.config index 35ddaa6..b2653a2 100644 --- a/rebar.config +++ b/rebar.config @@ -1,6 +1,4 @@ -% uncomment to disable encoding support for erlang maps -% {jsx_nomaps, true}. - {erl_opts, [ - {platform_define, "R14|R15", 'no_binary_to_whatever'} + {platform_define, "R14|R15", 'no_binary_to_whatever'}, + {platform_define, "^((?!R1[456]).)*$", 'maps_support'} ]}. \ No newline at end of file diff --git a/rebar.config.script b/rebar.config.script deleted file mode 100644 index c5d8d92..0000000 --- a/rebar.config.script +++ /dev/null @@ -1,9 +0,0 @@ -case os:getenv("JSX_NOMAPS") or proplists:get_value(jsx_nomaps, CONFIG, false) of - false -> - try file:script("config/maps") of - {ok, true} -> [{erl_opts, [{d, maps_support}]}] ++ CONFIG; - _ -> CONFIG - catch _:_ -> CONFIG - end; - _ -> CONFIG -end. \ No newline at end of file