Skip to content

Commit fb2a5fd

Browse files
robertoaloimeta-codesync[bot]
authored andcommitted
Require OTP 27 as minimum version
Summary: The `assert` documentation claimed OTP 26 to be the minimum required version. This is not true, since the library uses several features not available in that version: * Zip generators (OTP 28) * Sigils (OTP 27) * Triple quoted strings (OTP 27) Restoring OTP 26 support (2023) is impractical, but requiring OTP 28 is also unnecessary. So removing the only usages of zip generators and specifying OTP 27 as the minimum required version. CI is already running on OTP 27. Reviewed By: TD5 Differential Revision: D107631858 fbshipit-source-id: 5154b18f9b9da093aae0e62d8e25807b3ac692e5
1 parent 05cc67c commit fb2a5fd

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ To add `assert` to your rebar3 project, simply add it to the `deps` in your `reb
147147

148148
## Requirements
149149

150-
`assert` requires Erlang/OTP 26.
150+
`assert` requires Erlang/OTP 27.
151151

152152
## License
153153
`assert` is Apache 2.0 licensed, as found in the [LICENSE](LICENSE.md) file.

rebar.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{diffy, "1.1.2"}
1313
]}.
1414

15-
{minimum_otp_vsn, "26"}.
15+
{minimum_otp_vsn, "27"}.
1616

1717
{erlfmt, [
1818
write,
@@ -52,6 +52,6 @@
5252
{hex, [{doc, ex_doc}]}.
5353

5454
{ex_doc, [
55-
{extras, [~"README.md", ~"LICENSE.md"]},
56-
{main, ~"README.md"}
55+
{extras, [<<"README.md">>, <<"LICENSE.md">>]},
56+
{main, <<"README.md">>}
5757
]}.

src/wa_diff.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ expand_tuple([Name | Values], #{records := Records} = _Context) when is_atom(Nam
308308
not_found ->
309309
not_found;
310310
Fields ->
311-
{Name, #{K => V || K <:- Fields && V <:- Values}}
311+
{Name, maps:from_list(lists:zip(Fields, Values))}
312312
end;
313313
expand_tuple(_, _) ->
314314
not_found.
@@ -356,7 +356,7 @@ safe_to_algebra(#{contents := Contents}, DiffWrapper) ->
356356
({true, Content}) ->
357357
DiffWrapper(Content)
358358
end,
359-
erlfmt_algebra:concat([Fun(Elem) || Elem <:- Contents]);
359+
erlfmt_algebra:concat([Fun(Elem) || Elem <- Contents]);
360360
safe_to_algebra(Literal, _DiffWrapper) ->
361361
erlfmt_algebra:string(inspect(Literal)).
362362

0 commit comments

Comments
 (0)