From d9f0f95bf7294cc156692a7b208670fd47d90005 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Tue, 25 Feb 2025 16:08:31 +0900 Subject: [PATCH] Verup, new stdlib dir discovery --- CHANGELOG.md | 6 ++++++ rebar.config | 2 +- src/so_aci.erl | 1 + src/so_ast.erl | 1 + src/so_ast_infer_types.erl | 1 + src/so_ast_to_fcode.erl | 1 + src/so_compiler.erl | 1 + src/so_errors.erl | 1 + src/so_fcode_to_fate.erl | 1 + src/so_parse_lib.erl | 1 + src/so_parser.erl | 1 + src/so_pretty.erl | 1 + src/so_scan.erl | 1 + src/so_scan_lib.erl | 1 + src/so_stdlib.erl | 4 +++- src/so_syntax.erl | 1 + src/so_syntax_utils.erl | 1 + src/so_utils.erl | 1 + src/so_vm_decode.erl | 1 + src/so_warnings.erl | 1 + src/sophia.app.src | 2 +- zomp.meta | 2 +- 22 files changed, 29 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e35c60..2f0a00e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed ### Removed +## [9.0.0] +### Changed +- stdlib dir discovery now works by finding a relative path from the loaded Sophia installation +###Removed +- Oracles + ## [8.0.1] ### Changed - Upgrade aebytecode to v3.4.1 to fix C warnings diff --git a/rebar.config b/rebar.config index e2d02d9..58f1a97 100644 --- a/rebar.config +++ b/rebar.config @@ -15,7 +15,7 @@ {base_plt_apps, [erts, kernel, stdlib, crypto, mnesia]} ]}. -{relx, [{release, {sophia, "8.0.1"}, +{relx, [{release, {sophia, "9.0.0"}, [sophia, gmbytecode]}, {dev_mode, true}, diff --git a/src/so_aci.erl b/src/so_aci.erl index 2416f14..d543db9 100644 --- a/src/so_aci.erl +++ b/src/so_aci.erl @@ -8,6 +8,7 @@ %%%------------------------------------------------------------------- -module(so_aci). +-vsn("9.0.0"). -export([ file/2 , file/3 diff --git a/src/so_ast.erl b/src/so_ast.erl index 7250d7d..8954042 100644 --- a/src/so_ast.erl +++ b/src/so_ast.erl @@ -1,4 +1,5 @@ -module(so_ast). +-vsn("9.0.0"). -export([int/2, line/1, diff --git a/src/so_ast_infer_types.erl b/src/so_ast_infer_types.erl index 83ca108..d8e982b 100644 --- a/src/so_ast_infer_types.erl +++ b/src/so_ast_infer_types.erl @@ -12,6 +12,7 @@ %%% instances of the compiler to be run in parallel. -module(so_ast_infer_types). +-vsn("9.0.0"). -export([ infer/1 , infer/2 diff --git a/src/so_ast_to_fcode.erl b/src/so_ast_to_fcode.erl index a566a85..a90fb35 100644 --- a/src/so_ast_to_fcode.erl +++ b/src/so_ast_to_fcode.erl @@ -7,6 +7,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_ast_to_fcode). +-vsn("9.0.0"). -export([ast_to_fcode/2, format_fexpr/1]). -export_type([fcode/0, fexpr/0, fun_def/0]). diff --git a/src/so_compiler.erl b/src/so_compiler.erl index fc841b6..921b925 100644 --- a/src/so_compiler.erl +++ b/src/so_compiler.erl @@ -7,6 +7,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_compiler). +-vsn("9.0.0"). -export([ file/1 , file/2 diff --git a/src/so_errors.erl b/src/so_errors.erl index 94f5659..3709f70 100644 --- a/src/so_errors.erl +++ b/src/so_errors.erl @@ -7,6 +7,7 @@ %%%------------------------------------------------------------------- -module(so_errors). +-vsn("9.0.0"). -type src_file() :: no_file | iolist(). diff --git a/src/so_fcode_to_fate.erl b/src/so_fcode_to_fate.erl index a609214..43dfe10 100644 --- a/src/so_fcode_to_fate.erl +++ b/src/so_fcode_to_fate.erl @@ -7,6 +7,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_fcode_to_fate). +-vsn("9.0.0"). -export([compile/3, compile/4, term_to_fate/1, term_to_fate/2]). diff --git a/src/so_parse_lib.erl b/src/so_parse_lib.erl index 74429bf..a338a0d 100644 --- a/src/so_parse_lib.erl +++ b/src/so_parse_lib.erl @@ -8,6 +8,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_parse_lib). +-vsn("9.0.0"). -export([parse/2, return/1, fail/0, fail/1, fail/2, map/2, bind/2, diff --git a/src/so_parser.erl b/src/so_parser.erl index 8859f18..017cee9 100644 --- a/src/so_parser.erl +++ b/src/so_parser.erl @@ -3,6 +3,7 @@ %%% Description : %%% Created : 1 Mar 2018 by Ulf Norell -module(so_parser). +-vsn("9.0.0"). -compile({no_auto_import,[map_get/2]}). -export([string/1, diff --git a/src/so_pretty.erl b/src/so_pretty.erl index d9c5103..16a34a9 100644 --- a/src/so_pretty.erl +++ b/src/so_pretty.erl @@ -7,6 +7,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_pretty). +-vsn("9.0.0"). -import(prettypr, [text/1, sep/1, above/2, beside/2, nest/2, empty/0]). diff --git a/src/so_scan.erl b/src/so_scan.erl index 2f3ad41..9e032bd 100644 --- a/src/so_scan.erl +++ b/src/so_scan.erl @@ -7,6 +7,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_scan). +-vsn("9.0.0"). -export([scan/1, utf8_encode/1]). diff --git a/src/so_scan_lib.erl b/src/so_scan_lib.erl index 5a2236c..9a5485c 100644 --- a/src/so_scan_lib.erl +++ b/src/so_scan_lib.erl @@ -6,6 +6,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_scan_lib). +-vsn("9.0.0"). -export([compile/1, string/3, token/1, token/2, symbol/0, skip/0, diff --git a/src/so_stdlib.erl b/src/so_stdlib.erl index f01b5ba..b037009 100644 --- a/src/so_stdlib.erl +++ b/src/so_stdlib.erl @@ -8,9 +8,11 @@ %%%------------------------------------------------------------------- -module(so_stdlib). +-vsn("9.0.0"). -export([stdlib_include_path/0]). stdlib_include_path() -> - filename:join([code:priv_dir(sophia), "stdlib"]). + {file, BEAM} = code:is_loaded(?MODULE), + filename:join(filename:dirname(filename:dirname(BEAM)), "priv/stdlib"). diff --git a/src/so_syntax.erl b/src/so_syntax.erl index cd2e149..27c3ff7 100644 --- a/src/so_syntax.erl +++ b/src/so_syntax.erl @@ -8,6 +8,7 @@ %%%------------------------------------------------------------------- -module(so_syntax). +-vsn("9.0.0"). -export([get_ann/1, get_ann/2, get_ann/3, set_ann/2, qualify/2]). diff --git a/src/so_syntax_utils.erl b/src/so_syntax_utils.erl index be6d851..6316c31 100644 --- a/src/so_syntax_utils.erl +++ b/src/so_syntax_utils.erl @@ -6,6 +6,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_syntax_utils). +-vsn("9.0.0"). -export([used_ids/1, used_ids/2, used_types/2, used/1]). diff --git a/src/so_utils.erl b/src/so_utils.erl index 4cf1a8d..8b2e5c5 100644 --- a/src/so_utils.erl +++ b/src/so_utils.erl @@ -6,6 +6,7 @@ %%% @end %%%------------------------------------------------------------------- -module(so_utils). +-vsn("9.0.0"). -export([scc/1, canonical_dir/1]). diff --git a/src/so_vm_decode.erl b/src/so_vm_decode.erl index bc4daeb..f5ac61b 100644 --- a/src/so_vm_decode.erl +++ b/src/so_vm_decode.erl @@ -6,6 +6,7 @@ %%%------------------------------------------------------------------- -module(so_vm_decode). +-vsn("9.0.0"). -export([ from_fate/2 ]). diff --git a/src/so_warnings.erl b/src/so_warnings.erl index 2d8460b..8e768c3 100644 --- a/src/so_warnings.erl +++ b/src/so_warnings.erl @@ -1,4 +1,5 @@ -module(so_warnings). +-vsn("9.0.0"). -record(warn, { pos :: so_errors:pos() , message :: iolist() diff --git a/src/sophia.app.src b/src/sophia.app.src index 5501b51..bd9b989 100644 --- a/src/sophia.app.src +++ b/src/sophia.app.src @@ -1,6 +1,6 @@ {application, sophia, [{description, "Compiler for Sophia language"}, - {vsn, "8.0.1"}, + {vsn, "9.0.0"}, {registered, []}, {applications, [kernel, diff --git a/zomp.meta b/zomp.meta index 8221f79..edd5aeb 100644 --- a/zomp.meta +++ b/zomp.meta @@ -4,7 +4,7 @@ {prefix,none}. {desc,"The Sophia smart contract language for the FATE VM"}. {author,"QPQ AG"}. -{package_id,{"otpr","sophia",{8,0,1}}}. +{package_id,{"otpr","sophia",{9,0,0}}}. {deps,[{"otpr","gmbytecode",{3,4,1}}, {"otpr","getopt",{1,0,2}}, {"otpr","eblake2",{1,0,0}},