From ac01255d3ab889ca05c192f4dcea52408ff078be Mon Sep 17 00:00:00 2001 From: radrow Date: Tue, 12 Apr 2022 14:21:28 +0200 Subject: [PATCH] Fix test, changelog --- CHANGELOG.md | 1 + src/aeso_code_errors.erl | 1 - src/aeso_compiler.erl | 5 +++-- test/aeso_aci_tests.erl | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13a2b52..925053c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Error messages have been restructured (less newlines) to provide more unified errors. Also `pp_oneline/1` has been added. ### Removed +- Support for AEVM has been entirely wiped ## [6.1.0] - 2021-10-20 ### Added diff --git a/src/aeso_code_errors.erl b/src/aeso_code_errors.erl index 81a5fa9..ca8c692 100644 --- a/src/aeso_code_errors.erl +++ b/src/aeso_code_errors.erl @@ -41,7 +41,6 @@ format({invalid_entrypoint, Why, Ann, {id, _, Name}, Thing}) -> Msg = io_lib:format("The ~sof entrypoint '~s' ~s.", [ThingS, Name, Bad]), case Why of - polymorphic -> mk_err(pos(Ann), Msg, "Use the FATE backend if you want polymorphic entrypoints.\n"); higher_order -> mk_err(pos(Ann), Msg) end; format({invalid_aens_resolve_type, Ann, T}) -> diff --git a/src/aeso_compiler.erl b/src/aeso_compiler.erl index d86ab65..9d1905c 100644 --- a/src/aeso_compiler.erl +++ b/src/aeso_compiler.erl @@ -252,8 +252,9 @@ to_sophia_value(ContractString, Fun, ResType, Data) -> to_sophia_value(_, _, error, Err, _Options) -> {ok, {app, [], {id, [], "error"}, [{string, [], Err}]}}; to_sophia_value(_, _, revert, Data, _Options) -> - try aeb_fate_encoding:deserialize(Data) of - Err -> {ok, {app, [], {id, [], "abort"}, [{string, [], Err}]}} + try aeso_vm_decode:from_fate({id, [], "string"}, aeb_fate_encoding:deserialize(Data)) of + Err -> + {ok, {app, [], {id, [], "abort"}, [Err]}} catch _:_ -> Msg = "Could not deserialize the revert message", {error, [aeso_errors:new(data_error, Msg)]} diff --git a/test/aeso_aci_tests.erl b/test/aeso_aci_tests.erl index fe71638..43ac0c3 100644 --- a/test/aeso_aci_tests.erl +++ b/test/aeso_aci_tests.erl @@ -108,7 +108,7 @@ aci_test_contract(Name) -> {error, ErrorStringJ} when is_binary(ErrorStringJ) -> error(ErrorStringJ); {error, ErrorJ} -> aeso_compiler_tests:print_and_throw(ErrorJ) end, - case aeso_compiler:from_string(String, [{aci, json}, {backend, fate} | Opts]) of + case aeso_compiler:from_string(String, [{aci, json} | Opts]) of {ok, #{aci := JSON1}} -> ?assertEqual(JSON, JSON1), io:format("JSON:\n~p\n", [JSON]),