From 7e78c133c7a373384411d9fd0e1366b14e4c31d8 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 1 Nov 2017 15:40:09 -0400 Subject: Support OTP-20 Unicode functions Use either optional compilation or version-safe variants of the string functions. Prevents warnings when the switch to OTP-21 will happen. --- rebar.config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rebar.config') diff --git a/rebar.config b/rebar.config index 762d6df..6686664 100644 --- a/rebar.config +++ b/rebar.config @@ -18,6 +18,7 @@ {platform_define, "^1[8|9]", rand_module}, {platform_define, "^2", rand_module}, warnings_as_errors, + {platform_define, "^2", unicode_str}, inline]}. %% Use OTP 18+ when dialyzing relx @@ -53,6 +54,7 @@ {erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, {platform_define, "^R1[4|5]", deprecated_crypto}, {platform_define, "^((1[8|9])|2)", rand_module}, + {platform_define, "^2", unicode_str}, no_debug_info, warnings_as_errors ]}, @@ -61,7 +63,8 @@ {override, bbmustache, [ {erl_opts, [no_debug_info]}, {deps, []}, {plugins, []}]}, - {override, getopt, [{erl_opts, [no_debug_info]}]}, + {override, getopt, [{erl_opts, [no_debug_info, + {platform_define, "^2", unicode_str}]}]}, {override, providers, [{erl_opts, [no_debug_info]}]} ]}. -- cgit v1.2.3