From 9dd41ba554c9ddc616e2ce02c0cf8daa36b12266 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sun, 20 Jan 2019 11:13:03 -0800 Subject: [PATCH] remove offending assert, disable assembly-info for dotnet core Signed-off-by: Nikolaj Bjorner --- scripts/mk_project.py | 2 +- scripts/mk_util.py | 32 ++++++++++++++++++-------------- src/opt/opt_context.cpp | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/mk_project.py b/scripts/mk_project.py index 58d087f32..2748e30a1 100644 --- a/scripts/mk_project.py +++ b/scripts/mk_project.py @@ -87,7 +87,7 @@ def init_project_def(): export_files=API_files, staging_link='python') add_dot_net_dll('dotnet', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', assembly_info_dir='Properties', default_key_file='src/api/dotnet/Microsoft.Z3.snk') - add_dot_net_core_dll('dotnetcore', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', assembly_info_dir='Properties', default_key_file='src/api/dotnet/Microsoft.Z3.snk') + add_dot_net_core_dll('dotnetcore', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', default_key_file='src/api/dotnet/Microsoft.Z3.snk') add_java_dll('java', ['api_dll'], 'api/java', dll_name='libz3java', package_name="com.microsoft.z3", manifest_file='manifest') add_ml_lib('ml', ['api_dll'], 'api/ml', lib_name='libz3ml') add_hlib('cpp', 'api/c++', includes2install=['z3++.h']) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 6552a942f..2e827a7f3 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -1774,6 +1774,22 @@ class DotNetDLLComponent(Component): def has_assembly_info(self): return True + def make_assembly_info(c, major, minor, build, revision): + assembly_info_template = os.path.join(c.src_dir, c.assembly_info_dir, 'AssemblyInfo.cs.in') + assembly_info_output = assembly_info_template[:-3] + assert assembly_info_output.endswith('.cs') + if os.path.exists(assembly_info_template): + configure_file(assembly_info_template, assembly_info_output, + { 'VER_MAJOR': str(major), + 'VER_MINOR': str(minor), + 'VER_BUILD': str(build), + 'VER_REVISION': str(revision), + } + ) + else: + raise MKException("Failed to find assembly template info file '%s'" % assembly_info_template) + + def mk_win_dist(self, build_path, dist_path): if is_dotnet_enabled(): mk_dir(os.path.join(dist_path, INSTALL_BIN_DIR)) @@ -2004,7 +2020,7 @@ class DotNetCoreDLLComponent(Component): def has_assembly_info(self): # TBD: is this required for dotnet core given that version numbers are in z3.csproj file? - return True + return False def mk_win_dist(self, build_path, dist_path): @@ -3093,19 +3109,7 @@ def mk_version_dot_h(major, minor, build, revision): def mk_all_assembly_infos(major, minor, build, revision): for c in get_components(): if c.has_assembly_info(): - assembly_info_template = os.path.join(c.src_dir, c.assembly_info_dir, 'AssemblyInfo.cs.in') - assembly_info_output = assembly_info_template[:-3] - assert assembly_info_output.endswith('.cs') - if os.path.exists(assembly_info_template): - configure_file(assembly_info_template, assembly_info_output, - { 'VER_MAJOR': str(major), - 'VER_MINOR': str(minor), - 'VER_BUILD': str(build), - 'VER_REVISION': str(revision), - } - ) - else: - raise MKException("Failed to find assembly template info file '%s'" % assembly_info_template) + c.make_assembly_info(major, minor, build, revision) def get_header_files_for_components(component_src_dirs): assert isinstance(component_src_dirs, list) diff --git a/src/opt/opt_context.cpp b/src/opt/opt_context.cpp index 2d406e0b4..98884d311 100644 --- a/src/opt/opt_context.cpp +++ b/src/opt/opt_context.cpp @@ -1614,7 +1614,7 @@ namespace opt { value = obj.m_adjust_value(value); rational value0 = ms.get_lower(); TRACE("opt", tout << "value " << value << " " << value0 << "\n";); - SASSERT(value == value0); + // TBD is this correct? SASSERT(value == value0); } } }