From ac3c3f66d2004ef9b915f168cca02d15e1d8c360 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 21 Nov 2024 17:17:19 +0100 Subject: [PATCH 001/364] Initial commit, add base for NodeJS and constructor for MetaCall, still a lot of work to do. --- source/metacall/include/metacall/metacall.h | 6 +- source/metacall/source/metacall.c | 23 +++ source/portability/CMakeLists.txt | 5 +- .../include/portability/portability.h | 1 + ...ler_detection.h => portability_compiler.h} | 6 +- .../portability/portability_constructor.h | 79 ++++++++++ source/ports/node_port/CMakeLists.txt | 43 +++++- source/ports/node_port/index.js | 142 +++++++++++++----- 8 files changed, 253 insertions(+), 52 deletions(-) rename source/portability/include/portability/{portability_compiler_detection.h => portability_compiler.h} (99%) create mode 100644 source/portability/include/portability/portability_constructor.h diff --git a/source/metacall/include/metacall/metacall.h b/source/metacall/include/metacall/metacall.h index a1cea928fe..3e841fdcfa 100644 --- a/source/metacall/include/metacall/metacall.h +++ b/source/metacall/include/metacall/metacall.h @@ -58,10 +58,8 @@ struct metacall_initialize_configuration_type; struct metacall_initialize_configuration_type { - char *tag; - void *options; // TODO: We should use a MetaCall value MAP here and merge it with the configuration. - // By this way loaders will be able to access this information in the backend and we - // can use a weak API in order to implement this successfully + const char *tag; /* Tag referring to the loader */ + void *options; /* Value of type Map that will be merged merged into the configuration of the loader */ }; typedef void *(*metacall_await_callback)(void *, void *); diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 45ce6bf0fb..45b949c708 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -35,6 +35,8 @@ #include +#include + #include #include @@ -68,6 +70,27 @@ static int metacall_plugin_extension_load(void); static void *metacallv_method(void *target, const char *name, method_invoke_ptr call, vector v, void *args[], size_t size); static type_id *metacall_type_ids(void *args[], size_t size); +/* -- Costructors -- */ + +portability_constructor(metacall_constructor) +{ + const char *metacall_host = environment_variable_get("METACALL_HOST", NULL); + + if (metacall_host != NULL) + { + struct metacall_initialize_configuration_type config[] = { + { metacall_host, NULL /* TODO: Initialize the map and define { host: true } */ }, + { NULL, NULL } + }; + + if (metacall_initialize_ex(config) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall host constructor failed to initialize"); + exit(1); + } + } +} + /* -- Methods -- */ const char *metacall_serial(void) diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index 17d2b2159b..2841f3aaa7 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -35,16 +35,17 @@ set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") set(headers ${include_path}/portability.h ${include_path}/portability_assert.h - ${include_path}/portability_path.h + ${include_path}/portability_constructor.h ${include_path}/portability_executable_path.h ${include_path}/portability_library_path.h + ${include_path}/portability_path.h ) set(sources ${source_path}/portability.c - ${source_path}/portability_path.c ${source_path}/portability_executable_path.c ${source_path}/portability_library_path.c + ${source_path}/portability_path.c ) # Group source files diff --git a/source/portability/include/portability/portability.h b/source/portability/include/portability/portability.h index 6316fda482..75af3411bb 100644 --- a/source/portability/include/portability/portability.h +++ b/source/portability/include/portability/portability.h @@ -27,6 +27,7 @@ #include #include +#include #include #ifdef __cplusplus diff --git a/source/portability/include/portability/portability_compiler_detection.h b/source/portability/include/portability/portability_compiler.h similarity index 99% rename from source/portability/include/portability/portability_compiler_detection.h rename to source/portability/include/portability/portability_compiler.h index ec2e4eaaa3..871adf1811 100644 --- a/source/portability/include/portability/portability_compiler_detection.h +++ b/source/portability/include/portability/portability_compiler.h @@ -18,8 +18,8 @@ * */ -#ifndef PORTABILITY_COMPILER_DETECTION_H -#define PORTABILITY_COMPILER_DETECTION_H 1 +#ifndef PORTABILITY_COMPILER_H +#define PORTABILITY_COMPILER_H 1 /* TODO: This needs to be implemented properly, including another file for architecture and operative system detection */ @@ -490,4 +490,4 @@ // PORTABILITY_THREAD_LOCAL not defined for this configuration. #endif -#endif /* PORTABILITY_COMPILER_DETECTION_H */ +#endif /* PORTABILITY_COMPILER_H */ diff --git a/source/portability/include/portability/portability_constructor.h b/source/portability/include/portability/portability_constructor.h new file mode 100644 index 0000000000..9dc72a8389 --- /dev/null +++ b/source/portability/include/portability/portability_constructor.h @@ -0,0 +1,79 @@ +/* + * Portability Library by Parra Studios + * A generic cross-platform portability utility. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PORTABILITY_CONSTRUCTOR_H +#define PORTABILITY_CONSTRUCTOR_H 1 + +/* -- Headers -- */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Headers -- */ + +#include + +#include +#include + +/* -- Macros -- */ + +#ifndef portability_constructor + + #ifdef __cplusplus + #define portability_constructor(ctor) \ + static void ctor(void); \ + static struct PREPROCESSOR_CONCAT(ctor, _type) \ + { \ + PREPROCESSOR_CONCAT(ctor, _type) \ + (void) \ + { \ + ctor(); \ + } \ + } PREPROCESSOR_CONCAT(ctor, _ctor); \ + static void ctor(void) + #elif defined(_MSC_VER) + /* TODO: Test MSVC version in release mode */ + #pragma section(".CRT$XCU", read) + #define portability_constructor_impl(ctor, prefix) \ + static void ctor(void); \ + __declspec(allocate(".CRT$XCU")) void (*PREPROCESSOR_CONCAT(ctor, _ptr))(void) = ctor; \ + __pragma(comment(linker, "/include:" prefix PREPROCESSOR_STRINGIFY(ctor) "_ptr")) static void ctor(void) + #ifdef _WIN64 + #define portability_constructor(ctor) portability_constructor_impl(ctor, "") + #else + #define portability_constructor(ctor) portability_constructor_impl(ctor, "_") + #endif + #else + #define portability_constructor(ctor) \ + static void ctor(void) __attribute__((constructor)); \ + static void ctor(void) + #endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PORTABILITY_CONSTRUCTOR_H */ diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 2402d2a7f6..9cbb94fbcd 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -93,12 +93,6 @@ if(NOT OPTION_BUILD_CLI OR NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_ return() endif() -set(node_port_test "${target}_test") - -# -# Define test -# - if(OPTION_BUILD_THREAD_SANITIZER AND OPTION_BUILD_LOADERS_CS) # TODO: This test fails when run with thread sanitizer: # @@ -121,6 +115,14 @@ if(OPTION_BUILD_THREAD_SANITIZER AND OPTION_BUILD_LOADERS_CS) return() endif() +# +# Define test +# + +set(node_port_test "${target}_test") + +message(STATUS "Test ${node_port_test}") + add_test(NAME ${target} COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${CMAKE_CURRENT_SOURCE_DIR}/test/commands/node_port.txt" -P "${CMAKE_SOURCE_DIR}/source/cli/metacallcli/test/commands/command_runner.cmake" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -213,3 +215,32 @@ test_environment_variables(${target} ${TESTS_ENVIRONMENT_VARIABLES_RS} ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} ) + +# +# Test importing NodeJS Port from node.exe +# + +set(node_port_test_exec "${node_port_test}_executable") + +message(STATUS "Test ${node_port_test_exec}") + +add_test(NAME ${node_port_test_exec} + COMMAND ${NodeJS_EXECUTABLE} test/index.js + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +# Define test labels +set_property(TEST ${node_port_test_exec} + PROPERTY LABELS ${node_port_test_exec} +) + +# Environment variables +test_environment_variables(${node_port_test_exec} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + ${TESTS_ENVIRONMENT_VARIABLES_COB} + ${TESTS_ENVIRONMENT_VARIABLES_C} + ${TESTS_ENVIRONMENT_VARIABLES_RS} + ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} + "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" +) diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 10fcbf24e2..0120fbf617 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -22,55 +22,123 @@ const mod = require('module'); const path = require('path'); +const fs = require('fs').promises; const { URL } = require('url'); /* TODO: RPC Loader */ -const addon = (() => { - try { - /* This forces metacall port to be run always by metacall cli */ - return process._linkedBinding('node_loader_port_module'); - } catch (e) { - console.error('MetaCall failed to load, probably you are importing this file from NodeJS directly.'); - console.error('You should use MetaCall CLI instead. Install it from: https://github.com/metacall/install'); - throw e; - - /* TODO: Until we find a better way to do this, we should disable it */ - /* - const write = (data, cb) => { - if (!process.stdout.write(data)) { - process.stdout.once('drain', cb); - } else { - process.nextTick(cb); +async function findFilesRecursively(dirPattern, filePattern, depthLimit = Infinity) { + const stack = [{ dir: dirPattern, depth: 0 }]; + const files = []; + const dirRegex = new RegExp(dirPattern); + const fileRegex = new RegExp(filePattern); + + while (stack.length > 0) { + const { dir, depth } = stack.pop(); + + try { + if (!dirRegex.test(dir)) { + continue; } - }; - // Notify synchronously that we are launching MetaCall - write('NodeJS detected, launching MetaCall...\n', () => { - try { - const { spawnSync } = require('child_process'); - const args = [...process.argv]; + if (depth > depthLimit) { + continue; + } - args.shift(); + const items = await fs.readdir(dir); - const result = spawnSync('metacall', args, {}); + for (const item of items) { + const fullPath = path.join(dir, item); + const stat = await fs.stat(fullPath); - if (result.error && result.error.code === 'ENOENT') { - write('MetaCall not found. Please install MetaCall from: https://github.com/metacall/install and run it again.\n', () => { - process.exit(1); - }); + if (stat.isDirectory()) { + stack.push({ dir: fullPath, depth: depth + 1 }); + } else if (stat.isFile() && fileRegex.test(item)) { + files.push(fullPath); } + } + } catch (err) { + console.error(`Error reading directory ${dir}:`, err); + } + } - process.exit(result.status !== null ? result.status : 1); - } catch (e) { - const message = 'MetaCall failed to load, probably you are importing this file from NodeJS directly.\n' - + e.message + '\n' - + 'Install MetaCall from: https://github.com/metacall/install and run it again.\n'; + return files; +} - write(message, () => { - throw e; - }); +const platformInstallPaths = () => { + switch (process.platform) { + case 'win32': + return { + paths: [ path.join(process.env['LOCALAPPDATA'], 'MetaCall', 'metacall') ], + name: 'metacall.dll' } - }); + case 'darwin': + return { + paths: [ '/opt/homebrew/lib/', '/usr/local/lib/' ], + name: 'libmetacall.dylib' + } + case 'linux': + return { + paths: [ '/usr/local/lib/', '/gnu/lib/' ], + name: 'libmetacall.so' + } + } + + throw new Error(`Platform ${process.platform} not supported`) +} + +const searchPaths = () => { + const customPath = process.env['METACALL_INSTALL_PATH']; + + if (customPath) { + return { + paths: [ customPath ], + name: /^(lib)?metacall(d)?\.(so|dylib|dll)$/ + } + } + + return platformInstallPaths() +} + +const findLibrary = async () => { + const searchData = searchPaths(); + + for (const p of searchData.paths) { + const files = await findFilesRecursively(p, searchData.name, 0); + + if (files.length !== 0) { + return files[0]; + } + } + + throw new Error('MetaCall library not found, if you have it in a special folder, define it through METACALL_INSTALL_PATH') +} + +const addon = (() => { + try { + /* If the binding can be loaded, it means MetaCall is being + * imported from the node_loader, in that case the runtime + * was initialized by node_loader itself and we can proceed. + */ + return process._linkedBinding('node_loader_port_module'); + } catch (e) { + /* If the port cannot be found, it means MetaCall port has + * been imported for the first time from node.exe, the + * runtime in this case has been initialized by node.exe, + * and MetaCall is not initialized */ + process.env['METACALL_HOST'] = 'node'; + + findLibrary().then(library => { + const { constants } = require('os'); + const m = { exports: {} }; + + process.dlopen(m, library, constants.dlopen.RTLD_GLOBAL | constants.dlopen.RTLD_NOW); + + // TODO: What to do with m? should we use process._linkedBinding instead, no? + + }).catch(err => { + console.log(err); + process.exit(1); + }); } })(); From 3ed5d236280fd983782615866234231958d3f229 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 21 Nov 2024 23:32:02 +0100 Subject: [PATCH 002/364] Implemented cwd and options map. --- source/loader/source/loader_impl.c | 7 +- source/loader/source/loader_manager_impl.c | 12 ++- source/metacall/source/metacall.c | 19 ++++- source/portability/CMakeLists.txt | 2 + .../portability/portability_working_path.h | 54 ++++++++++++++ .../source/portability_working_path.c | 74 +++++++++++++++++++ 6 files changed, 159 insertions(+), 9 deletions(-) create mode 100644 source/portability/include/portability/portability_working_path.h create mode 100644 source/portability/source/portability_working_path.c diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index c6ccf3297a..6b7bbafe34 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -87,7 +87,7 @@ struct loader_impl_type loader_impl_data data; /* Derived metadata provided by the loader, usually contains the data of the VM, Interpreter or JIT */ context ctx; /* Contains the objects, classes and functions loaded in the global scope of each loader */ set type_info_map; /* Stores a set indexed by type name of all of the types existing in the loader (global scope (TODO: may need refactor per handle)) */ - void *options; /* Additional initialization options passed in the initialize phase */ + value options; /* Additional initialization options passed in the initialize phase */ set exec_path_map; /* Set of execution paths passed by the end user */ }; @@ -1539,6 +1539,11 @@ void loader_impl_destroy_deallocate(loader_impl impl) context_destroy(impl->ctx); + if (impl->options != NULL) + { + value_type_destroy(impl->options); + } + free(impl); } diff --git a/source/loader/source/loader_manager_impl.c b/source/loader/source/loader_manager_impl.c index b22fa15273..f3f4375a63 100644 --- a/source/loader/source/loader_manager_impl.c +++ b/source/loader/source/loader_manager_impl.c @@ -26,8 +26,8 @@ #include -#include #include +#include #include @@ -52,8 +52,8 @@ static void *loader_manager_impl_is_destroyed_ptr = NULL; vector loader_manager_impl_script_paths_initialize(void) { - portability_executable_path_str exe_path_str = { 0 }; - portability_executable_path_length exe_path_str_length = 0; + portability_working_path_str cwd_path_str = { 0 }; + portability_working_path_length cwd_path_str_length = 0; char *script_path = NULL; size_t script_path_size = 0; vector script_paths = vector_create_type(char *); @@ -63,11 +63,9 @@ vector loader_manager_impl_script_paths_initialize(void) return NULL; } - if (portability_executable_path(exe_path_str, &exe_path_str_length) == 0) + if (portability_working_path(cwd_path_str, &cwd_path_str_length) == 0) { - size_t exe_directory_size = portability_path_get_directory_inplace(exe_path_str, exe_path_str_length + 1); - - script_path = environment_variable_path_create(LOADER_SCRIPT_PATH, exe_path_str, exe_directory_size, &script_path_size); + script_path = environment_variable_path_create(LOADER_SCRIPT_PATH, cwd_path_str, cwd_path_str_length + 1, &script_path_size); } else { diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 45b949c708..171c18482d 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -76,16 +76,33 @@ portability_constructor(metacall_constructor) { const char *metacall_host = environment_variable_get("METACALL_HOST", NULL); + /* We are running from a different host, initialize the loader of the host + * and redirect it to the existing symbols, also avoiding initialization + * and destruction of the runtime as it is being managed externally to MetaCall */ if (metacall_host != NULL) { + static const char host_str[] = "host"; + struct metacall_initialize_configuration_type config[] = { - { metacall_host, NULL /* TODO: Initialize the map and define { host: true } */ }, + { metacall_host, metacall_value_create_map(NULL, 1) }, { NULL, NULL } }; + /* Initialize the loader options with a map defining its options to { "host": true } */ + void **host_tuple, **options_map = metacall_value_to_map(config[0].options); + + options_map[0] = metacall_value_create_array(NULL, 2); + + host_tuple = metacall_value_to_array(options_map[0]); + + host_tuple[0] = metacall_value_create_string(host_str, sizeof(host_str) - 1); + host_tuple[1] = metacall_value_create_bool(1); + + /* Initialize MetaCall with extra options, defining the host properly */ if (metacall_initialize_ex(config) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "MetaCall host constructor failed to initialize"); + metacall_value_destroy(config[0].options); exit(1); } } diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index 2841f3aaa7..cf4af64c62 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -38,6 +38,7 @@ set(headers ${include_path}/portability_constructor.h ${include_path}/portability_executable_path.h ${include_path}/portability_library_path.h + ${include_path}/portability_working_path.h ${include_path}/portability_path.h ) @@ -45,6 +46,7 @@ set(sources ${source_path}/portability.c ${source_path}/portability_executable_path.c ${source_path}/portability_library_path.c + ${source_path}/portability_working_path.c ${source_path}/portability_path.c ) diff --git a/source/portability/include/portability/portability_working_path.h b/source/portability/include/portability/portability_working_path.h new file mode 100644 index 0000000000..00866a3a90 --- /dev/null +++ b/source/portability/include/portability/portability_working_path.h @@ -0,0 +1,54 @@ +/* + * Portability Library by Parra Studios + * A generic cross-platform portability utility. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PORTABILITY_WORKING_PATH_H +#define PORTABILITY_WORKING_PATH_H 1 + +/* -- Headers -- */ + +#include + +#include + +/* -- Type Definitions -- */ + +typedef char portability_working_path_str[PORTABILITY_PATH_SIZE]; + +#if defined(WIN32) || defined(_WIN32) || \ + defined(__CYGWIN__) || defined(__CYGWIN32__) || \ + defined(__MINGW32__) || defined(__MINGW64__) +typedef DWORD portability_working_path_length; +#else +typedef size_t portability_working_path_length; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Methods -- */ + +PORTABILITY_API int portability_working_path(portability_working_path_str path, portability_working_path_length *length); + +#ifdef __cplusplus +} +#endif + +#endif /* PORTABILITY_WORKING_PATH_H */ diff --git a/source/portability/source/portability_working_path.c b/source/portability/source/portability_working_path.c new file mode 100644 index 0000000000..1511cef35c --- /dev/null +++ b/source/portability/source/portability_working_path.c @@ -0,0 +1,74 @@ +/* + * Portability Library by Parra Studios + * A generic cross-platform portability utility. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include + +#if defined(WIN32) || defined(_WIN32) || \ + defined(__CYGWIN__) || defined(__CYGWIN32__) || \ + defined(__MINGW32__) || defined(__MINGW64__) + #include +#else + #include +#endif + +int portability_working_path(portability_working_path_str path, portability_working_path_length *length) +{ + const portability_working_path_length path_max_length = PORTABILITY_PATH_SIZE; + + /* Reset the path */ + memset(path, 0, path_max_length); + +#if defined(WIN32) || defined(_WIN32) || \ + defined(__CYGWIN__) || defined(__CYGWIN32__) || \ + defined(__MINGW32__) || defined(__MINGW64__) + *length = GetCurrentDirectory(0, NULL); + + if (*length == 0) + { + /* TODO: DWORD dw = GetLastError(); */ + return 1; + } + + if (*length > path_max_length) + { + /* TODO: Handle error */ + return 1; + } + + if (GetCurrentDirectory(*length, path) == 0) + { + /* TODO: DWORD dw = GetLastError(); */ + return 1; + } +#else + if (getcwd(path, path_max_length) == NULL) + { + *length = 0; + /* TODO: Handle error */ + return 1; + } + + *length = strnlen(path, path_max_length); +#endif + + return 0; +} From 8e8fe8b46545a286f452cb0062db7db1aaeb3502 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 22 Nov 2024 13:25:37 +0100 Subject: [PATCH 003/364] Add functions for detecting host from loader side. --- source/loader/include/loader/loader.h | 10 +-- source/loader/include/loader/loader_impl.h | 6 +- source/loader/source/loader.c | 16 ++++- source/loader/source/loader_impl.c | 37 ++++++++++- source/loaders/node_loader/CMakeLists.txt | 4 +- .../node_loader/source/node_loader_impl.cpp | 39 ++++++------ .../node_loader/source/node_loader_port.cpp | 11 ---- source/metacall/source/metacall.c | 63 ++++++++++--------- 8 files changed, 118 insertions(+), 68 deletions(-) diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index b7fec73ec5..3c31ba98d4 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -33,10 +33,6 @@ extern "C" { #endif -/* -- Headers -- */ - -#include - /* -- Forward Declarations -- */ struct loader_type; @@ -81,7 +77,11 @@ LOADER_API void *loader_get_handle(const loader_tag tag, const char *name); LOADER_API void loader_set_options(const loader_tag tag, void *options); -LOADER_API void *loader_get_options(const loader_tag tag); +LOADER_API value loader_get_options(const loader_tag tag); + +LOADER_API value loader_get_option(const loader_tag tag, const char *field); + +LOADER_API int loader_get_option_host(const loader_tag tag); LOADER_API int loader_handle_initialize(loader_impl impl, const loader_path name, void **handle_ptr); diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index c6c8826d6d..8eea205e23 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -67,7 +67,11 @@ LOADER_API void *loader_impl_get_handle(loader_impl impl, const char *name); LOADER_API void loader_impl_set_options(loader_impl impl, void *options); -LOADER_API void *loader_impl_get_options(loader_impl impl); +LOADER_API value loader_impl_get_options(loader_impl impl); + +LOADER_API value loader_impl_get_option(loader_impl impl, const char *field); + +LOADER_API int loader_impl_get_option_host(loader_impl impl); LOADER_API int loader_impl_handle_initialize(plugin_manager manager, plugin p, loader_impl impl, const loader_path name, void **handle_ptr); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 82bb7d5a4f..13b1364458 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -547,13 +547,27 @@ void loader_set_options(const loader_tag tag, void *options) loader_impl_set_options(plugin_impl_type(p, loader_impl), options); } -void *loader_get_options(const loader_tag tag) +value loader_get_options(const loader_tag tag) { plugin p = loader_get_impl_plugin(tag); return loader_impl_get_options(plugin_impl_type(p, loader_impl)); } +value loader_get_option(const loader_tag tag, const char *field) +{ + plugin p = loader_get_impl_plugin(tag); + + return loader_impl_get_option(plugin_impl_type(p, loader_impl), field); +} + +int loader_get_option_host(const loader_tag tag) +{ + plugin p = loader_get_impl_plugin(tag); + + return loader_impl_get_option_host(plugin_impl_type(p, loader_impl)); +} + int loader_handle_initialize(loader_impl impl, const loader_path name, void **handle_ptr) { if (loader_initialize() == 1) diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 6b7bbafe34..80c58db320 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -1158,7 +1158,7 @@ void loader_impl_set_options(loader_impl impl, void *options) } } -void *loader_impl_get_options(loader_impl impl) +value loader_impl_get_options(loader_impl impl) { if (impl != NULL) { @@ -1168,6 +1168,41 @@ void *loader_impl_get_options(loader_impl impl) return NULL; } +value loader_impl_get_option(loader_impl impl, const char *field) +{ + value *options_map = value_to_map(impl->options); + size_t i, size = value_type_count(impl->options); + + for (i = 0; i < size; ++i) + { + value *options_tuple = value_to_array(options_map[i]); + + if (value_type_id(options_tuple[0]) == TYPE_STRING) + { + const char *str = value_to_string(options_tuple[0]); + + if (strncmp(str, field, value_type_size(options_tuple[0])) == 0) + { + return options_tuple[1]; + } + } + } + + return NULL; +} + +int loader_impl_get_option_host(loader_impl impl) +{ + value host = loader_impl_get_option(impl, "host"); + + if (host != NULL && value_type_id(host) == TYPE_BOOL) + { + return value_to_bool(host); + } + + return 0; +} + int loader_impl_handle_initialize(plugin_manager manager, plugin p, loader_impl impl, const loader_path name, void **handle_ptr) { if (impl != NULL) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 814f411f71..70108f53e2 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -156,7 +156,9 @@ target_include_directories(${target} target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - ${NodeJS_LIBRARY} # NodeJS library + + # TODO: Implement delayed load + # ${NodeJS_LIBRARY} # NodeJS library PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index bfe6e90c47..af983d29d9 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -3937,34 +3937,37 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con config }; - /* Create NodeJS thread */ - if (uv_thread_create(&node_impl->thread, node_loader_impl_thread, &thread_data) != 0) + if (loader_impl_get_option_host(impl) == 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid NodeJS Thread creation"); + /* Create NodeJS thread */ + if (uv_thread_create(&node_impl->thread, node_loader_impl_thread, &thread_data) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid NodeJS Thread creation"); - /* TODO: Clear resources */ + /* TODO: Clear resources */ - delete node_impl; + delete node_impl; - return NULL; - } + return NULL; + } - /* Wait until start has been launch */ - uv_mutex_lock(&node_impl->mutex); + /* Wait until start has been launch */ + uv_mutex_lock(&node_impl->mutex); - uv_cond_wait(&node_impl->cond, &node_impl->mutex); + uv_cond_wait(&node_impl->cond, &node_impl->mutex); - if (node_impl->error_message != NULL) - { - uv_mutex_unlock(&node_impl->mutex); + if (node_impl->error_message != NULL) + { + uv_mutex_unlock(&node_impl->mutex); - /* TODO: Remove this when implementing thread safe */ - log_write("metacall", LOG_LEVEL_ERROR, node_impl->error_message); + /* TODO: Remove this when implementing thread safe */ + log_write("metacall", LOG_LEVEL_ERROR, node_impl->error_message); - return NULL; - } + return NULL; + } - uv_mutex_unlock(&node_impl->mutex); + uv_mutex_unlock(&node_impl->mutex); + } /* Call initialize function with thread safe */ { diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index ed681f1e91..8261f6bce9 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -836,17 +836,6 @@ void node_loader_port_exports(napi_env env, napi_value exports) /* This function is called by NodeJs when the module is required */ napi_value node_loader_port_initialize(napi_env env, napi_value exports) { -/* Note: This should not be necessary because we do not allow to use ports outside MetaCall */ -#if 0 - if (metacall_initialize() != 0) - { - /* TODO: Show error message (when error handling is properly implemented in the core lib) */ - napi_throw_error(env, nullptr, "MetaCall failed to initialize"); - - return nullptr; - } -#endif - node_loader_port_exports(env, exports); return exports; diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 171c18482d..8a9ad2eb9c 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -74,36 +74,39 @@ static type_id *metacall_type_ids(void *args[], size_t size); portability_constructor(metacall_constructor) { - const char *metacall_host = environment_variable_get("METACALL_HOST", NULL); - - /* We are running from a different host, initialize the loader of the host - * and redirect it to the existing symbols, also avoiding initialization - * and destruction of the runtime as it is being managed externally to MetaCall */ - if (metacall_host != NULL) + if (metacall_initialize_flag == 1) { - static const char host_str[] = "host"; + const char *metacall_host = environment_variable_get("METACALL_HOST", NULL); - struct metacall_initialize_configuration_type config[] = { - { metacall_host, metacall_value_create_map(NULL, 1) }, - { NULL, NULL } - }; + /* We are running from a different host, initialize the loader of the host + * and redirect it to the existing symbols, also avoiding initialization + * and destruction of the runtime as it is being managed externally to MetaCall */ + if (metacall_host != NULL) + { + static const char host_str[] = "host"; - /* Initialize the loader options with a map defining its options to { "host": true } */ - void **host_tuple, **options_map = metacall_value_to_map(config[0].options); + struct metacall_initialize_configuration_type config[] = { + { metacall_host, metacall_value_create_map(NULL, 1) }, + { NULL, NULL } + }; - options_map[0] = metacall_value_create_array(NULL, 2); + /* Initialize the loader options with a map defining its options to { "host": true } */ + void **host_tuple, **options_map = metacall_value_to_map(config[0].options); - host_tuple = metacall_value_to_array(options_map[0]); + options_map[0] = metacall_value_create_array(NULL, 2); - host_tuple[0] = metacall_value_create_string(host_str, sizeof(host_str) - 1); - host_tuple[1] = metacall_value_create_bool(1); + host_tuple = metacall_value_to_array(options_map[0]); - /* Initialize MetaCall with extra options, defining the host properly */ - if (metacall_initialize_ex(config) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall host constructor failed to initialize"); - metacall_value_destroy(config[0].options); - exit(1); + host_tuple[0] = metacall_value_create_string(host_str, sizeof(host_str) - 1); + host_tuple[1] = metacall_value_create_bool(1); + + /* Initialize MetaCall with extra options, defining the host properly */ + if (metacall_initialize_ex(config) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall host constructor failed to initialize"); + metacall_value_destroy(config[0].options); + exit(1); + } } } } @@ -179,6 +182,13 @@ int metacall_initialize(void) { memory_allocator allocator; + if (metacall_initialize_flag == 0) + { + log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall already initialized"); + + return 0; + } + /* Initialize logs by default to stdout if none has been defined */ if (metacall_log_null_flag != 0 && log_size() == 0) { @@ -194,13 +204,6 @@ int metacall_initialize(void) log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall default logger to stdout initialized"); } - if (metacall_initialize_flag == 0) - { - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall already initialized"); - - return 0; - } - log_write("metacall", LOG_LEVEL_DEBUG, "Initializing MetaCall"); /* Initialize MetaCall version environment variable */ From 355c12f1f274ad381d7bdc67186852ada4a73039 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 27 Nov 2024 23:01:13 +0100 Subject: [PATCH 004/364] Improve dynlink, trying to hook dlsym. --- .../include/cli_core_plugin/cli_core_plugin.h | 4 -- .../cli_sandbox_plugin/cli_sandbox_plugin.h | 4 -- .../include/funchook_detour/funchook_detour.h | 6 -- source/dynlink/CMakeLists.txt | 3 - source/dynlink/include/dynlink/dynlink.h | 1 - source/dynlink/include/dynlink/dynlink_impl.h | 4 -- .../include/dynlink/dynlink_impl_beos.h | 2 - .../include/dynlink/dynlink_impl_macos.h | 2 - .../dynlink/dynlink_impl_symbol_beos.h | 62 ------------------ .../dynlink/dynlink_impl_symbol_macos.h | 62 ------------------ .../dynlink/dynlink_impl_symbol_unix.h | 62 ------------------ .../dynlink/dynlink_impl_symbol_win32.h | 58 ----------------- .../include/dynlink/dynlink_impl_unix.h | 2 - .../include/dynlink/dynlink_impl_win32.h | 2 - .../include/dynlink/dynlink_interface.h | 21 ------- .../dynlink/include/dynlink/dynlink_symbol.h | 63 ------------------- source/dynlink/include/dynlink/dynlink_type.h | 17 +++++ source/dynlink/source/dynlink_impl_beos.c | 2 +- source/dynlink/source/dynlink_impl_macos.c | 3 +- source/dynlink/source/dynlink_impl_unix.c | 2 +- source/dynlink/source/dynlink_impl_win32.c | 2 +- source/dynlink/source/dynlink_symbol.c | 51 --------------- .../plugin_extension/plugin_extension.h | 4 -- .../c_loader/include/c_loader/c_loader.h | 6 -- .../include/cob_loader/cob_loader.h | 6 -- .../cr_loader/include/cr_loader/cr_loader.h | 6 -- .../cs_loader/include/cs_loader/cs_loader.h | 6 -- .../include/dart_loader/dart_loader.h | 6 -- .../include/ext_loader/ext_loader.h | 6 -- .../ext_loader/source/ext_loader_impl.cpp | 4 +- .../include/file_loader/file_loader.h | 6 -- .../include/java_loader/java_loader.h | 6 -- .../jl_loader/include/jl_loader/jl_loader.h | 6 -- .../js_loader/include/js_loader/js_loader.h | 6 -- .../include/jsm_loader/jsm_loader.h | 6 -- .../include/llvm_loader/llvm_loader.h | 6 -- .../include/lua_loader/lua_loader.h | 6 -- .../include/mock_loader/mock_loader.h | 6 -- source/loaders/node_loader/CMakeLists.txt | 2 +- .../include/node_loader/node_loader.h | 6 -- .../node_loader/source/node_loader_impl.cpp | 52 ++++++++------- .../py_loader/include/py_loader/py_loader.h | 6 -- .../rb_loader/include/rb_loader/rb_loader.h | 6 -- .../include/rpc_loader/rpc_loader.h | 6 -- .../rs_loader/include/rs_loader/rs_loader.h | 6 -- .../ts_loader/include/ts_loader/ts_loader.h | 6 -- .../include/wasm_loader/wasm_loader.h | 6 -- source/metacall/source/metacall.c | 59 +++++++++++++++++ source/plugin/source/plugin_descriptor.c | 2 +- source/plugin/source/plugin_loader.c | 9 ++- .../backtrace_plugin/backtrace_plugin.h | 4 -- .../include/sandbox_plugin/sandbox_plugin.h | 4 -- .../sum/include/sum_extension/sum_extension.h | 4 -- .../include/metacall_serial/metacall_serial.h | 6 -- .../rapid_json_serial/rapid_json_serial.h | 6 -- .../dynlink_test/source/dynlink_test.cpp | 6 +- 56 files changed, 120 insertions(+), 603 deletions(-) delete mode 100644 source/dynlink/include/dynlink/dynlink_impl_symbol_beos.h delete mode 100644 source/dynlink/include/dynlink/dynlink_impl_symbol_macos.h delete mode 100644 source/dynlink/include/dynlink/dynlink_impl_symbol_unix.h delete mode 100644 source/dynlink/include/dynlink/dynlink_impl_symbol_win32.h delete mode 100644 source/dynlink/include/dynlink/dynlink_symbol.h delete mode 100644 source/dynlink/source/dynlink_symbol.c diff --git a/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h b/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h index e27865d260..6c4446d9eb 100644 --- a/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h +++ b/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif CLI_CORE_PLUGIN_API int cli_core_plugin(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(cli_core_plugin); - #ifdef __cplusplus } #endif diff --git a/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h b/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h index f0f1aa6711..a11ef6abc0 100644 --- a/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h +++ b/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif CLI_SANDBOX_PLUGIN_API int cli_sandbox_plugin(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(cli_sandbox_plugin); - #ifdef __cplusplus } #endif diff --git a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h b/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h index b1967f77df..551ace90b6 100644 --- a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h +++ b/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h @@ -27,8 +27,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif @@ -45,8 +43,6 @@ extern "C" { */ FUNCHOOK_DETOUR_API detour_interface funchook_detour_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(funchook_detour_impl_interface_singleton); - /** * @brief * Provide the module information @@ -57,8 +53,6 @@ DYNLINK_SYMBOL_EXPORT(funchook_detour_impl_interface_singleton); */ FUNCHOOK_DETOUR_API const char *funchook_detour_print_info(void); -DYNLINK_SYMBOL_EXPORT(funchook_detour_print_info); - #ifdef __cplusplus } #endif diff --git a/source/dynlink/CMakeLists.txt b/source/dynlink/CMakeLists.txt index 0c1bd92942..dbb770bec9 100644 --- a/source/dynlink/CMakeLists.txt +++ b/source/dynlink/CMakeLists.txt @@ -47,9 +47,7 @@ set(headers ${include_path}/dynlink.h ${include_path}/dynlink_flags.h ${include_path}/dynlink_impl.h - ${include_path}/dynlink_impl_symbol_${DYNLINK_IMPL_INTERFACE_NAME}.h ${include_path}/dynlink_impl_${DYNLINK_IMPL_INTERFACE_NAME}.h - ${include_path}/dynlink_symbol.h ) set(sources @@ -57,7 +55,6 @@ set(sources ${source_path}/dynlink_impl.c ${source_path}/dynlink_impl_${DYNLINK_IMPL_INTERFACE_NAME}.c ${source_path}/dynlink_interface.c - ${source_path}/dynlink_symbol.c ) # Group source files diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index 2b42705a6c..77102c9e1b 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -29,7 +29,6 @@ #include #include -#include #ifdef __cplusplus extern "C" { diff --git a/source/dynlink/include/dynlink/dynlink_impl.h b/source/dynlink/include/dynlink/dynlink_impl.h index 3185db4aac..8f09c51951 100644 --- a/source/dynlink/include/dynlink/dynlink_impl.h +++ b/source/dynlink/include/dynlink/dynlink_impl.h @@ -33,10 +33,6 @@ extern "C" { #endif -/* -- Headers -- */ - -#include - /* -- Methods -- */ /** diff --git a/source/dynlink/include/dynlink/dynlink_impl_beos.h b/source/dynlink/include/dynlink/dynlink_impl_beos.h index f77adbb3ee..60efcdc2a1 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_beos.h +++ b/source/dynlink/include/dynlink/dynlink_impl_beos.h @@ -25,8 +25,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/source/dynlink/include/dynlink/dynlink_impl_macos.h b/source/dynlink/include/dynlink/dynlink_impl_macos.h index d2bce45dd4..404235e30c 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_macos.h +++ b/source/dynlink/include/dynlink/dynlink_impl_macos.h @@ -25,8 +25,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/source/dynlink/include/dynlink/dynlink_impl_symbol_beos.h b/source/dynlink/include/dynlink/dynlink_impl_symbol_beos.h deleted file mode 100644 index 6530fd895b..0000000000 --- a/source/dynlink/include/dynlink/dynlink_impl_symbol_beos.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef DYNLINK_IMPL_SYMBOL_BEOS_H -#define DYNLINK_IMPL_SYMBOL_BEOS_H 1 - -/* -- Headers -- */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Definitions -- */ - -#define DYNLINK_SYMBOL_PREFIX \ - dynlink_symbol_ - -/* -- Macros -- */ - -#define DYNLINK_SYMBOL_EXPORT(name) \ - DYNLINK_API struct dynlink_symbol_addr_beos_type DYNLINK_SYMBOL_NAME(name) = { \ - (dynlink_symbol_addr_beos_impl)&name \ - } - -#define DYNLINK_SYMBOL_GET(name) \ - ((dynlink_symbol_addr_beos)(name))->symbol - -/* -- Type definitions -- */ - -typedef void (*dynlink_symbol_addr_beos_impl)(void); - -typedef struct dynlink_symbol_addr_beos_type -{ - dynlink_symbol_addr_beos_impl symbol; -} * dynlink_symbol_addr_beos; - -typedef dynlink_symbol_addr_beos dynlink_symbol_addr; - -#ifdef __cplusplus -} -#endif - -#endif /* DYNLINK_IMPL_SYMBOL_BEOS_H */ diff --git a/source/dynlink/include/dynlink/dynlink_impl_symbol_macos.h b/source/dynlink/include/dynlink/dynlink_impl_symbol_macos.h deleted file mode 100644 index 7d92286e65..0000000000 --- a/source/dynlink/include/dynlink/dynlink_impl_symbol_macos.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef DYNLINK_IMPL_SYMBOL_MACOS_H -#define DYNLINK_IMPL_SYMBOL_MACOS_H 1 - -/* -- Headers -- */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Definitions -- */ - -#define DYNLINK_SYMBOL_PREFIX \ - dynlink_symbol_ - -/* -- Macros -- */ - -#define DYNLINK_SYMBOL_EXPORT(name) \ - DYNLINK_API struct dynlink_symbol_addr_macos_type DYNLINK_SYMBOL_NAME(name) = { \ - (dynlink_symbol_addr_macos_impl)&name \ - } - -#define DYNLINK_SYMBOL_GET(name) \ - ((dynlink_symbol_addr_macos)(name))->symbol - -/* -- Type definitions -- */ - -typedef void (*dynlink_symbol_addr_macos_impl)(void); - -typedef struct dynlink_symbol_addr_macos_type -{ - dynlink_symbol_addr_macos_impl symbol; -} * dynlink_symbol_addr_macos; - -typedef dynlink_symbol_addr_macos dynlink_symbol_addr; - -#ifdef __cplusplus -} -#endif - -#endif /* DYNLINK_IMPL_SYMBOL_MACOS_H */ diff --git a/source/dynlink/include/dynlink/dynlink_impl_symbol_unix.h b/source/dynlink/include/dynlink/dynlink_impl_symbol_unix.h deleted file mode 100644 index 56a66a91b3..0000000000 --- a/source/dynlink/include/dynlink/dynlink_impl_symbol_unix.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef DYNLINK_IMPL_SYMBOL_UNIX_H -#define DYNLINK_IMPL_SYMBOL_UNIX_H 1 - -/* -- Headers -- */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Definitions -- */ - -#define DYNLINK_SYMBOL_PREFIX \ - dynlink_symbol_ - -/* -- Macros -- */ - -#define DYNLINK_SYMBOL_EXPORT(name) \ - DYNLINK_API struct dynlink_symbol_addr_unix_type DYNLINK_SYMBOL_NAME(name) = { \ - (dynlink_symbol_addr_unix_impl)&name \ - } - -#define DYNLINK_SYMBOL_GET(name) \ - ((dynlink_symbol_addr_unix)(name))->symbol - -/* -- Type definitions -- */ - -typedef void (*dynlink_symbol_addr_unix_impl)(void); - -typedef struct dynlink_symbol_addr_unix_type -{ - dynlink_symbol_addr_unix_impl symbol; -} * dynlink_symbol_addr_unix; - -typedef dynlink_symbol_addr_unix dynlink_symbol_addr; - -#ifdef __cplusplus -} -#endif - -#endif /* DYNLINK_IMPL_SYMBOL_UNIX_H */ diff --git a/source/dynlink/include/dynlink/dynlink_impl_symbol_win32.h b/source/dynlink/include/dynlink/dynlink_impl_symbol_win32.h deleted file mode 100644 index 670ece3712..0000000000 --- a/source/dynlink/include/dynlink/dynlink_impl_symbol_win32.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef DYNLINK_IMPL_SYMBOL_WIN32_H -#define DYNLINK_IMPL_SYMBOL_WIN32_H 1 - -/* -- Headers -- */ - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Definitions -- */ - -#define DYNLINK_SYMBOL_PREFIX - -/* -- Macros -- */ - -#define DYNLINK_SYMBOL_EXPORT(name) \ - DYNLINK_NO_EXPORT struct \ - { \ - char name; \ - } PREPROCESSOR_CONCAT(dynlink_no_export_, name) - -#define DYNLINK_SYMBOL_GET(name) name - -/* -- Type definitions -- */ - -typedef void (*dynlink_symbol_addr_win32)(void); - -typedef dynlink_symbol_addr_win32 dynlink_symbol_addr; - -#ifdef __cplusplus -} -#endif - -#endif /* DYNLINK_IMPL_SYMBOL_WIN32_H */ diff --git a/source/dynlink/include/dynlink/dynlink_impl_unix.h b/source/dynlink/include/dynlink/dynlink_impl_unix.h index 7cd53898b8..cb239a1d8c 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_unix.h +++ b/source/dynlink/include/dynlink/dynlink_impl_unix.h @@ -25,8 +25,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/source/dynlink/include/dynlink/dynlink_impl_win32.h b/source/dynlink/include/dynlink/dynlink_impl_win32.h index 17daeb7112..9bd39af77e 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_win32.h +++ b/source/dynlink/include/dynlink/dynlink_impl_win32.h @@ -25,8 +25,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/source/dynlink/include/dynlink/dynlink_interface.h b/source/dynlink/include/dynlink/dynlink_interface.h index b0f710c032..0a33fa6086 100644 --- a/source/dynlink/include/dynlink/dynlink_interface.h +++ b/source/dynlink/include/dynlink/dynlink_interface.h @@ -28,18 +28,14 @@ #include #if defined(WIN32) || defined(_WIN32) - #include #include #elif defined(unix) || defined(__unix__) || defined(__unix) || \ defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ (((defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__)) && (defined(MAC_OS_X_VERSION_10_15) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15))) - #include #include #elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - #include #include #elif defined(__HAIKU__) || defined(__BEOS__) - #include #include #else #error "Unsupported platform for dynlink" @@ -50,27 +46,10 @@ #include #include -#include - #ifdef __cplusplus extern "C" { #endif -/* -- Macros -- */ - -#define DYNLINK_SYMBOL_PREFIX_STR() \ - PREPROCESSOR_STRINGIFY_OR_EMPTY(DYNLINK_SYMBOL_PREFIX) - -#define DYNLINK_SYMBOL_NAME(name) \ - PREPROCESSOR_CONCAT(DYNLINK_SYMBOL_PREFIX, name) - -#define DYNLINK_SYMBOL_NAME_STR(name) \ - PREPROCESSOR_STRINGIFY(DYNLINK_SYMBOL_NAME(name)) - -#define DYNLINK_SYMBOL_STR(name) \ - DYNLINK_SYMBOL_PREFIX_STR() \ - name - /* -- Type definitions -- */ typedef dynlink_symbol_addr *dynlink_symbol_addr_ptr; diff --git a/source/dynlink/include/dynlink/dynlink_symbol.h b/source/dynlink/include/dynlink/dynlink_symbol.h deleted file mode 100644 index d0319663f5..0000000000 --- a/source/dynlink/include/dynlink/dynlink_symbol.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef DYNLINK_SYMBOL_H -#define DYNLINK_SYMBOL_H 1 - -/* -- Headers -- */ - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Definitions -- */ - -#define DYNLINK_SYMBOL_NAME_SIZE 0xFF - -/* -- Type Definitions -- */ - -typedef char dynlink_symbol_name_man[DYNLINK_SYMBOL_NAME_SIZE]; - -/* -- Methods -- */ - -/** -* @brief -* Get convert a symbol to name mangled for cross-platform dynamic loading -* -* @param[in] symbol_name -* Reference to name of the of dynamically linked shared object symbol -* -* @param[out] symbol_mangled -* Reference to mangled name of the of dynamically linked shared object symbol -* -* @return -* Returns zero if @symbol_name was correctly mangled -*/ -DYNLINK_API size_t dynlink_symbol_name_mangle(dynlink_symbol_name symbol_name, size_t symbol_name_length, dynlink_symbol_name_man symbol_mangled); - -#ifdef __cplusplus -} -#endif - -#endif /* DYNLINK_H */ diff --git a/source/dynlink/include/dynlink/dynlink_type.h b/source/dynlink/include/dynlink/dynlink_type.h index c883ec2dab..7661172e78 100644 --- a/source/dynlink/include/dynlink/dynlink_type.h +++ b/source/dynlink/include/dynlink/dynlink_type.h @@ -44,6 +44,23 @@ typedef const char *dynlink_symbol_name; /**< Dynamically linked shared o typedef portability_library_path_str dynlink_library_path_str; /**< Dynamically linked shared object symbol name */ typedef void *dynlink_impl; /**< Dynamically linked shared object implementation */ typedef char dynlink_name_impl[PORTABILITY_PATH_SIZE]; /**< Allocated copy of dynamically linked shared object name */ +typedef void (*dynlink_symbol_addr)(void); /**< Function pointer referring to a symbol address */ + +/* -- Macros -- */ + +#define dynlink_symbol_cast(type, symbol, result) \ + do \ + { \ + union \ + { \ + type ptr; \ + dynlink_symbol_addr fn; \ + } cast; \ +\ + cast.ptr = (symbol); \ + (result) = cast.fn; \ +\ + } while (0) #ifdef __cplusplus } diff --git a/source/dynlink/source/dynlink_impl_beos.c b/source/dynlink/source/dynlink_impl_beos.c index 8ce81828f5..bc28312af9 100644 --- a/source/dynlink/source/dynlink_impl_beos.c +++ b/source/dynlink/source/dynlink_impl_beos.c @@ -85,7 +85,7 @@ int dynlink_impl_interface_symbol_beos(dynlink handle, dynlink_impl impl, dynlin return 1; } - *addr = (dynlink_symbol_addr)symbol; + dynlink_symbol_cast(void *, symbol, *addr); return (*addr == NULL); } diff --git a/source/dynlink/source/dynlink_impl_macos.c b/source/dynlink/source/dynlink_impl_macos.c index 6447c73902..672b39771b 100644 --- a/source/dynlink/source/dynlink_impl_macos.c +++ b/source/dynlink/source/dynlink_impl_macos.c @@ -133,10 +133,11 @@ dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) int dynlink_impl_interface_symbol_macos(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) { NSSymbol symbol = NSLookupSymbolInModule(impl, name); + void *symbol_addr = NSAddressOfSymbol(symbol); (void)handle; - *addr = (dynlink_symbol_addr)NSAddressOfSymbol(symbol); + dynlink_symbol_cast(void *, symbol_addr, *addr); return (*addr == NULL); } diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index a6455dd648..4c00300c65 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -105,7 +105,7 @@ int dynlink_impl_interface_symbol_unix(dynlink handle, dynlink_impl impl, dynlin (void)handle; - *addr = (dynlink_symbol_addr)symbol; + dynlink_symbol_cast(void *, symbol, *addr); return (*addr == NULL); } diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 8ea74bb24f..75d576f0fd 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -76,7 +76,7 @@ int dynlink_impl_interface_symbol_win32(dynlink handle, dynlink_impl impl, dynli (void)handle; - *addr = (dynlink_symbol_addr)proc_addr; + dynlink_symbol_cast(FARPROC, proc_addr, *addr); return (*addr == NULL); } diff --git a/source/dynlink/source/dynlink_symbol.c b/source/dynlink/source/dynlink_symbol.c deleted file mode 100644 index 35ac3861d7..0000000000 --- a/source/dynlink/source/dynlink_symbol.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Dynamic Link Library by Parra Studios - * A library for dynamic loading and linking shared objects at run-time. - * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* -- Headers -- */ - -#include -#include - -#include - -/* -- Methods -- */ - -size_t dynlink_symbol_name_mangle(dynlink_symbol_name symbol_name, size_t symbol_name_length, dynlink_symbol_name_man symbol_mangled) -{ - static const char symbol_prefix[] = DYNLINK_SYMBOL_PREFIX_STR(); - static size_t symbol_prefix_length = sizeof(symbol_prefix) - 1; - size_t length = symbol_name_length + symbol_prefix_length; - - if (symbol_mangled == NULL) - { - return length; - } - - if (symbol_prefix_length > 0) - { - memcpy(symbol_mangled, symbol_prefix, symbol_prefix_length); - } - - memcpy(&symbol_mangled[symbol_prefix_length], symbol_name, symbol_name_length); - - symbol_mangled[length] = '\0'; - - return length; -} diff --git a/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h b/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h index ef5d86dc55..7b65599132 100644 --- a/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h +++ b/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif PLUGIN_EXTENSION_API int plugin_extension(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(plugin_extension); - #ifdef __cplusplus } #endif diff --git a/source/loaders/c_loader/include/c_loader/c_loader.h b/source/loaders/c_loader/include/c_loader/c_loader.h index 0e083cb018..159d45a62a 100644 --- a/source/loaders/c_loader/include/c_loader/c_loader.h +++ b/source/loaders/c_loader/include/c_loader/c_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif C_LOADER_API loader_impl_interface c_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(c_loader_impl_interface_singleton); - C_LOADER_API const char *c_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(c_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/cob_loader/include/cob_loader/cob_loader.h b/source/loaders/cob_loader/include/cob_loader/cob_loader.h index 92c6412aa3..4344cf2571 100644 --- a/source/loaders/cob_loader/include/cob_loader/cob_loader.h +++ b/source/loaders/cob_loader/include/cob_loader/cob_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif COB_LOADER_API loader_impl_interface cob_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(cob_loader_impl_interface_singleton); - COB_LOADER_API const char *cob_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(cob_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/cr_loader/include/cr_loader/cr_loader.h b/source/loaders/cr_loader/include/cr_loader/cr_loader.h index 628f387e66..33e01700f6 100644 --- a/source/loaders/cr_loader/include/cr_loader/cr_loader.h +++ b/source/loaders/cr_loader/include/cr_loader/cr_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif CR_LOADER_API loader_impl_interface cr_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(cr_loader_impl_interface_singleton); - CR_LOADER_API const char *cr_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(cr_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/cs_loader/include/cs_loader/cs_loader.h b/source/loaders/cs_loader/include/cs_loader/cs_loader.h index 546a515caf..37aa49c71a 100644 --- a/source/loaders/cs_loader/include/cs_loader/cs_loader.h +++ b/source/loaders/cs_loader/include/cs_loader/cs_loader.h @@ -13,20 +13,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif CS_LOADER_API loader_impl_interface cs_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(cs_loader_impl_interface_singleton); - CS_LOADER_API const char *cs_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(cs_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/dart_loader/include/dart_loader/dart_loader.h b/source/loaders/dart_loader/include/dart_loader/dart_loader.h index 8b6530480d..15dab7185a 100644 --- a/source/loaders/dart_loader/include/dart_loader/dart_loader.h +++ b/source/loaders/dart_loader/include/dart_loader/dart_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif DART_LOADER_API loader_impl_interface dart_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(dart_loader_impl_interface_singleton); - DART_LOADER_API const char *dart_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(dart_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/ext_loader/include/ext_loader/ext_loader.h b/source/loaders/ext_loader/include/ext_loader/ext_loader.h index 580ab2ff7d..d1a9db118c 100644 --- a/source/loaders/ext_loader/include/ext_loader/ext_loader.h +++ b/source/loaders/ext_loader/include/ext_loader/ext_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif EXT_LOADER_API loader_impl_interface ext_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(ext_loader_impl_interface_singleton); - EXT_LOADER_API const char *ext_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(ext_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/ext_loader/source/ext_loader_impl.cpp b/source/loaders/ext_loader/source/ext_loader_impl.cpp index 25b8385a53..caa235182f 100644 --- a/source/loaders/ext_loader/source/ext_loader_impl.cpp +++ b/source/loaders/ext_loader/source/ext_loader_impl.cpp @@ -76,7 +76,7 @@ typedef struct loader_impl_ext_handle_type union loader_impl_function_cast { - void *ptr; + dynlink_symbol_addr ptr; int (*fn)(void *, void *); }; @@ -352,7 +352,7 @@ int ext_loader_impl_discover(loader_impl impl, loader_handle handle, context ctx { loader_impl_function_cast function_cast; - function_cast.ptr = static_cast(ext.addr); + function_cast.ptr = ext.addr; if (function_cast.fn(impl, loader_impl_handle_container_of(impl, handle)) != 0) { diff --git a/source/loaders/file_loader/include/file_loader/file_loader.h b/source/loaders/file_loader/include/file_loader/file_loader.h index b596e15378..4fff999e25 100644 --- a/source/loaders/file_loader/include/file_loader/file_loader.h +++ b/source/loaders/file_loader/include/file_loader/file_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif FILE_LOADER_API loader_impl_interface file_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(file_loader_impl_interface_singleton); - FILE_LOADER_API const char *file_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(file_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/java_loader/include/java_loader/java_loader.h b/source/loaders/java_loader/include/java_loader/java_loader.h index 4db5d86c2e..b0aaa901d0 100644 --- a/source/loaders/java_loader/include/java_loader/java_loader.h +++ b/source/loaders/java_loader/include/java_loader/java_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif JAVA_LOADER_API loader_impl_interface java_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(java_loader_impl_interface_singleton); - JAVA_LOADER_API const char *java_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(java_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/jl_loader/include/jl_loader/jl_loader.h b/source/loaders/jl_loader/include/jl_loader/jl_loader.h index 574e095044..02d588657b 100644 --- a/source/loaders/jl_loader/include/jl_loader/jl_loader.h +++ b/source/loaders/jl_loader/include/jl_loader/jl_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif JL_LOADER_API loader_impl_interface jl_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(jl_loader_impl_interface_singleton); - JL_LOADER_API const char *jl_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(jl_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/js_loader/include/js_loader/js_loader.h b/source/loaders/js_loader/include/js_loader/js_loader.h index 7af1acf54b..7bbcce7f70 100644 --- a/source/loaders/js_loader/include/js_loader/js_loader.h +++ b/source/loaders/js_loader/include/js_loader/js_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif JS_LOADER_API loader_impl_interface js_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(js_loader_impl_interface_singleton); - JS_LOADER_API const char *js_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(js_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h index b3d633549a..6b74e75197 100644 --- a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h +++ b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif JSM_LOADER_API loader_impl_interface jsm_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(jsm_loader_impl_interface_singleton); - JSM_LOADER_API const char *jsm_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(jsm_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h index db405edd83..e395b8ccc2 100644 --- a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h +++ b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif LLVM_LOADER_API loader_impl_interface llvm_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(llvm_loader_impl_interface_singleton); - LLVM_LOADER_API const char *llvm_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(llvm_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/lua_loader/include/lua_loader/lua_loader.h b/source/loaders/lua_loader/include/lua_loader/lua_loader.h index f93ed53127..8117509070 100644 --- a/source/loaders/lua_loader/include/lua_loader/lua_loader.h +++ b/source/loaders/lua_loader/include/lua_loader/lua_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif LUA_LOADER_API loader_impl_interface lua_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(lua_loader_impl_interface_singleton); - LUA_LOADER_API const char *lua_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(lua_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader.h b/source/loaders/mock_loader/include/mock_loader/mock_loader.h index f92e7d1ddc..2f0302fdf4 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif MOCK_LOADER_API loader_impl_interface mock_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(mock_loader_impl_interface_singleton); - MOCK_LOADER_API const char *mock_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(mock_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 70108f53e2..a9bf13c675 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -158,7 +158,7 @@ target_link_libraries(${target} ${META_PROJECT_NAME}::metacall # MetaCall library # TODO: Implement delayed load - # ${NodeJS_LIBRARY} # NodeJS library + ${NodeJS_LIBRARY} # NodeJS library PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/loaders/node_loader/include/node_loader/node_loader.h b/source/loaders/node_loader/include/node_loader/node_loader.h index 8660376395..84b1009bea 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader.h +++ b/source/loaders/node_loader/include/node_loader/node_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif NODE_LOADER_API loader_impl_interface node_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(node_loader_impl_interface_singleton); - NODE_LOADER_API const char *node_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(node_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index af983d29d9..720c7b1a27 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -783,27 +783,35 @@ static HMODULE (*get_module_handle_a_ptr)(_In_opt_ LPCSTR) = NULL; /* TODO: Impl /* -- Methods -- */ +#if NODE_MAJOR_VERSION >= 12 + #define node_loader_impl_register_module_id node::ModuleFlags::kLinked | 0x08 /* NM_F_DELETEME */ +#else + #define node_loader_impl_register_module_id 0x02 | 0x08 /* NM_F_LINKED | NM_F_DELETEME */ +#endif + #if 1 // NODE_MAJOR_VERSION < 18 - #if NODE_MAJOR_VERSION >= 12 - #define node_loader_impl_register_module_id node::ModuleFlags::kLinked | 0x08 /* NM_F_DELETEME */ - #else - #define node_loader_impl_register_module_id 0x02 | 0x08 /* NM_F_LINKED | NM_F_DELETEME */ - #endif + #define node_loader_impl_register_binding(module) \ + napi_module_register(&module) +#else + // TODO: This won't work, this must be run after NodeJS has initialized and passing the environment + #define node_loader_impl_register_binding(module) \ + AddLinkedBinding(nullptr, module) +#endif - #define node_loader_impl_register_module(name, fn) \ - do \ - { \ - static napi_module node_loader_module = { \ - NAPI_MODULE_VERSION, \ - node_loader_impl_register_module_id, \ - __FILE__, \ - fn, \ - name, \ - NULL, \ - { 0 } \ - }; \ - napi_module_register(&node_loader_module); \ - } while (0) +#define node_loader_impl_register_module(name, fn) \ + do \ + { \ + static napi_module node_loader_module = { \ + NAPI_MODULE_VERSION, \ + node_loader_impl_register_module_id, \ + __FILE__, \ + fn, \ + name, \ + NULL, \ + { 0 } \ + }; \ + node_loader_impl_register_binding(node_loader_module); \ + } while (0) void node_loader_impl_register_linked_bindings() { @@ -813,9 +821,6 @@ void node_loader_impl_register_linked_bindings() /* Initialize Node Loader Port */ node_loader_impl_register_module("node_loader_port_module", node_loader_port_initialize); } -#else -// TODO: New register implementation -#endif void node_loader_impl_exception(napi_env env, napi_status status) { @@ -3806,9 +3811,8 @@ void node_loader_impl_thread(void *data) #endif */ - // #if NODE_MAJOR_VERSION < 18 + /* Register bindings */ node_loader_impl_register_linked_bindings(); - // #endif /* Unlock node implementation mutex */ uv_mutex_unlock(&node_impl->mutex); diff --git a/source/loaders/py_loader/include/py_loader/py_loader.h b/source/loaders/py_loader/include/py_loader/py_loader.h index 0e655cdb81..cdc88d4155 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader.h +++ b/source/loaders/py_loader/include/py_loader/py_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif PY_LOADER_API loader_impl_interface py_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(py_loader_impl_interface_singleton); - PY_LOADER_API const char *py_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(py_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader.h b/source/loaders/rb_loader/include/rb_loader/rb_loader.h index 49b53024c0..4d727e5079 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif RB_LOADER_API loader_impl_interface rb_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(rb_loader_impl_interface_singleton); - RB_LOADER_API const char *rb_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(rb_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h index de574b4b81..a4e399d16e 100644 --- a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h +++ b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif RPC_LOADER_API loader_impl_interface rpc_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(rpc_loader_impl_interface_singleton); - RPC_LOADER_API const char *rpc_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(rpc_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/rs_loader/include/rs_loader/rs_loader.h b/source/loaders/rs_loader/include/rs_loader/rs_loader.h index 75f961a332..61e9c11e85 100644 --- a/source/loaders/rs_loader/include/rs_loader/rs_loader.h +++ b/source/loaders/rs_loader/include/rs_loader/rs_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif RS_LOADER_API loader_impl_interface rs_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(rs_loader_impl_interface_singleton); - RS_LOADER_API const char *rs_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(rs_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/ts_loader/include/ts_loader/ts_loader.h b/source/loaders/ts_loader/include/ts_loader/ts_loader.h index 812c4c2496..b433fd9411 100644 --- a/source/loaders/ts_loader/include/ts_loader/ts_loader.h +++ b/source/loaders/ts_loader/include/ts_loader/ts_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif TS_LOADER_API loader_impl_interface ts_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(ts_loader_impl_interface_singleton); - TS_LOADER_API const char *ts_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(ts_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h index b34e2a5d10..067ea4856f 100644 --- a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h +++ b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h @@ -25,20 +25,14 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif WASM_LOADER_API loader_impl_interface wasm_loader_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(wasm_loader_impl_interface_singleton); - WASM_LOADER_API const char *wasm_loader_print_info(void); -DYNLINK_SYMBOL_EXPORT(wasm_loader_print_info); - #ifdef __cplusplus } #endif diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 8a9ad2eb9c..a5beb250cd 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -72,6 +72,65 @@ static type_id *metacall_type_ids(void *args[], size_t size); /* -- Costructors -- */ +/* TODO: Test, abstract and remove this */ +/* +#include + +extern void *__libc_dlsym(void *map, const char *name); +extern void *__libc_dlopen_mode(const char *name, int mode); + +typedef void *(*dynlink_dlsym_fn)(void *, const char *); + +static dynlink_dlsym_fn dynlink_dlsym_fn_ptr = NULL; + +int dynlink_dlsym_initialize(void) +{ + void *handle = __libc_dlopen_mode("libdl.so.2", RTLD_GLOBAL | RTLD_LAZY); + union + { + void *ptr; + dynlink_dlsym_fn fn; + } cast; + + if (handle == NULL) + { + return 1; + } + + cast.ptr = __libc_dlsym(handle, "dlsym"); + + if (cast.ptr == NULL) + { + return 1; + } + + dynlink_dlsym_fn_ptr = cast.fn; + + return 0; +} + +void *dynlink_dlsym(void *handle, const char *symbol) +{ + if (dynlink_dlsym_fn_ptr == NULL) + { + if (dynlink_dlsym_initialize() != 0) + { + return NULL; + } + } + + return dynlink_dlsym_fn_ptr(handle, symbol); +} + +void *dlsym(void *handle, const char *symbol) +{ + printf("HANDLE %p - Symbol: %s\n", handle, symbol); + + return dynlink_dlsym(handle, symbol); +} +*/ +/* TODO-END */ + portability_constructor(metacall_constructor) { if (metacall_initialize_flag == 1) diff --git a/source/plugin/source/plugin_descriptor.c b/source/plugin/source/plugin_descriptor.c index 491895e050..00f463079c 100644 --- a/source/plugin/source/plugin_descriptor.c +++ b/source/plugin/source/plugin_descriptor.c @@ -65,7 +65,7 @@ plugin_descriptor plugin_descriptor_create(char *path, char *library_name, char return NULL; } - descriptor->iface_singleton = (void *(*)(void))DYNLINK_SYMBOL_GET(address); + descriptor->iface_singleton = (void *(*)(void))(address); if (descriptor->iface_singleton == NULL) { diff --git a/source/plugin/source/plugin_loader.c b/source/plugin/source/plugin_loader.c index 5212f7ebb5..a88ccda719 100644 --- a/source/plugin/source/plugin_loader.c +++ b/source/plugin/source/plugin_loader.c @@ -178,20 +178,19 @@ char *plugin_loader_generate_library_name(const char *name, char *suffix) char *plugin_loader_generate_symbol_iface_name(const char *name, char *suffix) { size_t name_length = strlen(name); - size_t mangle_length = dynlink_symbol_name_mangle(name, name_length, NULL); size_t suffix_length = strlen(suffix); - char *symbol_iface_name = malloc(sizeof(char) * (mangle_length + suffix_length + 1)); + char *symbol_iface_name = malloc(sizeof(char) * (name_length + suffix_length + 1)); if (symbol_iface_name == NULL) { return NULL; } - dynlink_symbol_name_mangle(name, name_length, symbol_iface_name); + memcpy(symbol_iface_name, name, name_length); - memcpy(&symbol_iface_name[mangle_length], suffix, suffix_length); + memcpy(&symbol_iface_name[name_length], suffix, suffix_length); - symbol_iface_name[mangle_length + suffix_length] = '\0'; + symbol_iface_name[name_length + suffix_length] = '\0'; return symbol_iface_name; } diff --git a/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h b/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h index 5269713f94..7a2ce1f079 100644 --- a/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h +++ b/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif BACKTRACE_PLUGIN_API int backtrace_plugin(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(backtrace_plugin); - #ifdef __cplusplus } #endif diff --git a/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h b/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h index 12d8c2caf4..68d6d23f42 100644 --- a/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h +++ b/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif SANDBOX_PLUGIN_API int sandbox_plugin(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(sandbox_plugin); - #ifdef __cplusplus } #endif diff --git a/source/scripts/extension/sum/include/sum_extension/sum_extension.h b/source/scripts/extension/sum/include/sum_extension/sum_extension.h index 4dd93bc046..386bd4d761 100644 --- a/source/scripts/extension/sum/include/sum_extension/sum_extension.h +++ b/source/scripts/extension/sum/include/sum_extension/sum_extension.h @@ -23,16 +23,12 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif SUM_EXTENSION_API int sum_extension(void *loader, void *handle); -DYNLINK_SYMBOL_EXPORT(sum_extension); - #ifdef __cplusplus } #endif diff --git a/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h b/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h index 5d4f2e119f..fb80de34c5 100644 --- a/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h +++ b/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h @@ -27,8 +27,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif @@ -45,8 +43,6 @@ extern "C" { */ METACALL_SERIAL_API serial_interface metacall_serial_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(metacall_serial_impl_interface_singleton); - /** * @brief * Provide the module information @@ -57,8 +53,6 @@ DYNLINK_SYMBOL_EXPORT(metacall_serial_impl_interface_singleton); */ METACALL_SERIAL_API const char *metacall_serial_print_info(void); -DYNLINK_SYMBOL_EXPORT(metacall_serial_print_info); - #ifdef __cplusplus } #endif diff --git a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h index 51e32e3b80..106acb20e6 100644 --- a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h +++ b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h @@ -27,8 +27,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif @@ -45,8 +43,6 @@ extern "C" { */ RAPID_JSON_SERIAL_API serial_interface rapid_json_serial_impl_interface_singleton(void); -DYNLINK_SYMBOL_EXPORT(rapid_json_serial_impl_interface_singleton); - /** * @brief * Provide the module information @@ -57,8 +53,6 @@ DYNLINK_SYMBOL_EXPORT(rapid_json_serial_impl_interface_singleton); */ RAPID_JSON_SERIAL_API const char *rapid_json_serial_print_info(void); -DYNLINK_SYMBOL_EXPORT(rapid_json_serial_print_info); - #ifdef __cplusplus } #endif diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index dc77a7c6b9..3d69b74a27 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -68,17 +68,17 @@ TEST_F(dynlink_test, DefaultConstructor) { static dynlink_symbol_addr mock_loader_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, DYNLINK_SYMBOL_STR("mock_loader_print_info"), &mock_loader_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "mock_loader_print_info", &mock_loader_print_info_addr)); if (mock_loader_print_info_addr != NULL) { - mock_loader_print_func print = DYNLINK_SYMBOL_GET(mock_loader_print_info_addr); + mock_loader_print_func print = mock_loader_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)mock_loader_print_info_addr); - if (DYNLINK_SYMBOL_GET(mock_loader_print_info_addr) != NULL) + if (mock_loader_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } From cbbf4a45a81e306ab3374d3f81758c28c362aa15 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 28 Nov 2024 21:14:33 +0100 Subject: [PATCH 005/364] Solve issues from detours, plugin manager, fork safety and added support to mingw in dynlink. --- .../funchook_detour/scripts/download.bat.in | 6 +++--- .../detours/funchook_detour/scripts/download.sh.in | 10 ++++------ source/dynlink/source/dynlink_impl_win32.c | 6 ++++++ source/metacall/source/metacall_fork.c | 4 ++-- source/plugin/source/plugin_manager.c | 14 +++++++------- 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/source/detours/funchook_detour/scripts/download.bat.in b/source/detours/funchook_detour/scripts/download.bat.in index 8f1fd3842a..a2702001b5 100755 --- a/source/detours/funchook_detour/scripts/download.bat.in +++ b/source/detours/funchook_detour/scripts/download.bat.in @@ -1,11 +1,11 @@ @echo on rem Download repository if it does not exist -if not exist @FUNCHOOK_SOURCE_DIR@/.git ( - if exist @FUNCHOOK_SOURCE_DIR@ ( +if not exist "@FUNCHOOK_SOURCE_DIR@/.git" ( + if exist "@FUNCHOOK_SOURCE_DIR@" ( rmdir /S /Q "@FUNCHOOK_SOURCE_DIR@" ) - "@GIT_EXECUTABLE@" clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git @FUNCHOOK_SOURCE_DIR@ + "@GIT_EXECUTABLE@" clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git "@FUNCHOOK_SOURCE_DIR@" ) rem Write empty CMake file to avoid cmake warnings diff --git a/source/detours/funchook_detour/scripts/download.sh.in b/source/detours/funchook_detour/scripts/download.sh.in index 946485c7bd..122a268bf9 100755 --- a/source/detours/funchook_detour/scripts/download.sh.in +++ b/source/detours/funchook_detour/scripts/download.sh.in @@ -1,11 +1,9 @@ #!/usr/bin/env sh # Download repository if it does not exist -if [ ! -d @FUNCHOOK_SOURCE_DIR@/.git ] -then - if [ -d @FUNCHOOK_SOURCE_DIR@ ] - then - rm -rf @FUNCHOOK_SOURCE_DIR@ +if [ ! -d "@FUNCHOOK_SOURCE_DIR@/.git" ]; then + if [ -d "@FUNCHOOK_SOURCE_DIR@" ]; then + rm -rf "@FUNCHOOK_SOURCE_DIR@" fi - @GIT_EXECUTABLE@ clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git @FUNCHOOK_SOURCE_DIR@ + "@GIT_EXECUTABLE@" clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git "@FUNCHOOK_SOURCE_DIR@" fi diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 75d576f0fd..60532c4636 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -41,7 +41,13 @@ const char *dynlink_impl_interface_extension_win32(void) void dynlink_impl_interface_get_name_win32(dynlink_name name, dynlink_name_impl name_impl, size_t size) { +#if defined(__MINGW32__) || defined(__MINGW64__) + strncpy(name_impl, "lib", size); + + strncat(name_impl, name, size - 1); +#else strncpy(name_impl, name, size); +#endif strncat(name_impl, ".", size - 1); diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index 8eea459f8e..67bcfd6a3a 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -212,7 +212,7 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, void (*metacall_fork_func(void))(void) { - return (void (*)(void)) & fork; + return (void (*)(void))(&fork); } pid_t metacall_fork_hook(void) @@ -325,7 +325,7 @@ int metacall_fork_initialize(void) if (metacall_detour_handle == NULL) { - metacall_detour_handle = detour_install(metacall_detour, (void (*)(void))fork_func, (void (*)(void)) & metacall_fork_hook); + metacall_detour_handle = detour_install(metacall_detour, (void (*)(void))fork_func, (void (*)(void))(&metacall_fork_hook)); if (metacall_detour_handle == NULL) { diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index d3c06044b8..f60155fe62 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -138,16 +138,16 @@ int plugin_manager_initialize(plugin_manager manager, const char *name, const ch return 1; } - } - /* On Windows, pass the library path to the loader so it can find the dependencies of the plugins */ - /* For more information: https://github.com/metacall/core/issues/479 */ + /* On Windows, pass the library path to the loader so it can find the dependencies of the plugins */ + /* For more information: https://github.com/metacall/core/issues/479 */ #if defined(WIN32) || defined(_WIN32) - if (SetDllDirectoryA(manager->library_path) == FALSE) - { - log_write("metacall", LOG_LEVEL_ERROR, "Failed to register the DLL directory %s; plugins with other dependant DLLs may fail to load", manager->library_path); - } + if (SetDllDirectoryA(manager->library_path) == FALSE) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to register the DLL directory %s; plugins with other dependant DLLs may fail to load", manager->library_path); + } #endif + } /* Initialize the plugin loader */ if (manager->l == NULL) From 1927c6252b4b9e6fc1bdfde0b93eb227184f3ab2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 28 Nov 2024 23:58:12 +0100 Subject: [PATCH 006/364] Unified all detours modules, add a destructor in metacall module for detours, add base for metacall link. --- source/metacall/CMakeLists.txt | 2 + source/metacall/include/metacall/metacall.h | 10 ++ .../metacall/include/metacall/metacall_link.h | 58 ++++++++ source/metacall/source/metacall.c | 126 +++++++++--------- source/metacall/source/metacall_fork.c | 99 +++----------- source/metacall/source/metacall_link.c | 117 ++++++++++++++++ 6 files changed, 265 insertions(+), 147 deletions(-) create mode 100644 source/metacall/include/metacall/metacall_link.h create mode 100644 source/metacall/source/metacall_link.c diff --git a/source/metacall/CMakeLists.txt b/source/metacall/CMakeLists.txt index 87146dc9b5..1ab5be1fab 100644 --- a/source/metacall/CMakeLists.txt +++ b/source/metacall/CMakeLists.txt @@ -56,6 +56,7 @@ set(headers ${include_path}/metacall_log.h ${include_path}/metacall_allocator.h ${include_path}/metacall_error.h + ${include_path}/metacall_link.h ) set(sources @@ -64,6 +65,7 @@ set(sources ${source_path}/metacall_log.c ${source_path}/metacall_allocator.c ${source_path}/metacall_error.c + ${source_path}/metacall_link.c ) if(OPTION_FORK_SAFE) diff --git a/source/metacall/include/metacall/metacall.h b/source/metacall/include/metacall/metacall.h index 3e841fdcfa..2ad427ca3c 100644 --- a/source/metacall/include/metacall/metacall.h +++ b/source/metacall/include/metacall/metacall.h @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -96,6 +97,15 @@ METACALL_API extern void *metacall_null_args[1]; */ METACALL_API const char *metacall_serial(void); +/** +* @brief +* Returns default detour used by MetaCall +* +* @return +* Name of the detour to be used with detouring methods +*/ +METACALL_API const char *metacall_detour(void); + /** * @brief * Disables MetaCall logs, must be called before @metacall_initialize. diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h new file mode 100644 index 0000000000..b0665a8242 --- /dev/null +++ b/source/metacall/include/metacall/metacall_link.h @@ -0,0 +1,58 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef METACALL_LINK_H +#define METACALL_LINK_H 1 + +/* -- Headers -- */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Methods -- */ + +/** +* @brief +* Initialize link detours and allocate shared memory +* +* @return +* Zero if success, different from zero otherwise +*/ +METACALL_API int metacall_link_initialize(void); + +// TODO: Implement dlsym hook function table + +/** +* @brief +* Unregister link detours and destroy shared memory +* +* @return +* Zero if success, different from zero otherwise +*/ +METACALL_API int metacall_link_destroy(void); + +#ifdef __cplusplus +} +#endif + +#endif /* METACALL_LINK_H */ diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index a5beb250cd..02ab3deaa6 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -33,6 +33,8 @@ #include +#include + #include #include @@ -44,6 +46,7 @@ #define METACALL_ARGS_SIZE 0x10 #define METACALL_SERIAL "rapid_json" +#define METACALL_DETOUR "funchook" /* -- Type Definitions -- */ @@ -69,68 +72,10 @@ static loader_path plugin_path = { 0 }; static int metacall_plugin_extension_load(void); static void *metacallv_method(void *target, const char *name, method_invoke_ptr call, vector v, void *args[], size_t size); static type_id *metacall_type_ids(void *args[], size_t size); +static void metacall_detour_destructor(void); /* -- Costructors -- */ -/* TODO: Test, abstract and remove this */ -/* -#include - -extern void *__libc_dlsym(void *map, const char *name); -extern void *__libc_dlopen_mode(const char *name, int mode); - -typedef void *(*dynlink_dlsym_fn)(void *, const char *); - -static dynlink_dlsym_fn dynlink_dlsym_fn_ptr = NULL; - -int dynlink_dlsym_initialize(void) -{ - void *handle = __libc_dlopen_mode("libdl.so.2", RTLD_GLOBAL | RTLD_LAZY); - union - { - void *ptr; - dynlink_dlsym_fn fn; - } cast; - - if (handle == NULL) - { - return 1; - } - - cast.ptr = __libc_dlsym(handle, "dlsym"); - - if (cast.ptr == NULL) - { - return 1; - } - - dynlink_dlsym_fn_ptr = cast.fn; - - return 0; -} - -void *dynlink_dlsym(void *handle, const char *symbol) -{ - if (dynlink_dlsym_fn_ptr == NULL) - { - if (dynlink_dlsym_initialize() != 0) - { - return NULL; - } - } - - return dynlink_dlsym_fn_ptr(handle, symbol); -} - -void *dlsym(void *handle, const char *symbol) -{ - printf("HANDLE %p - Symbol: %s\n", handle, symbol); - - return dynlink_dlsym(handle, symbol); -} -*/ -/* TODO-END */ - portability_constructor(metacall_constructor) { if (metacall_initialize_flag == 1) @@ -179,6 +124,13 @@ const char *metacall_serial(void) return metacall_serial_str; } +const char *metacall_detour(void) +{ + static const char metacall_detour_str[] = METACALL_DETOUR; + + return metacall_detour_str; +} + void metacall_log_null(void) { metacall_log_null_flag = 0; @@ -237,6 +189,31 @@ int metacall_plugin_extension_load(void) return result; } +void metacall_detour_destructor(void) +{ + log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour destruction"); + + /* Destroy link */ + if (metacall_link_destroy() != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall link destruction"); + } + + /* Destroy fork */ +#ifdef METACALL_FORK_SAFE + if (metacall_config_flags & METACALL_FLAGS_FORK_SAFE) + { + if (metacall_fork_destroy() != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall fork destruction"); + } + } +#endif /* METACALL_FORK_SAFE */ + + /* Destroy detour */ + detour_destroy(); +} + int metacall_initialize(void) { memory_allocator allocator; @@ -272,18 +249,37 @@ int metacall_initialize(void) return 1; } -#ifdef METACALL_FORK_SAFE - if (metacall_config_flags & METACALL_FLAGS_FORK_SAFE) + /* Initialize detours */ { - if (metacall_fork_initialize() != 0) + if (detour_initialize() != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall fork initialization"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour initialization"); + return 1; } - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall fork initialized"); - } + /* Initialize link */ + if (metacall_link_initialize() != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall link initialization"); + } + +#ifdef METACALL_FORK_SAFE + if (metacall_config_flags & METACALL_FLAGS_FORK_SAFE) + { + if (metacall_fork_initialize() != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall fork initialization"); + } + + log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall fork initialized"); + } #endif /* METACALL_FORK_SAFE */ + /* Define destructor for detouring (it must be executed at the end to prevent problems with fork mechanisms) */ + atexit(metacall_detour_destructor); + } + + /* Initialize configuration and serializer */ allocator = memory_allocator_std(&malloc, &realloc, &free); if (configuration_initialize(metacall_serial(), NULL, allocator) != 0) diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index 67bcfd6a3a..379a1a61c1 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -102,17 +102,11 @@ pid_t metacall_fork_hook(void); /* -- Private Variables -- */ -static const char metacall_fork_detour_name[] = "funchook"; - -static detour metacall_detour = NULL; - -static detour_handle metacall_detour_handle = NULL; +static detour_handle detour_fork_handle = NULL; static metacall_pre_fork_callback_ptr metacall_pre_fork_callback = NULL; static metacall_post_fork_callback_ptr metacall_post_fork_callback = NULL; -static int metacall_fork_flag = 1; - /* -- Methods -- */ #if defined(WIN32) || defined(_WIN32) || \ @@ -142,7 +136,7 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, HANDLE DebugPort, PRTL_USER_PROCESS_INFORMATION ProcessInformation) { - RtlCloneUserProcessPtr metacall_fork_trampoline = (RtlCloneUserProcessPtr)detour_trampoline(metacall_detour_handle); + RtlCloneUserProcessPtr metacall_fork_trampoline = (RtlCloneUserProcessPtr)detour_trampoline(detour_fork_handle); metacall_pre_fork_callback_ptr pre_callback = metacall_pre_fork_callback; metacall_post_fork_callback_ptr post_callback = metacall_post_fork_callback; @@ -159,7 +153,7 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, /* TODO: Context */ if (pre_callback(NULL) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour pre callback invocation"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour pre fork callback invocation"); } } @@ -198,7 +192,7 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, /* TODO: Context */ if (post_callback(_getpid(), NULL) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour post callback invocation"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour post fork callback invocation"); } } @@ -217,7 +211,7 @@ void (*metacall_fork_func(void))(void) pid_t metacall_fork_hook(void) { - pid_t (*metacall_fork_trampoline)(void) = (pid_t(*)(void))detour_trampoline(metacall_detour_handle); + pid_t (*metacall_fork_trampoline)(void) = (pid_t(*)(void))detour_trampoline(detour_fork_handle); metacall_pre_fork_callback_ptr pre_callback = metacall_pre_fork_callback; metacall_post_fork_callback_ptr post_callback = metacall_post_fork_callback; @@ -234,7 +228,7 @@ pid_t metacall_fork_hook(void) /* TODO: Context */ if (pre_callback(NULL) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour pre callback invocation"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour pre fork callback invocation"); } } @@ -268,7 +262,7 @@ pid_t metacall_fork_hook(void) /* TODO: Context */ if (post_callback(pid, NULL) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour post callback invocation"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour post fork callback invocation"); } } @@ -279,57 +273,17 @@ pid_t metacall_fork_hook(void) #error "Unknown metacall fork safety platform" #endif -static void metacall_fork_exit(void) -{ - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall atexit triggered"); - - if (metacall_fork_destroy() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall fork destruction"); - } - - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall fork destroyed"); -} - int metacall_fork_initialize(void) { - void (*fork_func)(void) = metacall_fork_func(); - - if (fork_func == NULL) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid fork function pointer"); - - return 1; - } - - if (detour_initialize() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour initialization"); - - return 1; - } - - if (metacall_detour == NULL) - { - metacall_detour = detour_create(metacall_fork_detour_name); + detour d = detour_create(metacall_detour()); - if (metacall_detour == NULL) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour creation"); - - metacall_fork_destroy(); - - return 1; - } - } - - if (metacall_detour_handle == NULL) + if (detour_fork_handle == NULL) { - metacall_detour_handle = detour_install(metacall_detour, (void (*)(void))fork_func, (void (*)(void))(&metacall_fork_hook)); + detour_fork_handle = detour_install(d, (void (*)(void))metacall_fork_func(), (void (*)(void))(&metacall_fork_hook)); - if (metacall_detour_handle == NULL) + if (detour_fork_handle == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour installation"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork installation"); metacall_fork_destroy(); @@ -337,13 +291,6 @@ int metacall_fork_initialize(void) } } - if (metacall_fork_flag == 1) - { - atexit(&metacall_fork_exit); - - metacall_fork_flag = 0; - } - return 0; } @@ -357,32 +304,20 @@ int metacall_fork_destroy(void) { int result = 0; - if (metacall_detour_handle != NULL) + if (detour_fork_handle != NULL) { - if (detour_uninstall(metacall_detour, metacall_detour_handle) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour uninstall"); - - result = 1; - } - - metacall_detour_handle = NULL; - } + detour d = detour_create(metacall_detour()); - if (metacall_detour != NULL) - { - if (detour_clear(metacall_detour) != 0) + if (detour_uninstall(d, detour_fork_handle) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour clear"); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork uninstall"); result = 1; } - metacall_detour = NULL; + detour_fork_handle = NULL; } - detour_destroy(); - metacall_pre_fork_callback = NULL; metacall_post_fork_callback = NULL; diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c new file mode 100644 index 0000000000..82f0ca851c --- /dev/null +++ b/source/metacall/source/metacall_link.c @@ -0,0 +1,117 @@ +// /* +// * MetaCall Library by Parra Studios +// * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +// * +// * A library for providing a foreign function interface calls. +// * +// */ + +// /* -- Headers -- */ + +#include +#include + +#include + +#include + +#include + +/* -- Private Variables -- */ + +static detour_handle detour_link_handle = NULL; + +#if defined(WIN32) || defined(_WIN32) || \ + defined(__CYGWIN__) || defined(__CYGWIN32__) || \ + defined(__MINGW32__) || defined(__MINGW64__) + + #include + +void (*metacall_link_func(void))(void) +{ + return (void (*)(void))(&GetProcAddress); +} + +FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) +{ + typedef FARPROC (*metacall_link_func_ptr)(HMODULE, LPCSTR); + + metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); + + // TODO: Intercept if any, iterate hash map elements and invoke them + + return metacall_link_trampoline(handle, symbol); +} + +#elif defined(unix) || defined(__unix__) || defined(__unix) || \ + defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__CYGWIN__) || defined(__CYGWIN32__) || \ + (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) + + #include + +void (*metacall_link_func(void))(void) +{ + return (void (*)(void))(&dlsym); +} + +void *metacall_link_hook(void *handle, const char *symbol) +{ + typedef void *(*metacall_link_func_ptr)(void *, const char *); + + metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); + + // TODO: Intercept if any, iterate hash map elements and invoke them + + return metacall_link_trampoline(handle, symbol); +} + +#else + #error "Unknown metacall link platform" +#endif + +/* -- Methods -- */ + +int metacall_link_initialize(void) +{ + detour d = detour_create(metacall_detour()); + + if (detour_link_handle == NULL) + { + detour_link_handle = detour_install(d, (void (*)(void))metacall_link_func(), (void (*)(void))(&metacall_link_hook)); + + if (detour_link_handle == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour link installation"); + + metacall_link_destroy(); + + return 1; + } + } + + return 0; +} + +int metacall_link_destroy(void) +{ + int result = 0; + + if (detour_link_handle != NULL) + { + detour d = detour_create(metacall_detour()); + + if (detour_uninstall(d, detour_link_handle) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork uninstall"); + + result = 1; + } + + detour_link_handle = NULL; + } + + // TODO: Destroy hash map + + return result; +} From d9604dd16296ccd1c050d7f1d3f6df3ce9040760 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 29 Nov 2024 00:55:44 +0100 Subject: [PATCH 007/364] Implemented metacall link table. --- source/dynlink/include/dynlink/dynlink_type.h | 14 +++ .../metacall/include/metacall/metacall_link.h | 33 +++++- source/metacall/source/metacall_fork.c | 14 ++- source/metacall/source/metacall_link.c | 103 ++++++++++++++++-- 4 files changed, 150 insertions(+), 14 deletions(-) diff --git a/source/dynlink/include/dynlink/dynlink_type.h b/source/dynlink/include/dynlink/dynlink_type.h index 7661172e78..5347eb51a0 100644 --- a/source/dynlink/include/dynlink/dynlink_type.h +++ b/source/dynlink/include/dynlink/dynlink_type.h @@ -62,6 +62,20 @@ typedef void (*dynlink_symbol_addr)(void); /**< Function pointer referrin \ } while (0) +#define dynlink_symbol_uncast(fn, result) \ + do \ + { \ + union \ + { \ + void *ptr; \ + dynlink_symbol_addr fn; \ + } cast; \ +\ + cast.fn = (fn); \ + (result) = cast.ptr; \ +\ + } while (0) + #ifdef __cplusplus } #endif diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index b0665a8242..9d5f7d8901 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -40,7 +40,38 @@ extern "C" { */ METACALL_API int metacall_link_initialize(void); -// TODO: Implement dlsym hook function table +/** +* @brief +* Register a function pointer in order to allow function +* interposition when loading a library, if you register a +* function @symbol called 'foo', when you try to dlsym (or the equivalent +* on every platform), you will get the pointer to @fn, even if +* the symbol does not exist in the library, it will work. +* Function interposition is required in order to hook into runtimes +* and dynamically interpose our functions. +* +* @param[in] symbol +* Name of the function to be interposed +* +* @param[in] fn +* Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol +* +* @return +* Zero if success, different from zero otherwise +*/ +METACALL_API int metacall_link_register(const char *symbol, void (*fn)(void)); + +/** +* @brief +* Remove the hook previously registered +* +* @param[in] symbol +* Name of the function to be removed +* +* @return +* Zero if success, different from zero otherwise +*/ +METACALL_API int metacall_link_unregister(const char *symbol); /** * @brief diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index 379a1a61c1..6cbe972e68 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -1,8 +1,20 @@ /* * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia * - * A library for providing a foreign function interface calls. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. * */ diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 82f0ca851c..d1343c52df 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -1,26 +1,44 @@ -// /* -// * MetaCall Library by Parra Studios -// * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia -// * -// * A library for providing a foreign function interface calls. -// * -// */ - -// /* -- Headers -- */ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* -- Headers -- */ #include #include #include +#include + #include +#include + #include /* -- Private Variables -- */ static detour_handle detour_link_handle = NULL; +static set metacall_link_table = NULL; + #if defined(WIN32) || defined(_WIN32) || \ defined(__CYGWIN__) || defined(__CYGWIN32__) || \ defined(__MINGW32__) || defined(__MINGW64__) @@ -38,7 +56,17 @@ FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); - // TODO: Intercept if any, iterate hash map elements and invoke them + /* Intercept if any */ + void *ptr = set_get(metacall_link_table, (set_key)symbol); + + if (ptr != NULL) + { + dynlink_symbol_addr addr; + + dynlink_symbol_cast(void *, ptr, addr); + + return (FARPROC)addr; + } return metacall_link_trampoline(handle, symbol); } @@ -61,7 +89,15 @@ void *metacall_link_hook(void *handle, const char *symbol) metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); - // TODO: Intercept if any, iterate hash map elements and invoke them + /* Intercept function if any */ + void *ptr = set_get(metacall_link_table, (set_key)symbol); + + log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour link interception: %s -> %p", symbol, ptr); + + if (ptr != NULL) + { + return ptr; + } return metacall_link_trampoline(handle, symbol); } @@ -90,9 +126,47 @@ int metacall_link_initialize(void) } } + if (metacall_link_table == NULL) + { + metacall_link_table = set_create(&hash_callback_str, &comparable_callback_str); + + if (metacall_link_table == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to create link table"); + + metacall_link_destroy(); + + return 1; + } + } + return 0; } +int metacall_link_register(const char *symbol, void (*fn)(void)) +{ + void *ptr; + + if (metacall_link_table == NULL) + { + return 1; + } + + dynlink_symbol_uncast(fn, ptr); + + return set_insert(metacall_link_table, (set_key)symbol, ptr); +} + +int metacall_link_unregister(const char *symbol) +{ + if (metacall_link_table == NULL) + { + return 1; + } + + return (set_remove(metacall_link_table, (set_key)symbol) == NULL); +} + int metacall_link_destroy(void) { int result = 0; @@ -111,7 +185,12 @@ int metacall_link_destroy(void) detour_link_handle = NULL; } - // TODO: Destroy hash map + if (metacall_link_table != NULL) + { + set_destroy(metacall_link_table); + + metacall_link_table = NULL; + } return result; } From 83de5532b76c7b213567964b18f5ed4df329b035 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Dec 2024 02:08:10 +0100 Subject: [PATCH 008/364] Initialization working properly on NodeJS. --- source/loader/include/loader/loader.h | 2 + source/loader/include/loader/loader_impl.h | 2 + source/loader/source/loader.c | 12 + source/loader/source/loader_impl.c | 2 - source/loaders/node_loader/CMakeLists.txt | 2 +- .../node_loader/bootstrap/lib/bootstrap.js | 20 +- .../include/node_loader/node_loader_impl.h | 2 + .../node_loader/node_loader_trampoline.h | 2 + .../node_loader/source/node_loader_impl.cpp | 468 +++++++++--------- .../node_loader/source/node_loader_port.cpp | 19 +- .../source/node_loader_trampoline.cpp | 28 ++ source/metacall/source/metacall.c | 11 + source/ports/node_port/index.js | 15 +- 13 files changed, 340 insertions(+), 245 deletions(-) diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index 3c31ba98d4..a108b3c5cb 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -51,6 +51,8 @@ LOADER_API void loader_initialization_register(loader_impl impl); LOADER_API int loader_initialize(void); +LOADER_NO_EXPORT int loader_initialize_host(const loader_tag tag); + LOADER_API int loader_is_initialized(const loader_tag tag); LOADER_API int loader_register(const char *name, loader_register_invoke invoke, function *func, type_id return_type, size_t arg_size, type_id args_type_id[]); diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index 8eea205e23..726cdf2ca6 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -35,6 +35,8 @@ extern "C" { /* -- Methods -- */ +LOADER_NO_EXPORT int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl); + LOADER_API int loader_impl_is_initialized(loader_impl impl); LOADER_API loader_impl loader_impl_create(const loader_tag tag); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 13b1364458..8fc4901189 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -201,6 +201,18 @@ void loader_initialization_register_plugin(plugin p) } } +int loader_initialize_host(const loader_tag tag) +{ + plugin p = plugin_manager_get(&loader_manager, tag); + + if (p == NULL) + { + return 1; + } + + return loader_impl_initialize(&loader_manager, p, plugin_impl_type(p, loader_impl)); +} + int loader_is_initialized(const loader_tag tag) { plugin p = plugin_manager_get(&loader_manager, tag); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 80c58db320..7d9bdbf4c8 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -123,8 +123,6 @@ static configuration loader_impl_initialize_configuration(plugin p); static int loader_impl_initialize_registered(plugin_manager manager, plugin p); -static int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl); - static loader_handle_impl loader_impl_load_handle(loader_impl impl, loader_impl_interface iface, loader_handle module, const char *path, size_t size); static int loader_impl_handle_init(loader_impl impl, const char *path, loader_handle_impl handle_impl, void **handle_ptr, int populated); diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index a9bf13c675..70108f53e2 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -158,7 +158,7 @@ target_link_libraries(${target} ${META_PROJECT_NAME}::metacall # MetaCall library # TODO: Implement delayed load - ${NodeJS_LIBRARY} # NodeJS library + # ${NodeJS_LIBRARY} # NodeJS library PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/loaders/node_loader/bootstrap/lib/bootstrap.js b/source/loaders/node_loader/bootstrap/lib/bootstrap.js index 5582ab48eb..4f2c5b766f 100644 --- a/source/loaders/node_loader/bootstrap/lib/bootstrap.js +++ b/source/loaders/node_loader/bootstrap/lib/bootstrap.js @@ -408,14 +408,20 @@ function node_loader_trampoline_await_future(trampoline) { }; } -module.exports = ((impl, ptr) => { +const startup = (impl, ptr, trampoline_exports) => { try { if (typeof impl === 'undefined' || typeof ptr === 'undefined') { - throw new Error('Process arguments (process.argv[2], process.argv[3]) not defined.'); + throw new Error('Bootstrap startup arguments impl or ptr are not defined.'); } // Get trampoline from list of linked bindings - const trampoline = process._linkedBinding('node_loader_trampoline_module'); + const trampoline = (() => { + if (trampoline_exports) { + return trampoline_exports; + } + + return process._linkedBinding('node_loader_trampoline_module'); + })(); const node_loader_ptr = trampoline.register(impl, ptr, { 'initialize': node_loader_trampoline_initialize, @@ -433,4 +439,12 @@ module.exports = ((impl, ptr) => { } catch (ex) { console.log('Exception in bootstrap.js trampoline initialization:', ex); } +}; + +module.exports = ((impl, ptr) => { + if (impl === undefined || ptr === undefined) { + return startup; + } else { + return startup(impl, ptr); + } })(process.argv[2], process.argv[3]); diff --git a/source/loaders/node_loader/include/node_loader/node_loader_impl.h b/source/loaders/node_loader/include/node_loader/node_loader_impl.h index 6aa1f34488..b41893a623 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_impl.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_impl.h @@ -69,6 +69,8 @@ NODE_LOADER_NO_EXPORT void node_loader_impl_print_handles(loader_impl_node node_ NODE_LOADER_NO_EXPORT int64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl); +NODE_LOADER_NO_EXPORT napi_value node_loader_impl_register_bootstrap_startup(loader_impl_node node_impl, napi_env env); + #ifdef __cplusplus } #endif diff --git a/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h b/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h index 228d6f5c6b..84ea34ccfc 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h @@ -33,6 +33,8 @@ typedef void *(*node_loader_trampoline_register_ptr)(void *, void *, void *); NODE_LOADER_NO_EXPORT napi_value node_loader_trampoline_initialize(napi_env env, napi_value exports); +NODE_LOADER_NO_EXPORT napi_value node_loader_trampoline_initialize_object(napi_env env); + #ifdef __cplusplus } #endif diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 720c7b1a27..053754289d 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -77,9 +77,6 @@ extern char **environ; #include #include -#include -#include -#include #include #include @@ -553,6 +550,118 @@ struct loader_impl_async_destroy_safe_type node_impl(node_impl), has_finished(false) {} }; +static void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *function_table_object_ptr); + +typedef struct node_loader_impl_startup_args_type +{ + /* Executable path */ + portability_executable_path_str exe_path_str = { 0 }; + portability_executable_path_length length = 0; + size_t exe_path_str_size = 0, exe_path_str_offset = 0; + + /* Bootstrap path */ + loader_path bootstrap_path_str = { 0 }; + size_t bootstrap_path_str_size = 0; + + /* The node_impl pointer */ + char *node_impl_ptr_str = nullptr; + size_t node_impl_ptr_str_size = 0; + + /* The register function pointer */ + char *register_ptr_str = nullptr; + size_t register_ptr_str_size = 0; + + node_loader_impl_startup_args_type() {} + + ~node_loader_impl_startup_args_type() + { + if (node_impl_ptr_str != nullptr) + { + delete[] node_impl_ptr_str; + } + + if (register_ptr_str != nullptr) + { + delete[] register_ptr_str; + } + } + + int initialize(loader_impl_node node_impl, configuration config) + { + /* Get the executable */ + if (portability_executable_path(exe_path_str, &length) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Node loader failed to retrieve the executable path (%s)", exe_path_str); + return 1; + } + + for (size_t iterator = 0; iterator <= (size_t)length; ++iterator) + { +#if defined(WIN32) || defined(_WIN32) + if (exe_path_str[iterator] == '\\') +#else + if (exe_path_str[iterator] == '/') +#endif + { + exe_path_str_offset = iterator + 1; + } + } + + exe_path_str_size = (size_t)length - exe_path_str_offset + 1; + + /* Get the bootstrap.js path */ + static const char bootstrap_file_str[] = "bootstrap.js"; + + if (node_loader_impl_bootstrap_path(bootstrap_file_str, sizeof(bootstrap_file_str) - 1, config, bootstrap_path_str, &bootstrap_path_str_size) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "LOADER_LIBRARY_PATH environment variable or loader_library_path field in configuration is not defined, bootstrap.js cannot be found"); + return 1; + } + + /* Get node impl pointer */ + ssize_t node_impl_ptr_length = snprintf(NULL, 0, "%p", (void *)node_impl); + + if (node_impl_ptr_length <= 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid node impl pointer length in NodeJS thread"); + return 1; + } + + node_impl_ptr_str_size = static_cast(node_impl_ptr_length + 1); + node_impl_ptr_str = new char[node_impl_ptr_str_size]; + + if (node_impl_ptr_str == nullptr) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid node impl pointer initialization in NodeJS thread"); + return 1; + } + + snprintf(node_impl_ptr_str, node_impl_ptr_str_size, "%p", (void *)node_impl); + + /* Get register pointer */ + ssize_t register_ptr_length = snprintf(NULL, 0, "%p", (void *)&node_loader_impl_register); + + if (register_ptr_length <= 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid register pointer length in NodeJS thread"); + return 1; + } + + register_ptr_str_size = static_cast(register_ptr_length + 1); + register_ptr_str = new char[register_ptr_str_size]; + + if (register_ptr_str == nullptr) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid register pointer initialization in NodeJS thread"); + return 1; + } + + snprintf(register_ptr_str, register_ptr_str_size, "%p", (void *)&node_loader_impl_register); + + return 0; + } +} * node_loader_impl_startup_args; + struct loader_impl_node_type { /* TODO: The current implementation may not support multi-isolate environments. We should test it. */ @@ -588,8 +697,8 @@ struct loader_impl_node_type uv_thread_t thread_log_id; #endif + node_loader_impl_startup_args_type thread_data; int result; - const char *error_message; /* TODO: This implementation won't work for multi-isolate environments. We should test it. */ std::thread::id js_thread_id; @@ -688,13 +797,6 @@ typedef struct loader_impl_async_func_await_trampoline_type } * loader_impl_async_func_await_trampoline; -typedef struct loader_impl_thread_type -{ - loader_impl_node node_impl; - configuration config; - -} * loader_impl_thread; - typedef struct loader_impl_napi_to_value_callback_closure_type { value func; @@ -702,6 +804,23 @@ typedef struct loader_impl_napi_to_value_callback_closure_type } * loader_impl_napi_to_value_callback_closure; +class loader_impl_napi_constructor +{ +public: + loader_impl_napi_constructor() + { + if (metacall_link_register("napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Node loader failed register the link hook"); + } + } + + ~loader_impl_napi_constructor() {} +}; + +/* Initializer of napi_register_module_v1 */ +static loader_impl_napi_constructor loader_impl_napi_ctor; + /* Type conversion */ static napi_value node_loader_impl_napi_to_value_callback(napi_env env, napi_callback_info info); @@ -757,8 +876,6 @@ static void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destro static char *node_loader_impl_get_property_as_char(napi_env env, napi_value obj, const char *prop); /* Loader */ -static void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *function_table_object_ptr); - static void node_loader_impl_thread(void *data); #ifdef __ANDROID__ @@ -3590,185 +3707,30 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi void node_loader_impl_thread(void *data) { - loader_impl_thread thread_data = static_cast(data); - loader_impl_node node_impl = thread_data->node_impl; - configuration config = thread_data->config; + loader_impl_node node_impl = static_cast(data); + node_loader_impl_startup_args args = &node_impl->thread_data; /* Lock node implementation mutex */ uv_mutex_lock(&node_impl->mutex); - /* TODO: Reimplement from here to ... */ - portability_executable_path_str exe_path_str = { 0 }; - portability_executable_path_length length = 0; - size_t exe_path_str_size = 0, exe_path_str_offset = 0; - - if (portability_executable_path(exe_path_str, &length) != 0) - { - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Node loader failed to retrieve the executable path"; - - /* TODO: Make logs thread safe */ - /* log_write("metacall", LOG_LEVEL_ERROR, "Node loader failed to retrieve the executable path (%s)", exe_path_str); */ - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - for (size_t iterator = 0; iterator <= (size_t)length; ++iterator) - { -#if defined(WIN32) || defined(_WIN32) - if (exe_path_str[iterator] == '\\') -#else - if (exe_path_str[iterator] == '/') -#endif - { - exe_path_str_offset = iterator + 1; - } - } - - exe_path_str_size = (size_t)length - exe_path_str_offset + 1; - - /* Get the boostrap path */ - static const char bootstrap_file_str[] = "bootstrap.js"; - loader_path bootstrap_path_str = { 0 }; - size_t bootstrap_path_str_size = 0; - - if (node_loader_impl_bootstrap_path(bootstrap_file_str, sizeof(bootstrap_file_str) - 1, config, bootstrap_path_str, &bootstrap_path_str_size) != 0) - { - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "LOADER_LIBRARY_PATH environment variable or loader_library_path field in configuration is not defined, bootstrap.js cannot be found"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - /* Get node impl pointer */ - char *node_impl_ptr_str; - size_t node_impl_ptr_str_size; - - ssize_t node_impl_ptr_length = snprintf(NULL, 0, "%p", (void *)node_impl); - - if (node_impl_ptr_length <= 0) - { - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Invalid node impl pointer length in NodeJS thread"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - node_impl_ptr_str_size = static_cast(node_impl_ptr_length + 1); - node_impl_ptr_str = new char[node_impl_ptr_str_size]; - - if (node_impl_ptr_str == nullptr) - { - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Invalid node impl pointer initialization in NodeJS thread"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - snprintf(node_impl_ptr_str, node_impl_ptr_str_size, "%p", (void *)node_impl); - - /* Get register pointer */ - char *register_ptr_str; - size_t register_ptr_str_size; - ssize_t register_ptr_length = snprintf(NULL, 0, "%p", (void *)&node_loader_impl_register); - - if (register_ptr_length <= 0) - { - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Invalid register pointer length in NodeJS thread"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - register_ptr_str_size = static_cast(register_ptr_length + 1); - register_ptr_str = new char[register_ptr_str_size]; - - if (register_ptr_str == nullptr) - { - delete[] node_impl_ptr_str; - - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Invalid register pointer initialization in NodeJS thread"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - - snprintf(register_ptr_str, register_ptr_str_size, "%p", (void *)&node_loader_impl_register); - /* Define argv_str contigously allocated with: executable name, bootstrap file, node impl pointer and register pointer */ - size_t argv_str_size = exe_path_str_size + bootstrap_path_str_size + node_impl_ptr_str_size + register_ptr_str_size; + size_t argv_str_size = args->exe_path_str_size + args->bootstrap_path_str_size + args->node_impl_ptr_str_size + args->register_ptr_str_size; char *argv_str = new char[argv_str_size]; - if (argv_str == nullptr) - { - delete[] node_impl_ptr_str; - delete[] register_ptr_str; - - /* Report error (TODO: Implement it with thread safe logs) */ - node_impl->error_message = "Invalid argv initialization in NodeJS thread"; - - /* Signal start condition */ - uv_cond_signal(&node_impl->cond); - - /* Unlock node implementation mutex */ - uv_mutex_unlock(&node_impl->mutex); - - return; - } - /* Initialize the argv string memory */ memset(argv_str, 0, sizeof(char) * argv_str_size); - memcpy(&argv_str[0], &exe_path_str[exe_path_str_offset], exe_path_str_size); - memcpy(&argv_str[exe_path_str_size], bootstrap_path_str, bootstrap_path_str_size); - memcpy(&argv_str[exe_path_str_size + bootstrap_path_str_size], node_impl_ptr_str, node_impl_ptr_str_size); - memcpy(&argv_str[exe_path_str_size + bootstrap_path_str_size + node_impl_ptr_str_size], register_ptr_str, register_ptr_str_size); - - delete[] node_impl_ptr_str; - delete[] register_ptr_str; + memcpy(&argv_str[0], &args->exe_path_str[args->exe_path_str_offset], args->exe_path_str_size); + memcpy(&argv_str[args->exe_path_str_size], args->bootstrap_path_str, args->bootstrap_path_str_size); + memcpy(&argv_str[args->exe_path_str_size + args->bootstrap_path_str_size], args->node_impl_ptr_str, args->node_impl_ptr_str_size); + memcpy(&argv_str[args->exe_path_str_size + args->bootstrap_path_str_size + args->node_impl_ptr_str_size], args->register_ptr_str, args->register_ptr_str_size); /* Define argv */ char *argv[] = { &argv_str[0], - &argv_str[exe_path_str_size], - &argv_str[exe_path_str_size + bootstrap_path_str_size], - &argv_str[exe_path_str_size + bootstrap_path_str_size + node_impl_ptr_str_size], + &argv_str[args->exe_path_str_size], + &argv_str[args->exe_path_str_size + args->bootstrap_path_str_size], + &argv_str[args->exe_path_str_size + args->bootstrap_path_str_size + args->node_impl_ptr_str_size], NULL }; @@ -3817,8 +3779,6 @@ void node_loader_impl_thread(void *data) /* Unlock node implementation mutex */ uv_mutex_unlock(&node_impl->mutex); - /* Register bindings for versions older than 18 */ - /* Start NodeJS runtime */ int result = node::Start(argc, reinterpret_cast(argv)); @@ -3915,7 +3875,6 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con /* Initialize execution result */ node_impl->result = 1; - node_impl->error_message = NULL; /* Initialize the reference to the loader so we can use it on the destruction */ node_impl->impl = impl; @@ -3936,15 +3895,19 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con } #endif - struct loader_impl_thread_type thread_data = { - node_impl, - config - }; + if (node_impl->thread_data.initialize(node_impl, config) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid startup arguments creation"); + + delete node_impl; + + return NULL; + } if (loader_impl_get_option_host(impl) == 0) { /* Create NodeJS thread */ - if (uv_thread_create(&node_impl->thread, node_loader_impl_thread, &thread_data) != 0) + if (uv_thread_create(&node_impl->thread, node_loader_impl_thread, node_impl) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid NodeJS Thread creation"); @@ -3960,50 +3923,45 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con uv_cond_wait(&node_impl->cond, &node_impl->mutex); - if (node_impl->error_message != NULL) - { - uv_mutex_unlock(&node_impl->mutex); - - /* TODO: Remove this when implementing thread safe */ - log_write("metacall", LOG_LEVEL_ERROR, node_impl->error_message); - - return NULL; - } - uv_mutex_unlock(&node_impl->mutex); - } - - /* Call initialize function with thread safe */ - { - loader_impl_async_initialize_safe_type initialize_safe(node_impl, value_to_string(configuration_value(config, "loader_library_path"))); - int result = 1; - /* Check if we are in the JavaScript thread */ - if (node_impl->js_thread_id == std::this_thread::get_id()) + /* Call initialize function with thread safe (only when not using host) */ { - /* We are already in the V8 thread, we can call safely */ - node_loader_impl_initialize_safe(node_impl->env, &initialize_safe); + loader_impl_async_initialize_safe_type initialize_safe(node_impl, value_to_string(configuration_value(config, "loader_library_path"))); + int result = 1; - /* Set up return of the function call */ - result = initialize_safe.result; - } - else - { - /* Submit the task to the async queue */ - loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_initialize, initialize_safe); + /* Check if we are in the JavaScript thread */ + if (node_impl->js_thread_id == std::this_thread::get_id()) + { + /* We are already in the V8 thread, we can call safely */ + node_loader_impl_initialize_safe(node_impl->env, &initialize_safe); - /* Set up return of the function call */ - result = initialize_safe.result; - } + /* Set up return of the function call */ + result = initialize_safe.result; + } + else + { + /* Submit the task to the async queue */ + loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_initialize, initialize_safe); - if (result != 0) - { - /* TODO: Implement better error message */ - log_write("metacall", LOG_LEVEL_ERROR, "Call to initialization function node_loader_impl_async_initialize_safe failed"); + /* Set up return of the function call */ + result = initialize_safe.result; + } - /* TODO: Handle properly the error */ + if (result != 0) + { + /* TODO: Implement better error message */ + log_write("metacall", LOG_LEVEL_ERROR, "Call to initialization function node_loader_impl_async_initialize_safe failed"); + + /* TODO: Handle properly the error */ + } } } + else + { + // TODO: Set this to NULL and if in execution_path is null, delay the execution paths.. + node_impl->thread_loop = uv_default_loop(); + } /* Register initialization */ loader_initialization_register(impl); @@ -4011,29 +3969,65 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con return node_impl; } -int node_loader_impl_execution_path(loader_impl impl, const loader_path path) +napi_value node_loader_impl_register_bootstrap_startup(loader_impl_node node_impl, napi_env env) { - loader_impl_node node_impl = static_cast(loader_impl_get(impl)); + node_loader_impl_startup_args args = &node_impl->thread_data; + napi_value argv[4], v; + napi_status status; - if (node_impl == nullptr) - { - return 1; - } + status = napi_create_array_with_length(env, 4, &v); + node_loader_impl_exception(env, status); - loader_impl_async_execution_path_safe_type execution_path_safe(node_impl, static_cast(path)); + /* Convert bootstrap.js path to N-API value */ + status = napi_create_string_utf8(env, args->bootstrap_path_str, args->bootstrap_path_str_size - 1, &argv[0]); + node_loader_impl_exception(env, status); - /* Check if we are in the JavaScript thread */ - if (node_impl->js_thread_id == std::this_thread::get_id()) - { - /* We are already in the V8 thread, we can call safely */ - node_loader_impl_execution_path_safe(node_impl->env, &execution_path_safe); - } - else + /* Convert node impl to N-API value */ + status = napi_create_string_utf8(env, args->node_impl_ptr_str, args->node_impl_ptr_str_size - 1, &argv[1]); + node_loader_impl_exception(env, status); + + /* Convert register to N-API value */ + status = napi_create_string_utf8(env, args->register_ptr_str, args->register_ptr_str_size - 1, &argv[2]); + node_loader_impl_exception(env, status); + + /* Create trampoline exports */ + argv[3] = node_loader_trampoline_initialize_object(env); + + /* Set the values */ + for (size_t iterator = 0; iterator < 4; ++iterator) { - /* Submit the task to the async queue */ - loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_execution_path, execution_path_safe); + status = napi_set_element(env, v, iterator, argv[iterator]); + node_loader_impl_exception(env, status); } + return v; +} + +int node_loader_impl_execution_path(loader_impl impl, const loader_path path) +{ + // TODO: + + // loader_impl_node node_impl = static_cast(loader_impl_get(impl)); + + // if (node_impl == nullptr) + // { + // return 1; + // } + + // loader_impl_async_execution_path_safe_type execution_path_safe(node_impl, static_cast(path)); + + // /* Check if we are in the JavaScript thread */ + // if (node_impl->js_thread_id == std::this_thread::get_id()) + // { + // /* We are already in the V8 thread, we can call safely */ + // node_loader_impl_execution_path_safe(node_impl->env, &execution_path_safe); + // } + // else + // { + // /* Submit the task to the async queue */ + // loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_execution_path, execution_path_safe); + // } + return 0; } diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index 8261f6bce9..2238c0ab32 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -799,6 +799,16 @@ napi_value node_loader_port_metacall_logs(napi_env env, napi_callback_info) return nullptr; } +napi_value node_loader_port_register_bootstrap_startup(napi_env env, napi_callback_info) +{ + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = static_cast(loader_impl_get(impl)); + + /* Return all the values required for the bootstrap startup */ + return node_loader_impl_register_bootstrap_startup(node_impl, env); +} + /* TODO: Review documentation */ // This functions sets the necessary js functions that could be called in NodeJs void node_loader_port_exports(napi_env env, napi_value exports) @@ -823,7 +833,8 @@ void node_loader_port_exports(napi_env env, napi_value exports) x(metacall_load_from_configuration); \ x(metacall_load_from_configuration_export); \ x(metacall_inspect); \ - x(metacall_logs); + x(metacall_logs); \ + x(register_bootstrap_startup); /* Declare all the functions */ NODE_LOADER_PORT_DECL_X_MACRO(NODE_LOADER_PORT_DECL_FUNC) @@ -838,5 +849,11 @@ napi_value node_loader_port_initialize(napi_env env, napi_value exports) { node_loader_port_exports(env, exports); + /* Unregister NAPI Hook */ + if (metacall_link_unregister("napi_register_module_v1") != 0) + { + // TODO: Handle error + } + return exports; } diff --git a/source/loaders/node_loader/source/node_loader_trampoline.cpp b/source/loaders/node_loader/source/node_loader_trampoline.cpp index 184fbbcda3..6314d2d309 100644 --- a/source/loaders/node_loader/source/node_loader_trampoline.cpp +++ b/source/loaders/node_loader/source/node_loader_trampoline.cpp @@ -427,3 +427,31 @@ napi_value node_loader_trampoline_initialize(napi_env env, napi_value exports) return exports; } + +#define NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD(name, func) \ + do \ + { \ + napi_value func_value; \ + status = napi_create_function(env, name, NAPI_AUTO_LENGTH, func, nullptr, &func_value); \ + node_loader_impl_exception(env, status); \ + napi_set_named_property(env, obj, name, func_value); \ + node_loader_impl_exception(env, status); \ + } while (0) + +napi_value node_loader_trampoline_initialize_object(napi_env env) +{ + napi_value obj; + napi_status status; + + status = napi_create_object(env, &obj); + node_loader_impl_exception(env, status); + + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("register", node_loader_trampoline_register); + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("resolve", node_loader_trampoline_resolve); + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("reject", node_loader_trampoline_reject); + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("destroy", node_loader_trampoline_destroy); + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("print", node_loader_trampoline_print); + NODE_LOADER_TRAMPOLINE_DECLARE_OBJ_METHOD("active_handles", node_loader_trampoline_active_handles); + + return obj; +} diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 02ab3deaa6..d7d19f8150 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -350,11 +350,22 @@ int metacall_initialize_ex(struct metacall_initialize_configuration_type initial if (impl == NULL) { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to find '%s_loader'", initialize_config[index].tag); return 1; } loader_set_options(initialize_config[index].tag, initialize_config[index].options); + /* If we are initializing a loader as a host, we must initialize it */ + if (loader_get_option_host(initialize_config[index].tag)) + { + if (loader_initialize_host(initialize_config[index].tag) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to initialize '%s_loader' as host", initialize_config[index].tag); + return 1; + } + } + ++index; } diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 0120fbf617..db45810f23 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -133,8 +133,21 @@ const addon = (() => { process.dlopen(m, library, constants.dlopen.RTLD_GLOBAL | constants.dlopen.RTLD_NOW); - // TODO: What to do with m? should we use process._linkedBinding instead, no? + /* Save argv */ + const argv = process.argv; + process.argv = []; + /* Pass the require function in order to import bootstrap.js and register it */ + const args = m.exports.register_bootstrap_startup(); + + const bootstrap = require(args[0]); + + bootstrap(args[1], args[2], args[3]); + + /* Restore argv */ + process.argv = argv; + + return m.exports; }).catch(err => { console.log(err); process.exit(1); From 7779200ec041e19e334a6ed6f0d4561b41f8985f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Dec 2024 19:59:03 +0100 Subject: [PATCH 009/364] Add delayed execution paths in NodeJS. --- .../node_loader/source/node_loader_impl.cpp | 81 +++++++++++++------ .../node_loader/source/node_loader_port.cpp | 3 + 2 files changed, 59 insertions(+), 25 deletions(-) diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 053754289d..33a0ea0362 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -684,6 +684,7 @@ struct loader_impl_node_type uv_thread_t thread; uv_loop_t *thread_loop; + std::vector *delayed_execution_paths; uv_mutex_t mutex; uv_cond_t cond; @@ -3691,6 +3692,24 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi get_module_handle_a_ptr = (HMODULE(*)(_In_opt_ LPCSTR))node_loader_hook_import_address_table("kernel32.dll", "GetModuleHandleA", &get_module_handle_a_hook); #endif + /* On host mode, register delayed paths */ + if (node_impl->delayed_execution_paths != nullptr) + { + std::vector *paths = node_impl->delayed_execution_paths; + + node_impl->delayed_execution_paths = nullptr; + + for (const std::string &path : *paths) + { + if (node_loader_impl_execution_path(node_impl->impl, path.c_str()) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to register a delayed execution path: %s", path.c_str()); + } + } + + delete paths; + } + /* Close scope */ status = napi_close_handle_scope(env, handle_scope); @@ -3736,8 +3755,7 @@ void node_loader_impl_thread(void *data) int argc = 4; - /* TODO: ... reimplement until here */ - + /* Initialize current thread event loop */ node_impl->thread_loop = uv_default_loop(); #if defined(__POSIX__) @@ -3956,11 +3974,17 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con /* TODO: Handle properly the error */ } } + + /* Initialize delayed execution paths to null, they are only used in host mode */ + node_impl->delayed_execution_paths = nullptr; } else { - // TODO: Set this to NULL and if in execution_path is null, delay the execution paths.. + /* Initialize current thread event loop */ node_impl->thread_loop = uv_default_loop(); + + /* Initialize delayed execution paths for register them once it has been initialized */ + node_impl->delayed_execution_paths = new std::vector(); } /* Register initialization */ @@ -4005,28 +4029,35 @@ napi_value node_loader_impl_register_bootstrap_startup(loader_impl_node node_imp int node_loader_impl_execution_path(loader_impl impl, const loader_path path) { - // TODO: - - // loader_impl_node node_impl = static_cast(loader_impl_get(impl)); - - // if (node_impl == nullptr) - // { - // return 1; - // } - - // loader_impl_async_execution_path_safe_type execution_path_safe(node_impl, static_cast(path)); - - // /* Check if we are in the JavaScript thread */ - // if (node_impl->js_thread_id == std::this_thread::get_id()) - // { - // /* We are already in the V8 thread, we can call safely */ - // node_loader_impl_execution_path_safe(node_impl->env, &execution_path_safe); - // } - // else - // { - // /* Submit the task to the async queue */ - // loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_execution_path, execution_path_safe); - // } + loader_impl_node node_impl = static_cast(loader_impl_get(impl)); + + if (node_impl == nullptr) + { + return 1; + } + + /* When using host mode, the paths are registered before NodeJS is properly initialized, + * delay the execution path registration until it is properly registered + */ + if (node_impl->delayed_execution_paths != nullptr) + { + node_impl->delayed_execution_paths->push_back(path); + return 0; + } + + loader_impl_async_execution_path_safe_type execution_path_safe(node_impl, static_cast(path)); + + /* Check if we are in the JavaScript thread */ + if (node_impl->js_thread_id == std::this_thread::get_id()) + { + /* We are already in the V8 thread, we can call safely */ + node_loader_impl_execution_path_safe(node_impl->env, &execution_path_safe); + } + else + { + /* Submit the task to the async queue */ + loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_execution_path, execution_path_safe); + } return 0; } diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index 2238c0ab32..773e62ccaa 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -805,6 +805,9 @@ napi_value node_loader_port_register_bootstrap_startup(napi_env env, napi_callba loader_impl impl = loader_get_impl(node_loader_tag); loader_impl_node node_impl = static_cast(loader_impl_get(impl)); + /* Define environment, required to initialize the runtime properly */ + node_loader_impl_env(node_impl, env); + /* Return all the values required for the bootstrap startup */ return node_loader_impl_register_bootstrap_startup(node_impl, env); } From 55a8553a6396f7f0791f8ec3921a2da9ccc05ea6 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 5 Dec 2024 18:35:10 +0100 Subject: [PATCH 010/364] Add base for destroy in node. --- .../node_loader/source/node_loader_impl.cpp | 74 ++++++++++++++----- 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 33a0ea0362..b321541533 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -874,6 +874,8 @@ static void node_loader_impl_handle_promise_safe(napi_env env, loader_impl_async static void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe_type *destroy_safe); +static void node_loader_impl_destroy_hook(loader_impl_node node_impl); + static char *node_loader_impl_get_property_as_char(napi_env env, napi_value obj, const char *prop); /* Loader */ @@ -3708,6 +3710,9 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi } delete paths; + + /* Trigger destroy hook */ + node_loader_impl_destroy_hook(node_impl); } /* Close scope */ @@ -3985,6 +3990,9 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con /* Initialize delayed execution paths for register them once it has been initialized */ node_impl->delayed_execution_paths = new std::vector(); + + /* Result will never be defined properly */ + node_impl->result = 0; } /* Register initialization */ @@ -4267,6 +4275,32 @@ napi_value node_loader_impl_promise_await(loader_impl_node node_impl, napi_env e return promise; } +static void node_loader_impl_destroy_close_cb(loader_impl_node node_impl, napi_env env) +{ + if (--node_impl->extra_active_handles == 0) + { + if (loader_impl_get_option_host(node_impl->impl) == 0) + { + node_loader_impl_try_destroy(node_impl); + } + else + { + node_impl->threadsafe_initialize.abort(env); + node_impl->threadsafe_execution_path.abort(env); + node_impl->threadsafe_load_from_file.abort(env); + node_impl->threadsafe_load_from_memory.abort(env); + node_impl->threadsafe_clear.abort(env); + node_impl->threadsafe_discover.abort(env); + node_impl->threadsafe_func_call.abort(env); + node_impl->threadsafe_func_await.abort(env); + node_impl->threadsafe_func_destroy.abort(env); + node_impl->threadsafe_future_await.abort(env); + node_impl->threadsafe_future_delete.abort(env); + node_impl->threadsafe_destroy.abort(env); + } + } +} + #define container_of(ptr, type, member) \ (type *)((char *)(ptr) - (char *)&((type *)0)->member) @@ -4275,10 +4309,7 @@ static void node_loader_impl_destroy_prepare_close_cb(uv_handle_t *handle) uv_prepare_t *prepare = (uv_prepare_t *)handle; loader_impl_node node_impl = container_of(prepare, struct loader_impl_node_type, destroy_prepare); - if (--node_impl->extra_active_handles == 0) - { - node_loader_impl_try_destroy(node_impl); - } + node_loader_impl_destroy_close_cb(node_impl, node_impl->env); } static void node_loader_impl_destroy_check_close_cb(uv_handle_t *handle) @@ -4286,10 +4317,7 @@ static void node_loader_impl_destroy_check_close_cb(uv_handle_t *handle) uv_check_t *check = (uv_check_t *)handle; loader_impl_node node_impl = container_of(check, struct loader_impl_node_type, destroy_check); - if (--node_impl->extra_active_handles == 0) - { - node_loader_impl_try_destroy(node_impl); - } + node_loader_impl_destroy_close_cb(node_impl, node_impl->env); } static void node_loader_impl_destroy_cb(loader_impl_node node_impl) @@ -4329,6 +4357,15 @@ static void node_loader_impl_destroy_check_cb(uv_check_t *handle) node_loader_impl_destroy_cb(node_impl); } +void node_loader_impl_destroy_hook(loader_impl_node node_impl) +{ + node_impl->extra_active_handles.store(2); + uv_prepare_init(node_impl->thread_loop, &node_impl->destroy_prepare); + uv_check_init(node_impl->thread_loop, &node_impl->destroy_check); + uv_prepare_start(&node_impl->destroy_prepare, &node_loader_impl_destroy_prepare_cb); + uv_check_start(&node_impl->destroy_check, &node_loader_impl_destroy_check_cb); +} + void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe_type *destroy_safe) { napi_status status; @@ -4349,11 +4386,7 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe_ } else { - node_impl->extra_active_handles.store(2); - uv_prepare_init(node_impl->thread_loop, &node_impl->destroy_prepare); - uv_check_init(node_impl->thread_loop, &node_impl->destroy_check); - uv_prepare_start(&node_impl->destroy_prepare, &node_loader_impl_destroy_prepare_cb); - uv_check_start(&node_impl->destroy_check, &node_loader_impl_destroy_check_cb); + node_loader_impl_destroy_hook(node_impl); } /* Close scope */ @@ -4500,6 +4533,7 @@ void node_loader_impl_destroy_safe_impl(loader_impl_node node_impl, napi_env env node_loader_impl_exception(env, status); /* Clear thread safe functions except by destroy one */ + if (loader_impl_get_option_host(node_impl->impl) == 0) { node_impl->threadsafe_initialize.abort(env); node_impl->threadsafe_execution_path.abort(env); @@ -4552,9 +4586,12 @@ void node_loader_impl_try_destroy(loader_impl_node node_impl) loader_impl_threadsafe_invoke_type invoke(node_impl->threadsafe_destroy, destroy_safe); } - if (destroy_safe.has_finished) + if (loader_impl_get_option_host(node_impl->impl) == 0) { - node_impl->threadsafe_destroy.abort(node_impl->env); + if (destroy_safe.has_finished) + { + node_impl->threadsafe_destroy.abort(node_impl->env); + } } } @@ -4570,8 +4607,11 @@ int node_loader_impl_destroy(loader_impl impl) /* Call destroy function with thread safe */ node_loader_impl_try_destroy(node_impl); - /* Wait for node thread to finish */ - uv_thread_join(&node_impl->thread); + if (loader_impl_get_option_host(impl) == 0) + { + /* Wait for node thread to finish */ + uv_thread_join(&node_impl->thread); + } /* Clear condition syncronization object */ uv_cond_destroy(&node_impl->cond); From 9bbc9a63844e072609ec05ce24113afdafa387b7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 19 Dec 2024 03:34:31 +0100 Subject: [PATCH 011/364] Host destruction working properly with nodejs. --- source/loader/source/loader.c | 13 ++++++++- source/loaders/node_loader/CMakeLists.txt | 2 +- .../node_loader/bootstrap/lib/bootstrap.js | 6 ++++ .../node_loader/source/node_loader_impl.cpp | 6 ++-- .../source/node_loader_trampoline.cpp | 1 - source/metacall/source/metacall.c | 9 ++++++ source/metacall/source/metacall_link.c | 3 +- source/ports/node_port/CMakeLists.txt | 2 +- source/ports/node_port/index.js | 28 ++++++++++--------- 9 files changed, 49 insertions(+), 21 deletions(-) diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 8fc4901189..73803e7edf 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -210,7 +210,18 @@ int loader_initialize_host(const loader_tag tag) return 1; } - return loader_impl_initialize(&loader_manager, p, plugin_impl_type(p, loader_impl)); + if (loader_impl_initialize(&loader_manager, p, plugin_impl_type(p, loader_impl)) != 0) + { + return 1; + } + else + { + loader_manager_impl manager_impl = plugin_manager_impl_type(&loader_manager, loader_manager_impl); + + manager_impl->host = p; + + return 0; + } } int loader_is_initialized(const loader_tag tag) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 70108f53e2..a9bf13c675 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -158,7 +158,7 @@ target_link_libraries(${target} ${META_PROJECT_NAME}::metacall # MetaCall library # TODO: Implement delayed load - # ${NodeJS_LIBRARY} # NodeJS library + ${NodeJS_LIBRARY} # NodeJS library PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/loaders/node_loader/bootstrap/lib/bootstrap.js b/source/loaders/node_loader/bootstrap/lib/bootstrap.js index 4f2c5b766f..8201b220a8 100644 --- a/source/loaders/node_loader/bootstrap/lib/bootstrap.js +++ b/source/loaders/node_loader/bootstrap/lib/bootstrap.js @@ -436,6 +436,12 @@ const startup = (impl, ptr, trampoline_exports) => { 'await_function': node_loader_trampoline_await_function(trampoline), 'await_future': node_loader_trampoline_await_future(trampoline), }); + + // This function must destroy all the loaders but + // delaying the NodeJS Loader library unloading + if (trampoline_exports) { + process.on('exit', () => trampoline.destroy(node_loader_ptr)); + } } catch (ex) { console.log('Exception in bootstrap.js trampoline initialization:', ex); } diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index b321541533..281221d40a 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -4604,11 +4604,11 @@ int node_loader_impl_destroy(loader_impl impl) return 1; } - /* Call destroy function with thread safe */ - node_loader_impl_try_destroy(node_impl); - if (loader_impl_get_option_host(impl) == 0) { + /* Call destroy function with thread safe */ + node_loader_impl_try_destroy(node_impl); + /* Wait for node thread to finish */ uv_thread_join(&node_impl->thread); } diff --git a/source/loaders/node_loader/source/node_loader_trampoline.cpp b/source/loaders/node_loader/source/node_loader_trampoline.cpp index 6314d2d309..7ed654358b 100644 --- a/source/loaders/node_loader/source/node_loader_trampoline.cpp +++ b/source/loaders/node_loader/source/node_loader_trampoline.cpp @@ -244,7 +244,6 @@ napi_value node_loader_trampoline_reject(napi_env env, napi_callback_info info) napi_value node_loader_trampoline_destroy(napi_env env, napi_callback_info info) { napi_status status; - const size_t args_size = 1; size_t argc = args_size; napi_value recv; diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index d7d19f8150..0962d974ed 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -72,6 +72,7 @@ static loader_path plugin_path = { 0 }; static int metacall_plugin_extension_load(void); static void *metacallv_method(void *target, const char *name, method_invoke_ptr call, vector v, void *args[], size_t size); static type_id *metacall_type_ids(void *args[], size_t size); +static void metacall_destructor(void); static void metacall_detour_destructor(void); /* -- Costructors -- */ @@ -111,10 +112,18 @@ portability_constructor(metacall_constructor) metacall_value_destroy(config[0].options); exit(1); } + + /* Register the destructor on exit */ + atexit(metacall_destructor); } } } +void metacall_destructor(void) +{ + metacall_destroy(); +} + /* -- Methods -- */ const char *metacall_serial(void) diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index d1343c52df..9bad2939a9 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -92,7 +92,8 @@ void *metacall_link_hook(void *handle, const char *symbol) /* Intercept function if any */ void *ptr = set_get(metacall_link_table, (set_key)symbol); - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour link interception: %s -> %p", symbol, ptr); + /* TODO: Disable logs here until log is completely thread safe and async signal safe */ + /* log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour link interception: %s -> %p", symbol, ptr); */ if (ptr != NULL) { diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 9cbb94fbcd..c6531650a9 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -225,7 +225,7 @@ set(node_port_test_exec "${node_port_test}_executable") message(STATUS "Test ${node_port_test_exec}") add_test(NAME ${node_port_test_exec} - COMMAND ${NodeJS_EXECUTABLE} test/index.js + COMMAND ${NodeJS_EXECUTABLE} -e "require('./test.js').main()" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index f96f870d76..2372b3fd57 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -22,10 +22,10 @@ const mod = require('module'); const path = require('path'); -const fs = require('fs').promises; +const fs = require('fs'); const { URL } = require('url'); /* TODO: RPC Loader */ -async function findFilesRecursively(dirPattern, filePattern, depthLimit = Infinity) { +const findFilesRecursively = (dirPattern, filePattern, depthLimit = Infinity) => { const stack = [{ dir: dirPattern, depth: 0 }]; const files = []; const dirRegex = new RegExp(dirPattern); @@ -43,11 +43,11 @@ async function findFilesRecursively(dirPattern, filePattern, depthLimit = Infini continue; } - const items = await fs.readdir(dir); + const items = fs.readdirSync(dir); for (const item of items) { const fullPath = path.join(dir, item); - const stat = await fs.stat(fullPath); + const stat = fs.statSync(fullPath); if (stat.isDirectory()) { stack.push({ dir: fullPath, depth: depth + 1 }); @@ -61,7 +61,7 @@ async function findFilesRecursively(dirPattern, filePattern, depthLimit = Infini } return files; -} +}; const platformInstallPaths = () => { switch (process.platform) { @@ -83,7 +83,7 @@ const platformInstallPaths = () => { } throw new Error(`Platform ${process.platform} not supported`) -} +}; const searchPaths = () => { const customPath = process.env['METACALL_INSTALL_PATH']; @@ -96,13 +96,13 @@ const searchPaths = () => { } return platformInstallPaths() -} +}; -const findLibrary = async () => { +const findLibrary = () => { const searchData = searchPaths(); for (const p of searchData.paths) { - const files = await findFilesRecursively(p, searchData.name, 0); + const files = findFilesRecursively(p, searchData.name, 0); if (files.length !== 0) { return files[0]; @@ -110,7 +110,7 @@ const findLibrary = async () => { } throw new Error('MetaCall library not found, if you have it in a special folder, define it through METACALL_INSTALL_PATH') -} +}; const addon = (() => { try { @@ -127,7 +127,9 @@ const addon = (() => { */ process.env['METACALL_HOST'] = 'node'; - findLibrary().then(library => { + try { + const library = findLibrary(); + const { constants } = require('os'); const m = { exports: {} }; @@ -148,10 +150,10 @@ const addon = (() => { process.argv = argv; return m.exports; - }).catch(err => { + } catch (err) { console.log(err); process.exit(1); - }); + } } })(); From 10f72e1810ec872ec202b550945ff3f1b8538622 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 19 Dec 2024 17:17:01 +0100 Subject: [PATCH 012/364] Add preload of sanitizers for node tests with node executable. --- cmake/CompileOptions.cmake | 33 +++++++++++++++++++++++++++ source/ports/node_port/CMakeLists.txt | 1 + 2 files changed, 34 insertions(+) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index f569a6c169..a5610945c3 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -149,6 +149,39 @@ else() set(SANITIZER_COMPILE_DEFINITIONS) endif() +if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") + if(OPTION_BUILD_THREAD_SANITIZER) + execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libtsan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBTSAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + set(SANITIZER_LIBRARIES_PATH + "${LIBTSAN_PATH}" + ) + elseif(OPTION_BUILD_MEMORY_SANITIZER) + set(SANITIZER_LIBRARIES_PATH) # TODO + elseif(OPTION_BUILD_ADDRESS_SANITIZER) + execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libasan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBASAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libubsan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBUBSAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + set(SANITIZER_LIBRARIES_PATH + "${LIBASAN_PATH}" + "${LIBUBSAN_PATH}" + ) + endif() +endif() + +if(SANITIZER_LIBRARIES_PATH) + if(PROJECT_OS_LINUX) + list(JOIN SANITIZER_LIBRARIES_PATH " " SANITIZER_LIBRARIES_PATH_JOINED) + set(TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES + "LD_PRELOAD=${SANITIZER_LIBRARIES_PATH_JOINED}" + ) + elseif(PROJECT_OS_FAMILY MATCHES "macos") + list(JOIN SANITIZER_LIBRARIES_PATH ":" SANITIZER_LIBRARIES_PATH_JOINED) + set(TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES + "DYLD_INSERT_LIBRARIES=${SANITIZER_LIBRARIES_PATH_JOINED}" + "DYLD_FORCE_FLAT_NAMESPACE=1" + ) + endif() +endif() + if((PROJECT_OS_WIN AND MSVC) OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # MSVC and Clang do not require to link manually the sanitizer libraries set(SANITIZER_LIBRARIES) diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index c6531650a9..5ddccd023b 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -243,4 +243,5 @@ test_environment_variables(${node_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES_RS} ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) From ad08aec46e52cde5df25bacba4db040baff7f10c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 19 Dec 2024 17:18:27 +0100 Subject: [PATCH 013/364] Change metacall_destroy signature, improved bugs with atexit. --- .../source/metacall_cs_call_bench.cpp | 4 +++- .../source/metacall_node_call_bench.cpp | 4 +++- .../source/metacall_py_call_bench.cpp | 5 +---- .../source/metacall_py_init_bench.cpp | 5 +---- .../source/metacall_rb_call_bench.cpp | 5 +---- source/cli/metacallcli/source/application.cpp | 7 +------ source/examples/metacalllog/main.cpp | 4 +++- source/metacall/include/metacall/metacall.h | 5 +---- source/metacall/source/metacall.c | 19 +++++-------------- source/metacall/source/metacall_fork.c | 10 ++-------- .../src/main/java/metacall/Bindings.java | 2 +- source/ports/rs_port/src/bindings.rs | 4 ++-- source/ports/rs_port/src/init.rs | 10 +++------- .../ports/zig_port/src/metacall-bindings.zig | 2 +- source/ports/zig_port/src/root.zig | 9 ++------- .../ports/zig_port/src/tests/integrated.zig | 2 +- .../source/metacall_backtrace_plugin_test.cpp | 2 +- .../source/metacall_c_lib_test.cpp | 2 +- .../source/metacall_c_test.cpp | 2 +- .../source/metacall_callback_complex_test.cpp | 2 +- .../source/metacall_cast_test.cpp | 2 +- .../source/metacall_clear_test.cpp | 2 +- .../metacall_cli_core_plugin_await_test.cpp | 2 +- .../source/metacall_cli_core_plugin_test.cpp | 2 +- .../source/metacall_cobol_test.cpp | 2 +- .../metacall_configuration_default_test.cpp | 2 +- .../metacall_configuration_exec_path_test.cpp | 2 +- .../metacall_cs_test/source/environment.cpp | 2 +- .../source/metacall_csharp_function_test.cpp | 2 +- .../metacall_csharp_static_class_test.cpp | 2 +- .../source/metacall_depends_test.cpp | 2 +- .../source/metacall_distributable_test.cpp | 2 +- .../source/metacall_ducktype_test.cpp | 2 +- .../metacall_duplicated_handle_test.cpp | 2 +- .../metacall_duplicated_symbols_test.cpp | 2 +- .../source/metacall_ext_test.cpp | 2 +- .../source/metacall_file_fail_test.cpp | 2 +- .../source/metacall_file_glob_test.cpp | 2 +- .../source/metacall_file_test.cpp | 2 +- .../source/metacall_fork_test.cpp | 2 +- .../source/metacall_function_test.cpp | 2 +- .../source/metacall_handle_export_test.cpp | 2 +- .../source/metacall_handle_get_test.cpp | 2 +- .../source/metacall_init_fini_test.cpp | 2 +- ..._initialize_destroy_multiple_node_test.cpp | 6 +++--- ...acall_initialize_destroy_multiple_test.cpp | 6 +++--- .../source/metacall_initialize_ex_test.cpp | 2 +- .../source/metacall_initialize_test.cpp | 2 +- .../source/metacall_inspect_test.cpp | 2 +- .../source/environment.cpp | 2 +- .../source/metacall_invalid_loader_test.cpp | 2 +- .../source/metacall_java_test.cpp | 2 +- .../source/metacall_julia_test.cpp | 2 +- ...all_library_path_without_env_vars_test.cpp | 2 +- .../source/metacall_llvm_test.cpp | 2 +- .../metacall_load_configuration_fail_test.cpp | 2 +- ...ll_load_configuration_node_python_test.cpp | 2 +- ...ll_load_configuration_python_node_test.cpp | 2 +- ...acall_load_configuration_relative_test.cpp | 2 +- .../metacall_load_configuration_test.cpp | 2 +- .../metacall_load_memory_empty_test.cpp | 2 +- .../source/metacall_load_memory_test.cpp | 2 +- .../source/metacall_logs_test.cpp | 2 +- .../source/metacall_lua_test.cpp | 2 +- .../source/metacall_map_await_test.cpp | 2 +- .../source/metacall_map_test.cpp | 2 +- .../metacall_node_async_multiple_test.cpp | 2 +- .../metacall_node_async_resources_test.cpp | 2 +- .../source/metacall_node_async_test.cpp | 2 +- .../source/metacall_node_await_chain_test.cpp | 2 +- .../source/metacall_node_call_test.cpp | 2 +- .../source/metacall_node_callback_test.cpp | 2 +- .../source/metacall_node_clear_mem_test.cpp | 2 +- .../metacall_node_default_export_test.cpp | 2 +- .../metacall_node_event_loop_signal_test.cpp | 2 +- .../source/metacall_node_event_loop_test.cpp | 2 +- .../source/metacall_node_exception_test.cpp | 2 +- .../source/metacall_node_extension_test.cpp | 2 +- .../metacall_node_fail_env_var_test.cpp | 2 +- .../metacall_node_fail_load_leak_test.cpp | 2 +- .../source/metacall_node_fail_test.cpp | 2 +- .../source/metacall_node_inline_test.cpp | 2 +- ...etacall_node_multithread_deadlock_test.cpp | 2 +- .../source/metacall_node_native_code_test.cpp | 2 +- .../source/metacall_node_port_await_test.cpp | 2 +- .../source/metacall_node_port_rs_test.cpp | 2 +- .../source/metacall_node_port_test.cpp | 2 +- ...l_node_python_async_after_destroy_test.cpp | 2 +- ...tacall_node_python_await_extended_test.cpp | 2 +- .../metacall_node_python_await_test.cpp | 2 +- .../metacall_node_python_deadlock_test.cpp | 2 +- .../metacall_node_python_exception_test.cpp | 2 +- .../metacall_node_python_port_mock_test.cpp | 2 +- .../metacall_node_python_port_ruby_test.cpp | 2 +- .../source/metacall_node_python_ruby_test.cpp | 2 +- .../source/metacall_node_reentrant_test.cpp | 2 +- .../metacall_node_signal_handler_test.cpp | 2 +- .../source/metacall_node_test.cpp | 2 +- .../source/metacall_node_typescript_test.cpp | 2 +- ...ll_plugin_extension_destroy_order_test.cpp | 2 +- ...all_plugin_extension_invalid_path_test.cpp | 2 +- .../metacall_plugin_extension_local_test.cpp | 2 +- .../source/metacall_plugin_extension_test.cpp | 2 +- .../source/metacall_python_async_test.cpp | 2 +- .../source/metacall_python_await_test.cpp | 2 +- .../source/metacall_python_builtins_test.cpp | 2 +- .../source/metacall_python_callback_test.cpp | 2 +- .../source/metacall_python_dict_test.cpp | 2 +- .../source/metacall_python_exception_test.cpp | 2 +- .../source/metacall_python_fail_test.cpp | 2 +- .../source/metacall_python_gc_test.cpp | 2 +- .../metacall_python_loader_port_test.cpp | 2 +- .../source/metacall_python_model_test.cpp | 2 +- .../metacall_python_node_await_test.cpp | 2 +- .../metacall_python_object_class_test.cpp | 2 +- .../source/metacall_python_open_test.cpp | 2 +- .../source/metacall_python_pointer_test.cpp | 2 +- .../metacall_python_port_callback_test.cpp | 2 +- .../metacall_python_port_https_test.cpp | 2 +- .../metacall_python_port_import_test.cpp | 2 +- .../metacall_python_port_pointer_test.cpp | 2 +- .../source/metacall_python_port_test.cpp | 2 +- .../source/metacall_python_reentrant_test.cpp | 2 +- .../metacall_python_relative_path_test.cpp | 2 +- .../source/metacall_python_test.cpp | 2 +- .../source/metacall_python_varargs_test.cpp | 2 +- .../metacall_python_without_env_vars_test.cpp | 2 +- ...metacall_python_without_functions_test.cpp | 2 +- .../source/metacall_reinitialize_test.cpp | 2 +- .../source/metacall_reload_functions_test.cpp | 2 +- .../source/metacall_return_monad_test.cpp | 2 +- .../source/metacall_rpc_test.cpp | 2 +- .../source/metacall_ruby_fail_empty_test.cpp | 2 +- .../source/metacall_ruby_fail_test.cpp | 2 +- .../metacall_ruby_object_class_test.cpp | 2 +- .../metacall_ruby_parser_integration_test.cpp | 2 +- .../metacall_ruby_rails_integration_test.cpp | 2 +- .../source/metacall_ruby_test.cpp | 2 +- .../source/metacall_rust_class_test.cpp | 2 +- .../metacall_rust_load_from_mem_test.cpp | 2 +- ...call_rust_load_from_package_class_test.cpp | 2 +- ...tacall_rust_load_from_package_dep_test.cpp | 2 +- .../metacall_rust_load_from_package_test.cpp | 2 +- .../source/metacall_rust_test.cpp | 2 +- .../source/metacall_sandbox_plugin_test.cpp | 18 +++++++++--------- .../metacall_test/source/metacall_test.cpp | 2 +- .../source/metacall_test_split.cpp | 4 ++-- .../metacall_typescript_call_map_test.cpp | 2 +- .../metacall_typescript_jsx_default_test.cpp | 2 +- .../source/metacall_typescript_node_test.cpp | 2 +- .../metacall_typescript_require_test.cpp | 2 +- .../source/metacall_typescript_test.cpp | 2 +- ...metacall_typescript_tsx_loop_fail_test.cpp | 2 +- .../source/metacall_typescript_tsx_test.cpp | 2 +- .../source/metacall_wasm_test.cpp | 2 +- 155 files changed, 183 insertions(+), 218 deletions(-) diff --git a/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp b/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp index e16f199a8f..d0acd24cce 100644 --- a/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp +++ b/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp @@ -186,5 +186,7 @@ int main(int argc, char **argv) ::benchmark::RunSpecifiedBenchmarks(); - return metacall_destroy(); + metacall_destroy(); + + return 0; } diff --git a/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp b/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp index f66efa2ab7..15861f5257 100644 --- a/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp +++ b/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp @@ -292,5 +292,7 @@ int main(int argc, char **argv) } #endif /* OPTION_BUILD_LOADERS_NODE */ - return metacall_destroy(); + metacall_destroy(); + + return 0; } diff --git a/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp b/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp index 399ebe2396..74d0bc7c52 100644 --- a/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp +++ b/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp @@ -178,10 +178,7 @@ int main(int argc, char *argv[]) ::benchmark::RunSpecifiedBenchmarks(); ::benchmark::Shutdown(); - if (metacall_destroy() != 0) - { - return 4; - } + metacall_destroy(); return 0; } diff --git a/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp b/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp index 7021aad6b5..ee60fee48c 100644 --- a/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp +++ b/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp @@ -130,10 +130,7 @@ BENCHMARK_DEFINE_F(metacall_py_init_bench, destroy) /* Python */ #if defined(OPTION_BUILD_LOADERS_PY) { - if (metacall_destroy() != 0) - { - state.SkipWithError("Error destroying MetaCall"); - } + metacall_destroy(); } #endif /* OPTION_BUILD_LOADERS_PY */ } diff --git a/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp b/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp index ddcfd27956..903530eae1 100644 --- a/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp +++ b/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp @@ -198,10 +198,7 @@ int main(int argc, char *argv[]) ::benchmark::RunSpecifiedBenchmarks(); ::benchmark::Shutdown(); - if (metacall_destroy() != 0) - { - return 4; - } + metacall_destroy(); return 0; } diff --git a/source/cli/metacallcli/source/application.cpp b/source/cli/metacallcli/source/application.cpp index b1b22761b7..0ba037683e 100644 --- a/source/cli/metacallcli/source/application.cpp +++ b/source/cli/metacallcli/source/application.cpp @@ -299,12 +299,7 @@ application::application(int argc, char *argv[]) : application::~application() { - int result = metacall_destroy(); - - if (result != 0) - { - std::cout << "Error while destroying MetaCall, exit code: " << result << std::endl; - } + metacall_destroy(); } void application::arguments_parse(std::vector &arguments) diff --git a/source/examples/metacalllog/main.cpp b/source/examples/metacalllog/main.cpp index e7b47deea5..0b4ac01a92 100644 --- a/source/examples/metacalllog/main.cpp +++ b/source/examples/metacalllog/main.cpp @@ -143,5 +143,7 @@ int main(int, char *[]) /* Here you can load some scripts */ - return metacall_destroy(); + metacall_destroy(); + + return 0; } diff --git a/source/metacall/include/metacall/metacall.h b/source/metacall/include/metacall/metacall.h index 2ad427ca3c..b7788e2232 100644 --- a/source/metacall/include/metacall/metacall.h +++ b/source/metacall/include/metacall/metacall.h @@ -1488,11 +1488,8 @@ METACALL_API const char *metacall_plugin_path(void); /** * @brief * Destroy MetaCall library -* -* @return -* Zero if success, different from zero otherwise */ -METACALL_API int metacall_destroy(void); +METACALL_API void metacall_destroy(void); /** * @brief diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 0962d974ed..3fcc54b8cc 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -72,7 +72,6 @@ static loader_path plugin_path = { 0 }; static int metacall_plugin_extension_load(void); static void *metacallv_method(void *target, const char *name, method_invoke_ptr call, vector v, void *args[], size_t size); static type_id *metacall_type_ids(void *args[], size_t size); -static void metacall_destructor(void); static void metacall_detour_destructor(void); /* -- Costructors -- */ @@ -114,16 +113,11 @@ portability_constructor(metacall_constructor) } /* Register the destructor on exit */ - atexit(metacall_destructor); + atexit(metacall_destroy); } } } -void metacall_destructor(void) -{ - metacall_destroy(); -} - /* -- Methods -- */ const char *metacall_serial(void) @@ -200,8 +194,6 @@ int metacall_plugin_extension_load(void) void metacall_detour_destructor(void) { - log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour destruction"); - /* Destroy link */ if (metacall_link_destroy() != 0) { @@ -2364,7 +2356,7 @@ const char *metacall_plugin_path(void) return plugin_path; } -int metacall_destroy(void) +void metacall_destroy(void) { if (metacall_initialize_flag == 0) { @@ -2374,17 +2366,16 @@ int metacall_destroy(void) /* Destroy configurations */ configuration_destroy(); - metacall_initialize_flag = 1; - /* Print stats from functions, classes, objects and exceptions */ reflect_memory_tracker_debug(); /* Set to null the plugin extension and core plugin handles */ plugin_extension_handle = NULL; plugin_core_handle = NULL; - } - return 0; + /* Set initialization flag to destroyed */ + metacall_initialize_flag = 1; + } } const struct metacall_version_type *metacall_version(void) diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index 6cbe972e68..cd1ec50229 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -172,10 +172,7 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall process fork auto destroy"); /* Destroy metacall before the fork */ - if (metacall_destroy() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall fork auto destruction"); - } + metacall_destroy(); /* Execute the real fork */ result = metacall_fork_trampoline(ProcessFlags, ProcessSecurityDescriptor, ThreadSecurityDescriptor, DebugPort, ProcessInformation); @@ -247,10 +244,7 @@ pid_t metacall_fork_hook(void) log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall process fork auto destroy"); /* Destroy metacall before the fork */ - if (metacall_destroy() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall fork auto destruction fail"); - } + metacall_destroy(); /* Execute the real fork */ pid = metacall_fork_trampoline(); diff --git a/source/ports/java_port/src/main/java/metacall/Bindings.java b/source/ports/java_port/src/main/java/metacall/Bindings.java index b1de4d1c4a..71b93a7299 100644 --- a/source/ports/java_port/src/main/java/metacall/Bindings.java +++ b/source/ports/java_port/src/main/java/metacall/Bindings.java @@ -31,7 +31,7 @@ public interface Bindings extends Library SizeT metacall_function_size(Pointer func); int metacall_function_async(Pointer func); - int metacall_destroy(); + void metacall_destroy(); //metacall_value.h Pointer metacall_value_create_int(int i); diff --git a/source/ports/rs_port/src/bindings.rs b/source/ports/rs_port/src/bindings.rs index fdfc35049f..c4319b2ac2 100644 --- a/source/ports/rs_port/src/bindings.rs +++ b/source/ports/rs_port/src/bindings.rs @@ -1355,8 +1355,8 @@ unsafe extern "C" { pub fn metacall_plugin_path() -> *const ::std::os::raw::c_char; } unsafe extern "C" { - #[doc = " @brief\n Destroy MetaCall library\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_destroy() -> ::std::os::raw::c_int; + #[doc = " @brief\n Destroy MetaCall library\n"] + pub fn metacall_destroy(); } unsafe extern "C" { #[doc = " @brief\n Provide the module version struct\n\n @return\n Static struct containing unpacked version"] diff --git a/source/ports/rs_port/src/init.rs b/source/ports/rs_port/src/init.rs index da09899a24..fb578600ae 100644 --- a/source/ports/rs_port/src/init.rs +++ b/source/ports/rs_port/src/init.rs @@ -2,17 +2,13 @@ use crate::{ bindings::{metacall_destroy, metacall_initialize, metacall_is_initialized}, types::MetaCallInitError, }; -use std::{ffi::c_int, ptr}; +use std::ptr; -pub struct MetaCallDestroy(unsafe extern "C" fn() -> c_int); +pub struct MetaCallDestroy(unsafe extern "C" fn()); impl Drop for MetaCallDestroy { fn drop(&mut self) { - let code = unsafe { self.0() }; - - if code != 0 { - panic!("MetaCall failed to destroy with code: {}", code) - } + unsafe { self.0() } } } diff --git a/source/ports/zig_port/src/metacall-bindings.zig b/source/ports/zig_port/src/metacall-bindings.zig index 05243d2426..0615eb7231 100644 --- a/source/ports/zig_port/src/metacall-bindings.zig +++ b/source/ports/zig_port/src/metacall-bindings.zig @@ -1325,7 +1325,7 @@ pub extern fn metacall_deserialize(name: [*c]const u8, buffer: [*c]const u8, siz pub extern fn metacall_clear(handle: ?*anyopaque) c_int; pub extern fn metacall_plugin_extension() ?*anyopaque; pub extern fn metacall_plugin_path() [*c]const u8; -pub extern fn metacall_destroy() c_int; +pub extern fn metacall_destroy() void; pub extern fn metacall_version() [*c]const struct_metacall_version_type; pub extern fn metacall_version_hex_make(major: c_uint, minor: c_uint, patch: c_uint) u32; pub extern fn metacall_version_hex() u32; diff --git a/source/ports/zig_port/src/root.zig b/source/ports/zig_port/src/root.zig index bb88c3da0e..6bc5054e08 100644 --- a/source/ports/zig_port/src/root.zig +++ b/source/ports/zig_port/src/root.zig @@ -9,13 +9,8 @@ pub fn init() !void { return error.FailedToInitMetacall; } /// Deinitializes MetaCall and returns an error if didn't succeed. -pub fn destroy() !void { - if (mb.metacall_destroy() != 0) - return error.FailedToDeinitMetacall; -} -/// Deinitializes MetaCall. -pub fn deinit() void { - _ = destroy() catch {}; +pub fn destroy() void { + mb.metacall_destroy(); } /// Loads files into MetaCall, strings should be null-terminated. diff --git a/source/ports/zig_port/src/tests/integrated.zig b/source/ports/zig_port/src/tests/integrated.zig index 8ee7089f3a..70b46b7985 100644 --- a/source/ports/zig_port/src/tests/integrated.zig +++ b/source/ports/zig_port/src/tests/integrated.zig @@ -38,5 +38,5 @@ pub fn main() !void { try std.testing.expect(ret_string.?[0] == 'h'); try std.testing.expect(ret_string.?[1] == 'i'); - defer metacall.deinit(); + defer metacall.destroy(); } diff --git a/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp b/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp index 900c8b0a25..6f70caf081 100644 --- a/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp +++ b/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp @@ -60,5 +60,5 @@ TEST_F(metacall_backtrace_plugin_test, DefaultConstructor) /* Generate a segmentation fault in order to catch it by backtrace plugin */ EXPECT_DEATH({ badass_function(); }, ""); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp index 28e940a9b8..83aa1a8de1 100644 --- a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp +++ b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp @@ -93,5 +93,5 @@ TEST_F(metacall_c_lib_test, DefaultConstructor) metacall_value_destroy(args_destroy[0]); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index 2aff37a270..dc4cc606b7 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -153,5 +153,5 @@ TEST_F(metacall_c_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp b/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp index e608f1dcdc..daf5717e58 100644 --- a/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp +++ b/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp @@ -151,5 +151,5 @@ TEST_F(metacall_callback_complex_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_cast_test/source/metacall_cast_test.cpp b/source/tests/metacall_cast_test/source/metacall_cast_test.cpp index 12cd28065d..c22c55cc76 100644 --- a/source/tests/metacall_cast_test/source/metacall_cast_test.cpp +++ b/source/tests/metacall_cast_test/source/metacall_cast_test.cpp @@ -106,5 +106,5 @@ TEST_F(metacall_cast_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp index 8c59a5bab2..0a59ea23a9 100644 --- a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp +++ b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp @@ -76,5 +76,5 @@ TEST_F(metacall_clear_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp b/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp index 05b98823b6..49a813bc5a 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp +++ b/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp @@ -123,5 +123,5 @@ TEST_F(metacall_cli_core_plugin_await_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp b/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp index ec178460cf..e86f930511 100644 --- a/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp +++ b/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp @@ -386,5 +386,5 @@ TEST_F(metacall_cli_core_plugin_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp b/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp index 7158b3bb64..d6aae1a2cf 100644 --- a/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp +++ b/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp @@ -91,5 +91,5 @@ TEST_F(metacall_cobol_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp b/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp index af04b08dc6..e852b0f580 100644 --- a/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp +++ b/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp @@ -33,5 +33,5 @@ TEST_F(metacall_configuration_default_test, DefaultConstructor) ASSERT_EQ((int)0, (int)metacall_initialize()); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp index 48d998782e..92fa6eac5e 100644 --- a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp +++ b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp @@ -55,5 +55,5 @@ TEST_F(metacall_configuration_exec_path_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_cs_test/source/environment.cpp b/source/tests/metacall_cs_test/source/environment.cpp index 1753b9cd5f..1affa4ae73 100644 --- a/source/tests/metacall_cs_test/source/environment.cpp +++ b/source/tests/metacall_cs_test/source/environment.cpp @@ -40,5 +40,5 @@ void environment::SetUp() void environment::TearDown() { - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp b/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp index aaa0b4e966..799a1dc18e 100644 --- a/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp +++ b/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp @@ -75,5 +75,5 @@ TEST_F(metacall_csharp_function_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp b/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp index 5057a6efbb..653616db1c 100644 --- a/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp +++ b/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp @@ -79,5 +79,5 @@ TEST_F(metacall_csharp_static_class_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_depends_test/source/metacall_depends_test.cpp b/source/tests/metacall_depends_test/source/metacall_depends_test.cpp index 69fff39b43..0f82dd0da0 100644 --- a/source/tests/metacall_depends_test/source/metacall_depends_test.cpp +++ b/source/tests/metacall_depends_test/source/metacall_depends_test.cpp @@ -82,5 +82,5 @@ TEST_F(metacall_depends_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp index 03300dbb6b..7aaec074bc 100644 --- a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp +++ b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp @@ -276,5 +276,5 @@ TEST_F(metacall_distributable_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_C */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp index 4f404762e2..f912c04659 100644 --- a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp +++ b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp @@ -386,5 +386,5 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_JS */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp b/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp index 370c3e5659..72c2a2ad56 100644 --- a/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp +++ b/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp @@ -105,5 +105,5 @@ TEST_F(metacall_duplicated_handle_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp b/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp index 26ce8456a9..4306bd1ba9 100644 --- a/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp +++ b/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp @@ -155,5 +155,5 @@ TEST_F(metacall_duplicated_symbols_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY + OPTION_BUILD_LOADERS_RB */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ext_test/source/metacall_ext_test.cpp b/source/tests/metacall_ext_test/source/metacall_ext_test.cpp index 4a15017287..5894a32789 100644 --- a/source/tests/metacall_ext_test/source/metacall_ext_test.cpp +++ b/source/tests/metacall_ext_test/source/metacall_ext_test.cpp @@ -75,5 +75,5 @@ TEST_F(metacall_ext_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp b/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp index ce3a62f7b7..f5f4a0ba48 100644 --- a/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp +++ b/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp @@ -69,5 +69,5 @@ TEST_F(metacall_file_fail_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp b/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp index 23edddd061..a5f3a2d2a2 100644 --- a/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp +++ b/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp @@ -70,5 +70,5 @@ TEST_F(metacall_file_glob_test, DefaultConstructor) metacall_allocator_destroy(config_allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_file_test/source/metacall_file_test.cpp b/source/tests/metacall_file_test/source/metacall_file_test.cpp index 029e8f0f6b..aa635963c1 100644 --- a/source/tests/metacall_file_test/source/metacall_file_test.cpp +++ b/source/tests/metacall_file_test/source/metacall_file_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_file_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp index 07c9e87348..c4f18db15f 100644 --- a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp +++ b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp @@ -169,5 +169,5 @@ TEST_F(metacall_fork_test, DefaultConstructor) EXPECT_EQ((int)1, (int)pre_callback_fired); EXPECT_EQ((int)1, (int)post_callback_fired); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_function_test/source/metacall_function_test.cpp b/source/tests/metacall_function_test/source/metacall_function_test.cpp index 60c52efb1b..2d015ea7f5 100644 --- a/source/tests/metacall_function_test/source/metacall_function_test.cpp +++ b/source/tests/metacall_function_test/source/metacall_function_test.cpp @@ -272,5 +272,5 @@ TEST_F(metacall_function_test, DefaultConstructor) metacall_value_destroy(c_callback_factorial_impl_value); metacall_value_destroy(c_callback_factorial_value); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp b/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp index 0c5fc5773d..5c19f588a3 100644 --- a/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp +++ b/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp @@ -139,5 +139,5 @@ TEST_F(metacall_handle_export_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp index c1d25836cf..fb9202aba0 100644 --- a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp +++ b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp @@ -158,5 +158,5 @@ TEST_F(metacall_handle_get_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp b/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp index 2290009dd3..eba4e72069 100644 --- a/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp +++ b/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp @@ -55,5 +55,5 @@ TEST_F(metacall_init_fini_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp b/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp index 12d008293e..a38e648857 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp @@ -51,13 +51,13 @@ TEST_F(metacall_initialize_destroy_multiple_node_test, DefaultConstructor) ASSERT_EQ((int)0, (int)metacall_is_initialized(tag)); - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); ASSERT_EQ((int)1, (int)metacall_is_initialized(tag)); } #endif /* OPTION_BUILD_LOADERS_NODE */ - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp b/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp index df51f5d946..337923b152 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp @@ -51,13 +51,13 @@ TEST_F(metacall_initialize_destroy_multiple_test, DefaultConstructor) ASSERT_EQ((int)0, (int)metacall_is_initialized(tag)); - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); ASSERT_EQ((int)1, (int)metacall_is_initialized(tag)); } #endif /* OPTION_BUILD_LOADERS_MOCK */ - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp b/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp index 8c9e2930b6..c26f24374c 100644 --- a/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp +++ b/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp @@ -61,5 +61,5 @@ TEST_F(metacall_initialize_ex_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_MOCK */ - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp b/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp index ba4ab42b94..e1b67c480c 100644 --- a/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp +++ b/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp @@ -49,5 +49,5 @@ TEST_F(metacall_initialize_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_MOCK */ - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp b/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp index 06b1c220b8..a759571d76 100644 --- a/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp +++ b/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp @@ -134,5 +134,5 @@ TEST_F(metacall_inspect_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_integration_test/source/environment.cpp b/source/tests/metacall_integration_test/source/environment.cpp index 8ac160cf2e..3c2a0bb9ab 100644 --- a/source/tests/metacall_integration_test/source/environment.cpp +++ b/source/tests/metacall_integration_test/source/environment.cpp @@ -36,5 +36,5 @@ void environment::SetUp() void environment::TearDown() { - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp b/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp index 92edc0f2d5..dc472134f0 100644 --- a/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp +++ b/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp @@ -48,5 +48,5 @@ TEST_F(metacall_invalid_loader_test, DefaultConstructor) ASSERT_EQ((int)1, (int)metacall_is_initialized("invalid")); - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_java_test/source/metacall_java_test.cpp b/source/tests/metacall_java_test/source/metacall_java_test.cpp index c934cd1739..d6a44287cf 100644 --- a/source/tests/metacall_java_test/source/metacall_java_test.cpp +++ b/source/tests/metacall_java_test/source/metacall_java_test.cpp @@ -412,5 +412,5 @@ TEST_F(metacall_java_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_julia_test/source/metacall_julia_test.cpp b/source/tests/metacall_julia_test/source/metacall_julia_test.cpp index 1b9e21cdf1..384ea1ec58 100644 --- a/source/tests/metacall_julia_test/source/metacall_julia_test.cpp +++ b/source/tests/metacall_julia_test/source/metacall_julia_test.cpp @@ -98,5 +98,5 @@ TEST_F(metacall_julia_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp b/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp index a64b4464c8..dade10d5ea 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp +++ b/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp @@ -45,5 +45,5 @@ TEST_F(metacall_library_path_without_env_vars_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_MOCK */ - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp b/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp index 446161e609..8d0100c17b 100644 --- a/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp +++ b/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp @@ -99,5 +99,5 @@ TEST_F(metacall_llvm_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp b/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp index 8632cb274c..cdd57d8529 100644 --- a/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp +++ b/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp @@ -72,5 +72,5 @@ TEST_F(metacall_load_configuration_fail_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp b/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp index 92a253b9a8..b9665efecd 100644 --- a/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp +++ b/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp @@ -55,5 +55,5 @@ TEST_F(metacall_load_configuration_node_python_test, DefaultConstructor) EXPECT_EQ((double)5.0, (double)metacall_value_to_double(ret)); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp b/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp index ae64810d4b..005ee1e336 100644 --- a/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp +++ b/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp @@ -62,5 +62,5 @@ TEST_F(metacall_load_configuration_python_node_test, DefaultConstructor) metacall_allocator_destroy(config_allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp b/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp index c14a1cedaa..7527de8577 100644 --- a/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp +++ b/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp @@ -65,5 +65,5 @@ TEST_F(metacall_load_configuration_relative_test, DefaultConstructor) metacall_allocator_destroy(config_allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp index d3fc377c40..da91461a7b 100644 --- a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp +++ b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp @@ -254,5 +254,5 @@ TEST_F(metacall_load_configuration_test, DefaultConstructor) metacall_allocator_destroy(config_allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp b/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp index ee424fed8a..d007234460 100644 --- a/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp +++ b/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp @@ -67,5 +67,5 @@ TEST_F(metacall_load_memory_empty_test, DefaultConstructor) /* Non existent loader */ ASSERT_EQ((int)1, (int)metacall_load_from_memory("asdfghjk", buffer, sizeof(buffer), NULL)); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp b/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp index b65eeb92e3..1201ddaa4a 100644 --- a/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp +++ b/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp @@ -157,5 +157,5 @@ TEST_F(metacall_load_memory_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_JS */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_logs_test/source/metacall_logs_test.cpp b/source/tests/metacall_logs_test/source/metacall_logs_test.cpp index 15c14c4cec..9c352db700 100644 --- a/source/tests/metacall_logs_test/source/metacall_logs_test.cpp +++ b/source/tests/metacall_logs_test/source/metacall_logs_test.cpp @@ -40,5 +40,5 @@ TEST_F(metacall_logs_test, DefaultConstructor) ASSERT_EQ((int)0, (int)metacall_initialize()); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_lua_test/source/metacall_lua_test.cpp b/source/tests/metacall_lua_test/source/metacall_lua_test.cpp index e229265f78..50baf66e34 100644 --- a/source/tests/metacall_lua_test/source/metacall_lua_test.cpp +++ b/source/tests/metacall_lua_test/source/metacall_lua_test.cpp @@ -110,5 +110,5 @@ TEST_F(metacall_lua_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp index 8c3646f924..11243d861d 100644 --- a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp +++ b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp @@ -263,7 +263,7 @@ TEST_F(metacall_map_await_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); /* NodeJS */ #if defined(OPTION_BUILD_LOADERS_NODE) diff --git a/source/tests/metacall_map_test/source/metacall_map_test.cpp b/source/tests/metacall_map_test/source/metacall_map_test.cpp index ceb829c788..5aceb11fdb 100644 --- a/source/tests/metacall_map_test/source/metacall_map_test.cpp +++ b/source/tests/metacall_map_test/source/metacall_map_test.cpp @@ -210,5 +210,5 @@ TEST_F(metacall_map_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp b/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp index 629b1c7890..db398273cf 100644 --- a/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp +++ b/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp @@ -198,7 +198,7 @@ TEST_F(metacall_node_async_multiple_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); /* NodeJS */ #if defined(OPTION_BUILD_LOADERS_NODE) diff --git a/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp b/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp index 4a979174ed..dc256cc038 100644 --- a/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp +++ b/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp @@ -46,5 +46,5 @@ TEST_F(metacall_node_event_loop_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp b/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp index 8c125563f1..51c0843a54 100644 --- a/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp +++ b/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp @@ -252,7 +252,7 @@ TEST_F(metacall_node_async_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); /* NodeJS */ #if defined(OPTION_BUILD_LOADERS_NODE) diff --git a/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp b/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp index 308dff2bf3..bf57f21f52 100644 --- a/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp +++ b/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp @@ -95,7 +95,7 @@ TEST_F(metacall_node_await_chain_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); EXPECT_EQ((unsigned int)3, (unsigned int)callbacks_executed); } diff --git a/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp b/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp index 7d1fbd59af..3608330ee7 100644 --- a/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp +++ b/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp @@ -67,5 +67,5 @@ TEST_F(metacall_node_call_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp b/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp index a8a4bd900b..f89070ac2d 100644 --- a/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp +++ b/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp @@ -66,5 +66,5 @@ TEST_F(metacall_node_callback_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp b/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp index 17e38ea18e..7139335818 100644 --- a/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp +++ b/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp @@ -64,5 +64,5 @@ TEST_F(metacall_node_clear_mem_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp b/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp index 6e51c13c10..ac9bd4bd20 100644 --- a/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp +++ b/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp @@ -83,5 +83,5 @@ TEST_F(metacall_node_default_export_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp b/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp index 5cf2feeb3b..463aabc6be 100644 --- a/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp +++ b/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp @@ -54,5 +54,5 @@ TEST_F(metacall_node_event_loop_signal_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp b/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp index 350386b0cc..88e0197980 100644 --- a/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp +++ b/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp @@ -46,5 +46,5 @@ TEST_F(metacall_node_event_loop_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp index a82a9ed6cc..794056a01f 100644 --- a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp +++ b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp @@ -75,5 +75,5 @@ TEST_F(metacall_node_exception_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp index f091bf53c5..6514b0c759 100644 --- a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp +++ b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp @@ -79,5 +79,5 @@ TEST_F(metacall_node_extension_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp b/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp index 6c3e0f255d..5803e2920a 100644 --- a/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp +++ b/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp @@ -66,5 +66,5 @@ TEST_F(metacall_node_fail_env_var_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp b/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp index a9c44e1f68..b99d94d2bc 100644 --- a/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp +++ b/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp @@ -70,5 +70,5 @@ TEST_F(metacall_node_fail_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp b/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp index d065434d00..5b1038755d 100644 --- a/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp +++ b/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp @@ -71,5 +71,5 @@ TEST_F(metacall_node_fail_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp b/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp index c8f9f767c8..4148ae1fb0 100644 --- a/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp +++ b/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp @@ -81,5 +81,5 @@ TEST_F(metacall_node_inline_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp b/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp index d1b33518e3..133d949dd2 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp +++ b/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp @@ -125,7 +125,7 @@ TEST_F(metacall_node_multithread_deadlock_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); /* NodeJS */ #if defined(OPTION_BUILD_LOADERS_NODE) diff --git a/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp b/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp index 83bd3466be..bbf7fcf5db 100644 --- a/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp +++ b/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp @@ -68,5 +68,5 @@ TEST_F(metacall_node_unsupported_features_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp b/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp index 34d49f16ee..00766eb883 100644 --- a/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp +++ b/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp @@ -71,5 +71,5 @@ TEST_F(metacall_node_port_await_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp b/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp index 3c34a8094d..4c57bb201b 100644 --- a/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp +++ b/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp @@ -55,5 +55,5 @@ TEST_F(metacall_node_port_rs_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_RS */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp index 3b3552186b..5cfb285a20 100644 --- a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp +++ b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp @@ -85,5 +85,5 @@ TEST_F(metacall_node_port_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp b/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp index 464e9b7503..43cdbde337 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp +++ b/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp @@ -65,5 +65,5 @@ TEST_F(metacall_node_python_async_after_destroy_test, DefaultConstructor) * https://github.com/metacall/core/commit/9b64ee533079fa0d543fc346fb7149d1086451f0 * https://github.com/metacall/core/commit/22bd999c281f23aac04cea7df435a836631706da */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp b/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp index ef20b69f40..57e9c143be 100644 --- a/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp +++ b/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp @@ -90,5 +90,5 @@ TEST_F(metacall_node_python_await_extended_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp b/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp index 2f7160c5dd..b140752acc 100644 --- a/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp +++ b/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp @@ -84,5 +84,5 @@ TEST_F(metacall_node_python_await_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp b/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp index 95c5f2d9b3..4b9ce4866e 100644 --- a/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp +++ b/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp @@ -54,5 +54,5 @@ TEST_F(metacall_node_python_deadlock_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp b/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp index abe3e4a495..69ed55884f 100644 --- a/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp +++ b/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp @@ -59,5 +59,5 @@ TEST_F(metacall_node_python_exception_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp b/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp index c1db00da3e..7670e8d897 100644 --- a/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp +++ b/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp @@ -64,5 +64,5 @@ TEST_F(metacall_node_python_port_mock_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY && OPTION_BUILD_LOADERS_MOCK */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp b/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp index 87ce31cb02..0b4edc45ca 100644 --- a/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp +++ b/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp @@ -59,5 +59,5 @@ TEST_F(metacall_node_python_port_ruby_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY && OPTION_BUILD_LOADERS_RB */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp index 246e93b8ac..a3ff9fe7ef 100644 --- a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp +++ b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp @@ -110,5 +110,5 @@ TEST_F(metacall_node_python_ruby_test, DefaultConstructor) EXPECT_EQ((int)success_callbacks, (int)1); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp b/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp index 2f32965ecd..cfac3514f9 100644 --- a/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp +++ b/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp @@ -119,5 +119,5 @@ TEST_F(metacall_node_reentrant_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp b/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp index 8dd995d8d7..869a6fd1e1 100644 --- a/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp +++ b/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp @@ -127,7 +127,7 @@ TEST_F(metacall_node_signal_handler_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); EXPECT_EQ((bool)callback_result.load(), (bool)true); EXPECT_EQ((bool)signal_result.load(), (bool)true); diff --git a/source/tests/metacall_node_test/source/metacall_node_test.cpp b/source/tests/metacall_node_test/source/metacall_node_test.cpp index 1b7b595b61..f63f67c2cc 100644 --- a/source/tests/metacall_node_test/source/metacall_node_test.cpp +++ b/source/tests/metacall_node_test/source/metacall_node_test.cpp @@ -143,5 +143,5 @@ TEST_F(metacall_node_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp b/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp index 49ddae7f9d..984705f86c 100644 --- a/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp +++ b/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp @@ -138,5 +138,5 @@ TEST_F(metacall_node_typescript_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp b/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp index d738fa05a0..0ad0838ab9 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp +++ b/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_plugin_destroy_order_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp b/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp index 56731f9960..fe30dd53e7 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp +++ b/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_plugin_extension_invalid_path_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp b/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp index cb49d030bd..b7a6680f65 100644 --- a/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp +++ b/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp @@ -119,5 +119,5 @@ TEST_F(metacall_plugin_extension_local_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp b/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp index 73a7269973..975e70590b 100644 --- a/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp +++ b/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp @@ -117,5 +117,5 @@ TEST_F(metacall_plugin_extension_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp b/source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp index 2b56809820..736753c3d9 100644 --- a/source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp +++ b/source/tests/metacall_python_async_test/source/metacall_python_async_test.cpp @@ -160,5 +160,5 @@ TEST_F(metacall_python_async_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp b/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp index 79d1a7d47f..355e712880 100644 --- a/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp +++ b/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp @@ -68,5 +68,5 @@ TEST_F(metacall_python_await_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp b/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp index e3fb30711f..5ba74c8397 100644 --- a/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp +++ b/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_python_builtins_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp b/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp index c183c575ec..b62c2d021c 100644 --- a/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp +++ b/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp @@ -66,5 +66,5 @@ TEST_F(metacall_python_callback_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp index af0ec1aa53..b5cb079b92 100644 --- a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp +++ b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp @@ -169,5 +169,5 @@ TEST_F(metacall_python_dict_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp index 1a5f92cec2..05726d9a46 100644 --- a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp +++ b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp @@ -72,5 +72,5 @@ TEST_F(metacall_python_exception_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp b/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp index b36822b37a..f35f187b8a 100644 --- a/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp +++ b/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp @@ -93,5 +93,5 @@ TEST_F(metacall_python_fail_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp index 14e5fdc741..d7f1fc308b 100644 --- a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp +++ b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp @@ -63,5 +63,5 @@ TEST_F(metacall_python_gc_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp index 05619bf636..bc151f7d9c 100644 --- a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp +++ b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp @@ -131,5 +131,5 @@ TEST_F(metacall_python_loader_port_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp b/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp index 1ab58c5db3..503e0f6c0a 100644 --- a/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp +++ b/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp @@ -82,5 +82,5 @@ TEST_F(metacall_python_model_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp b/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp index 5b1d15b30a..219b8b4a68 100644 --- a/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp +++ b/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp @@ -71,5 +71,5 @@ TEST_F(metacall_python_node_await_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_NODE && OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp index c2117aeb1b..b1f6d18fb4 100644 --- a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp +++ b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp @@ -203,5 +203,5 @@ TEST_F(metacall_python_class_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp index 0a273681ef..23b30971fc 100644 --- a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp +++ b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp @@ -94,5 +94,5 @@ TEST_F(metacall_python_open_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp b/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp index 863ab1cdd0..93afe1d319 100644 --- a/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp +++ b/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp @@ -160,5 +160,5 @@ TEST_F(metacall_python_pointer_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp b/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp index b3f5b8598f..0cf39bfe3f 100644 --- a/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp +++ b/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp @@ -67,5 +67,5 @@ TEST_F(metacall_python_port_callback_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp b/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp index f552efa14b..b005ffa1b3 100644 --- a/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp +++ b/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp @@ -71,5 +71,5 @@ TEST_F(metacall_python_port_https_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp b/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp index bfb2fa4e8f..0b15fa9775 100644 --- a/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp +++ b/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp @@ -118,5 +118,5 @@ TEST_F(metacall_python_port_import_test, metacall_node_ramda_case_1) ASSERT_NE((void *)handle, (void *)NULL); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp b/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp index b2d57db4bb..2e48f56071 100644 --- a/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp +++ b/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp @@ -118,5 +118,5 @@ TEST_F(metacall_python_port_pointer_test, DefaultConstructor) metacall_value_destroy(ret); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp index e901d72456..d562fd89e5 100644 --- a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp +++ b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp @@ -52,5 +52,5 @@ TEST_F(metacall_python_port_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp b/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp index 33328a637e..fa6dae3f6c 100644 --- a/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp +++ b/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp @@ -76,5 +76,5 @@ TEST_F(metacall_python_reentrant_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp b/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp index 5d0505a560..f1f7ce4bb2 100644 --- a/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp +++ b/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp @@ -72,5 +72,5 @@ TEST_F(metacall_python_dict_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_test/source/metacall_python_test.cpp b/source/tests/metacall_python_test/source/metacall_python_test.cpp index 97a6bb3efb..35dfb9e414 100644 --- a/source/tests/metacall_python_test/source/metacall_python_test.cpp +++ b/source/tests/metacall_python_test/source/metacall_python_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_python_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp b/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp index 539c7e02bd..d5a2ee3762 100644 --- a/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp +++ b/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp @@ -102,5 +102,5 @@ TEST_F(metacall_python_varargs_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp b/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp index 7a0c6c1184..9c35499a75 100644 --- a/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp +++ b/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp @@ -45,5 +45,5 @@ TEST_F(metacall_python_without_env_vars_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp b/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp index 8dd69eafa0..7c4ec16a40 100644 --- a/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp +++ b/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp @@ -66,5 +66,5 @@ TEST_F(metacall_python_without_functions_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp b/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp index e1324ba7f3..d3cade3233 100644 --- a/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp +++ b/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp @@ -61,6 +61,6 @@ TEST_F(metacall_reinitialize_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_MOCK */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } } diff --git a/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp b/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp index 85fee11c54..ae4bc39051 100644 --- a/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp +++ b/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp @@ -170,5 +170,5 @@ TEST_F(metacall_reload_functions_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp index 63b65fe2f5..ad07a1db83 100644 --- a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp +++ b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp @@ -129,5 +129,5 @@ TEST_F(metacall_return_monad_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp b/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp index 0984befcd2..51fb948f24 100644 --- a/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp +++ b/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp @@ -87,5 +87,5 @@ TEST_F(metacall_rpc_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_RPC */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp b/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp index b9cb7dfd26..96b4f5c151 100644 --- a/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp +++ b/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp @@ -69,5 +69,5 @@ TEST_F(metacall_ruby_fail_empty_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp b/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp index b7228a7e94..2fe3de533b 100644 --- a/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp +++ b/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp @@ -50,5 +50,5 @@ TEST_F(metacall_ruby_fail_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_RB */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp b/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp index ca8ca3c142..c471d24062 100644 --- a/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp +++ b/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp @@ -160,5 +160,5 @@ TEST_F(metacall_ruby_object_class_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp index e9fd2d082f..295697da2e 100644 --- a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp +++ b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp @@ -80,5 +80,5 @@ TEST_F(metacall_ruby_parser_integration_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_RB */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp b/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp index 91fb3fb4c4..66b0fa7478 100644 --- a/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp +++ b/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp @@ -59,5 +59,5 @@ TEST_F(metacall_ruby_integration_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_RB */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp b/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp index e22eb5dbbd..adb9a70070 100644 --- a/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp +++ b/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp @@ -37,5 +37,5 @@ TEST_F(metacall_ruby_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_load_from_file("rb", rb_scripts, sizeof(rb_scripts) / sizeof(rb_scripts[0]), NULL)); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp b/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp index 64d4627bfa..cb0c537a05 100644 --- a/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp +++ b/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp @@ -103,5 +103,5 @@ TEST_F(metacall_rust_class_test, DefaultConstructor) // metacall_value_destroy(book_class); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp b/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp index fccdcee342..5a2f5b4406 100644 --- a/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp +++ b/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp @@ -69,5 +69,5 @@ TEST_F(metacall_rust_load_from_mem_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp b/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp index db6f6de38f..6d6ed2bfc0 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp +++ b/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp @@ -102,5 +102,5 @@ TEST_F(metacall_rust_load_from_mem_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp index c239fd1cc1..dc578bb42c 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp +++ b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp @@ -65,5 +65,5 @@ TEST_F(metacall_rust_load_from_package_dep_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp index 7f639f4bcf..776ce0ebb6 100644 --- a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp +++ b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp @@ -168,5 +168,5 @@ TEST_F(metacall_rust_load_from_mem_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp index cbe3e2ef91..b0a2e94073 100644 --- a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp +++ b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp @@ -187,5 +187,5 @@ TEST_F(metacall_rust_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp b/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp index 824da2ae1a..6d0f186a17 100644 --- a/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp +++ b/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp @@ -291,7 +291,7 @@ TEST_F(metacall_sandbox_plugin_test, DefaultConstructor) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } /* [Note] This test blocks all the gtest context, so you should comment it to allow testing for other test cases */ @@ -330,7 +330,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_IO_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_SOCKETS_DISABLE_TEST) @@ -381,7 +381,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_SOCKETS_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_IPC_DISABLE_TEST) @@ -432,7 +432,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_IPC_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_PROCESS_DISABLE_TEST) @@ -470,7 +470,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_PROCESS_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_FILESYSTEMS_DISABLE_TEST) @@ -508,7 +508,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_FILESYSTEMS_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_TIME_DISABLE_TEST) @@ -559,7 +559,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_TIME_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_MEMORY_DISABLE_TEST) @@ -597,7 +597,7 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_MEMORY_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } TEST_F(metacall_sandbox_plugin_test, SANDBOX_SIGNALS_DISABLE_TEST) @@ -648,5 +648,5 @@ TEST_F(metacall_sandbox_plugin_test, SANDBOX_SIGNALS_DISABLE_TEST) metacall_value_destroy(args[0]); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_test/source/metacall_test.cpp b/source/tests/metacall_test/source/metacall_test.cpp index 4deebb1501..cf9d864a2a 100644 --- a/source/tests/metacall_test/source/metacall_test.cpp +++ b/source/tests/metacall_test/source/metacall_test.cpp @@ -605,5 +605,5 @@ TEST_F(metacall_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_test/source/metacall_test_split.cpp b/source/tests/metacall_test/source/metacall_test_split.cpp index 1064365b1e..dead0c91e4 100644 --- a/source/tests/metacall_test/source/metacall_test_split.cpp +++ b/source/tests/metacall_test/source/metacall_test_split.cpp @@ -44,7 +44,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_initialize()); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } class metacall_loader_test : public testing::Test @@ -63,7 +63,7 @@ class metacall_loader_test : public testing::Test ~metacall_loader_test() { - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } }; diff --git a/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp b/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp index 923f8e0484..d9cf65a803 100644 --- a/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp +++ b/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp @@ -79,5 +79,5 @@ TEST_F(metacall_typescript_call_map_test, DefaultConstructor) metacall_allocator_destroy(allocator); - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp b/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp index 7ac88e6da7..0930ddff38 100644 --- a/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp +++ b/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp @@ -47,5 +47,5 @@ TEST_F(metacall_typescript_jsx_default_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_TS */ - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp b/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp index 9f51a73c4d..95a65c98b2 100644 --- a/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp +++ b/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp @@ -138,5 +138,5 @@ TEST_F(metacall_typescript_node_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp b/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp index 8ec87717f8..13d90c5152 100644 --- a/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp +++ b/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp @@ -77,5 +77,5 @@ TEST_F(metacall_typescript_require_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp b/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp index 60d1868219..8b3488797b 100644 --- a/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp +++ b/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp @@ -126,5 +126,5 @@ TEST_F(metacall_typescript_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp b/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp index 1635e15a04..8256b34813 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp @@ -68,5 +68,5 @@ TEST_F(metacall_tsx_loop_fail_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp index 82a9dc0c6c..0723b6eed3 100644 --- a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp +++ b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp @@ -79,5 +79,5 @@ TEST_F(metacall_tsx_test, DefaultConstructor) metacall_allocator_destroy(allocator); } - EXPECT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } diff --git a/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp b/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp index eb49b144c3..2c5515ed83 100644 --- a/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp +++ b/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp @@ -192,5 +192,5 @@ TEST_F(metacall_wasm_test, Default) ASSERT_EQ((int)1, (int)metacall_load_from_file("wasm", modules, sizeof(modules) / sizeof(modules[0]), NULL)); } - ASSERT_EQ((int)0, (int)metacall_destroy()); + metacall_destroy(); } From 5b592ac0e9a8e498e3e706623d0a788276f566e0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 14 Jan 2025 17:12:21 +0100 Subject: [PATCH 014/364] Add NodeJS support for load_from_package and execution_path, add test with libgit2, solve issues c_loader. --- cmake/FindLibGit2.cmake | 78 ++++++ .../loaders/c_loader/source/c_loader_impl.cpp | 47 +++- .../node_loader/source/node_loader_port.cpp | 261 ++++++++++++++++++ source/ports/node_port/index.d.ts | 3 + source/ports/node_port/index.js | 39 +++ source/tests/CMakeLists.txt | 1 + .../CMakeLists.txt | 167 +++++++++++ .../source/main.cpp | 28 ++ .../source/metacall_node_port_c_lib_test.cpp | 57 ++++ tools/metacall-environment.ps1 | 21 ++ tools/metacall-environment.sh | 17 +- 11 files changed, 711 insertions(+), 8 deletions(-) create mode 100644 cmake/FindLibGit2.cmake create mode 100644 source/tests/metacall_node_port_c_lib_test/CMakeLists.txt create mode 100644 source/tests/metacall_node_port_c_lib_test/source/main.cpp create mode 100644 source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp diff --git a/cmake/FindLibGit2.cmake b/cmake/FindLibGit2.cmake new file mode 100644 index 0000000000..787b5319c4 --- /dev/null +++ b/cmake/FindLibGit2.cmake @@ -0,0 +1,78 @@ +# +# CMake Find LibGit2 Library by Parra Studios +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia +# + +# Find libgit2 library and include paths +# +# LibGit2_FOUND - True if LibGit2 was found +# LibGit2_INCLUDE_DIR - LibGit2 headers path +# LibGit2_VERSION - LibGit2 version +# LibGit2_VERSION_MAJOR - LibGit2 major version +# LibGit2_VERSION_MINOR - LibGit2 minor version +# LibGit2_VERSION_REVISION - LibGit2 patch version +# LibGit2_LIBRARY - LibGit2 shared library +# LibGit2_LIBRARY_DIR - LibGit2 shared library folder +# + +# Prevent vervosity if already included +if(LibGit2_LIBRARY) + set(LibGit2_FIND_QUIETLY TRUE) +endif() + +# Include package manager +include(FindPackageHandleStandardArgs) + +# Find via PkgConfig +find_package(PkgConfig QUIET) +pkg_check_modules(PKG_GIT2 QUIET libgit2) + +if(NOT LibGit2_DEFINITIONS) + set(LibGit2_DEFINITIONS ${PKG_GIT2_CFLAGS_OTHER}) +endif() + +if(NOT LibGit2_INCLUDE_DIR) + find_path(LibGit2_INCLUDE_DIR + NAMES git2.h + HINTS ${PKG_GIT2_INCLUDE_DIRS} + ) +endif() + +if(NOT LibGit2_VERSION AND LibGit2_INCLUDE_DIR) + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MAJOR REGEX "^#define LIBGIT2_VER_MAJOR +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MAJOR ${LibGit2_VERSION_MAJOR}) + + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MINOR REGEX "^#define LIBGIT2_VER_MINOR +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MINOR ${LibGit2_VERSION_MINOR}) + + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_REVISION REGEX "^#define LIBGIT2_VER_REVISION +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_REVISION ${LibGit2_VERSION_REVISION}) + + set(LibGit2_VERSION "${LibGit2_VERSION_MAJOR}.${LibGit2_VERSION_MINOR}.${LibGit2_VERSION_REVISION}") +endif() + +if(NOT LibGit2_LIBRARY) + find_library(LibGit2_LIBRARY + NAMES git2 + HINTS ${PKG_GIT2_LIBRARY_DIRS} + ) +endif() + +set(LibGit2_LIBRARIES ${LibGit2_LIBRARY}) +set(LibGit2_INCLUDE_DIRS ${LibGit2_INCLUDE_DIR}) +get_filename_component(LibGit2_LIBRARY_DIR ${LibGit2_LIBRARY} DIRECTORY) + +# Define package +find_package_handle_standard_args(LibGit2 + FOUND_VAR + LibGit2_FOUND + REQUIRED_VARS + LibGit2_LIBRARY + LibGit2_LIBRARY_DIR + LibGit2_INCLUDE_DIR + LibGit2_INCLUDE_DIRS + VERSION_VAR + LibGit2_VERSION +) + +mark_as_advanced(LibGit2_LIBRARY LibGit2_LIBRARY_DIR LibGit2_INCLUDE_DIR) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index 52ead7b7cd..4ad6689bfe 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -81,6 +81,8 @@ typedef struct loader_impl_c_handle_base_type virtual ~loader_impl_c_handle_base_type() {} + virtual bool recursive_includes() = 0; + virtual int discover(loader_impl impl, context ctx) = 0; virtual const void *symbol(std::string &name) = 0; @@ -136,6 +138,11 @@ typedef struct loader_impl_c_handle_tcc_type : loader_impl_c_handle_base_type } } + bool recursive_includes() + { + return false; + } + bool initialize(loader_impl_c c_impl) { this->state = tcc_new(); @@ -232,6 +239,11 @@ typedef struct loader_impl_c_handle_dynlink_type : loader_impl_c_handle_base_typ } } + bool recursive_includes() + { + return true; + } + bool initialize(loader_impl_c c_impl, const loader_path path) { std::string lib_path_str(path); @@ -1022,12 +1034,18 @@ static int c_loader_impl_discover_signature(loader_impl impl, loader_impl_c_hand symbol_name.insert(0, 1, '_'); #endif + if (scope_get(sp, symbol_name.c_str()) != NULL) + { + log_write("metacall", LOG_LEVEL_WARNING, "Symbol '%s' redefined, skipping the function", func_name.c_str()); + return 0; + } + const void *address = c_handle->symbol(symbol_name); if (address == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Symbol '%s' not found, skipping the function", func_name.c_str()); - return 1; + log_write("metacall", LOG_LEVEL_WARNING, "Symbol '%s' not found, skipping the function", func_name.c_str()); + return 0; } loader_impl_c_function c_function = new loader_impl_c_function_type(address); @@ -1080,9 +1098,13 @@ static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCurs { c_loader_impl_discover_visitor_data visitor_data = static_cast(data); - if (clang_Location_isFromMainFile(clang_getCursorLocation(cursor)) == 0) + /* Include recursively when disabled, include only the header inlcuded is populated when enabled */ + if (visitor_data->c_handle->recursive_includes() == false) { - return CXChildVisit_Continue; + if (clang_Location_isFromMainFile(clang_getCursorLocation(cursor)) == 0) + { + return CXChildVisit_Continue; + } } CXCursorKind kind = clang_getCursorKind(cursor); @@ -1102,6 +1124,7 @@ static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCurs static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_base c_handle, context ctx) { + loader_impl_c c_impl = static_cast(loader_impl_get(impl)); c_loader_impl_discover_visitor_data_type data = { impl, c_handle, @@ -1109,12 +1132,24 @@ static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_bas 0 }; + std::vector includes; + std::vector command_line_args; + + /* Otherwise, check the execution paths */ + for (auto exec_path : c_impl->execution_paths) + { + includes.push_back("-I" + exec_path); + command_line_args.push_back(includes.back().c_str()); + } + for (std::string file : c_handle->files) { - CXIndex index = clang_createIndex(0, 0); + /* Define the command line arguments (simulating compiler flags) */ + CXIndex index = clang_createIndex(0, 1); CXTranslationUnit unit = clang_parseTranslationUnit( index, - file.c_str(), nullptr, 0, + file.c_str(), + command_line_args.data(), command_line_args.size(), nullptr, 0, CXTranslationUnit_None); diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index ed681f1e91..a072f934ff 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -281,6 +281,94 @@ napi_value node_loader_port_metacall_await(napi_env env, napi_callback_info info return promise; } +/** +* @brief +* Define an execution path into a runtime +* +* @param[in] env +* N-API reference to the enviroment +* +* @param[in] info +* Reference to the call information +* +* @return +* TODO: Not implemented yet +*/ +napi_value node_loader_port_metacall_execution_path(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, path_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get path length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &path_length); + + node_loader_impl_exception(env, status); + + size_t path_size = path_length + 1; + + /* Allocate path */ + char *path = new char[path_size]; + + if (path == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path, path allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get path */ + status = napi_get_value_string_utf8(env, argv[1], path, path_size, &path_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + /* Define execution path */ + if (metacall_execution_path(tag, path) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] path; + + /* TODO: Return value and logs */ + return nullptr; +} + napi_value node_loader_port_metacall_load_from_file(napi_env env, napi_callback_info info) { /* TODO: Detect if input argument types are valid */ @@ -628,6 +716,176 @@ napi_value node_loader_port_metacall_load_from_memory_export(napi_env env, napi_ return v_exports; } +/** +* @brief +* Load a package by tag +* +* @param[in] env +* N-API reference to the enviroment +* +* @param[in] info +* Reference to the call information +* +* @return +* TODO: Not implemented yet +*/ +napi_value node_loader_port_metacall_load_from_package(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, package_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get package length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &package_length); + + node_loader_impl_exception(env, status); + + size_t package_size = package_length + 1; + + /* Allocate package */ + char *package = new char[package_size]; + + if (package == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, package allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get package */ + status = napi_get_value_string_utf8(env, argv[1], package, package_size, &package_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + /* Load the package */ + if (metacall_load_from_package(tag, package, NULL) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not load a package"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] package; + + /* TODO: Return value and logs */ + return nullptr; +} + +napi_value node_loader_port_metacall_load_from_package_export(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, package_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from memory, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get package length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &package_length); + + node_loader_impl_exception(env, status); + + size_t package_size = package_length + 1; + + /* Allocate package */ + char *package = new char[package_size]; + + if (package == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, package allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get package */ + status = napi_get_value_string_utf8(env, argv[1], package, package_size, &package_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + void *handle = NULL; + + /* Load package from package */ + if (metacall_load_from_package(tag, package, &handle) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] package; + + void *exports = metacall_handle_export(handle); + + napi_value v_exports = node_loader_impl_value_to_napi(node_impl, env, exports); + + node_loader_impl_finalizer(env, v_exports, exports); + + return v_exports; +} + /** * @brief * Loads a script from configuration path @@ -816,10 +1074,13 @@ void node_loader_port_exports(napi_env env, napi_value exports) x(metacall); \ x(metacallfms); \ x(metacall_await); \ + x(metacall_execution_path); \ x(metacall_load_from_file); \ x(metacall_load_from_file_export); \ x(metacall_load_from_memory); \ x(metacall_load_from_memory_export); \ + x(metacall_load_from_package); \ + x(metacall_load_from_package_export); \ x(metacall_load_from_configuration); \ x(metacall_load_from_configuration_export); \ x(metacall_inspect); \ diff --git a/source/ports/node_port/index.d.ts b/source/ports/node_port/index.d.ts index 7b1d6d1bd2..3be9a48091 100644 --- a/source/ports/node_port/index.d.ts +++ b/source/ports/node_port/index.d.ts @@ -1,10 +1,13 @@ declare module 'metacall' { export function metacall(name: string, ...args: any): any; export function metacallfms(name: string, buffer: string): any; + export function metacall_execution_path(tag: string, path: string): number; export function metacall_load_from_file(tag: string, paths: string[]): number; export function metacall_load_from_file_export(tag: string, paths: string[]): any; export function metacall_load_from_memory(tag: string, code: string): number; export function metacall_load_from_memory_export(tag: string, code: string): any; + export function metacall_load_from_package(tag: string, pkg: string): number; + export function metacall_load_from_package_export(tag: string, pkg: string): any; export function metacall_load_from_configuration(path: string): number; export function metacall_load_from_configuration_export(path: string): any; export function metacall_inspect(): any; diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 8d690b6d84..6d15c028ec 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -102,6 +102,18 @@ const metacall_await = (name, ...args) => { return addon.metacall_await(name, ...args); }; +const metacall_execution_path = (tag, path) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(path) !== '[object String]') { + throw Error('The path should be of string type.'); + } + + return addon.metacall_execution_path(tag, path); +}; + const metacall_load_from_file = (tag, paths) => { if (Object.prototype.toString.call(tag) !== '[object String]') { throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); @@ -150,6 +162,30 @@ const metacall_load_from_memory_export = (tag, code) => { return addon.metacall_load_from_memory_export(tag, code); }; +const metacall_load_from_package = (tag, pkg) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(pkg) !== '[object String]') { + throw Error('Package should be a string with the id or path to the package.'); + } + + return addon.metacall_load_from_package(tag, pkg); +}; + +const metacall_load_from_package_export = (tag, pkg) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(pkg) !== '[object String]') { + throw Error('Package should be a string with the id or path to the package.'); + } + + return addon.metacall_load_from_package_export(tag, pkg); +}; + const metacall_load_from_configuration = (path) => { if (Object.prototype.toString.call(path) !== '[object String]') { throw Error('Path should be a string indicating the path where the metacall.json is located.'); @@ -207,10 +243,13 @@ const module_exports = { metacallfms, metacall_await, metacall_inspect, + metacall_execution_path, metacall_load_from_file, metacall_load_from_file_export, metacall_load_from_memory, metacall_load_from_memory_export, + metacall_load_from_package, + metacall_load_from_package_export, metacall_load_from_configuration, metacall_load_from_configuration_export, metacall_handle, diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index eb70ae1c70..aca1cfdaa3 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -128,6 +128,7 @@ add_subdirectory(metacall_node_reentrant_test) add_subdirectory(metacall_node_port_test) add_subdirectory(metacall_node_port_await_test) add_subdirectory(metacall_node_port_rs_test) +add_subdirectory(metacall_node_port_c_lib_test) add_subdirectory(metacall_node_python_port_mock_test) add_subdirectory(metacall_node_python_port_ruby_test) add_subdirectory(metacall_node_python_ruby_test) diff --git a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt new file mode 100644 index 0000000000..0f4436b100 --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt @@ -0,0 +1,167 @@ +# Check if this loader is enabled +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_LOADERS_C OR NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_NODE) + return() +endif() + +# +# External dependencies +# + +find_package(LibGit2) + +if(NOT LibGit2_FOUND) + message(WARNING "LibGit2 libraries not found, skipping test metacall-node-port-c-lib-test") + return() +endif() + +# +# Executable name and options +# + +# Target name +set(target metacall-node-port-c-lib-test) +message(STATUS "Test ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/main.cpp + ${source_path}/metacall_node_port_c_lib_test.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GTest + + ${META_PROJECT_NAME}::metacall +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} + + # NodeJS Port path + METACALL_NODE_PORT_PATH="${CMAKE_SOURCE_DIR}/source/ports/node_port/index.js" + + # LibGit2 paths + LIBGIT2_LIBRARY_DIR="${LibGit2_LIBRARY_DIR}" + LIBGIT2_INCLUDE_DIR="${LibGit2_INCLUDE_DIR}" +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Linker options +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $ +) + +# +# Define dependencies +# + +add_dependencies(${target} + node_port + node_loader + c_loader +) + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} +) diff --git a/source/tests/metacall_node_port_c_lib_test/source/main.cpp b/source/tests/metacall_node_port_c_lib_test/source/main.cpp new file mode 100644 index 0000000000..11ddf3f599 --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/source/main.cpp @@ -0,0 +1,28 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff --git a/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp new file mode 100644 index 0000000000..faa944974a --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp @@ -0,0 +1,57 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include +#include +#include + +class metacall_node_port_c_lib_test : public testing::Test +{ +public: +}; + +TEST_F(metacall_node_port_c_lib_test, DefaultConstructor) +{ + metacall_print_info(); + + ASSERT_EQ((int)0, (int)metacall_initialize()); + + static const char buffer[] = + /* NodeJS */ + "const assert = require('assert');\n" + "const { metacall_execution_path, metacall_load_from_package_export } = require('" METACALL_NODE_PORT_PATH "');\n" + /* C Lib Paths */ + "metacall_execution_path('c', '" LIBGIT2_INCLUDE_DIR "');\n" + "metacall_execution_path('c', '" LIBGIT2_LIBRARY_DIR "');\n" + /* C Lib Require */ + "const git2 = metacall_load_from_package_export('c', 'git2');\n" + "const { git_libgit2_init, git_libgit2_shutdown } = git2;\n" + "console.log(git2);\n" + /* C Lib Assert */ + "assert(git_libgit2_init() >= 0, 'libgit2 initialization failed');\n" + "git_libgit2_shutdown();\n" + "\n"; + + ASSERT_EQ((int)0, (int)metacall_load_from_memory("node", buffer, sizeof(buffer), NULL)); + + metacall_destroy(); +} diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 1638de22c8..dd21915200 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -126,6 +126,27 @@ function Set-Nodejs { Write-Output "-DNodeJS_EXECUTABLE=""$NodeDir/node.exe""" >> $EnvOpts Write-Output "-DNodeJS_LIBRARY_NAME=""libnode.dll""" >> $EnvOpts Write-Output "-DNodeJS_LIBRARY_NAME_PATH=""$NodeDir/lib/libnode.dll""" >> $EnvOpts + + if ($Arguments -contains "c") { + # Required for test source/tests/metacall_node_port_c_lib_test + if (!(Test-Path -Path "$DepsDir\libgit2")) { + # Clone libgit2 + git clone --depth 1 --branch v1.8.4 https://github.com/libgit2/libgit2 + } + + $InstallDir = "$DepsDir\libgit2\build\dist" + + mkdir "$DepsDir\libgit2\build" + mkdir "$InstallDir" + Set-Location "$DepsDir\libgit2\build" + + cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=OFF -DBUILD_CLI=OFF .. + cmake --build . "-j$((Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors)" + cmake --install . --prefix "$InstallDir" + + Write-Output "-DLibGit2_LIBRARY=""$InstallDir\lib\git2.lib""" >> $EnvOpts + Write-Output "-DLibGit2_INCLUDE_DIR=""$InstallDir\include""" >> $EnvOpts + } } function Set-Java { diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 304fa6a02d..d2983330bf 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -464,11 +464,18 @@ sub_nodejs(){ cd $ROOT_DIR if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + INSTALL_LIBGIT2="libgit2-dev" + else + INSTALL_LIBGIT2="" + fi + if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then # Note that Python is required for GYP - $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends python3 g++ make nodejs npm curl + $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends python3 g++ make nodejs npm curl $INSTALL_LIBGIT2 elif [ "${LINUX_DISTRO}" = "alpine" ]; then - $SUDO_CMD apk add --no-cache python3 g++ make nodejs nodejs-dev npm curl + $SUDO_CMD apk add --no-cache python3 g++ make nodejs nodejs-dev npm curl $INSTALL_LIBGIT2 # Build dependencies (note libexecinfo-dev is not available in Alpine 3.17) $SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main linux-headers libexecinfo libexecinfo-dev @@ -557,6 +564,12 @@ sub_nodejs(){ # Configure NPM path echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + brew install libgit2@1.8 + brew link libgit2@1.8 --force --overwrite + fi + # fi fi } From 0fe22954b27534e32a51c8b2a021c87b50cce7d1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 14 Jan 2025 17:12:21 +0100 Subject: [PATCH 015/364] Add NodeJS support for load_from_package and execution_path, add test with libgit2, solve issues c_loader. --- cmake/FindLibGit2.cmake | 78 ++++++ .../loaders/c_loader/source/c_loader_impl.cpp | 47 +++- .../node_loader/source/node_loader_port.cpp | 261 ++++++++++++++++++ source/ports/node_port/index.d.ts | 3 + source/ports/node_port/index.js | 39 +++ source/tests/CMakeLists.txt | 1 + .../CMakeLists.txt | 167 +++++++++++ .../source/main.cpp | 28 ++ .../source/metacall_node_port_c_lib_test.cpp | 57 ++++ tools/metacall-environment.ps1 | 21 ++ tools/metacall-environment.sh | 17 +- 11 files changed, 711 insertions(+), 8 deletions(-) create mode 100644 cmake/FindLibGit2.cmake create mode 100644 source/tests/metacall_node_port_c_lib_test/CMakeLists.txt create mode 100644 source/tests/metacall_node_port_c_lib_test/source/main.cpp create mode 100644 source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp diff --git a/cmake/FindLibGit2.cmake b/cmake/FindLibGit2.cmake new file mode 100644 index 0000000000..787b5319c4 --- /dev/null +++ b/cmake/FindLibGit2.cmake @@ -0,0 +1,78 @@ +# +# CMake Find LibGit2 Library by Parra Studios +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia +# + +# Find libgit2 library and include paths +# +# LibGit2_FOUND - True if LibGit2 was found +# LibGit2_INCLUDE_DIR - LibGit2 headers path +# LibGit2_VERSION - LibGit2 version +# LibGit2_VERSION_MAJOR - LibGit2 major version +# LibGit2_VERSION_MINOR - LibGit2 minor version +# LibGit2_VERSION_REVISION - LibGit2 patch version +# LibGit2_LIBRARY - LibGit2 shared library +# LibGit2_LIBRARY_DIR - LibGit2 shared library folder +# + +# Prevent vervosity if already included +if(LibGit2_LIBRARY) + set(LibGit2_FIND_QUIETLY TRUE) +endif() + +# Include package manager +include(FindPackageHandleStandardArgs) + +# Find via PkgConfig +find_package(PkgConfig QUIET) +pkg_check_modules(PKG_GIT2 QUIET libgit2) + +if(NOT LibGit2_DEFINITIONS) + set(LibGit2_DEFINITIONS ${PKG_GIT2_CFLAGS_OTHER}) +endif() + +if(NOT LibGit2_INCLUDE_DIR) + find_path(LibGit2_INCLUDE_DIR + NAMES git2.h + HINTS ${PKG_GIT2_INCLUDE_DIRS} + ) +endif() + +if(NOT LibGit2_VERSION AND LibGit2_INCLUDE_DIR) + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MAJOR REGEX "^#define LIBGIT2_VER_MAJOR +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MAJOR ${LibGit2_VERSION_MAJOR}) + + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MINOR REGEX "^#define LIBGIT2_VER_MINOR +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MINOR ${LibGit2_VERSION_MINOR}) + + file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_REVISION REGEX "^#define LIBGIT2_VER_REVISION +([0-9]+)") + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_REVISION ${LibGit2_VERSION_REVISION}) + + set(LibGit2_VERSION "${LibGit2_VERSION_MAJOR}.${LibGit2_VERSION_MINOR}.${LibGit2_VERSION_REVISION}") +endif() + +if(NOT LibGit2_LIBRARY) + find_library(LibGit2_LIBRARY + NAMES git2 + HINTS ${PKG_GIT2_LIBRARY_DIRS} + ) +endif() + +set(LibGit2_LIBRARIES ${LibGit2_LIBRARY}) +set(LibGit2_INCLUDE_DIRS ${LibGit2_INCLUDE_DIR}) +get_filename_component(LibGit2_LIBRARY_DIR ${LibGit2_LIBRARY} DIRECTORY) + +# Define package +find_package_handle_standard_args(LibGit2 + FOUND_VAR + LibGit2_FOUND + REQUIRED_VARS + LibGit2_LIBRARY + LibGit2_LIBRARY_DIR + LibGit2_INCLUDE_DIR + LibGit2_INCLUDE_DIRS + VERSION_VAR + LibGit2_VERSION +) + +mark_as_advanced(LibGit2_LIBRARY LibGit2_LIBRARY_DIR LibGit2_INCLUDE_DIR) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index 52ead7b7cd..4ad6689bfe 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -81,6 +81,8 @@ typedef struct loader_impl_c_handle_base_type virtual ~loader_impl_c_handle_base_type() {} + virtual bool recursive_includes() = 0; + virtual int discover(loader_impl impl, context ctx) = 0; virtual const void *symbol(std::string &name) = 0; @@ -136,6 +138,11 @@ typedef struct loader_impl_c_handle_tcc_type : loader_impl_c_handle_base_type } } + bool recursive_includes() + { + return false; + } + bool initialize(loader_impl_c c_impl) { this->state = tcc_new(); @@ -232,6 +239,11 @@ typedef struct loader_impl_c_handle_dynlink_type : loader_impl_c_handle_base_typ } } + bool recursive_includes() + { + return true; + } + bool initialize(loader_impl_c c_impl, const loader_path path) { std::string lib_path_str(path); @@ -1022,12 +1034,18 @@ static int c_loader_impl_discover_signature(loader_impl impl, loader_impl_c_hand symbol_name.insert(0, 1, '_'); #endif + if (scope_get(sp, symbol_name.c_str()) != NULL) + { + log_write("metacall", LOG_LEVEL_WARNING, "Symbol '%s' redefined, skipping the function", func_name.c_str()); + return 0; + } + const void *address = c_handle->symbol(symbol_name); if (address == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Symbol '%s' not found, skipping the function", func_name.c_str()); - return 1; + log_write("metacall", LOG_LEVEL_WARNING, "Symbol '%s' not found, skipping the function", func_name.c_str()); + return 0; } loader_impl_c_function c_function = new loader_impl_c_function_type(address); @@ -1080,9 +1098,13 @@ static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCurs { c_loader_impl_discover_visitor_data visitor_data = static_cast(data); - if (clang_Location_isFromMainFile(clang_getCursorLocation(cursor)) == 0) + /* Include recursively when disabled, include only the header inlcuded is populated when enabled */ + if (visitor_data->c_handle->recursive_includes() == false) { - return CXChildVisit_Continue; + if (clang_Location_isFromMainFile(clang_getCursorLocation(cursor)) == 0) + { + return CXChildVisit_Continue; + } } CXCursorKind kind = clang_getCursorKind(cursor); @@ -1102,6 +1124,7 @@ static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCurs static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_base c_handle, context ctx) { + loader_impl_c c_impl = static_cast(loader_impl_get(impl)); c_loader_impl_discover_visitor_data_type data = { impl, c_handle, @@ -1109,12 +1132,24 @@ static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_bas 0 }; + std::vector includes; + std::vector command_line_args; + + /* Otherwise, check the execution paths */ + for (auto exec_path : c_impl->execution_paths) + { + includes.push_back("-I" + exec_path); + command_line_args.push_back(includes.back().c_str()); + } + for (std::string file : c_handle->files) { - CXIndex index = clang_createIndex(0, 0); + /* Define the command line arguments (simulating compiler flags) */ + CXIndex index = clang_createIndex(0, 1); CXTranslationUnit unit = clang_parseTranslationUnit( index, - file.c_str(), nullptr, 0, + file.c_str(), + command_line_args.data(), command_line_args.size(), nullptr, 0, CXTranslationUnit_None); diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index 773e62ccaa..4a4e224212 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -281,6 +281,94 @@ napi_value node_loader_port_metacall_await(napi_env env, napi_callback_info info return promise; } +/** +* @brief +* Define an execution path into a runtime +* +* @param[in] env +* N-API reference to the enviroment +* +* @param[in] info +* Reference to the call information +* +* @return +* TODO: Not implemented yet +*/ +napi_value node_loader_port_metacall_execution_path(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, path_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get path length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &path_length); + + node_loader_impl_exception(env, status); + + size_t path_size = path_length + 1; + + /* Allocate path */ + char *path = new char[path_size]; + + if (path == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path, path allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get path */ + status = napi_get_value_string_utf8(env, argv[1], path, path_size, &path_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + /* Define execution path */ + if (metacall_execution_path(tag, path) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not define an execution path"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] path; + + /* TODO: Return value and logs */ + return nullptr; +} + napi_value node_loader_port_metacall_load_from_file(napi_env env, napi_callback_info info) { /* TODO: Detect if input argument types are valid */ @@ -628,6 +716,176 @@ napi_value node_loader_port_metacall_load_from_memory_export(napi_env env, napi_ return v_exports; } +/** +* @brief +* Load a package by tag +* +* @param[in] env +* N-API reference to the enviroment +* +* @param[in] info +* Reference to the call information +* +* @return +* TODO: Not implemented yet +*/ +napi_value node_loader_port_metacall_load_from_package(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, package_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get package length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &package_length); + + node_loader_impl_exception(env, status); + + size_t package_size = package_length + 1; + + /* Allocate package */ + char *package = new char[package_size]; + + if (package == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, package allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get package */ + status = napi_get_value_string_utf8(env, argv[1], package, package_size, &package_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + /* Load the package */ + if (metacall_load_from_package(tag, package, NULL) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not load a package"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] package; + + /* TODO: Return value and logs */ + return nullptr; +} + +napi_value node_loader_port_metacall_load_from_package_export(napi_env env, napi_callback_info info) +{ + const size_t args_size = 2; + size_t argc = args_size, tag_length, package_length; + napi_value argv[args_size]; + + /* Get arguments */ + napi_status status = napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); + + node_loader_impl_exception(env, status); + + /* Get tag length */ + status = napi_get_value_string_utf8(env, argv[0], nullptr, 0, &tag_length); + + node_loader_impl_exception(env, status); + + /* Allocate tag */ + char *tag = new char[tag_length + 1]; + + if (tag == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from memory, tag allocation failed"); + return nullptr; + } + + /* Get tag */ + status = napi_get_value_string_utf8(env, argv[0], tag, tag_length + 1, &tag_length); + + node_loader_impl_exception(env, status); + + /* Get package length */ + status = napi_get_value_string_utf8(env, argv[1], nullptr, 0, &package_length); + + node_loader_impl_exception(env, status); + + size_t package_size = package_length + 1; + + /* Allocate package */ + char *package = new char[package_size]; + + if (package == nullptr) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package, package allocation failed"); + delete[] tag; + return nullptr; + } + + /* Get package */ + status = napi_get_value_string_utf8(env, argv[1], package, package_size, &package_length); + + node_loader_impl_exception(env, status); + + /* Obtain NodeJS loader implementation */ + loader_impl impl = loader_get_impl(node_loader_tag); + loader_impl_node node_impl = (loader_impl_node)loader_impl_get(impl); + + /* Store current reference of the environment */ + node_loader_impl_env(node_impl, env); + + void *handle = NULL; + + /* Load package from package */ + if (metacall_load_from_package(tag, package, &handle) != 0) + { + napi_throw_error(env, nullptr, "MetaCall could not load from package"); + } + + /* Release current reference of the environment */ + // node_loader_impl_env(node_impl, nullptr); + + delete[] tag; + delete[] package; + + void *exports = metacall_handle_export(handle); + + napi_value v_exports = node_loader_impl_value_to_napi(node_impl, env, exports); + + node_loader_impl_finalizer(env, v_exports, exports); + + return v_exports; +} + /** * @brief * Loads a script from configuration path @@ -829,10 +1087,13 @@ void node_loader_port_exports(napi_env env, napi_value exports) x(metacall); \ x(metacallfms); \ x(metacall_await); \ + x(metacall_execution_path); \ x(metacall_load_from_file); \ x(metacall_load_from_file_export); \ x(metacall_load_from_memory); \ x(metacall_load_from_memory_export); \ + x(metacall_load_from_package); \ + x(metacall_load_from_package_export); \ x(metacall_load_from_configuration); \ x(metacall_load_from_configuration_export); \ x(metacall_inspect); \ diff --git a/source/ports/node_port/index.d.ts b/source/ports/node_port/index.d.ts index 7b1d6d1bd2..3be9a48091 100644 --- a/source/ports/node_port/index.d.ts +++ b/source/ports/node_port/index.d.ts @@ -1,10 +1,13 @@ declare module 'metacall' { export function metacall(name: string, ...args: any): any; export function metacallfms(name: string, buffer: string): any; + export function metacall_execution_path(tag: string, path: string): number; export function metacall_load_from_file(tag: string, paths: string[]): number; export function metacall_load_from_file_export(tag: string, paths: string[]): any; export function metacall_load_from_memory(tag: string, code: string): number; export function metacall_load_from_memory_export(tag: string, code: string): any; + export function metacall_load_from_package(tag: string, pkg: string): number; + export function metacall_load_from_package_export(tag: string, pkg: string): any; export function metacall_load_from_configuration(path: string): number; export function metacall_load_from_configuration_export(path: string): any; export function metacall_inspect(): any; diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 2372b3fd57..296e33e68a 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -185,6 +185,18 @@ const metacall_await = (name, ...args) => { return addon.metacall_await(name, ...args); }; +const metacall_execution_path = (tag, path) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(path) !== '[object String]') { + throw Error('The path should be of string type.'); + } + + return addon.metacall_execution_path(tag, path); +}; + const metacall_load_from_file = (tag, paths) => { if (Object.prototype.toString.call(tag) !== '[object String]') { throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); @@ -233,6 +245,30 @@ const metacall_load_from_memory_export = (tag, code) => { return addon.metacall_load_from_memory_export(tag, code); }; +const metacall_load_from_package = (tag, pkg) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(pkg) !== '[object String]') { + throw Error('Package should be a string with the id or path to the package.'); + } + + return addon.metacall_load_from_package(tag, pkg); +}; + +const metacall_load_from_package_export = (tag, pkg) => { + if (Object.prototype.toString.call(tag) !== '[object String]') { + throw Error('Tag should be a string indicating the id of the loader to be used [py, rb, cs, js, node, mock...].'); + } + + if (Object.prototype.toString.call(pkg) !== '[object String]') { + throw Error('Package should be a string with the id or path to the package.'); + } + + return addon.metacall_load_from_package_export(tag, pkg); +}; + const metacall_load_from_configuration = (path) => { if (Object.prototype.toString.call(path) !== '[object String]') { throw Error('Path should be a string indicating the path where the metacall.json is located.'); @@ -290,10 +326,13 @@ const module_exports = { metacallfms, metacall_await, metacall_inspect, + metacall_execution_path, metacall_load_from_file, metacall_load_from_file_export, metacall_load_from_memory, metacall_load_from_memory_export, + metacall_load_from_package, + metacall_load_from_package_export, metacall_load_from_configuration, metacall_load_from_configuration_export, metacall_handle, diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index eb70ae1c70..aca1cfdaa3 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -128,6 +128,7 @@ add_subdirectory(metacall_node_reentrant_test) add_subdirectory(metacall_node_port_test) add_subdirectory(metacall_node_port_await_test) add_subdirectory(metacall_node_port_rs_test) +add_subdirectory(metacall_node_port_c_lib_test) add_subdirectory(metacall_node_python_port_mock_test) add_subdirectory(metacall_node_python_port_ruby_test) add_subdirectory(metacall_node_python_ruby_test) diff --git a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt new file mode 100644 index 0000000000..0f4436b100 --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt @@ -0,0 +1,167 @@ +# Check if this loader is enabled +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_LOADERS_C OR NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_NODE) + return() +endif() + +# +# External dependencies +# + +find_package(LibGit2) + +if(NOT LibGit2_FOUND) + message(WARNING "LibGit2 libraries not found, skipping test metacall-node-port-c-lib-test") + return() +endif() + +# +# Executable name and options +# + +# Target name +set(target metacall-node-port-c-lib-test) +message(STATUS "Test ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/main.cpp + ${source_path}/metacall_node_port_c_lib_test.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GTest + + ${META_PROJECT_NAME}::metacall +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} + + # NodeJS Port path + METACALL_NODE_PORT_PATH="${CMAKE_SOURCE_DIR}/source/ports/node_port/index.js" + + # LibGit2 paths + LIBGIT2_LIBRARY_DIR="${LibGit2_LIBRARY_DIR}" + LIBGIT2_INCLUDE_DIR="${LibGit2_INCLUDE_DIR}" +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Linker options +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $ +) + +# +# Define dependencies +# + +add_dependencies(${target} + node_port + node_loader + c_loader +) + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} +) diff --git a/source/tests/metacall_node_port_c_lib_test/source/main.cpp b/source/tests/metacall_node_port_c_lib_test/source/main.cpp new file mode 100644 index 0000000000..11ddf3f599 --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/source/main.cpp @@ -0,0 +1,28 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff --git a/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp new file mode 100644 index 0000000000..faa944974a --- /dev/null +++ b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp @@ -0,0 +1,57 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include +#include +#include + +class metacall_node_port_c_lib_test : public testing::Test +{ +public: +}; + +TEST_F(metacall_node_port_c_lib_test, DefaultConstructor) +{ + metacall_print_info(); + + ASSERT_EQ((int)0, (int)metacall_initialize()); + + static const char buffer[] = + /* NodeJS */ + "const assert = require('assert');\n" + "const { metacall_execution_path, metacall_load_from_package_export } = require('" METACALL_NODE_PORT_PATH "');\n" + /* C Lib Paths */ + "metacall_execution_path('c', '" LIBGIT2_INCLUDE_DIR "');\n" + "metacall_execution_path('c', '" LIBGIT2_LIBRARY_DIR "');\n" + /* C Lib Require */ + "const git2 = metacall_load_from_package_export('c', 'git2');\n" + "const { git_libgit2_init, git_libgit2_shutdown } = git2;\n" + "console.log(git2);\n" + /* C Lib Assert */ + "assert(git_libgit2_init() >= 0, 'libgit2 initialization failed');\n" + "git_libgit2_shutdown();\n" + "\n"; + + ASSERT_EQ((int)0, (int)metacall_load_from_memory("node", buffer, sizeof(buffer), NULL)); + + metacall_destroy(); +} diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 1638de22c8..dd21915200 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -126,6 +126,27 @@ function Set-Nodejs { Write-Output "-DNodeJS_EXECUTABLE=""$NodeDir/node.exe""" >> $EnvOpts Write-Output "-DNodeJS_LIBRARY_NAME=""libnode.dll""" >> $EnvOpts Write-Output "-DNodeJS_LIBRARY_NAME_PATH=""$NodeDir/lib/libnode.dll""" >> $EnvOpts + + if ($Arguments -contains "c") { + # Required for test source/tests/metacall_node_port_c_lib_test + if (!(Test-Path -Path "$DepsDir\libgit2")) { + # Clone libgit2 + git clone --depth 1 --branch v1.8.4 https://github.com/libgit2/libgit2 + } + + $InstallDir = "$DepsDir\libgit2\build\dist" + + mkdir "$DepsDir\libgit2\build" + mkdir "$InstallDir" + Set-Location "$DepsDir\libgit2\build" + + cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=OFF -DBUILD_CLI=OFF .. + cmake --build . "-j$((Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors)" + cmake --install . --prefix "$InstallDir" + + Write-Output "-DLibGit2_LIBRARY=""$InstallDir\lib\git2.lib""" >> $EnvOpts + Write-Output "-DLibGit2_INCLUDE_DIR=""$InstallDir\include""" >> $EnvOpts + } } function Set-Java { diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 304fa6a02d..d2983330bf 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -464,11 +464,18 @@ sub_nodejs(){ cd $ROOT_DIR if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + INSTALL_LIBGIT2="libgit2-dev" + else + INSTALL_LIBGIT2="" + fi + if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then # Note that Python is required for GYP - $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends python3 g++ make nodejs npm curl + $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends python3 g++ make nodejs npm curl $INSTALL_LIBGIT2 elif [ "${LINUX_DISTRO}" = "alpine" ]; then - $SUDO_CMD apk add --no-cache python3 g++ make nodejs nodejs-dev npm curl + $SUDO_CMD apk add --no-cache python3 g++ make nodejs nodejs-dev npm curl $INSTALL_LIBGIT2 # Build dependencies (note libexecinfo-dev is not available in Alpine 3.17) $SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main linux-headers libexecinfo libexecinfo-dev @@ -557,6 +564,12 @@ sub_nodejs(){ # Configure NPM path echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + brew install libgit2@1.8 + brew link libgit2@1.8 --force --overwrite + fi + # fi fi } From 50c27f21a5d5cb5ead48716cbca48f6f5189ea6e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 29 Jan 2025 21:07:21 +0100 Subject: [PATCH 016/364] Add loader config with dependencies. --- CMakeLists.txt | 5 +- source/configuration/CMakeLists.txt | 10 +- source/loaders/CMakeLists.txt | 173 +++++++++++++++--- source/loaders/cs_loader/CMakeLists.txt | 13 +- .../loaders/cs_loader/data/cs_loader.json.in | 4 +- source/loaders/loader.json.in | 5 + source/loaders/node_loader/CMakeLists.txt | 27 ++- source/plugin/source/plugin_manager.c | 2 +- 8 files changed, 197 insertions(+), 42 deletions(-) create mode 100644 source/loaders/loader.json.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 6896e14f19..75da78355e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ # # CMake version -cmake_minimum_required(VERSION 3.14 FATAL_ERROR) +cmake_minimum_required(VERSION 3.15 FATAL_ERROR) # Include cmake modules @@ -241,6 +241,9 @@ else() endif() endif() +# Export compile commands +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # # CTest configuration # diff --git a/source/configuration/CMakeLists.txt b/source/configuration/CMakeLists.txt index c38ca6feb5..2332f06826 100644 --- a/source/configuration/CMakeLists.txt +++ b/source/configuration/CMakeLists.txt @@ -180,17 +180,19 @@ target_link_libraries(${target} function(configurations_write config_dir config_path) set(CONFIGURATION_GLOBAL "{") - if(OPTION_BUILD_LOADERS) - set(CONFIGURATION_GLOBAL_LOADERS 0) + # TODO: Make this automatic for all loaders + if(OPTION_BUILD_LOADERS) if(OPTION_BUILD_LOADERS_CS) set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"cs_loader\":\"${config_dir}/cs_loader.json\",") - set(CONFIGURATION_GLOBAL_LOADERS 1) + endif() + + if(OPTION_BUILD_LOADERS_NODE) + set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"node_loader\":\"${config_dir}/node_loader.json\",") endif() #if(OPTION_BUILD_LOADERS_JS) # set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"js_loader\":\"${config_dir}/js_loader.json\",") - # set(CONFIGURATION_GLOBAL_LOADERS 1) #endif() endif() diff --git a/source/loaders/CMakeLists.txt b/source/loaders/CMakeLists.txt index 2d992ee6f5..2798d2722c 100644 --- a/source/loaders/CMakeLists.txt +++ b/source/loaders/CMakeLists.txt @@ -26,6 +26,141 @@ option(OPTION_BUILD_LOADERS_RPC "Build cURL Remote Procedure Call loader plugin. option(OPTION_BUILD_LOADERS_TS "Build TypeScript 3.9.7 Runtime loader plugin." OFF) option(OPTION_BUILD_LOADERS_WASM "Build WebAssembly Virtual Machine loader plugin." OFF) +# +# Configuration for loaders +# +# The following list of macros is used for generating a configuration file which includes +# dependencies, this is required because now loaders can either load the dependencies or +# use the existing dependencies if MetaCall is being loaded from python.exe, node.exe +# or similar... so we require to delay the loader dependencies until we know if +# their dependencies are already present. +# +# This set of macros provies a flexible way of defining the configuration and dependencies. +# +# 1) The most basic case, let's assume we have the dependencies in the system, like in Python: +# +# loader_configuration_begin(py_loader) +# loader_configuration_deps(python "${Python3_LIBRARY}") +# loader_configuartion_end() +# +# 2) Maybe you want to have multiple paths for a library: +# +# loader_configuration_begin(node_loader) +# loader_configuration_deps(node "/path/to/libnode.so" "/alternative/path/to/libnode.so") +# loader_configuartion_end() +# +# 3) Or the dependencies are compiled by you and you so you have different folders for +# for development (build folder) and for when installing it: +# +# loader_configuration_begin(node_loader) +# loader_configuration_deps(node "/path/to/build/folder/libnode.so") +# loader_configuartion_end_development() +# +# loader_configuration_begin(node_loader) +# loader_configuration_deps(node "/path/to/install/folder/libnode.so") +# loader_configuartion_end_install() +# +# 4) Or you have a custom template because your loader needs a configuration with more fields: +# +# loader_configuration_begin(cs_loader) +# loader_configuration_deps(netcore "/path/to/build/folder/libnetcore.so") +# loader_configuartion_end() +# +# You can do any combination of those for defining the configuration of your loaders. +# + +# Define loader template configuration +set(LOADER_CONFIGURATION_DEFAULT_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/loader.json.in") + +# Define loader configuration for a specific loader +macro(loader_configuration_begin TARGET) + set(LOADER_DEPENDENCIES "") + + # Optional argument for template + if(${ARGV0}) + set(LOADER_CONFIGURATION_TEMPLATE "${ARGV0}") + else() + set(LOADER_CONFIGURATION_TEMPLATE "${LOADER_CONFIGURATION_DEFAULT_TEMPLATE}") + endif() + + set(LOADER_CONFIGURATION_TARGET "${TARGET}") +endmacro() + +# Generate configuration with dependencies for a loader +# +# node_loader: +# "node": [ "/path/to/libnode.so", "/alternative/path/to/libnode.so" ], +# +# c_loader: +# "libffi": [ ... ], +# "libclang": [ ... ], +# "libtcc": [ ... ] +macro(loader_configuration_deps LIBRARY) + # Add new line from previous dependency + if(NOT "${LOADER_DEPENDENCIES}" STREQUAL "") + string(APPEND LOADER_DEPENDENCIES ",\n\t\t") + endif() + + # Define the library + string(APPEND LOADER_DEPENDENCIES "\"${LIBRARY}\": [") + + # Define the paths + set(FIRST_ARGUMENT 0) + foreach(DEPENDENCY IN ITEMS ${ARGN}) + if(${FIRST_ARGUMENT} EQUAL 0) + # Set first path + string(APPEND LOADER_DEPENDENCIES "\"${DEPENDENCY}\"") + set(FIRST_ARGUMENT 1) + else() + # Set the rest of the paths + string(APPEND LOADER_DEPENDENCIES ", \"${DEPENDENCY}\"") + endif() + endforeach() + + # Finalize the list + string(APPEND LOADER_DEPENDENCIES "]") +endmacro() + +# Commit development version +macro(loader_configuartion_end_development) + if(NOT DEFINED LOADER_CONFIGURATION_TEMPLATE OR NOT DEFINED LOADER_CONFIGURATION_TARGET) + return() + endif() + + configure_file(${LOADER_CONFIGURATION_TEMPLATE} ${CONFIGURATION_DIR}/${LOADER_CONFIGURATION_TARGET}.json) + + unset(LOADER_DEPENDENCIES) + unset(LOADER_CONFIGURATION_TEMPLATE) + unset(LOADER_CONFIGURATION_TARGET) +endmacro() + +# Commit install version +macro(loader_configuartion_end_install) + if(NOT DEFINED LOADER_CONFIGURATION_TEMPLATE OR NOT DEFINED LOADER_CONFIGURATION_TARGET) + return() + endif() + + configure_file(${LOADER_CONFIGURATION_TEMPLATE} ${CONFIGURATION_DIR}/install/configurations/${LOADER_CONFIGURATION_TARGET}.json) + + unset(LOADER_DEPENDENCIES) + unset(LOADER_CONFIGURATION_TEMPLATE) + unset(LOADER_CONFIGURATION_TARGET) +endmacro() + +# Commit both versions +macro(loader_configuartion_end) + if(NOT DEFINED LOADER_CONFIGURATION_TEMPLATE OR NOT DEFINED LOADER_CONFIGURATION_TARGET) + return() + endif() + + configure_file(${LOADER_CONFIGURATION_TEMPLATE} ${CONFIGURATION_DIR}/${LOADER_CONFIGURATION_TARGET}.json) + configure_file(${LOADER_CONFIGURATION_TEMPLATE} ${CONFIGURATION_DIR}/install/configurations/${LOADER_CONFIGURATION_TARGET}.json) + + unset(LOADER_DEPENDENCIES) + unset(LOADER_CONFIGURATION_TEMPLATE) + unset(LOADER_CONFIGURATION_TARGET) +endmacro() + # Plugin packages add_subdirectory(c_loader) # Foreign Function Interface library add_subdirectory(cob_loader) # GNU/Cobol 2.2 Runtime @@ -49,34 +184,18 @@ add_subdirectory(rpc_loader) # cURL Remote Procedure Call add_subdirectory(ts_loader) # TypeScript 3.9.7 add_subdirectory(wasm_loader) # WebAssembly Virtual Machine -# Optionally enable loader dependencies utility -macro(add_loader_dependencies target) - set(loaders_map_c_loader OPTION_BUILD_LOADERS_C) - set(loaders_map_cob_loader OPTION_BUILD_LOADERS_COB) - set(loaders_map_cr_loader OPTION_BUILD_LOADERS_CR) - set(loaders_map_cs_loader OPTION_BUILD_LOADERS_DART) - set(loaders_map_dart_loader OPTION_BUILD_LOADERS_CS) - set(loaders_map_ext_loader OPTION_BUILD_LOADERS_EXT) - set(loaders_map_file_loader OPTION_BUILD_LOADERS_FILE) - set(loaders_map_java_loader OPTION_BUILD_LOADERS_JAVA) - set(loaders_map_jl_loader OPTION_BUILD_LOADERS_JL) - set(loaders_map_jsm_loader OPTION_BUILD_LOADERS_JSM) - set(loaders_map_js_loader OPTION_BUILD_LOADERS_JS) - set(loaders_map_llvm_loader OPTION_BUILD_LOADERS_LLVM) - set(loaders_map_lua_loader OPTION_BUILD_LOADERS_LUA) - set(loaders_map_mock_loader OPTION_BUILD_LOADERS_MOCK) - set(loaders_map_node_loader OPTION_BUILD_LOADERS_NODE) - set(loaders_map_py_loader OPTION_BUILD_LOADERS_PY) - set(loaders_map_rb_loader OPTION_BUILD_LOADERS_RB) - set(loaders_map_rs_loader OPTION_BUILD_LOADERS_RS) - set(loaders_map_rpc_loader OPTION_BUILD_LOADERS_RPC) - set(loaders_map_ts_loader OPTION_BUILD_LOADERS_TS) - set(loaders_map_wasm_loader OPTION_BUILD_LOADERS_WASM) - +# Optionally enable loader dependencies utility (for tests) +macro(add_loader_dependencies TARGET) set(LOADERS_LIST) - foreach(loader ${ARGN}) - if(${loaders_map_${loader}}) + foreach(LOADER ${ARGN}) + # Loaders come in the form of: py_loader, node_loader, ... + # Convert them into OPTION_BUILD_LOADERS_PY, OPTION_BUILD_LOADERS_NODE, ... + string(REPLACE "_loader" "" LOADER_TAG "${LOADER}") + string(TOUPPER "${LOADER_TAG}" LOADER_TAG) + + # Check if the loader is enabled + if(${OPTION_BUILD_LOADERS_${LOADER_TAG}}) set(LOADERS_LIST ${LOADERS_LIST} ${loader} @@ -85,6 +204,6 @@ macro(add_loader_dependencies target) endforeach() if(LOADERS_LIST) - add_dependencies(${target} ${LOADERS_LIST}) + add_dependencies(${TARGET} ${LOADERS_LIST}) endif() endmacro() diff --git a/source/loaders/cs_loader/CMakeLists.txt b/source/loaders/cs_loader/CMakeLists.txt index 3eedab81b3..8486486e68 100644 --- a/source/loaders/cs_loader/CMakeLists.txt +++ b/source/loaders/cs_loader/CMakeLists.txt @@ -235,13 +235,18 @@ target_link_libraries(${target} # Configuration # +set(CS_LOADER_CONFIG_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/data/cs_loader.json.in") string(REPLACE "\\" "/" DOTNET_CORE_PATH "${DOTNET_CORE_PATH}") -set(DOTNET_CORE_LOADER_ASSEMBLY_PATH ${PROJECT_OUTPUT_DIR}/CSLoader.dll) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/cs_loader.json.in ${CONFIGURATION_DIR}/cs_loader.json) +# Development +loader_configuration_begin(cs_loader "${CS_LOADER_CONFIG_TEMPLATE}") +set(DOTNET_CORE_LOADER_ASSEMBLY_PATH ${PROJECT_OUTPUT_DIR}/CSLoader.dll) +loader_configuartion_end_development() -set(DOTNET_CORE_LOADER_ASSEMBLY_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/CSLoader.dll) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/cs_loader.json.in ${CONFIGURATION_DIR}/install/configurations/cs_loader.json) +# Install +loader_configuration_begin(cs_loader "${CS_LOADER_CONFIG_TEMPLATE}") +set(DOTNET_CORE_LOADER_ASSEMBLY_PATH ${PROJECT_OUTPUT_DIR}/CSLoader.dll) +loader_configuartion_end_install() # # Deployment diff --git a/source/loaders/cs_loader/data/cs_loader.json.in b/source/loaders/cs_loader/data/cs_loader.json.in index b701dec8b8..a570e08689 100644 --- a/source/loaders/cs_loader/data/cs_loader.json.in +++ b/source/loaders/cs_loader/data/cs_loader.json.in @@ -1,4 +1,4 @@ { - "dotnet_root":"@DOTNET_CORE_PATH@", - "dotnet_loader_assembly_path":"@DOTNET_CORE_LOADER_ASSEMBLY_PATH@" + "dotnet_root": "@DOTNET_CORE_PATH@", + "dotnet_loader_assembly_path": "@DOTNET_CORE_LOADER_ASSEMBLY_PATH@" } diff --git a/source/loaders/loader.json.in b/source/loaders/loader.json.in new file mode 100644 index 0000000000..dfb183afd3 --- /dev/null +++ b/source/loaders/loader.json.in @@ -0,0 +1,5 @@ +{ + "dependencies": { + @LOADER_DEPENDENCIES@ + } +} diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index a9bf13c675..0a3b267757 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -157,9 +157,6 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - # TODO: Implement delayed load - ${NodeJS_LIBRARY} # NodeJS library - PUBLIC ${DEFAULT_LIBRARIES} @@ -227,6 +224,8 @@ install(TARGETS ${target} ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev ) +set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY}") + # Runtime (pack NodeJS DLL in windows) # TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies # TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da @@ -236,10 +235,32 @@ if(NodeJS_LIBRARY_NAME_PATH AND WIN32) DESTINATION ${INSTALL_LIB} COMPONENT runtime ) + + get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY_NAME_PATH}" NAME) + set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") elseif(NodeJS_BUILD_FROM_SOURCE AND NOT WIN32) install(FILES "${NodeJS_LIBRARY}" DESTINATION ${INSTALL_LIB} COMPONENT runtime ) + + get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY}" NAME) + set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") +else() + set(NodeJS_LIBRARY_INSTALL "${NodeJS_LIBRARY}") endif() + +# +# Configuration +# + +# Development +loader_configuration_begin(node_loader) +loader_configuration_deps(node "${NodeJS_LIBRARY_DEVELOPMENT}") +loader_configuartion_end_development() + +# Install +loader_configuration_begin(node_loader) +loader_configuration_deps(node "${NodeJS_LIBRARY_INSTALL}") +loader_configuartion_end_install() diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index f60155fe62..353eaded5c 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -31,7 +31,7 @@ #include #if defined(WIN32) || defined(_WIN32) - #include + #include /* SetDllDirectoryA */ #endif /* -- Declarations -- */ From 3f53257980d9e60a6d6b5d8d492199d21c209e2a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 30 Jan 2025 17:06:04 +0100 Subject: [PATCH 017/364] Use always Python3. --- source/tests/metacall_node_port_test/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tests/metacall_node_port_test/CMakeLists.txt b/source/tests/metacall_node_port_test/CMakeLists.txt index 6ffc2981bf..9c6c12b5b2 100644 --- a/source/tests/metacall_node_port_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_test/CMakeLists.txt @@ -193,15 +193,15 @@ add_dependencies(${target} set(NodeJS_EXECUTABLE_ONLY ON) find_package(NodeJS) -find_package(Python COMPONENTS Interpreter) +find_package(Python3 COMPONENTS Interpreter) -if(NodeJS_FOUND AND Python_Interpreter_FOUND) +if(NodeJS_FOUND AND Python3_Interpreter_FOUND) execute_process( COMMAND ${NodeJS_EXECUTABLE} -e "console.log(process.versions.openssl)" OUTPUT_VARIABLE NODEJS_OPENSSL_VERSION ) execute_process( - COMMAND ${Python_EXECUTABLE} -c "import ssl; print(ssl.OPENSSL_VERSION.split()[1])" + COMMAND ${Python3_EXECUTABLE} -c "import ssl; print(ssl.OPENSSL_VERSION.split()[1])" OUTPUT_VARIABLE PYTHON_OPENSSL_VERSION ) From 911e7a35b4db722075d342bd170444f9424cc224 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 30 Jan 2025 17:07:37 +0100 Subject: [PATCH 018/364] Solve issues Python 3.13. --- .../loaders/py_loader/source/py_loader_impl.c | 11 +++++++---- .../metacall_python_object_class_test.cpp | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 66be1c0b94..0c495ee073 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -685,7 +685,6 @@ int py_class_interface_static_set(klass cls, class_impl impl, struct accessor_ty (void)cls; loader_impl_py_class py_class = (loader_impl_py_class)impl; - PyObject *pyobject_class = py_class->cls; char *attr_name = attribute_name(accessor->data.attr); if (attr_name == NULL) @@ -695,15 +694,15 @@ int py_class_interface_static_set(klass cls, class_impl impl, struct accessor_ty py_loader_thread_acquire(); - PyObject *pyvalue = py_loader_impl_value_to_capi(py_class->impl, value_type_id(v), v); + PyObject *py_value = py_loader_impl_value_to_capi(py_class->impl, value_type_id(v), v); PyObject *key_py_str = PyUnicode_FromString(attr_name); - int retval = PyObject_GenericSetAttr(pyobject_class, key_py_str, pyvalue); + int result = PyObject_SetAttr(py_class->cls, key_py_str, py_value); Py_DECREF(key_py_str); py_loader_thread_release(); - return retval; + return result; } value py_class_interface_static_invoke(klass cls, class_impl impl, method m, class_args args, size_t argc) @@ -2640,7 +2639,11 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi /* Hook the deallocation of PyCFunction */ py_loader_impl_pycfunction_dealloc = PyCFunction_Type.tp_dealloc; PyCFunction_Type.tp_dealloc = PyCFunction_dealloc; + + /* TODO: This does not work after 3.13, is it really needed for this hook? */ +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 13 PyType_Modified(&PyCFunction_Type); +#endif if (py_loader_impl_initialize_sys_executable(py_impl) != 0) { diff --git a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp index b1f6d18fb4..a5a3439c24 100644 --- a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp +++ b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp @@ -149,6 +149,24 @@ TEST_F(metacall_python_class_test, DefaultConstructor) ASSERT_EQ((enum metacall_value_id)METACALL_STRING, (enum metacall_value_id)metacall_value_id(ret_value)); metacall_value_destroy(static_method_args[0]); metacall_value_destroy(ret_value); + + // Get and Set + void *param2 = metacall_class_static_get(myclass, "b"); + ASSERT_EQ((enum metacall_value_id)METACALL_LONG, (enum metacall_value_id)metacall_value_id(param2)); + ASSERT_EQ((long)44444L, (long)metacall_value_to_long(param2)); + + metacall_value_destroy(param2); + + void *long_value = metacall_value_create_long(5555L); + int retcode = metacall_class_static_set(myclass, "b", long_value); + metacall_value_destroy(long_value); + ASSERT_EQ((int)0, int(retcode)); + + param2 = metacall_class_static_get(myclass, "b"); + ASSERT_EQ((enum metacall_value_id)METACALL_LONG, (enum metacall_value_id)metacall_value_id(param2)); + ASSERT_EQ((long)5555L, (long)metacall_value_to_long(param2)); + + metacall_value_destroy(param2); } { From aa13d6ce0b94675f1f3a6cc7f8e4bc929b9004bb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 30 Jan 2025 17:08:09 +0100 Subject: [PATCH 019/364] Implement dependencies for loaders. --- source/dynlink/include/dynlink/dynlink.h | 15 +++ source/dynlink/source/dynlink.c | 24 ++++ source/loader/include/loader/loader_impl.h | 2 + .../include/loader/loader_impl_interface.h | 2 - source/loader/source/loader.c | 7 ++ source/loader/source/loader_impl.c | 116 +++++++++++++----- source/loaders/CMakeLists.txt | 5 +- 7 files changed, 139 insertions(+), 32 deletions(-) diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index 77102c9e1b..d1bdaf8d01 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -63,6 +63,21 @@ DYNLINK_API const char *dynlink_extension(void); */ DYNLINK_API dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags); +/** +* @brief +* Load a dynamically linked shared object with absolute path +* +* @param[in] path +* Path where is located the shared object (absolute) +* +* @param[in] flags +* Dynamic linking flags +* +* @return +* A handle to the dynamically linked shared object +*/ +DYNLINK_API dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags); + /** * @brief * Retreive the name of the dynamically linked shared object diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index 4ae3b801d4..bc2a6b843f 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -90,6 +90,30 @@ dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) return NULL; } +dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) +{ + dynlink handle = malloc(sizeof(struct dynlink_type)); + + if (handle == NULL) + { + return NULL; + } + + strncpy(handle->name_impl, path, strnlen(path, PORTABILITY_PATH_SIZE) + 1); + + handle->flags = flags; + + handle->impl = dynlink_impl_load(handle); + + if (handle->impl == NULL) + { + free(handle); + return NULL; + } + + return handle; +} + dynlink_name dynlink_get_name(dynlink handle) { if (handle != NULL) diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index 726cdf2ca6..c4f6c8706f 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -43,6 +43,8 @@ LOADER_API loader_impl loader_impl_create(const loader_tag tag); LOADER_API loader_impl loader_impl_create_host(const loader_tag tag); +LOADER_API int loader_impl_dependencies(loader_impl impl); + LOADER_API void loader_impl_attach(loader_impl impl, plugin p); LOADER_API plugin loader_impl_plugin(loader_impl impl); diff --git a/source/loader/include/loader/loader_impl_interface.h b/source/loader/include/loader/loader_impl_interface.h index 7033b2d5cd..1e56f3ac88 100644 --- a/source/loader/include/loader/loader_impl_interface.h +++ b/source/loader/include/loader/loader_impl_interface.h @@ -35,8 +35,6 @@ extern "C" { #endif -#include - struct loader_impl_type; typedef struct loader_impl_type *loader_impl; diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 73803e7edf..e29ef684f4 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -264,6 +264,13 @@ plugin loader_get_impl_plugin(const loader_tag tag) goto loader_create_error; } + /* Dynamic link loader dependencies if it is not host */ + if (loader_impl_get_option_host(impl) == 0) + { + loader_impl_dependencies(impl); + } + + /* Dynamic link the loader */ p = plugin_manager_create(&loader_manager, tag, impl, &loader_impl_destroy_dtor); if (p == NULL) diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 7d9bdbf4c8..7db5c35d5a 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -89,6 +89,7 @@ struct loader_impl_type set type_info_map; /* Stores a set indexed by type name of all of the types existing in the loader (global scope (TODO: may need refactor per handle)) */ value options; /* Additional initialization options passed in the initialize phase */ set exec_path_map; /* Set of execution paths passed by the end user */ + configuration config; /* Reference to the loader configuration, it contains execution_paths, dependencies and additional info */ }; struct loader_handle_impl_type @@ -119,7 +120,7 @@ struct loader_impl_metadata_cb_iterator_type static loader_impl loader_impl_allocate(const loader_tag tag); -static configuration loader_impl_initialize_configuration(plugin p); +static configuration loader_impl_initialize_configuration(const loader_tag tag); static int loader_impl_initialize_registered(plugin_manager manager, plugin p); @@ -258,50 +259,110 @@ plugin loader_impl_plugin(loader_impl impl) return NULL; } -void loader_impl_configuration(loader_impl_interface iface, loader_impl impl, configuration config) +void loader_impl_configuration_execution_paths(loader_impl_interface iface, loader_impl impl) { - value execution_paths_value = configuration_value_type(config, "execution_paths", TYPE_ARRAY); + value execution_paths_value = configuration_value_type(impl->config, "execution_paths", TYPE_ARRAY); if (execution_paths_value != NULL) { size_t size = value_type_count(execution_paths_value); value *execution_paths_array = value_to_array(execution_paths_value); + size_t iterator; - if (execution_paths_array != NULL) + for (iterator = 0; iterator < size; ++iterator) { - size_t iterator; + if (value_type_id(execution_paths_array[iterator]) == TYPE_STRING) + { + const char *str = value_to_string(execution_paths_array[iterator]); + size_t str_size = value_type_size(execution_paths_array[iterator]); + + if (str != NULL) + { + loader_path execution_path; + + strncpy(execution_path, str, str_size > LOADER_PATH_SIZE ? LOADER_PATH_SIZE : str_size); + + iface->execution_path(impl, execution_path); + } + } + } + } +} + +int loader_impl_dependencies(loader_impl impl) +{ + /* Dependencies have the following format */ + /* + { + "dependencies": { + "node": ["/usr/lib/x86_64-linux-gnu/libnode.so.72"] + } + } + */ + value dependencies_value = configuration_value_type(impl->config, "dependencies", TYPE_MAP); - for (iterator = 0; iterator < size; ++iterator) + if (dependencies_value != NULL) + { + size_t size = value_type_count(dependencies_value); + value *dependencies_map = value_to_map(dependencies_value); + size_t iterator; + + for (iterator = 0; iterator < size; ++iterator) + { + if (value_type_id(dependencies_map[iterator]) == TYPE_ARRAY) { - if (execution_paths_array[iterator] != NULL) + value *library_tuple = value_to_array(dependencies_map[iterator]); + + if (value_type_id(library_tuple[1]) == TYPE_ARRAY) { - const char *str = value_to_string(execution_paths_array[iterator]); - size_t str_size = value_type_size(execution_paths_array[iterator]); + value *paths_array = value_to_array(library_tuple[1]); + size_t paths_size = value_type_count(library_tuple[1]); + size_t path; + int found = 0; - if (str != NULL) + for (path = 0; path < paths_size; ++path) { - loader_path execution_path; + if (value_type_id(paths_array[iterator]) == TYPE_STRING) + { + const char *library_path = value_to_string(paths_array[iterator]); - strncpy(execution_path, str, str_size > LOADER_PATH_SIZE ? LOADER_PATH_SIZE : str_size); + if (library_path != NULL) + { + dynlink handle = dynlink_load_absolute(library_path, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); - iface->execution_path(impl, execution_path); + if (handle != NULL) + { + found = 1; + break; + } + } + } + } + + if (!found) + { + const char *dependency = value_type_id(library_tuple[0]) == TYPE_STRING ? value_to_string(library_tuple[0]) : "unknown_library"; + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader configuration '%s.json'", dependency, plugin_name(impl->p)); + return 1; } } } } } + + return 0; } -configuration loader_impl_initialize_configuration(plugin p) +configuration loader_impl_initialize_configuration(const loader_tag tag) { static const char configuration_key_suffix[] = "_loader"; #define CONFIGURATION_KEY_SIZE ((size_t)sizeof(configuration_key_suffix) + LOADER_TAG_SIZE - 1) char configuration_key[CONFIGURATION_KEY_SIZE]; /* Retrieve the configuration key: _loader */ - size_t tag_size = strnlen(plugin_name(p), LOADER_TAG_SIZE) + 1; + size_t tag_size = strnlen(tag, LOADER_TAG_SIZE) + 1; - strncpy(configuration_key, plugin_name(p), tag_size); + strncpy(configuration_key, tag, tag_size); strncat(configuration_key, configuration_key_suffix, CONFIGURATION_KEY_SIZE - tag_size); #undef CONFIGURATION_KEY_SIZE @@ -331,7 +392,6 @@ int loader_impl_initialize_registered(plugin_manager manager, plugin p) int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl) { static const char loader_library_path[] = "loader_library_path"; - configuration config; value loader_library_path_value = NULL; char *library_path = NULL; vector script_paths, paths; @@ -341,9 +401,6 @@ int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl) return 0; } - /* Get the configuration of the loader */ - config = loader_impl_initialize_configuration(p); - /* Retrieve the library path */ library_path = plugin_manager_library_path(manager); @@ -355,19 +412,19 @@ int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl) */ /* Check if the configuration has a custom loader_library_path, otherwise set it up */ - if (config != NULL && configuration_value_type(config, loader_library_path, TYPE_STRING) == NULL) + if (impl->config != NULL && configuration_value_type(impl->config, loader_library_path, TYPE_STRING) == NULL) { loader_library_path_value = value_create_string(library_path, strnlen(library_path, LOADER_PATH_SIZE)); - configuration_define(config, loader_library_path, loader_library_path_value); + configuration_define(impl->config, loader_library_path, loader_library_path_value); } /* Call to the loader initialize method */ - impl->data = loader_iface(p)->initialize(impl, config); + impl->data = loader_iface(p)->initialize(impl, impl->config); /* Undefine the library path field from config */ - if (config != NULL && loader_library_path_value != NULL) + if (impl->config != NULL && loader_library_path_value != NULL) { - configuration_undefine(config, loader_library_path); + configuration_undefine(impl->config, loader_library_path); value_type_destroy(loader_library_path_value); } @@ -390,9 +447,9 @@ int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl) impl->init = 0; - if (config != NULL) + if (impl->config != NULL) { - loader_impl_configuration(loader_iface(p), impl, config); + loader_impl_configuration_execution_paths(loader_iface(p), impl); } /* The scripts path priority order is the following: @@ -402,7 +459,7 @@ int loader_impl_initialize(plugin_manager manager, plugin p, loader_impl impl) */ /* Load the library path as execution path */ - loader_library_path_value = configuration_value_type(config, loader_library_path, TYPE_STRING); + loader_library_path_value = configuration_value_type(impl->config, loader_library_path, TYPE_STRING); if (loader_library_path_value != NULL) { @@ -470,6 +527,9 @@ loader_impl loader_impl_create(const loader_tag tag) impl->init = 1; impl->options = NULL; + /* Get the configuration of the loader */ + impl->config = loader_impl_initialize_configuration(tag); + return impl; } diff --git a/source/loaders/CMakeLists.txt b/source/loaders/CMakeLists.txt index 2798d2722c..edcb03e08f 100644 --- a/source/loaders/CMakeLists.txt +++ b/source/loaders/CMakeLists.txt @@ -75,10 +75,11 @@ set(LOADER_CONFIGURATION_DEFAULT_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/loader.js # Define loader configuration for a specific loader macro(loader_configuration_begin TARGET) set(LOADER_DEPENDENCIES "") + set(OPTIONAL_TEMPLATE "${ARGV1}") # Optional argument for template - if(${ARGV0}) - set(LOADER_CONFIGURATION_TEMPLATE "${ARGV0}") + if(NOT "${ARGV1}" STREQUAL "") + set(LOADER_CONFIGURATION_TEMPLATE "${ARGV1}") else() set(LOADER_CONFIGURATION_TEMPLATE "${LOADER_CONFIGURATION_DEFAULT_TEMPLATE}") endif() From 1f4881607bd1b8d5afebc5f0c9c36946e98e16d3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 3 Feb 2025 22:36:03 +0100 Subject: [PATCH 020/364] Change link options. --- source/adt/CMakeLists.txt | 2 +- source/benchmarks/log_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_cs_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_node_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_init_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_rb_call_bench/CMakeLists.txt | 2 +- source/cli/metacallcli/CMakeLists.txt | 2 +- source/cli/plugins/cli_core_plugin/CMakeLists.txt | 2 +- source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt | 2 +- source/configuration/CMakeLists.txt | 2 +- source/detour/CMakeLists.txt | 2 +- source/detours/funchook_detour/CMakeLists.txt | 2 +- source/dynlink/CMakeLists.txt | 2 +- source/environment/CMakeLists.txt | 2 +- source/examples/metacallgui/CMakeLists.txt | 2 +- source/examples/metacalllog/CMakeLists.txt | 2 +- source/examples/metacallquine/CMakeLists.txt | 2 +- source/examples/metacallweb/CMakeLists.txt | 2 +- source/extensions/plugin_extension/CMakeLists.txt | 2 +- source/filesystem/CMakeLists.txt | 2 +- source/format/CMakeLists.txt | 2 +- source/loader/CMakeLists.txt | 2 +- source/loaders/c_loader/CMakeLists.txt | 2 +- source/loaders/cob_loader/CMakeLists.txt | 2 +- source/loaders/cr_loader/CMakeLists.txt | 2 +- source/loaders/cs_loader/CMakeLists.txt | 2 +- source/loaders/dart_loader/CMakeLists.txt | 2 +- source/loaders/ext_loader/CMakeLists.txt | 2 +- source/loaders/file_loader/CMakeLists.txt | 2 +- source/loaders/java_loader/CMakeLists.txt | 2 +- source/loaders/jl_loader/CMakeLists.txt | 2 +- source/loaders/js_loader/CMakeLists.txt | 2 +- source/loaders/jsm_loader/CMakeLists.txt | 2 +- source/loaders/llvm_loader/CMakeLists.txt | 2 +- source/loaders/lua_loader/CMakeLists.txt | 2 +- source/loaders/mock_loader/CMakeLists.txt | 2 +- source/loaders/node_loader/CMakeLists.txt | 7 ++++++- source/loaders/py_loader/CMakeLists.txt | 2 +- source/loaders/rb_loader/CMakeLists.txt | 2 +- source/loaders/rpc_loader/CMakeLists.txt | 2 +- source/loaders/rs_loader/CMakeLists.txt | 2 +- source/loaders/ts_loader/CMakeLists.txt | 2 +- source/loaders/wasm_loader/CMakeLists.txt | 2 +- source/log/CMakeLists.txt | 2 +- source/memory/CMakeLists.txt | 2 +- source/metacall/CMakeLists.txt | 2 +- source/plugin/CMakeLists.txt | 2 +- source/plugins/backtrace_plugin/CMakeLists.txt | 2 +- source/plugins/sandbox_plugin/CMakeLists.txt | 2 +- source/portability/CMakeLists.txt | 2 +- source/ports/cxx_port/CMakeLists.txt | 2 +- source/ports/js_port/CMakeLists.txt | 7 ++----- source/ports/rb_port/CMakeLists.txt | 3 +-- source/preprocessor/CMakeLists.txt | 2 +- source/reflect/CMakeLists.txt | 2 +- source/scripts/extension/sum/CMakeLists.txt | 2 +- source/serial/CMakeLists.txt | 2 +- source/serials/metacall_serial/CMakeLists.txt | 2 +- source/serials/rapid_json_serial/CMakeLists.txt | 2 +- source/tests/adt_map_test/CMakeLists.txt | 2 +- source/tests/adt_set_test/CMakeLists.txt | 2 +- source/tests/adt_trie_test/CMakeLists.txt | 2 +- source/tests/adt_vector_test/CMakeLists.txt | 2 +- source/tests/configuration_test/CMakeLists.txt | 2 +- source/tests/detour_test/CMakeLists.txt | 2 +- source/tests/dynlink_test/CMakeLists.txt | 2 +- source/tests/environment_test/CMakeLists.txt | 2 +- source/tests/log_custom_test/CMakeLists.txt | 2 +- source/tests/log_test/CMakeLists.txt | 2 +- source/tests/metacall_backtrace_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_c_lib_test/CMakeLists.txt | 2 +- source/tests/metacall_c_test/CMakeLists.txt | 2 +- source/tests/metacall_callback_complex_test/CMakeLists.txt | 2 +- source/tests/metacall_cast_test/CMakeLists.txt | 2 +- source/tests/metacall_clear_test/CMakeLists.txt | 2 +- .../metacall_cli_core_plugin_await_test/CMakeLists.txt | 2 +- source/tests/metacall_cli_core_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_cobol_test/CMakeLists.txt | 2 +- .../metacall_configuration_default_test/CMakeLists.txt | 2 +- .../metacall_configuration_exec_path_test/CMakeLists.txt | 2 +- source/tests/metacall_cs_test/CMakeLists.txt | 2 +- source/tests/metacall_csharp_function_test/CMakeLists.txt | 2 +- .../tests/metacall_csharp_static_class_test/CMakeLists.txt | 2 +- source/tests/metacall_depends_test/CMakeLists.txt | 2 +- source/tests/metacall_distributable_test/CMakeLists.txt | 2 +- source/tests/metacall_ducktype_test/CMakeLists.txt | 2 +- .../tests/metacall_duplicated_handle_test/CMakeLists.txt | 2 +- .../tests/metacall_duplicated_symbols_test/CMakeLists.txt | 2 +- source/tests/metacall_dynlink_path_test/CMakeLists.txt | 2 +- source/tests/metacall_ext_test/CMakeLists.txt | 2 +- source/tests/metacall_file_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_file_glob_test/CMakeLists.txt | 2 +- source/tests/metacall_file_test/CMakeLists.txt | 2 +- source/tests/metacall_fork_test/CMakeLists.txt | 2 +- source/tests/metacall_function_test/CMakeLists.txt | 2 +- source/tests/metacall_handle_export_test/CMakeLists.txt | 2 +- source/tests/metacall_handle_get_test/CMakeLists.txt | 2 +- source/tests/metacall_init_fini_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- source/tests/metacall_initialize_ex_test/CMakeLists.txt | 2 +- source/tests/metacall_initialize_test/CMakeLists.txt | 2 +- source/tests/metacall_inspect_test/CMakeLists.txt | 2 +- source/tests/metacall_integration_test/CMakeLists.txt | 2 +- source/tests/metacall_invalid_loader_test/CMakeLists.txt | 2 +- source/tests/metacall_java_test/CMakeLists.txt | 2 +- source/tests/metacall_julia_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- source/tests/metacall_llvm_test/CMakeLists.txt | 2 +- .../metacall_load_configuration_fail_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../tests/metacall_load_configuration_test/CMakeLists.txt | 2 +- .../tests/metacall_load_memory_empty_test/CMakeLists.txt | 2 +- source/tests/metacall_load_memory_test/CMakeLists.txt | 2 +- source/tests/metacall_logs_test/CMakeLists.txt | 2 +- source/tests/metacall_lua_test/CMakeLists.txt | 2 +- source/tests/metacall_map_await_test/CMakeLists.txt | 2 +- source/tests/metacall_map_test/CMakeLists.txt | 2 +- .../tests/metacall_node_async_multiple_test/CMakeLists.txt | 2 +- .../metacall_node_async_resources_test/CMakeLists.txt | 2 +- source/tests/metacall_node_async_test/CMakeLists.txt | 2 +- source/tests/metacall_node_await_chain_test/CMakeLists.txt | 2 +- source/tests/metacall_node_call_test/CMakeLists.txt | 2 +- source/tests/metacall_node_callback_test/CMakeLists.txt | 2 +- source/tests/metacall_node_clear_mem_test/CMakeLists.txt | 2 +- .../tests/metacall_node_default_export_test/CMakeLists.txt | 2 +- .../metacall_node_event_loop_signal_test/CMakeLists.txt | 2 +- source/tests/metacall_node_event_loop_test/CMakeLists.txt | 2 +- source/tests/metacall_node_exception_test/CMakeLists.txt | 2 +- source/tests/metacall_node_extension_test/CMakeLists.txt | 2 +- .../node_extension_test/CMakeLists.txt | 2 +- .../tests/metacall_node_fail_env_var_test/CMakeLists.txt | 2 +- .../tests/metacall_node_fail_load_leak_test/CMakeLists.txt | 2 +- source/tests/metacall_node_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_node_inline_test/CMakeLists.txt | 2 +- .../metacall_node_multithread_deadlock_test/CMakeLists.txt | 2 +- source/tests/metacall_node_native_code_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_await_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_c_lib_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_rs_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../tests/metacall_node_python_await_test/CMakeLists.txt | 2 +- .../metacall_node_python_deadlock_test/CMakeLists.txt | 2 +- .../metacall_node_python_exception_test/CMakeLists.txt | 2 +- .../metacall_node_python_port_mock_test/CMakeLists.txt | 2 +- .../metacall_node_python_port_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_node_python_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_node_reentrant_test/CMakeLists.txt | 2 +- .../tests/metacall_node_signal_handler_test/CMakeLists.txt | 2 +- source/tests/metacall_node_test/CMakeLists.txt | 2 +- source/tests/metacall_node_typescript_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_plugin_extension_local_test/CMakeLists.txt | 2 +- source/tests/metacall_plugin_extension_test/CMakeLists.txt | 2 +- source/tests/metacall_python_async_test/CMakeLists.txt | 2 +- source/tests/metacall_python_await_test/CMakeLists.txt | 2 +- source/tests/metacall_python_builtins_test/CMakeLists.txt | 2 +- source/tests/metacall_python_callback_test/CMakeLists.txt | 2 +- source/tests/metacall_python_dict_test/CMakeLists.txt | 2 +- source/tests/metacall_python_exception_test/CMakeLists.txt | 2 +- source/tests/metacall_python_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_python_gc_test/CMakeLists.txt | 2 +- .../tests/metacall_python_loader_port_test/CMakeLists.txt | 2 +- source/tests/metacall_python_model_test/CMakeLists.txt | 2 +- .../tests/metacall_python_node_await_test/CMakeLists.txt | 2 +- .../tests/metacall_python_object_class_test/CMakeLists.txt | 2 +- source/tests/metacall_python_open_test/CMakeLists.txt | 2 +- source/tests/metacall_python_pointer_test/CMakeLists.txt | 2 +- .../metacall_python_port_callback_test/CMakeLists.txt | 2 +- .../tests/metacall_python_port_https_test/CMakeLists.txt | 2 +- .../tests/metacall_python_port_import_test/CMakeLists.txt | 2 +- .../tests/metacall_python_port_pointer_test/CMakeLists.txt | 2 +- source/tests/metacall_python_port_test/CMakeLists.txt | 2 +- source/tests/metacall_python_reentrant_test/CMakeLists.txt | 2 +- .../metacall_python_relative_path_test/CMakeLists.txt | 2 +- source/tests/metacall_python_test/CMakeLists.txt | 2 +- source/tests/metacall_python_varargs_test/CMakeLists.txt | 2 +- .../metacall_python_without_env_vars_test/CMakeLists.txt | 2 +- .../metacall_python_without_functions_test/CMakeLists.txt | 2 +- source/tests/metacall_reinitialize_test/CMakeLists.txt | 2 +- source/tests/metacall_reload_functions_test/CMakeLists.txt | 2 +- source/tests/metacall_return_monad_test/CMakeLists.txt | 2 +- source/tests/metacall_rpc_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_fail_test/CMakeLists.txt | 2 +- .../tests/metacall_ruby_object_class_test/CMakeLists.txt | 2 +- .../metacall_ruby_parser_integration_test/CMakeLists.txt | 2 +- .../metacall_ruby_rails_integration_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_rust_class_test/CMakeLists.txt | 2 +- .../tests/metacall_rust_load_from_mem_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_rust_load_from_package_test/CMakeLists.txt | 2 +- source/tests/metacall_rust_test/CMakeLists.txt | 2 +- source/tests/metacall_sandbox_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_test/CMakeLists.txt | 2 +- .../tests/metacall_typescript_call_map_test/CMakeLists.txt | 2 +- .../metacall_typescript_jsx_default_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_node_test/CMakeLists.txt | 2 +- .../tests/metacall_typescript_require_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_test/CMakeLists.txt | 2 +- .../metacall_typescript_tsx_loop_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_tsx_test/CMakeLists.txt | 2 +- source/tests/metacall_version_test/CMakeLists.txt | 2 +- source/tests/metacall_wasm_python_port_test/CMakeLists.txt | 2 +- source/tests/metacall_wasm_test/CMakeLists.txt | 2 +- source/tests/portability_path_test/CMakeLists.txt | 2 +- source/tests/preprocessor_test/CMakeLists.txt | 2 +- source/tests/rb_loader_parser_test/CMakeLists.txt | 2 +- source/tests/reflect_function_test/CMakeLists.txt | 2 +- source/tests/reflect_metadata_test/CMakeLists.txt | 2 +- source/tests/reflect_object_class_test/CMakeLists.txt | 2 +- source/tests/reflect_scope_test/CMakeLists.txt | 2 +- source/tests/reflect_value_cast_test/CMakeLists.txt | 2 +- source/tests/serial_test/CMakeLists.txt | 2 +- source/threading/CMakeLists.txt | 2 +- source/version/CMakeLists.txt | 2 +- 225 files changed, 231 insertions(+), 230 deletions(-) diff --git a/source/adt/CMakeLists.txt b/source/adt/CMakeLists.txt index 122513f58a..e97f2f59b0 100644 --- a/source/adt/CMakeLists.txt +++ b/source/adt/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/benchmarks/log_bench/CMakeLists.txt b/source/benchmarks/log_bench/CMakeLists.txt index 63f7c901e3..1c1175337a 100644 --- a/source/benchmarks/log_bench/CMakeLists.txt +++ b/source/benchmarks/log_bench/CMakeLists.txt @@ -108,7 +108,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt b/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt index 618c9a7eec..751b4a0341 100644 --- a/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_node_call_bench/CMakeLists.txt b/source/benchmarks/metacall_node_call_bench/CMakeLists.txt index 37aa304362..8b9c696bb9 100644 --- a/source/benchmarks/metacall_node_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_node_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt b/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt index 1807f755af..0c0ee17bc3 100644 --- a/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt @@ -121,7 +121,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_call_bench/CMakeLists.txt b/source/benchmarks/metacall_py_call_bench/CMakeLists.txt index 898bddd699..bbc6b33763 100644 --- a/source/benchmarks/metacall_py_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_init_bench/CMakeLists.txt b/source/benchmarks/metacall_py_init_bench/CMakeLists.txt index 9933482d18..1aff472c3f 100644 --- a/source/benchmarks/metacall_py_init_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_init_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt b/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt index 5643afe0b7..fc66c3230f 100644 --- a/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/cli/metacallcli/CMakeLists.txt b/source/cli/metacallcli/CMakeLists.txt index fe6679dc3e..227a81cfd7 100644 --- a/source/cli/metacallcli/CMakeLists.txt +++ b/source/cli/metacallcli/CMakeLists.txt @@ -139,7 +139,7 @@ target_compile_features(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/cli/plugins/cli_core_plugin/CMakeLists.txt b/source/cli/plugins/cli_core_plugin/CMakeLists.txt index 2dd38f06de..1e353e4d42 100644 --- a/source/cli/plugins/cli_core_plugin/CMakeLists.txt +++ b/source/cli/plugins/cli_core_plugin/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt b/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt index e4d16acd2f..3c777caf81 100644 --- a/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt +++ b/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt @@ -175,7 +175,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/configuration/CMakeLists.txt b/source/configuration/CMakeLists.txt index 2332f06826..6c5204d8f0 100644 --- a/source/configuration/CMakeLists.txt +++ b/source/configuration/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/detour/CMakeLists.txt b/source/detour/CMakeLists.txt index 0a8a4e5d74..fafc41c6fe 100644 --- a/source/detour/CMakeLists.txt +++ b/source/detour/CMakeLists.txt @@ -157,7 +157,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index b9c304e1dc..a822ca631c 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -221,7 +221,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/dynlink/CMakeLists.txt b/source/dynlink/CMakeLists.txt index dbb770bec9..33a62eaa77 100644 --- a/source/dynlink/CMakeLists.txt +++ b/source/dynlink/CMakeLists.txt @@ -168,7 +168,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/environment/CMakeLists.txt b/source/environment/CMakeLists.txt index 243a97849d..34c36271b8 100644 --- a/source/environment/CMakeLists.txt +++ b/source/environment/CMakeLists.txt @@ -150,7 +150,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/examples/metacallgui/CMakeLists.txt b/source/examples/metacallgui/CMakeLists.txt index 5ad9757906..8bfa9b9588 100644 --- a/source/examples/metacallgui/CMakeLists.txt +++ b/source/examples/metacallgui/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacalllog/CMakeLists.txt b/source/examples/metacalllog/CMakeLists.txt index 5a4c04da4c..5a180105b1 100644 --- a/source/examples/metacalllog/CMakeLists.txt +++ b/source/examples/metacalllog/CMakeLists.txt @@ -93,7 +93,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacallquine/CMakeLists.txt b/source/examples/metacallquine/CMakeLists.txt index 9254a6b796..299a457627 100644 --- a/source/examples/metacallquine/CMakeLists.txt +++ b/source/examples/metacallquine/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacallweb/CMakeLists.txt b/source/examples/metacallweb/CMakeLists.txt index 7e6a5f7feb..b4e9c095d2 100644 --- a/source/examples/metacallweb/CMakeLists.txt +++ b/source/examples/metacallweb/CMakeLists.txt @@ -99,7 +99,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/extensions/plugin_extension/CMakeLists.txt b/source/extensions/plugin_extension/CMakeLists.txt index 0ef36ecd17..6873958a26 100644 --- a/source/extensions/plugin_extension/CMakeLists.txt +++ b/source/extensions/plugin_extension/CMakeLists.txt @@ -161,7 +161,7 @@ target_compile_features(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/filesystem/CMakeLists.txt b/source/filesystem/CMakeLists.txt index 397193fde4..472863df30 100644 --- a/source/filesystem/CMakeLists.txt +++ b/source/filesystem/CMakeLists.txt @@ -181,7 +181,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/format/CMakeLists.txt b/source/format/CMakeLists.txt index d9f880e1a1..46d4ba5453 100644 --- a/source/format/CMakeLists.txt +++ b/source/format/CMakeLists.txt @@ -147,7 +147,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loader/CMakeLists.txt b/source/loader/CMakeLists.txt index 852575a607..dad99a6b72 100644 --- a/source/loader/CMakeLists.txt +++ b/source/loader/CMakeLists.txt @@ -170,7 +170,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/c_loader/CMakeLists.txt b/source/loaders/c_loader/CMakeLists.txt index cc2c092102..7294668727 100644 --- a/source/loaders/c_loader/CMakeLists.txt +++ b/source/loaders/c_loader/CMakeLists.txt @@ -203,7 +203,7 @@ target_compile_features(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cob_loader/CMakeLists.txt b/source/loaders/cob_loader/CMakeLists.txt index cd0327d7ce..19890f7d53 100644 --- a/source/loaders/cob_loader/CMakeLists.txt +++ b/source/loaders/cob_loader/CMakeLists.txt @@ -162,7 +162,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cr_loader/CMakeLists.txt b/source/loaders/cr_loader/CMakeLists.txt index 9a40a3bef2..b0ab7ba890 100644 --- a/source/loaders/cr_loader/CMakeLists.txt +++ b/source/loaders/cr_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cs_loader/CMakeLists.txt b/source/loaders/cs_loader/CMakeLists.txt index 8486486e68..c872d0f24f 100644 --- a/source/loaders/cs_loader/CMakeLists.txt +++ b/source/loaders/cs_loader/CMakeLists.txt @@ -222,7 +222,7 @@ target_compile_features(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/dart_loader/CMakeLists.txt b/source/loaders/dart_loader/CMakeLists.txt index 7cff11bd5b..6355e44cde 100644 --- a/source/loaders/dart_loader/CMakeLists.txt +++ b/source/loaders/dart_loader/CMakeLists.txt @@ -165,7 +165,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/ext_loader/CMakeLists.txt b/source/loaders/ext_loader/CMakeLists.txt index bb850b7ab0..b2a9545f9a 100644 --- a/source/loaders/ext_loader/CMakeLists.txt +++ b/source/loaders/ext_loader/CMakeLists.txt @@ -163,7 +163,7 @@ target_compile_features(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/file_loader/CMakeLists.txt b/source/loaders/file_loader/CMakeLists.txt index eac4491f72..0f03daec2a 100644 --- a/source/loaders/file_loader/CMakeLists.txt +++ b/source/loaders/file_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/java_loader/CMakeLists.txt b/source/loaders/java_loader/CMakeLists.txt index 7c26d18712..c9b4d58577 100644 --- a/source/loaders/java_loader/CMakeLists.txt +++ b/source/loaders/java_loader/CMakeLists.txt @@ -175,7 +175,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/jl_loader/CMakeLists.txt b/source/loaders/jl_loader/CMakeLists.txt index e7a4a3f81c..8c1109f2f6 100644 --- a/source/loaders/jl_loader/CMakeLists.txt +++ b/source/loaders/jl_loader/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/js_loader/CMakeLists.txt b/source/loaders/js_loader/CMakeLists.txt index e5a963fb09..dfa627ff9a 100644 --- a/source/loaders/js_loader/CMakeLists.txt +++ b/source/loaders/js_loader/CMakeLists.txt @@ -171,7 +171,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/jsm_loader/CMakeLists.txt b/source/loaders/jsm_loader/CMakeLists.txt index 3993e4b1fc..36accd7ed2 100644 --- a/source/loaders/jsm_loader/CMakeLists.txt +++ b/source/loaders/jsm_loader/CMakeLists.txt @@ -169,7 +169,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/llvm_loader/CMakeLists.txt b/source/loaders/llvm_loader/CMakeLists.txt index 0b31d18fcf..7755ecf18b 100644 --- a/source/loaders/llvm_loader/CMakeLists.txt +++ b/source/loaders/llvm_loader/CMakeLists.txt @@ -169,7 +169,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/lua_loader/CMakeLists.txt b/source/loaders/lua_loader/CMakeLists.txt index bd1c7fd723..6a735bbd78 100644 --- a/source/loaders/lua_loader/CMakeLists.txt +++ b/source/loaders/lua_loader/CMakeLists.txt @@ -167,7 +167,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/mock_loader/CMakeLists.txt b/source/loaders/mock_loader/CMakeLists.txt index 72a8dfbcb0..60cd93043e 100644 --- a/source/loaders/mock_loader/CMakeLists.txt +++ b/source/loaders/mock_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 0a3b267757..d4af40596a 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -157,6 +157,9 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library + # TODO: Implement workaround to the problem: "PE32 file format does not support weak linkage" + # $<$:${NodeJS_LIBRARY}> # NodeJS library + PUBLIC ${DEFAULT_LIBRARIES} @@ -195,8 +198,10 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE + # TODO: MacOS + # $<$:-Wl,-undefined=dynamic_lookup> PUBLIC ${DEFAULT_LINKER_OPTIONS} diff --git a/source/loaders/py_loader/CMakeLists.txt b/source/loaders/py_loader/CMakeLists.txt index eed3658bc7..105bfae2c6 100644 --- a/source/loaders/py_loader/CMakeLists.txt +++ b/source/loaders/py_loader/CMakeLists.txt @@ -209,7 +209,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index 787fb3a17f..8259079b46 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -186,7 +186,7 @@ endif() # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rpc_loader/CMakeLists.txt b/source/loaders/rpc_loader/CMakeLists.txt index 9ebdc58c07..c81839aefb 100644 --- a/source/loaders/rpc_loader/CMakeLists.txt +++ b/source/loaders/rpc_loader/CMakeLists.txt @@ -171,7 +171,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rs_loader/CMakeLists.txt b/source/loaders/rs_loader/CMakeLists.txt index e6b4bbcff3..4c97cf5990 100644 --- a/source/loaders/rs_loader/CMakeLists.txt +++ b/source/loaders/rs_loader/CMakeLists.txt @@ -177,7 +177,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/ts_loader/CMakeLists.txt b/source/loaders/ts_loader/CMakeLists.txt index 4869091dd1..076f40dc75 100644 --- a/source/loaders/ts_loader/CMakeLists.txt +++ b/source/loaders/ts_loader/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/wasm_loader/CMakeLists.txt b/source/loaders/wasm_loader/CMakeLists.txt index 1dd721fec9..20ada2d79e 100644 --- a/source/loaders/wasm_loader/CMakeLists.txt +++ b/source/loaders/wasm_loader/CMakeLists.txt @@ -174,7 +174,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/log/CMakeLists.txt b/source/log/CMakeLists.txt index becaf85fbd..79c9c9ff9b 100644 --- a/source/log/CMakeLists.txt +++ b/source/log/CMakeLists.txt @@ -219,7 +219,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/memory/CMakeLists.txt b/source/memory/CMakeLists.txt index fa7b05c039..17a4b1b1c5 100644 --- a/source/memory/CMakeLists.txt +++ b/source/memory/CMakeLists.txt @@ -161,7 +161,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/metacall/CMakeLists.txt b/source/metacall/CMakeLists.txt index 1ab5be1fab..e04b167e8a 100644 --- a/source/metacall/CMakeLists.txt +++ b/source/metacall/CMakeLists.txt @@ -242,7 +242,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugin/CMakeLists.txt b/source/plugin/CMakeLists.txt index 1682864041..c46756f36c 100644 --- a/source/plugin/CMakeLists.txt +++ b/source/plugin/CMakeLists.txt @@ -163,7 +163,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index e434b73030..866e7b9232 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -216,7 +216,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugins/sandbox_plugin/CMakeLists.txt b/source/plugins/sandbox_plugin/CMakeLists.txt index 8d271bf3f6..1197f9760f 100644 --- a/source/plugins/sandbox_plugin/CMakeLists.txt +++ b/source/plugins/sandbox_plugin/CMakeLists.txt @@ -196,7 +196,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index cf4af64c62..fab62a9214 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -156,7 +156,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index 076fe1bf15..07b94e752e 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -147,7 +147,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/ports/js_port/CMakeLists.txt b/source/ports/js_port/CMakeLists.txt index bae7efb737..447e1fc10c 100644 --- a/source/ports/js_port/CMakeLists.txt +++ b/source/ports/js_port/CMakeLists.txt @@ -213,11 +213,8 @@ target_compile_options(${SWIG_MODULE_${target}_REAL_NAME} # Linker options # -target_link_libraries(${SWIG_MODULE_${target}_REAL_NAME} +add_link_options(${SWIG_MODULE_${target}_REAL_NAME} PRIVATE - ${V8_LIBRARIES} # V8 libraries - - ${META_PROJECT_NAME}::metacall PUBLIC ${DEFAULT_LINKER_OPTIONS} @@ -383,7 +380,7 @@ target_compile_options(${js_port_test} # Linker options # -target_link_libraries(${js_port_test} +add_link_options(${js_port_test} PRIVATE PUBLIC diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index 1d2cbf5be8..0e9e574fce 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -237,9 +237,8 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${SWIG_MODULE_${target}_REAL_NAME} +add_link_options(${SWIG_MODULE_${target}_REAL_NAME} PRIVATE - ${META_PROJECT_NAME}::metacall PUBLIC ${DEFAULT_LINKER_OPTIONS} diff --git a/source/preprocessor/CMakeLists.txt b/source/preprocessor/CMakeLists.txt index da28c94b71..e3c7016ad7 100644 --- a/source/preprocessor/CMakeLists.txt +++ b/source/preprocessor/CMakeLists.txt @@ -179,7 +179,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/reflect/CMakeLists.txt b/source/reflect/CMakeLists.txt index ed13aa98bd..04921ad522 100644 --- a/source/reflect/CMakeLists.txt +++ b/source/reflect/CMakeLists.txt @@ -203,7 +203,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/scripts/extension/sum/CMakeLists.txt b/source/scripts/extension/sum/CMakeLists.txt index 223a700660..c076de1e1c 100644 --- a/source/scripts/extension/sum/CMakeLists.txt +++ b/source/scripts/extension/sum/CMakeLists.txt @@ -152,7 +152,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/serial/CMakeLists.txt b/source/serial/CMakeLists.txt index 6636295d7d..9a7a5b1e16 100644 --- a/source/serial/CMakeLists.txt +++ b/source/serial/CMakeLists.txt @@ -158,7 +158,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/serials/metacall_serial/CMakeLists.txt b/source/serials/metacall_serial/CMakeLists.txt index 0a981ebd3b..66160ee092 100644 --- a/source/serials/metacall_serial/CMakeLists.txt +++ b/source/serials/metacall_serial/CMakeLists.txt @@ -158,7 +158,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/serials/rapid_json_serial/CMakeLists.txt b/source/serials/rapid_json_serial/CMakeLists.txt index c3f1d0d0c8..aa2b189351 100644 --- a/source/serials/rapid_json_serial/CMakeLists.txt +++ b/source/serials/rapid_json_serial/CMakeLists.txt @@ -191,7 +191,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/tests/adt_map_test/CMakeLists.txt b/source/tests/adt_map_test/CMakeLists.txt index 65c947a0cd..45bca49c83 100644 --- a/source/tests/adt_map_test/CMakeLists.txt +++ b/source/tests/adt_map_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_set_test/CMakeLists.txt b/source/tests/adt_set_test/CMakeLists.txt index b56b9e7d9d..21972409d9 100644 --- a/source/tests/adt_set_test/CMakeLists.txt +++ b/source/tests/adt_set_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_trie_test/CMakeLists.txt b/source/tests/adt_trie_test/CMakeLists.txt index b59489c704..28305388ba 100644 --- a/source/tests/adt_trie_test/CMakeLists.txt +++ b/source/tests/adt_trie_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_vector_test/CMakeLists.txt b/source/tests/adt_vector_test/CMakeLists.txt index f01ad35d0e..cc085cb1b6 100644 --- a/source/tests/adt_vector_test/CMakeLists.txt +++ b/source/tests/adt_vector_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/configuration_test/CMakeLists.txt b/source/tests/configuration_test/CMakeLists.txt index 2e9e6d9964..e749dc9c59 100644 --- a/source/tests/configuration_test/CMakeLists.txt +++ b/source/tests/configuration_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/detour_test/CMakeLists.txt b/source/tests/detour_test/CMakeLists.txt index b22067a447..1e96fa5a0f 100644 --- a/source/tests/detour_test/CMakeLists.txt +++ b/source/tests/detour_test/CMakeLists.txt @@ -121,7 +121,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index f8375ae695..53718d4079 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/environment_test/CMakeLists.txt b/source/tests/environment_test/CMakeLists.txt index 2b314418be..7a7575d468 100644 --- a/source/tests/environment_test/CMakeLists.txt +++ b/source/tests/environment_test/CMakeLists.txt @@ -107,7 +107,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/log_custom_test/CMakeLists.txt b/source/tests/log_custom_test/CMakeLists.txt index f79f04b9d2..4793ab64a4 100644 --- a/source/tests/log_custom_test/CMakeLists.txt +++ b/source/tests/log_custom_test/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/log_test/CMakeLists.txt b/source/tests/log_test/CMakeLists.txt index dfcb40b5eb..8fe8cca096 100644 --- a/source/tests/log_test/CMakeLists.txt +++ b/source/tests/log_test/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt index 31ff00540d..2d5ad256a3 100644 --- a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_c_lib_test/CMakeLists.txt b/source/tests/metacall_c_lib_test/CMakeLists.txt index 60b3157a2b..d4d7aa5612 100644 --- a/source/tests/metacall_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_c_lib_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_c_test/CMakeLists.txt b/source/tests/metacall_c_test/CMakeLists.txt index da8b42575d..76188b304d 100644 --- a/source/tests/metacall_c_test/CMakeLists.txt +++ b/source/tests/metacall_c_test/CMakeLists.txt @@ -124,7 +124,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_callback_complex_test/CMakeLists.txt b/source/tests/metacall_callback_complex_test/CMakeLists.txt index 2edd78b985..c6c54a96a4 100644 --- a/source/tests/metacall_callback_complex_test/CMakeLists.txt +++ b/source/tests/metacall_callback_complex_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cast_test/CMakeLists.txt b/source/tests/metacall_cast_test/CMakeLists.txt index 73c8f9d984..4880ebe392 100644 --- a/source/tests/metacall_cast_test/CMakeLists.txt +++ b/source/tests/metacall_cast_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_clear_test/CMakeLists.txt b/source/tests/metacall_clear_test/CMakeLists.txt index a40a1ebc95..32591ebc4c 100644 --- a/source/tests/metacall_clear_test/CMakeLists.txt +++ b/source/tests/metacall_clear_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt index 5c2f4b7390..8bb9fa0bc3 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt @@ -123,7 +123,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt index 5da0b4cf35..1f50fb8cae 100644 --- a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cobol_test/CMakeLists.txt b/source/tests/metacall_cobol_test/CMakeLists.txt index 6dddd7b9f1..1c66d2dd29 100644 --- a/source/tests/metacall_cobol_test/CMakeLists.txt +++ b/source/tests/metacall_cobol_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_configuration_default_test/CMakeLists.txt b/source/tests/metacall_configuration_default_test/CMakeLists.txt index f82aca6df2..589eeb1d12 100644 --- a/source/tests/metacall_configuration_default_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_default_test/CMakeLists.txt @@ -129,7 +129,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt index da3bc94faf..af15809f27 100644 --- a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cs_test/CMakeLists.txt b/source/tests/metacall_cs_test/CMakeLists.txt index f92b705a74..5859e5a828 100644 --- a/source/tests/metacall_cs_test/CMakeLists.txt +++ b/source/tests/metacall_cs_test/CMakeLists.txt @@ -117,7 +117,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_csharp_function_test/CMakeLists.txt b/source/tests/metacall_csharp_function_test/CMakeLists.txt index 1d641d00d9..e89890969d 100644 --- a/source/tests/metacall_csharp_function_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_function_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt index 6280b8f986..1c43f950ad 100644 --- a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_depends_test/CMakeLists.txt b/source/tests/metacall_depends_test/CMakeLists.txt index c94dbeae7d..4fab09eae9 100644 --- a/source/tests/metacall_depends_test/CMakeLists.txt +++ b/source/tests/metacall_depends_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_distributable_test/CMakeLists.txt b/source/tests/metacall_distributable_test/CMakeLists.txt index bf924ad614..2571897243 100644 --- a/source/tests/metacall_distributable_test/CMakeLists.txt +++ b/source/tests/metacall_distributable_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ducktype_test/CMakeLists.txt b/source/tests/metacall_ducktype_test/CMakeLists.txt index 61d3ac4bfa..11eed7096b 100644 --- a/source/tests/metacall_ducktype_test/CMakeLists.txt +++ b/source/tests/metacall_ducktype_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt index c86f54169b..12424e2253 100644 --- a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt index c539070787..3b17aa0ac5 100644 --- a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_dynlink_path_test/CMakeLists.txt b/source/tests/metacall_dynlink_path_test/CMakeLists.txt index ecc76c6f7c..722d234a7c 100644 --- a/source/tests/metacall_dynlink_path_test/CMakeLists.txt +++ b/source/tests/metacall_dynlink_path_test/CMakeLists.txt @@ -115,7 +115,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ext_test/CMakeLists.txt b/source/tests/metacall_ext_test/CMakeLists.txt index e75e6ff9f4..b80533149f 100644 --- a/source/tests/metacall_ext_test/CMakeLists.txt +++ b/source/tests/metacall_ext_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_fail_test/CMakeLists.txt b/source/tests/metacall_file_fail_test/CMakeLists.txt index e58b57b699..7e8d500721 100644 --- a/source/tests/metacall_file_fail_test/CMakeLists.txt +++ b/source/tests/metacall_file_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_glob_test/CMakeLists.txt b/source/tests/metacall_file_glob_test/CMakeLists.txt index fde9870d65..ae886d2144 100644 --- a/source/tests/metacall_file_glob_test/CMakeLists.txt +++ b/source/tests/metacall_file_glob_test/CMakeLists.txt @@ -123,7 +123,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_test/CMakeLists.txt b/source/tests/metacall_file_test/CMakeLists.txt index ad378539d8..5f1673554d 100644 --- a/source/tests/metacall_file_test/CMakeLists.txt +++ b/source/tests/metacall_file_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_fork_test/CMakeLists.txt b/source/tests/metacall_fork_test/CMakeLists.txt index 34ebb8a125..d7f19ff1ea 100644 --- a/source/tests/metacall_fork_test/CMakeLists.txt +++ b/source/tests/metacall_fork_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_function_test/CMakeLists.txt b/source/tests/metacall_function_test/CMakeLists.txt index ad6e4fe584..fbe8d14ea7 100644 --- a/source/tests/metacall_function_test/CMakeLists.txt +++ b/source/tests/metacall_function_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_handle_export_test/CMakeLists.txt b/source/tests/metacall_handle_export_test/CMakeLists.txt index d734ebe09f..7320e8e924 100644 --- a/source/tests/metacall_handle_export_test/CMakeLists.txt +++ b/source/tests/metacall_handle_export_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_handle_get_test/CMakeLists.txt b/source/tests/metacall_handle_get_test/CMakeLists.txt index dd5aa471e4..7a6576f360 100644 --- a/source/tests/metacall_handle_get_test/CMakeLists.txt +++ b/source/tests/metacall_handle_get_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_init_fini_test/CMakeLists.txt b/source/tests/metacall_init_fini_test/CMakeLists.txt index 86f4671052..4b75590d1a 100644 --- a/source/tests/metacall_init_fini_test/CMakeLists.txt +++ b/source/tests/metacall_init_fini_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt index b91de9c5cf..65a6858019 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt index 1fbd5c0e48..9b19bbb709 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_ex_test/CMakeLists.txt b/source/tests/metacall_initialize_ex_test/CMakeLists.txt index 18d0f1e580..3aa9967e4e 100644 --- a/source/tests/metacall_initialize_ex_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_ex_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_test/CMakeLists.txt b/source/tests/metacall_initialize_test/CMakeLists.txt index 2d231d6161..fb1b6abfb3 100644 --- a/source/tests/metacall_initialize_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_inspect_test/CMakeLists.txt b/source/tests/metacall_inspect_test/CMakeLists.txt index 7f5664fbb8..3deb9cd296 100644 --- a/source/tests/metacall_inspect_test/CMakeLists.txt +++ b/source/tests/metacall_inspect_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_integration_test/CMakeLists.txt b/source/tests/metacall_integration_test/CMakeLists.txt index b3236cb020..7314bdebd6 100644 --- a/source/tests/metacall_integration_test/CMakeLists.txt +++ b/source/tests/metacall_integration_test/CMakeLists.txt @@ -117,7 +117,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_invalid_loader_test/CMakeLists.txt b/source/tests/metacall_invalid_loader_test/CMakeLists.txt index 3d0941cbaf..d3d16ec7ae 100644 --- a/source/tests/metacall_invalid_loader_test/CMakeLists.txt +++ b/source/tests/metacall_invalid_loader_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_java_test/CMakeLists.txt b/source/tests/metacall_java_test/CMakeLists.txt index b7e52cab42..b1e2810fa6 100644 --- a/source/tests/metacall_java_test/CMakeLists.txt +++ b/source/tests/metacall_java_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_julia_test/CMakeLists.txt b/source/tests/metacall_julia_test/CMakeLists.txt index 701fb1b89e..c5f59d1e9b 100644 --- a/source/tests/metacall_julia_test/CMakeLists.txt +++ b/source/tests/metacall_julia_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt index 1bc31a11ae..552b2ecc25 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_llvm_test/CMakeLists.txt b/source/tests/metacall_llvm_test/CMakeLists.txt index acc723fdc3..31b0c3d35d 100644 --- a/source/tests/metacall_llvm_test/CMakeLists.txt +++ b/source/tests/metacall_llvm_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt index d25581f20a..9d3f8e8ab9 100644 --- a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt index cb1dcf870f..86917f395a 100644 --- a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt index 9191bf4f39..b7588a561c 100644 --- a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt index efaabddc67..90d3754bcb 100644 --- a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_test/CMakeLists.txt b/source/tests/metacall_load_configuration_test/CMakeLists.txt index a37dec7521..04dca70c34 100644 --- a/source/tests/metacall_load_configuration_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt index 0cb67b3d98..719056eae0 100644 --- a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_memory_test/CMakeLists.txt b/source/tests/metacall_load_memory_test/CMakeLists.txt index c85b9c10d9..014b7823fc 100644 --- a/source/tests/metacall_load_memory_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_logs_test/CMakeLists.txt b/source/tests/metacall_logs_test/CMakeLists.txt index 068c0cf217..514da4c48e 100644 --- a/source/tests/metacall_logs_test/CMakeLists.txt +++ b/source/tests/metacall_logs_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_lua_test/CMakeLists.txt b/source/tests/metacall_lua_test/CMakeLists.txt index d8d2cfc014..164aeeb3ca 100644 --- a/source/tests/metacall_lua_test/CMakeLists.txt +++ b/source/tests/metacall_lua_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_map_await_test/CMakeLists.txt b/source/tests/metacall_map_await_test/CMakeLists.txt index c70decf95e..7cb62f098c 100644 --- a/source/tests/metacall_map_await_test/CMakeLists.txt +++ b/source/tests/metacall_map_await_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_map_test/CMakeLists.txt b/source/tests/metacall_map_test/CMakeLists.txt index 72cbbcab03..ffe8d92c58 100644 --- a/source/tests/metacall_map_test/CMakeLists.txt +++ b/source/tests/metacall_map_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt index 7fc6365c90..2e5f9a1355 100644 --- a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_resources_test/CMakeLists.txt b/source/tests/metacall_node_async_resources_test/CMakeLists.txt index f57aeb3776..6fafa70d28 100644 --- a/source/tests/metacall_node_async_resources_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_resources_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_test/CMakeLists.txt b/source/tests/metacall_node_async_test/CMakeLists.txt index 43e43eb6a7..d6a4050aa4 100644 --- a/source/tests/metacall_node_async_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_await_chain_test/CMakeLists.txt b/source/tests/metacall_node_await_chain_test/CMakeLists.txt index 8fc2574d98..8b15b75da3 100644 --- a/source/tests/metacall_node_await_chain_test/CMakeLists.txt +++ b/source/tests/metacall_node_await_chain_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_call_test/CMakeLists.txt b/source/tests/metacall_node_call_test/CMakeLists.txt index 1c86441a0f..f0ac1da58a 100644 --- a/source/tests/metacall_node_call_test/CMakeLists.txt +++ b/source/tests/metacall_node_call_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_callback_test/CMakeLists.txt b/source/tests/metacall_node_callback_test/CMakeLists.txt index 6c50252a10..1249cc38e6 100644 --- a/source/tests/metacall_node_callback_test/CMakeLists.txt +++ b/source/tests/metacall_node_callback_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt index 511ce96e65..c91655dc4a 100644 --- a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt +++ b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_default_export_test/CMakeLists.txt b/source/tests/metacall_node_default_export_test/CMakeLists.txt index 4e1f5477b8..93468e1adf 100644 --- a/source/tests/metacall_node_default_export_test/CMakeLists.txt +++ b/source/tests/metacall_node_default_export_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt index b47b5650d6..7c2922950e 100644 --- a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_event_loop_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_test/CMakeLists.txt index ddbf38c2cf..a0d1ae8ce7 100644 --- a/source/tests/metacall_node_event_loop_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_exception_test/CMakeLists.txt b/source/tests/metacall_node_exception_test/CMakeLists.txt index f203c824c3..f2a47f44e9 100644 --- a/source/tests/metacall_node_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_exception_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/CMakeLists.txt index 33c372ae83..538385f341 100644 --- a/source/tests/metacall_node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt index 997208d44f..ebd2867525 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt @@ -173,7 +173,7 @@ target_compile_options(${target} # Linker options # -target_link_options(${target} +add_link_options(${target} PRIVATE $<$:/IGNORE:4199> $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> diff --git a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt index 0e629197c8..9125c4a7be 100644 --- a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt index 35d46706ac..0477424f83 100644 --- a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_fail_test/CMakeLists.txt b/source/tests/metacall_node_fail_test/CMakeLists.txt index cdb112b965..fe06183ebc 100644 --- a/source/tests/metacall_node_fail_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_inline_test/CMakeLists.txt b/source/tests/metacall_node_inline_test/CMakeLists.txt index 8d86c00caa..9f7829362a 100644 --- a/source/tests/metacall_node_inline_test/CMakeLists.txt +++ b/source/tests/metacall_node_inline_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt index 3140153022..c7c06a6899 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_native_code_test/CMakeLists.txt b/source/tests/metacall_node_native_code_test/CMakeLists.txt index e915ed3b77..59f982c4c1 100644 --- a/source/tests/metacall_node_native_code_test/CMakeLists.txt +++ b/source/tests/metacall_node_native_code_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_await_test/CMakeLists.txt b/source/tests/metacall_node_port_await_test/CMakeLists.txt index 7afce5c27e..1b87b2f23e 100644 --- a/source/tests/metacall_node_port_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt index 0f4436b100..6fb0c363a6 100644 --- a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt @@ -128,7 +128,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_rs_test/CMakeLists.txt b/source/tests/metacall_node_port_rs_test/CMakeLists.txt index 2882f86306..081c44abc9 100644 --- a/source/tests/metacall_node_port_rs_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_rs_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_test/CMakeLists.txt b/source/tests/metacall_node_port_test/CMakeLists.txt index 9c6c12b5b2..2d83ab6747 100644 --- a/source/tests/metacall_node_port_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt index f08873f6e0..435ed2445f 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt index af1945174b..6c88f35e38 100644 --- a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_await_test/CMakeLists.txt b/source/tests/metacall_node_python_await_test/CMakeLists.txt index 70da8a5441..09f86f6baa 100644 --- a/source/tests/metacall_node_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt index 4f2cd49f91..0e896b1dcd 100644 --- a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_exception_test/CMakeLists.txt b/source/tests/metacall_node_python_exception_test/CMakeLists.txt index af4c39982f..49aee21789 100644 --- a/source/tests/metacall_node_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_exception_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt index 2179b2e2be..5cee029fe9 100644 --- a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt index d6299a6ae5..faa5e03e81 100644 --- a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt index 20f09c16a7..dbcd8c3167 100644 --- a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_reentrant_test/CMakeLists.txt b/source/tests/metacall_node_reentrant_test/CMakeLists.txt index 02e4976818..27cdea5166 100644 --- a/source/tests/metacall_node_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_node_reentrant_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt index 29cc2a68c8..312d296791 100644 --- a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt +++ b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_test/CMakeLists.txt b/source/tests/metacall_node_test/CMakeLists.txt index c5f3c1219e..3c311060af 100644 --- a/source/tests/metacall_node_test/CMakeLists.txt +++ b/source/tests/metacall_node_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_typescript_test/CMakeLists.txt b/source/tests/metacall_node_typescript_test/CMakeLists.txt index 2a0c79cccb..4a80ab646a 100644 --- a/source/tests/metacall_node_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_node_typescript_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt index c0d8779c4d..29f56547cc 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt index 65eec2ce21..a4328a9cce 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt @@ -115,7 +115,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt index 3a96bccef2..438ce91059 100644 --- a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_test/CMakeLists.txt index 4c4bc887c8..3b783b815e 100644 --- a/source/tests/metacall_plugin_extension_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_async_test/CMakeLists.txt b/source/tests/metacall_python_async_test/CMakeLists.txt index a93607cc87..3438c0ff45 100644 --- a/source/tests/metacall_python_async_test/CMakeLists.txt +++ b/source/tests/metacall_python_async_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_await_test/CMakeLists.txt b/source/tests/metacall_python_await_test/CMakeLists.txt index 13cddb5d2e..9e77a645c2 100644 --- a/source/tests/metacall_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_builtins_test/CMakeLists.txt b/source/tests/metacall_python_builtins_test/CMakeLists.txt index 2e13c4e70b..8d99ccf6c9 100644 --- a/source/tests/metacall_python_builtins_test/CMakeLists.txt +++ b/source/tests/metacall_python_builtins_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_callback_test/CMakeLists.txt b/source/tests/metacall_python_callback_test/CMakeLists.txt index eab775d3e2..702009b82a 100644 --- a/source/tests/metacall_python_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_callback_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_dict_test/CMakeLists.txt b/source/tests/metacall_python_dict_test/CMakeLists.txt index ed59ef059a..0f08317ff7 100644 --- a/source/tests/metacall_python_dict_test/CMakeLists.txt +++ b/source/tests/metacall_python_dict_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_exception_test/CMakeLists.txt b/source/tests/metacall_python_exception_test/CMakeLists.txt index 85f131f27b..904d8a573d 100644 --- a/source/tests/metacall_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_python_exception_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_fail_test/CMakeLists.txt b/source/tests/metacall_python_fail_test/CMakeLists.txt index 73c4b15a8d..b8950664c9 100644 --- a/source/tests/metacall_python_fail_test/CMakeLists.txt +++ b/source/tests/metacall_python_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_gc_test/CMakeLists.txt b/source/tests/metacall_python_gc_test/CMakeLists.txt index 01d197adaf..4155fec427 100644 --- a/source/tests/metacall_python_gc_test/CMakeLists.txt +++ b/source/tests/metacall_python_gc_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_loader_port_test/CMakeLists.txt b/source/tests/metacall_python_loader_port_test/CMakeLists.txt index e1c2b3f45f..63bcdad979 100644 --- a/source/tests/metacall_python_loader_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_loader_port_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_model_test/CMakeLists.txt b/source/tests/metacall_python_model_test/CMakeLists.txt index d7d554d845..86155738cf 100644 --- a/source/tests/metacall_python_model_test/CMakeLists.txt +++ b/source/tests/metacall_python_model_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_node_await_test/CMakeLists.txt b/source/tests/metacall_python_node_await_test/CMakeLists.txt index 4b2cb58b31..b4cf36b3c5 100644 --- a/source/tests/metacall_python_node_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_node_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_object_class_test/CMakeLists.txt b/source/tests/metacall_python_object_class_test/CMakeLists.txt index 0fb055b612..71dea28cf6 100644 --- a/source/tests/metacall_python_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_python_object_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_open_test/CMakeLists.txt b/source/tests/metacall_python_open_test/CMakeLists.txt index 2011c17a79..8569b85cd3 100644 --- a/source/tests/metacall_python_open_test/CMakeLists.txt +++ b/source/tests/metacall_python_open_test/CMakeLists.txt @@ -131,7 +131,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_pointer_test/CMakeLists.txt b/source/tests/metacall_python_pointer_test/CMakeLists.txt index 911c8d2e8e..9c807909a1 100644 --- a/source/tests/metacall_python_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_pointer_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_callback_test/CMakeLists.txt b/source/tests/metacall_python_port_callback_test/CMakeLists.txt index c2d356b145..6ba38e2c57 100644 --- a/source/tests/metacall_python_port_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_callback_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_https_test/CMakeLists.txt b/source/tests/metacall_python_port_https_test/CMakeLists.txt index 5760efabcd..961f0af9a4 100644 --- a/source/tests/metacall_python_port_https_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_https_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_import_test/CMakeLists.txt b/source/tests/metacall_python_port_import_test/CMakeLists.txt index 68b706515f..285dea5cc3 100644 --- a/source/tests/metacall_python_port_import_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_import_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt index d421bdbe79..55188da8f1 100644 --- a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_test/CMakeLists.txt b/source/tests/metacall_python_port_test/CMakeLists.txt index ca0c027db5..1caa130fad 100644 --- a/source/tests/metacall_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_reentrant_test/CMakeLists.txt b/source/tests/metacall_python_reentrant_test/CMakeLists.txt index 727a99c1df..f196c4f9d0 100644 --- a/source/tests/metacall_python_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_python_reentrant_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_relative_path_test/CMakeLists.txt b/source/tests/metacall_python_relative_path_test/CMakeLists.txt index 667570f675..e6ddb60287 100644 --- a/source/tests/metacall_python_relative_path_test/CMakeLists.txt +++ b/source/tests/metacall_python_relative_path_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_test/CMakeLists.txt b/source/tests/metacall_python_test/CMakeLists.txt index 6302b85c2a..77631a1fe5 100644 --- a/source/tests/metacall_python_test/CMakeLists.txt +++ b/source/tests/metacall_python_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_varargs_test/CMakeLists.txt b/source/tests/metacall_python_varargs_test/CMakeLists.txt index 4fa048b647..9143fc44e7 100644 --- a/source/tests/metacall_python_varargs_test/CMakeLists.txt +++ b/source/tests/metacall_python_varargs_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt index 5ffd8ffed4..1a100f4ad3 100644 --- a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_without_functions_test/CMakeLists.txt b/source/tests/metacall_python_without_functions_test/CMakeLists.txt index 47b97fb0af..5405951048 100644 --- a/source/tests/metacall_python_without_functions_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_functions_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_reinitialize_test/CMakeLists.txt b/source/tests/metacall_reinitialize_test/CMakeLists.txt index 82aa0d9627..f57b6b85fc 100644 --- a/source/tests/metacall_reinitialize_test/CMakeLists.txt +++ b/source/tests/metacall_reinitialize_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_reload_functions_test/CMakeLists.txt b/source/tests/metacall_reload_functions_test/CMakeLists.txt index 07845beb42..4474e902e5 100644 --- a/source/tests/metacall_reload_functions_test/CMakeLists.txt +++ b/source/tests/metacall_reload_functions_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_return_monad_test/CMakeLists.txt b/source/tests/metacall_return_monad_test/CMakeLists.txt index 94aa6644fc..91874ed626 100644 --- a/source/tests/metacall_return_monad_test/CMakeLists.txt +++ b/source/tests/metacall_return_monad_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rpc_test/CMakeLists.txt b/source/tests/metacall_rpc_test/CMakeLists.txt index 78553d0e85..8fef52d0fd 100644 --- a/source/tests/metacall_rpc_test/CMakeLists.txt +++ b/source/tests/metacall_rpc_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt index 5881420602..1fe56e79a3 100644 --- a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_fail_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_test/CMakeLists.txt index 375bfffeef..211d238b36 100644 --- a/source/tests/metacall_ruby_fail_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt index 3467e71653..fc9e50765e 100644 --- a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt index 9cabe6b27b..e933746a3c 100644 --- a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt index fd57bc5239..3f19f74b4c 100644 --- a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_test/CMakeLists.txt b/source/tests/metacall_ruby_test/CMakeLists.txt index e954b12fdb..267af49c86 100644 --- a/source/tests/metacall_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_class_test/CMakeLists.txt b/source/tests/metacall_rust_class_test/CMakeLists.txt index 46e5e89533..c968d31742 100644 --- a/source/tests/metacall_rust_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt index e873e59af2..46488ba4d9 100644 --- a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt index 1d06c81f34..757198c398 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt index 4c4e3d8b97..3b47f2f3ec 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt index 8a938e3003..c77fcfa350 100644 --- a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_test/CMakeLists.txt b/source/tests/metacall_rust_test/CMakeLists.txt index c868f44c31..543fac1de9 100644 --- a/source/tests/metacall_rust_test/CMakeLists.txt +++ b/source/tests/metacall_rust_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt index e6c39e7924..351a271b7b 100644 --- a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt @@ -127,7 +127,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_test/CMakeLists.txt b/source/tests/metacall_test/CMakeLists.txt index b9afa8da8d..932f43008c 100644 --- a/source/tests/metacall_test/CMakeLists.txt +++ b/source/tests/metacall_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt index 2d60cbe626..55f940a6f9 100644 --- a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt index 3f76973e63..1f88419a8c 100644 --- a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_node_test/CMakeLists.txt b/source/tests/metacall_typescript_node_test/CMakeLists.txt index b6347d0497..ba02a30ff7 100644 --- a/source/tests/metacall_typescript_node_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_node_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_require_test/CMakeLists.txt b/source/tests/metacall_typescript_require_test/CMakeLists.txt index 48af41357c..7ac9c10333 100644 --- a/source/tests/metacall_typescript_require_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_require_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_test/CMakeLists.txt b/source/tests/metacall_typescript_test/CMakeLists.txt index 73b56edcd6..92ac58a701 100644 --- a/source/tests/metacall_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt index 0eab47ceb2..f88d202b52 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt index 2be3b225b2..2f1c5273fd 100644 --- a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_version_test/CMakeLists.txt b/source/tests/metacall_version_test/CMakeLists.txt index f519f674ed..1b89dd1e8f 100644 --- a/source/tests/metacall_version_test/CMakeLists.txt +++ b/source/tests/metacall_version_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt index 9887521702..e179a04e1e 100644 --- a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_wasm_test/CMakeLists.txt b/source/tests/metacall_wasm_test/CMakeLists.txt index 2d1d0b0f3e..8a928bef8f 100644 --- a/source/tests/metacall_wasm_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/portability_path_test/CMakeLists.txt b/source/tests/portability_path_test/CMakeLists.txt index bc736b07de..ea98857af2 100644 --- a/source/tests/portability_path_test/CMakeLists.txt +++ b/source/tests/portability_path_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/preprocessor_test/CMakeLists.txt b/source/tests/preprocessor_test/CMakeLists.txt index f6533c008a..17efabee85 100644 --- a/source/tests/preprocessor_test/CMakeLists.txt +++ b/source/tests/preprocessor_test/CMakeLists.txt @@ -106,7 +106,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/rb_loader_parser_test/CMakeLists.txt b/source/tests/rb_loader_parser_test/CMakeLists.txt index 3242839e25..30cb37c5a0 100644 --- a/source/tests/rb_loader_parser_test/CMakeLists.txt +++ b/source/tests/rb_loader_parser_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_function_test/CMakeLists.txt b/source/tests/reflect_function_test/CMakeLists.txt index 3a7ae3a808..202dca6ac8 100644 --- a/source/tests/reflect_function_test/CMakeLists.txt +++ b/source/tests/reflect_function_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_metadata_test/CMakeLists.txt b/source/tests/reflect_metadata_test/CMakeLists.txt index 375080bea7..07291ac50b 100644 --- a/source/tests/reflect_metadata_test/CMakeLists.txt +++ b/source/tests/reflect_metadata_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_object_class_test/CMakeLists.txt b/source/tests/reflect_object_class_test/CMakeLists.txt index 6b515aec62..14d331f17f 100644 --- a/source/tests/reflect_object_class_test/CMakeLists.txt +++ b/source/tests/reflect_object_class_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_scope_test/CMakeLists.txt b/source/tests/reflect_scope_test/CMakeLists.txt index ba08a0cd72..dfb7120943 100644 --- a/source/tests/reflect_scope_test/CMakeLists.txt +++ b/source/tests/reflect_scope_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_value_cast_test/CMakeLists.txt b/source/tests/reflect_value_cast_test/CMakeLists.txt index aa40caae6f..616715e7fd 100644 --- a/source/tests/reflect_value_cast_test/CMakeLists.txt +++ b/source/tests/reflect_value_cast_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/serial_test/CMakeLists.txt b/source/tests/serial_test/CMakeLists.txt index 2cf1c6bcef..eb56ea1e18 100644 --- a/source/tests/serial_test/CMakeLists.txt +++ b/source/tests/serial_test/CMakeLists.txt @@ -124,7 +124,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/threading/CMakeLists.txt b/source/threading/CMakeLists.txt index a0109ce8d9..7486dced91 100644 --- a/source/threading/CMakeLists.txt +++ b/source/threading/CMakeLists.txt @@ -178,7 +178,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC diff --git a/source/version/CMakeLists.txt b/source/version/CMakeLists.txt index d62729c680..235dd1e3af 100644 --- a/source/version/CMakeLists.txt +++ b/source/version/CMakeLists.txt @@ -151,7 +151,7 @@ target_compile_options(${target} # Linker options # -target_link_libraries(${target} +add_link_options(${target} PRIVATE PUBLIC From ab80538e77ac7d69f684160bb1b01b5c69285376 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 3 Feb 2025 22:38:15 +0100 Subject: [PATCH 021/364] Add base for supporting weak symbols on node loader. --- source/loaders/node_loader/CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index d4af40596a..5324ea73c7 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -157,9 +157,6 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - # TODO: Implement workaround to the problem: "PE32 file format does not support weak linkage" - # $<$:${NodeJS_LIBRARY}> # NodeJS library - PUBLIC ${DEFAULT_LIBRARIES} @@ -200,8 +197,10 @@ target_compile_options(${target} add_link_options(${target} PRIVATE - # TODO: MacOS - # $<$:-Wl,-undefined=dynamic_lookup> + $<$:/IGNORE:4199> + $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> + $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> + $<$,$>:-undefined dynamic_lookup> PUBLIC ${DEFAULT_LINKER_OPTIONS} From ce9b9e66eb4840e184ace22c309f1dca35659c88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:41:45 -0500 Subject: [PATCH 022/364] Bump store2 in /source/scripts/node/gram/source/gram (#541) Bumps [store2](https://github.com/nbubna/store) from 2.12.0 to 2.14.4. - [Commits](https://github.com/nbubna/store/compare/2.12.0...2.14.4) --- updated-dependencies: - dependency-name: store2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../scripts/node/gram/source/gram/package-lock.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/scripts/node/gram/source/gram/package-lock.json b/source/scripts/node/gram/source/gram/package-lock.json index 27be43c05d..1f9839313d 100644 --- a/source/scripts/node/gram/source/gram/package-lock.json +++ b/source/scripts/node/gram/source/gram/package-lock.json @@ -310,9 +310,10 @@ } }, "node_modules/store2": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", - "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" + "version": "2.14.4", + "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.4.tgz", + "integrity": "sha512-srTItn1GOvyvOycgxjAnPA63FZNwy0PTyUBFMHRM+hVFltAeoh0LmNBz9SZqUS9mMqGk8rfyWyXn3GH5ReJ8Zw==", + "license": "MIT" }, "node_modules/telegram": { "version": "1.7.19", @@ -669,9 +670,9 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, "store2": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", - "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" + "version": "2.14.4", + "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.4.tgz", + "integrity": "sha512-srTItn1GOvyvOycgxjAnPA63FZNwy0PTyUBFMHRM+hVFltAeoh0LmNBz9SZqUS9mMqGk8rfyWyXn3GH5ReJ8Zw==" }, "telegram": { "version": "1.7.19", From cd1cb340510da17e568f893d7bfdbecf211d1d2b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 3 Feb 2025 23:17:41 +0100 Subject: [PATCH 023/364] Solve issue of NodeJS with MSVC. --- source/loaders/node_loader/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 5324ea73c7..f1803877aa 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -157,6 +157,8 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library + $<$:${NodeJS_LIBRARY}> # NodeJS library + PUBLIC ${DEFAULT_LIBRARIES} @@ -197,9 +199,6 @@ target_compile_options(${target} add_link_options(${target} PRIVATE - $<$:/IGNORE:4199> - $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> - $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> $<$,$>:-undefined dynamic_lookup> PUBLIC From a6c0144d8b16e6190948859502356c9b218424f3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 5 Feb 2025 06:15:55 +0100 Subject: [PATCH 024/364] Add thread safety for metacall link. --- source/detour/source/detour.c | 5 ++++ source/metacall/source/metacall_link.c | 30 ++++++++++++++++--- .../threading/threading_atomic_ref_count.h | 2 +- .../include/threading/threading_mutex.h | 16 +++++----- .../threading/source/threading_mutex_macos.c | 8 ++--- .../source/threading_mutex_pthread.c | 10 +++---- .../threading/source/threading_mutex_win32.c | 12 ++++---- 7 files changed, 54 insertions(+), 29 deletions(-) diff --git a/source/detour/source/detour.c b/source/detour/source/detour.c index 3eeb57d6d6..5503f44941 100644 --- a/source/detour/source/detour.c +++ b/source/detour/source/detour.c @@ -67,6 +67,11 @@ const char *detour_name(detour d) void (*detour_trampoline(detour_handle handle))(void) { + if (handle == NULL) + { + return NULL; + } + return handle->target; } diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 9bad2939a9..1124c9d2d7 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -25,6 +25,8 @@ #include +#include + #include #include @@ -36,8 +38,8 @@ /* -- Private Variables -- */ static detour_handle detour_link_handle = NULL; - static set metacall_link_table = NULL; +static threading_mutex_type link_mutex = THREADING_MUTEX_INITIALIZE; #if defined(WIN32) || defined(_WIN32) || \ defined(__CYGWIN__) || defined(__CYGWIN32__) || \ @@ -54,10 +56,18 @@ FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) { typedef FARPROC (*metacall_link_func_ptr)(HMODULE, LPCSTR); - metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); + metacall_link_func_ptr metacall_link_trampoline; + + void *ptr; + + threading_mutex_lock(&link_mutex); + + metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); /* Intercept if any */ - void *ptr = set_get(metacall_link_table, (set_key)symbol); + ptr = set_get(metacall_link_table, (set_key)symbol); + + threading_mutex_unlock(&link_mutex); if (ptr != NULL) { @@ -87,7 +97,11 @@ void *metacall_link_hook(void *handle, const char *symbol) { typedef void *(*metacall_link_func_ptr)(void *, const char *); - metacall_link_func_ptr metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); + metacall_link_func_ptr metacall_link_trampoline; + + threading_mutex_lock(&link_mutex); + + metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); /* Intercept function if any */ void *ptr = set_get(metacall_link_table, (set_key)symbol); @@ -95,6 +109,8 @@ void *metacall_link_hook(void *handle, const char *symbol) /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour link interception: %s -> %p", symbol, ptr); */ + threading_mutex_unlock(&link_mutex); + if (ptr != NULL) { return ptr; @@ -172,6 +188,8 @@ int metacall_link_destroy(void) { int result = 0; + threading_mutex_lock(&link_mutex); + if (detour_link_handle != NULL) { detour d = detour_create(metacall_detour()); @@ -193,5 +211,9 @@ int metacall_link_destroy(void) metacall_link_table = NULL; } + threading_mutex_unlock(&link_mutex); + + threading_mutex_destroy(&link_mutex); + return result; } diff --git a/source/threading/include/threading/threading_atomic_ref_count.h b/source/threading/include/threading/threading_atomic_ref_count.h index afdae715bc..9e152bb0ab 100644 --- a/source/threading/include/threading/threading_atomic_ref_count.h +++ b/source/threading/include/threading/threading_atomic_ref_count.h @@ -50,7 +50,7 @@ struct threading_atomic_ref_count_type { #if defined(__THREAD_SANITIZER__) uintmax_t count; - struct threading_mutex_type m; + threading_mutex_type m; #else atomic_uintmax_t count; #endif diff --git a/source/threading/include/threading/threading_mutex.h b/source/threading/include/threading/threading_mutex.h index 174e5772e1..b8762b25c2 100644 --- a/source/threading/include/threading/threading_mutex.h +++ b/source/threading/include/threading/threading_mutex.h @@ -33,6 +33,10 @@ extern "C" { #if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) #include + #define THREADING_MUTEX_INITIALIZE \ + { \ + 0 \ + } typedef CRITICAL_SECTION threading_mutex_impl_type; #elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux) || defined(__gnu_linux__) || defined(__TOS_LINUX__)) || \ defined(__FreeBSD__) || \ @@ -41,10 +45,12 @@ typedef CRITICAL_SECTION threading_mutex_impl_type; (defined(bsdi) || defined(__bsdi__)) || \ defined(__DragonFly__) #include + #define THREADING_MUTEX_INITIALIZE PTHREAD_MUTEX_INITIALIZER typedef pthread_mutex_t threading_mutex_impl_type; #elif (defined(__MACOS__) || defined(macintosh) || defined(Macintosh) || defined(__TOS_MACOS__)) || \ (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) #include + #define THREADING_MUTEX_INITIALIZE OS_UNFAIR_LOCK_INIT typedef os_unfair_lock threading_mutex_impl_type; #else #error "Platform not supported for mutex implementation" @@ -52,16 +58,10 @@ typedef os_unfair_lock threading_mutex_impl_type; #include -/* -- Member Data -- */ - -struct threading_mutex_type -{ - threading_mutex_impl_type impl; -}; - /* -- Type Definitions -- */ -typedef struct threading_mutex_type *threading_mutex; +typedef threading_mutex_impl_type threading_mutex_type; +typedef threading_mutex_type *threading_mutex; /* -- Methods -- */ diff --git a/source/threading/source/threading_mutex_macos.c b/source/threading/source/threading_mutex_macos.c index e8fe440479..dbcdd2218c 100644 --- a/source/threading/source/threading_mutex_macos.c +++ b/source/threading/source/threading_mutex_macos.c @@ -26,21 +26,21 @@ int threading_mutex_initialize(threading_mutex m) { - memset(&m->impl, 0, sizeof(os_unfair_lock)); + memset(m, 0, sizeof(os_unfair_lock)); return 0; } int threading_mutex_lock(threading_mutex m) { - os_unfair_lock_lock(&m->impl); + os_unfair_lock_lock(m); return 0; } int threading_mutex_try_lock(threading_mutex m) { - if (os_unfair_lock_trylock(&m->impl) == false) + if (os_unfair_lock_trylock(m) == false) { return 1; } @@ -50,7 +50,7 @@ int threading_mutex_try_lock(threading_mutex m) int threading_mutex_unlock(threading_mutex m) { - os_unfair_lock_unlock(&m->impl); + os_unfair_lock_unlock(m); return 0; } diff --git a/source/threading/source/threading_mutex_pthread.c b/source/threading/source/threading_mutex_pthread.c index 3a288830e1..3536387eb5 100644 --- a/source/threading/source/threading_mutex_pthread.c +++ b/source/threading/source/threading_mutex_pthread.c @@ -24,25 +24,25 @@ int threading_mutex_initialize(threading_mutex m) { - return pthread_mutex_init(&m->impl, NULL); + return pthread_mutex_init(m, NULL); } int threading_mutex_lock(threading_mutex m) { - return pthread_mutex_lock(&m->impl); + return pthread_mutex_lock(m); } int threading_mutex_try_lock(threading_mutex m) { - return pthread_mutex_trylock(&m->impl); + return pthread_mutex_trylock(m); } int threading_mutex_unlock(threading_mutex m) { - return pthread_mutex_unlock(&m->impl); + return pthread_mutex_unlock(m); } int threading_mutex_destroy(threading_mutex m) { - return pthread_mutex_destroy(&m->impl); + return pthread_mutex_destroy(m); } diff --git a/source/threading/source/threading_mutex_win32.c b/source/threading/source/threading_mutex_win32.c index 16739c50d9..19cdef9feb 100644 --- a/source/threading/source/threading_mutex_win32.c +++ b/source/threading/source/threading_mutex_win32.c @@ -22,25 +22,23 @@ #include -#include - int threading_mutex_initialize(threading_mutex m) { - InitializeCriticalSection(&m->impl); + InitializeCriticalSection(m); return 0; } int threading_mutex_lock(threading_mutex m) { - EnterCriticalSection(&m->impl); + EnterCriticalSection(m); return 0; } int threading_mutex_try_lock(threading_mutex m) { - if (TryEnterCriticalSection(&m->impl) == 0) + if (TryEnterCriticalSection(m) == 0) { return 1; } @@ -50,14 +48,14 @@ int threading_mutex_try_lock(threading_mutex m) int threading_mutex_unlock(threading_mutex m) { - LeaveCriticalSection(&m->impl); + LeaveCriticalSection(m); return 0; } int threading_mutex_destroy(threading_mutex m) { - DeleteCriticalSection(&m->impl); + DeleteCriticalSection(m); return 0; } From 64a6150f48a00975420a3a37a7724d65db8f5a23 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 5 Feb 2025 06:16:24 +0100 Subject: [PATCH 025/364] Add proper link flags for node_loader on macos. --- source/loaders/node_loader/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index f1803877aa..d372ccdb09 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -199,7 +199,7 @@ target_compile_options(${target} add_link_options(${target} PRIVATE - $<$,$>:-undefined dynamic_lookup> + $<$,$>:-Wl,-undefined,dynamic_lookup> PUBLIC ${DEFAULT_LINKER_OPTIONS} From f6789193db2945857e15b942aa44fbde34959d1a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 12 Feb 2025 23:22:29 +0100 Subject: [PATCH 026/364] Add basic atexit support in portability. --- source/log/CMakeLists.txt | 1 + source/log/source/log_singleton.c | 4 +- source/metacall/CMakeLists.txt | 4 +- source/metacall/source/metacall.c | 8 +- source/metacall/source/metacall_link.c | 11 +- source/portability/CMakeLists.txt | 2 + .../include/portability/portability_atexit.h | 63 ++++++++ .../portability/source/portability_atexit.c | 139 ++++++++++++++++++ 8 files changed, 226 insertions(+), 6 deletions(-) create mode 100644 source/portability/include/portability/portability_atexit.h create mode 100644 source/portability/source/portability_atexit.c diff --git a/source/log/CMakeLists.txt b/source/log/CMakeLists.txt index 79c9c9ff9b..556c17aae7 100644 --- a/source/log/CMakeLists.txt +++ b/source/log/CMakeLists.txt @@ -180,6 +180,7 @@ target_link_libraries(${target} ${META_PROJECT_NAME}::preprocessor ${META_PROJECT_NAME}::format ${META_PROJECT_NAME}::threading + ${META_PROJECT_NAME}::portability PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/log/source/log_singleton.c b/source/log/source/log_singleton.c index 39d326e64e..4b7863d8a8 100644 --- a/source/log/source/log_singleton.c +++ b/source/log/source/log_singleton.c @@ -9,6 +9,8 @@ #include #include +#include + #include /* -- Definitions -- */ @@ -98,7 +100,7 @@ log_singleton log_singleton_instance_impl(void) abort(); } - if (atexit(&log_atexit_callback) != 0) + if (portability_atexit_register(&log_atexit_callback) != 0) { if (log_singleton_destroy() != 0) { diff --git a/source/metacall/CMakeLists.txt b/source/metacall/CMakeLists.txt index e04b167e8a..ec669d7f0f 100644 --- a/source/metacall/CMakeLists.txt +++ b/source/metacall/CMakeLists.txt @@ -200,6 +200,8 @@ target_link_libraries(${target} PUBLIC ${DEFAULT_LIBRARIES} + $<$:${CMAKE_DL_LIBS}> # Native dynamic load library + INTERFACE ) @@ -248,8 +250,6 @@ add_link_options(${target} PUBLIC ${DEFAULT_LINKER_OPTIONS} - $<$:${CMAKE_DL_LIBS}> # Native dynamic load library - INTERFACE ) diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 3fcc54b8cc..2fdc314b56 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -37,6 +37,7 @@ #include +#include #include #include @@ -82,6 +83,9 @@ portability_constructor(metacall_constructor) { const char *metacall_host = environment_variable_get("METACALL_HOST", NULL); + /* Initialize at exit handlers */ + portability_atexit_initialize(); + /* We are running from a different host, initialize the loader of the host * and redirect it to the existing symbols, also avoiding initialization * and destruction of the runtime as it is being managed externally to MetaCall */ @@ -113,7 +117,7 @@ portability_constructor(metacall_constructor) } /* Register the destructor on exit */ - atexit(metacall_destroy); + portability_atexit_register(metacall_destroy); } } } @@ -277,7 +281,7 @@ int metacall_initialize(void) #endif /* METACALL_FORK_SAFE */ /* Define destructor for detouring (it must be executed at the end to prevent problems with fork mechanisms) */ - atexit(metacall_detour_destructor); + portability_atexit_register(metacall_detour_destructor); } /* Initialize configuration and serializer */ diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 1124c9d2d7..946d37a390 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -99,12 +99,14 @@ void *metacall_link_hook(void *handle, const char *symbol) metacall_link_func_ptr metacall_link_trampoline; + void *ptr; + threading_mutex_lock(&link_mutex); metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); /* Intercept function if any */ - void *ptr = set_get(metacall_link_table, (set_key)symbol); + ptr = set_get(metacall_link_table, (set_key)symbol); /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* log_write("metacall", LOG_LEVEL_DEBUG, "MetaCall detour link interception: %s -> %p", symbol, ptr); */ @@ -129,6 +131,13 @@ int metacall_link_initialize(void) { detour d = detour_create(metacall_detour()); + if (threading_mutex_initialize(&link_mutex) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid link mutex initialization"); + + return 1; + } + if (detour_link_handle == NULL) { detour_link_handle = detour_install(d, (void (*)(void))metacall_link_func(), (void (*)(void))(&metacall_link_hook)); diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index fab62a9214..65b9dd1f2e 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -40,6 +40,7 @@ set(headers ${include_path}/portability_library_path.h ${include_path}/portability_working_path.h ${include_path}/portability_path.h + ${include_path}/portability_atexit.h ) set(sources @@ -48,6 +49,7 @@ set(sources ${source_path}/portability_library_path.c ${source_path}/portability_working_path.c ${source_path}/portability_path.c + ${source_path}/portability_atexit.c ) # Group source files diff --git a/source/portability/include/portability/portability_atexit.h b/source/portability/include/portability/portability_atexit.h new file mode 100644 index 0000000000..78c107b1a1 --- /dev/null +++ b/source/portability/include/portability/portability_atexit.h @@ -0,0 +1,63 @@ +/* + * Portability Library by Parra Studios + * A generic cross-platform portability utility. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PORTABILITY_ATEXIT_H +#define PORTABILITY_ATEXIT_H 1 + +/* -- Headers -- */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Type Definitions -- */ + +typedef void (*portability_atexit_fn)(void); + +/* -- Methods -- */ + +/** +* @brief +* Initialize atexit instance for custom at exit handlers +* +* @return +* Zero if success, different from zero otherwise +*/ +PORTABILITY_API int portability_atexit_initialize(void); + +/** +* @brief +* Register handler to be run at exit +* +* @param[in] handler +* Function pointer to the handler that will be executed at exit +* +* @return +* Zero if success, different from zero otherwise +*/ +PORTABILITY_API int portability_atexit_register(portability_atexit_fn handler); + +#ifdef __cplusplus +} +#endif + +#endif /* PORTABILITY_ATEXIT_H */ diff --git a/source/portability/source/portability_atexit.c b/source/portability/source/portability_atexit.c new file mode 100644 index 0000000000..d08ee3653f --- /dev/null +++ b/source/portability/source/portability_atexit.c @@ -0,0 +1,139 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* -- Headers -- */ + +#include + +#include + +/* -- Member Data -- */ + +struct atexit_node_type +{ + portability_atexit_fn handler; + struct atexit_node_type *next; +}; + +/* -- Private Variables -- */ + +static struct atexit_node_type *atexit_list = NULL; + +/* -- Private Methods -- */ + +static void portability_atexit_destroy(void) +{ + if (atexit_list != NULL) + { + do + { + struct atexit_node_type *prev = atexit_list; + + atexit_list = prev->next; + + if (prev->handler != NULL) + { + prev->handler(); + } + + free(prev); + } while (atexit_list != NULL); + + atexit_list = NULL; + } +} + +/* -- Methods -- */ + +int portability_atexit_initialize(void) +{ + static int atexit_registered = 0; + + if (atexit_list == NULL) + { + atexit_list = malloc(sizeof(struct atexit_node_type)); + + if (atexit_list == NULL) + { + return 1; + } + + atexit_list->handler = NULL; + atexit_list->next = NULL; + } + + if (atexit_registered == 0) + { + atexit(&portability_atexit_destroy); + atexit_registered = 1; + } + + return 0; +} + +int portability_atexit_register(portability_atexit_fn handler) +{ + if (atexit_list == NULL) + { + return 1; + } + + if (atexit_list->handler == NULL) + { + atexit_list->handler = handler; + } + else + { + struct atexit_node_type *iterator = atexit_list; + + /* Find the last or duplicates */ + for (;;) + { + if (iterator->handler == handler) + { + /* Already registered, skip */ + return 1; + } + + if (iterator->next == NULL) + { + break; + } + + iterator = iterator->next; + } + + /* Allocate the new node */ + struct atexit_node_type *node = malloc(sizeof(struct atexit_node_type)); + + if (node == NULL) + { + return 1; + } + + node->handler = handler; + node->next = atexit_list; + + /* Insert it at the begining */ + atexit_list = node; + } + + return 0; +} From 9ba88287f5b33f3205e0c92b99c904d8842fa1b4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 13 Feb 2025 00:37:25 +0200 Subject: [PATCH 027/364] Revert "Bump store2 in /source/scripts/node/gram/source/gram (#541)" This reverts commit ce9b9e66eb4840e184ace22c309f1dca35659c88. --- .../scripts/node/gram/source/gram/package-lock.json | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/scripts/node/gram/source/gram/package-lock.json b/source/scripts/node/gram/source/gram/package-lock.json index 1f9839313d..27be43c05d 100644 --- a/source/scripts/node/gram/source/gram/package-lock.json +++ b/source/scripts/node/gram/source/gram/package-lock.json @@ -310,10 +310,9 @@ } }, "node_modules/store2": { - "version": "2.14.4", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.4.tgz", - "integrity": "sha512-srTItn1GOvyvOycgxjAnPA63FZNwy0PTyUBFMHRM+hVFltAeoh0LmNBz9SZqUS9mMqGk8rfyWyXn3GH5ReJ8Zw==", - "license": "MIT" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", + "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" }, "node_modules/telegram": { "version": "1.7.19", @@ -670,9 +669,9 @@ "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=" }, "store2": { - "version": "2.14.4", - "resolved": "https://registry.npmjs.org/store2/-/store2-2.14.4.tgz", - "integrity": "sha512-srTItn1GOvyvOycgxjAnPA63FZNwy0PTyUBFMHRM+hVFltAeoh0LmNBz9SZqUS9mMqGk8rfyWyXn3GH5ReJ8Zw==" + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/store2/-/store2-2.12.0.tgz", + "integrity": "sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==" }, "telegram": { "version": "1.7.19", From 037296f7a901e0949fe438ff371a86c5b161d52a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 12 Feb 2025 23:54:02 +0100 Subject: [PATCH 028/364] Add init of atexit in logs. --- source/log/source/log_singleton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/log/source/log_singleton.c b/source/log/source/log_singleton.c index 4b7863d8a8..cd6aefa400 100644 --- a/source/log/source/log_singleton.c +++ b/source/log/source/log_singleton.c @@ -100,6 +100,9 @@ log_singleton log_singleton_instance_impl(void) abort(); } + /* Initialize at exit handlers */ + portability_atexit_initialize(); + if (portability_atexit_register(&log_atexit_callback) != 0) { if (log_singleton_destroy() != 0) From fc940c78d0b8446498def1c16047f4037904825c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 13 Feb 2025 17:20:33 +0100 Subject: [PATCH 029/364] Solve issue with windows lib names. --- source/loaders/node_loader/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index d372ccdb09..4dd360fe04 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -240,6 +240,7 @@ if(NodeJS_LIBRARY_NAME_PATH AND WIN32) ) get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY_NAME_PATH}" NAME) + set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY_NAME_PATH}") set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") elseif(NodeJS_BUILD_FROM_SOURCE AND NOT WIN32) install(FILES From 690556db102cf1ea6deeaf9eaa392327cc788aa2 Mon Sep 17 00:00:00 2001 From: Adarsh Dubey <84132532+inclinedadarsh@users.noreply.github.com> Date: Sat, 15 Feb 2025 18:06:21 +0000 Subject: [PATCH 030/364] feat: Add C loader support for node_port --- source/ports/node_port/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 6d15c028ec..2e4271c500 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -289,6 +289,8 @@ const file_extensions_to_tag = { tsx: 'ts', /* Rust Loader */ rs: 'rs', + /* C Loader */ + c: 'c', /* Note: By default js extension uses NodeJS loader instead of JavaScript V8 */ /* Probably in the future we can differenciate between them, but it is not trivial */ From d4fbdb211c8adc0c0a3f9da04e97607836cd125f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 21 Feb 2025 00:58:50 +0100 Subject: [PATCH 031/364] Improve node port types. --- source/ports/node_port/index.d.ts | 40 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/source/ports/node_port/index.d.ts b/source/ports/node_port/index.d.ts index 3be9a48091..e9fe6b2a2c 100644 --- a/source/ports/node_port/index.d.ts +++ b/source/ports/node_port/index.d.ts @@ -1,16 +1,26 @@ -declare module 'metacall' { - export function metacall(name: string, ...args: any): any; - export function metacallfms(name: string, buffer: string): any; - export function metacall_execution_path(tag: string, path: string): number; - export function metacall_load_from_file(tag: string, paths: string[]): number; - export function metacall_load_from_file_export(tag: string, paths: string[]): any; - export function metacall_load_from_memory(tag: string, code: string): number; - export function metacall_load_from_memory_export(tag: string, code: string): any; - export function metacall_load_from_package(tag: string, pkg: string): number; - export function metacall_load_from_package_export(tag: string, pkg: string): any; - export function metacall_load_from_configuration(path: string): number; - export function metacall_load_from_configuration_export(path: string): any; - export function metacall_inspect(): any; - export function metacall_handle(tag: string, name: string): any; - export function metacall_logs(): void; +declare module "metacall" { + export function metacall(name: string, ...args: any): any; + export function metacallfms(name: string, buffer: string): any; + export function metacall_await(name: string, ...args: any): any; + export function metacall_execution_path(tag: string, path: string): number; + export function metacall_load_from_file(tag: string, paths: string[]): number; + export function metacall_load_from_file_export( + tag: string, + paths: string[] + ): any; + export function metacall_load_from_memory(tag: string, code: string): number; + export function metacall_load_from_memory_export( + tag: string, + code: string + ): any; + export function metacall_load_from_package(tag: string, pkg: string): number; + export function metacall_load_from_package_export( + tag: string, + pkg: string + ): any; + export function metacall_load_from_configuration(path: string): number; + export function metacall_load_from_configuration_export(path: string): any; + export function metacall_inspect(): any; // TODO: Implement return type + export function metacall_handle(tag: string, name: string): any; + export function metacall_logs(): void; } From 7587d8ace357e510422e77d07f865f5c3f796d23 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 21 Feb 2025 00:59:33 +0100 Subject: [PATCH 032/364] Solve issues with funchook and rapid_json. --- cmake/InstallRapidJSON.cmake | 18 ++++++------- source/detours/CMakeLists.txt | 2 +- source/detours/funchook_detour/CMakeLists.txt | 25 +++++++------------ .../funchook_detour/scripts/download.bat.in | 12 --------- .../funchook_detour/scripts/download.sh.in | 9 ------- source/tests/detour_test/CMakeLists.txt | 2 +- .../tests/metacall_fork_test/CMakeLists.txt | 2 +- 7 files changed, 20 insertions(+), 50 deletions(-) delete mode 100755 source/detours/funchook_detour/scripts/download.bat.in delete mode 100755 source/detours/funchook_detour/scripts/download.sh.in diff --git a/cmake/InstallRapidJSON.cmake b/cmake/InstallRapidJSON.cmake index 8b4bc960d0..44938fceb0 100644 --- a/cmake/InstallRapidJSON.cmake +++ b/cmake/InstallRapidJSON.cmake @@ -28,19 +28,17 @@ if(NOT RAPIDJSON_FOUND OR USE_BUNDLED_RAPIDJSON) endif() ExternalProject_Add(rapid-json-depends - GIT_REPOSITORY "https://github.com/Tencent/rapidjson.git" - GIT_TAG "${RAPIDJSON_VERSION}" - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX= - -DRAPIDJSON_BUILD_DOC=Off - -DRAPIDJSON_BUILD_EXAMPLES=Off - -DRAPIDJSON_BUILD_TESTS=Off - TEST_COMMAND "" + GIT_REPOSITORY "https://github.com/Tencent/rapidjson.git" + GIT_TAG "${RAPIDJSON_VERSION}" + BUILD_COMMAND "" + CONFIGURE_COMMAND "" + INSTALL_COMMAND "" + TEST_COMMAND "" ) - ExternalProject_Get_Property(rapid-json-depends INSTALL_DIR) + ExternalProject_Get_Property(rapid-json-depends SOURCE_DIR) - set(RAPIDJSON_ROOT_DIR ${INSTALL_DIR}) + set(RAPIDJSON_ROOT_DIR ${SOURCE_DIR}) set(RAPIDJSON_INCLUDE_DIRS ${RAPIDJSON_ROOT_DIR}/include) set(RAPIDJSON_FOUND TRUE) diff --git a/source/detours/CMakeLists.txt b/source/detours/CMakeLists.txt index 366f9f42ce..c1f851b977 100644 --- a/source/detours/CMakeLists.txt +++ b/source/detours/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if detours are enabled -if(NOT OPTION_FORK_SAFE OR NOT OPTION_BUILD_DETOURS) +if(NOT OPTION_BUILD_DETOURS) return() endif() diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index a822ca631c..74c39ef676 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if this detour is enabled -if(NOT OPTION_FORK_SAFE OR NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) +if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) return() endif() @@ -17,43 +17,36 @@ include(ExternalProject) set(FUNCHOOK_VERSION 1.1.3) if(WIN32) - set(FUNCHOOK_LIBRARY_PREFIX "") set(FUNCHOOK_LIBRARY_SUFFIX "lib") set(FUNCHOOK_LIBRARY_INSTALL_SUFFIX "dll") elseif(APPLE) - set(FUNCHOOK_LIBRARY_PREFIX "lib") set(FUNCHOOK_LIBRARY_SUFFIX "dylib") - set(FUNCHOOK_LIBRARY_INSTALL_SUFFIX "dylib") else() - set(FUNCHOOK_LIBRARY_PREFIX "lib") set(FUNCHOOK_LIBRARY_SUFFIX "so") - set(FUNCHOOK_LIBRARY_INSTALL_SUFFIX "so") endif() set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") if(WIN32) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/download.bat.in ${CMAKE_CURRENT_BINARY_DIR}/download.bat @ONLY) - set(FUNCHOOK_DOWNLOAD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/download.bat) set(FUNCHOOK_BUILD_TARGET "INSTALL") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") else() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/download.sh.in ${CMAKE_CURRENT_BINARY_DIR}/download.sh @ONLY) - set(FUNCHOOK_DOWNLOAD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/download.sh) set(FUNCHOOK_BUILD_TARGET "install") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") endif() set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") +set(FUNCHOOK_CMAKE_INSTALL_BINDIR "${PROJECT_OUTPUT_DIR}") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") -set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_SUFFIX}") -set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") -ExternalProject_Add( - ${target_depends} +ExternalProject_Add(${target_depends} PREFIX funchook SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} - DOWNLOAD_COMMAND ${FUNCHOOK_DOWNLOAD_COMMAND} - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . + DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" + CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_INSTALL_BINDIR=${FUNCHOOK_CMAKE_INSTALL_BINDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} UPDATE_COMMAND "" BUILD_IN_SOURCE ON diff --git a/source/detours/funchook_detour/scripts/download.bat.in b/source/detours/funchook_detour/scripts/download.bat.in deleted file mode 100755 index a2702001b5..0000000000 --- a/source/detours/funchook_detour/scripts/download.bat.in +++ /dev/null @@ -1,12 +0,0 @@ -@echo on - -rem Download repository if it does not exist -if not exist "@FUNCHOOK_SOURCE_DIR@/.git" ( - if exist "@FUNCHOOK_SOURCE_DIR@" ( - rmdir /S /Q "@FUNCHOOK_SOURCE_DIR@" - ) - "@GIT_EXECUTABLE@" clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git "@FUNCHOOK_SOURCE_DIR@" -) - -rem Write empty CMake file to avoid cmake warnings -copy /y nul "@FUNCHOOK_SOURCE_DIR@/CMakeLists.txt" diff --git a/source/detours/funchook_detour/scripts/download.sh.in b/source/detours/funchook_detour/scripts/download.sh.in deleted file mode 100755 index 122a268bf9..0000000000 --- a/source/detours/funchook_detour/scripts/download.sh.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh - -# Download repository if it does not exist -if [ ! -d "@FUNCHOOK_SOURCE_DIR@/.git" ]; then - if [ -d "@FUNCHOOK_SOURCE_DIR@" ]; then - rm -rf "@FUNCHOOK_SOURCE_DIR@" - fi - "@GIT_EXECUTABLE@" clone --single-branch --branch v@FUNCHOOK_VERSION@ --recursive https://github.com/kubo/funchook.git "@FUNCHOOK_SOURCE_DIR@" -fi diff --git a/source/tests/detour_test/CMakeLists.txt b/source/tests/detour_test/CMakeLists.txt index 1e96fa5a0f..b84f0f4a5f 100644 --- a/source/tests/detour_test/CMakeLists.txt +++ b/source/tests/detour_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if detours are enabled -if(NOT OPTION_FORK_SAFE OR NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) +if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) return() endif() diff --git a/source/tests/metacall_fork_test/CMakeLists.txt b/source/tests/metacall_fork_test/CMakeLists.txt index d7f19ff1ea..0c526d744d 100644 --- a/source/tests/metacall_fork_test/CMakeLists.txt +++ b/source/tests/metacall_fork_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if detours are enabled -if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_FORK_SAFE) +if(NOT OPTION_FORK_SAFE OR NOT OPTION_BUILD_DETOURS) return() endif() From b8e6f32a752d1ef3afa9be341c8d84586638fdb8 Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 21 Feb 2025 13:11:28 +0530 Subject: [PATCH 033/364] Add Workflow for Multi-Architecture Docker Image Build, Push, and Manifest Management (#535) * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Fix issue in tag --------- Co-authored-by: Yasindu Dissanayake Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- .github/workflows/docker-hub-platform.yml | 181 +++++++++++----------- 1 file changed, 89 insertions(+), 92 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index 32f9fe5d2f..db4f323f1d 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -14,7 +14,9 @@ concurrency: cancel-in-progress: true env: - IMAGE_NAME: index.docker.io/metacall/core + DOCKER_REGISTRY: index.docker.io + DOCKER_USERNAME: metacall + IMAGE_NAME: core BUILDKIT_VERSION: 0.13.0 jobs: @@ -26,41 +28,28 @@ jobs: matrix: platform: - linux/amd64 + - linux/386 - linux/arm64 - linux/riscv64 - linux/ppc64le - linux/s390x - - linux/386 - linux/arm/v7 - linux/arm/v6 - # - linux/mips64le - # - linux/mips64 - steps: - - name: Checkout the code + - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - name: Docker Setup BuildX + - name: Set up Docker BuildX uses: docker/setup-buildx-action@v3 with: version: v${{ env.BUILDKIT_VERSION }} - - name: Verify Docker BuildX Version - run: docker buildx version - - - name: Authenticate to Docker registry - if: github.event_name != 'pull_request' + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} @@ -72,93 +61,101 @@ jobs: run: | ./docker-compose.sh platform - # - name: Generate images - # if: github.event_name != 'pull_request' - # run: | - # for tag in "deps" "dev" "runtime" "cli"; do - # mkdir -p "/tmp/images/${tag}" - # digest="$(docker images --no-trunc --quiet metacall/core:${tag})" - # echo "FROM metacall/core:${tag}@${digest}" &> "/tmp/images/${tag}/Dockerfile" - # done - - # - name: Build and push by digest (deps) - # id: build - # uses: docker/build-push-action@v6 - # if: github.event_name != 'pull_request' - # with: - # context: /tmp/images/deps/Dockerfile - # platforms: ${{ matrix.platform }} - # labels: ${{ steps.meta.outputs.labels }} - # outputs: type=image,name=docker.io/${{ env.IMAGE_NAME }}:deps,push-by-digest=true,name-canonical=true,push=true - - - name: Export digests - if: github.event_name != 'pull_request' + - name: Tag Platform Images run: | - PLATFORM=${{ matrix.platform }} - echo "PLATFORM=${PLATFORM//\//-}" >> $GITHUB_ENV + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + echo "Platform Tag: ${platform_tag}" for tag in "deps" "dev" "runtime" "cli"; do - mkdir -p "/tmp/digests/${tag}" - digest="$(docker images --no-trunc --quiet metacall/core:${tag})" - touch "/tmp/digests/${tag}/${digest#sha256:}" + docker tag metacall/${IMAGE_NAME}:${tag} \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} done - - name: Upload digests - if: github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 + - name: Push Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + for tag in "deps" "dev" "runtime" "cli"; do + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done - merge: - name: Merge digests for the manifest + - name: Run Tests + run: | + set -exuo pipefail + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + cat < Dockerfile.test + FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + RUN echo "console.log('abcde')" > script.js + RUN metacallcli script.js + EOF + + docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker run --rm --platform=${{ matrix.platform }} test-image + + manifest: + name: Create and Push Manifest Lists + needs: build runs-on: ubuntu-latest - if: github.event_name != 'pull_request' - needs: - - build steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: v${{ env.BUILDKIT_VERSION }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - - - name: Authenticate to Docker registry + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Create manifest list and push - if: github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/') + - name: Create and Push Manifest Lists run: | for tag in "deps" "dev" "runtime" "cli"; do - cd "/tmp/digests/${tag}" - IMAGE_HASHES=$(printf '${{ env.IMAGE_NAME }}:${tag}@sha256:%s ' *) - for image in ${IMAGE_HASHES}; do - docker image tag ${image} ${{ env.IMAGE_NAME }}:${tag} - docker push ${{ env.IMAGE_NAME }}:${tag} + echo "Creating manifest for tag: $tag" + platform_tags="" + for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + echo "Creating manifest with tags: ${platform_tags}" + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} + done + + - name: Create Version Specific Tags + if: startsWith(github.ref, 'refs/tags/') + run: | + VERSION=${GITHUB_REF#refs/tags/v} + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + for tag in "${tags[@]}"; do + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + done + + cli_platform_tags="" + for platform in ${{ matrix.platform }}; do + cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + + cleanup: + name: Cleanup Platform Specific Tags + needs: [build, manifest] + runs-on: ubuntu-latest + if: always() + steps: + - name: Remove Platform-Specific Tags + run: | + platforms=("linux-amd64" "linux-386" "linux-arm64" "linux-riscv64" "linux-ppc64le" "linux-s390x" "linux-arm-v7" "linux-arm-v6") + tags=("deps" "dev" "runtime" "cli") + + for platform in "${platforms[@]}"; do + for tag in "${tags[@]}"; do + tag_to_delete="${tag}-${platform}" + echo "Deleting tag: ${tag_to_delete}" + + curl -X DELETE \ + -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ + "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" done - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${tag} ${IMAGE_HASHES} - if [[ "${tag}" = "cli" ]]; then - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest ${IMAGE_HASHES} - if [[ "${{ contains(github.ref, 'refs/tags/') }}" = true ]]; then - TAG=${GITHUB_REF#refs/*/} - VERSION=${TAG#v} - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${VERSION} ${IMAGE_HASHES} - fi - fi done From 12c3077e09b62d6d86817310b7a3a8f9ec9e3a0f Mon Sep 17 00:00:00 2001 From: Yasindu Dissanayake Date: Fri, 21 Feb 2025 13:11:28 +0530 Subject: [PATCH 034/364] Add Workflow for Multi-Architecture Docker Image Build, Push, and Manifest Management (#535) * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Update docker-hub-platform.yml * Fix issue in tag --------- Co-authored-by: Yasindu Dissanayake Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- .github/workflows/docker-hub-platform.yml | 181 +++++++++++----------- 1 file changed, 89 insertions(+), 92 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index 32f9fe5d2f..db4f323f1d 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -14,7 +14,9 @@ concurrency: cancel-in-progress: true env: - IMAGE_NAME: index.docker.io/metacall/core + DOCKER_REGISTRY: index.docker.io + DOCKER_USERNAME: metacall + IMAGE_NAME: core BUILDKIT_VERSION: 0.13.0 jobs: @@ -26,41 +28,28 @@ jobs: matrix: platform: - linux/amd64 + - linux/386 - linux/arm64 - linux/riscv64 - linux/ppc64le - linux/s390x - - linux/386 - linux/arm/v7 - linux/arm/v6 - # - linux/mips64le - # - linux/mips64 - steps: - - name: Checkout the code + - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - name: Docker Setup BuildX + - name: Set up Docker BuildX uses: docker/setup-buildx-action@v3 with: version: v${{ env.BUILDKIT_VERSION }} - - name: Verify Docker BuildX Version - run: docker buildx version - - - name: Authenticate to Docker registry - if: github.event_name != 'pull_request' + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} @@ -72,93 +61,101 @@ jobs: run: | ./docker-compose.sh platform - # - name: Generate images - # if: github.event_name != 'pull_request' - # run: | - # for tag in "deps" "dev" "runtime" "cli"; do - # mkdir -p "/tmp/images/${tag}" - # digest="$(docker images --no-trunc --quiet metacall/core:${tag})" - # echo "FROM metacall/core:${tag}@${digest}" &> "/tmp/images/${tag}/Dockerfile" - # done - - # - name: Build and push by digest (deps) - # id: build - # uses: docker/build-push-action@v6 - # if: github.event_name != 'pull_request' - # with: - # context: /tmp/images/deps/Dockerfile - # platforms: ${{ matrix.platform }} - # labels: ${{ steps.meta.outputs.labels }} - # outputs: type=image,name=docker.io/${{ env.IMAGE_NAME }}:deps,push-by-digest=true,name-canonical=true,push=true - - - name: Export digests - if: github.event_name != 'pull_request' + - name: Tag Platform Images run: | - PLATFORM=${{ matrix.platform }} - echo "PLATFORM=${PLATFORM//\//-}" >> $GITHUB_ENV + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + echo "Platform Tag: ${platform_tag}" for tag in "deps" "dev" "runtime" "cli"; do - mkdir -p "/tmp/digests/${tag}" - digest="$(docker images --no-trunc --quiet metacall/core:${tag})" - touch "/tmp/digests/${tag}/${digest#sha256:}" + docker tag metacall/${IMAGE_NAME}:${tag} \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} done - - name: Upload digests - if: github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM }} - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 + - name: Push Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + for tag in "deps" "dev" "runtime" "cli"; do + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done - merge: - name: Merge digests for the manifest + - name: Run Tests + run: | + set -exuo pipefail + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + cat < Dockerfile.test + FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + RUN echo "console.log('abcde')" > script.js + RUN metacallcli script.js + EOF + + docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker run --rm --platform=${{ matrix.platform }} test-image + + manifest: + name: Create and Push Manifest Lists + needs: build runs-on: ubuntu-latest - if: github.event_name != 'pull_request' - needs: - - build steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: /tmp/digests - pattern: digests-* - merge-multiple: true - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: v${{ env.BUILDKIT_VERSION }} - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.IMAGE_NAME }} - - - name: Authenticate to Docker registry + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - name: Create manifest list and push - if: github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/') + - name: Create and Push Manifest Lists run: | for tag in "deps" "dev" "runtime" "cli"; do - cd "/tmp/digests/${tag}" - IMAGE_HASHES=$(printf '${{ env.IMAGE_NAME }}:${tag}@sha256:%s ' *) - for image in ${IMAGE_HASHES}; do - docker image tag ${image} ${{ env.IMAGE_NAME }}:${tag} - docker push ${{ env.IMAGE_NAME }}:${tag} + echo "Creating manifest for tag: $tag" + platform_tags="" + for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + echo "Creating manifest with tags: ${platform_tags}" + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} + done + + - name: Create Version Specific Tags + if: startsWith(github.ref, 'refs/tags/') + run: | + VERSION=${GITHUB_REF#refs/tags/v} + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + for tag in "${tags[@]}"; do + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + done + + cli_platform_tags="" + for platform in ${{ matrix.platform }}; do + cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + + cleanup: + name: Cleanup Platform Specific Tags + needs: [build, manifest] + runs-on: ubuntu-latest + if: always() + steps: + - name: Remove Platform-Specific Tags + run: | + platforms=("linux-amd64" "linux-386" "linux-arm64" "linux-riscv64" "linux-ppc64le" "linux-s390x" "linux-arm-v7" "linux-arm-v6") + tags=("deps" "dev" "runtime" "cli") + + for platform in "${platforms[@]}"; do + for tag in "${tags[@]}"; do + tag_to_delete="${tag}-${platform}" + echo "Deleting tag: ${tag_to_delete}" + + curl -X DELETE \ + -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ + "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" done - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${tag} ${IMAGE_HASHES} - if [[ "${tag}" = "cli" ]]; then - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest ${IMAGE_HASHES} - if [[ "${{ contains(github.ref, 'refs/tags/') }}" = true ]]; then - TAG=${GITHUB_REF#refs/*/} - VERSION=${TAG#v} - docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:${VERSION} ${IMAGE_HASHES} - fi - fi done From d89b966e93bd4326085499b0d13b6038e932c2a5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 24 Feb 2025 23:36:56 +0100 Subject: [PATCH 035/364] Trying to solve issues macos. --- source/loaders/node_loader/CMakeLists.txt | 5 ++++- source/ports/node_port/index.js | 11 +++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 4dd360fe04..1f88155f1d 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -172,6 +172,9 @@ target_link_libraries(${target} target_compile_definitions(${target} PRIVATE $<$:NODEJS_LIBRARY_NAME="${NodeJS_LIBRARY_NAME}"> + $<$>:_LARGEFILE_SOURCE> + $<$>:_FILE_OFFSET_BITS=64> + $<$,$>:_DARWIN_USE_64_BIT_INODE=1> PUBLIC $<$>:${target_upper}_STATIC_DEFINE> @@ -199,7 +202,7 @@ target_compile_options(${target} add_link_options(${target} PRIVATE - $<$,$>:-Wl,-undefined,dynamic_lookup> + $<$,$>:-undefined dynamic_lookup> PUBLIC ${DEFAULT_LINKER_OPTIONS} diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 296e33e68a..44c264ae9c 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -25,20 +25,15 @@ const path = require('path'); const fs = require('fs'); const { URL } = require('url'); /* TODO: RPC Loader */ -const findFilesRecursively = (dirPattern, filePattern, depthLimit = Infinity) => { - const stack = [{ dir: dirPattern, depth: 0 }]; +const findFilesRecursively = (directory, filePattern, depthLimit = Infinity) => { + const stack = [{ dir: directory, depth: 0 }]; const files = []; - const dirRegex = new RegExp(dirPattern); const fileRegex = new RegExp(filePattern); while (stack.length > 0) { const { dir, depth } = stack.pop(); try { - if (!dirRegex.test(dir)) { - continue; - } - if (depth > depthLimit) { continue; } @@ -56,7 +51,7 @@ const findFilesRecursively = (dirPattern, filePattern, depthLimit = Infinity) => } } } catch (err) { - console.error(`Error reading directory ${dir}:`, err); + console.error(`Error reading directory '${dir}' while searching for MetaCall Library:`, err); } } From d73b40a3d129e783c7980da13ff8dfd8f6557768 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 24 Feb 2025 23:44:54 +0100 Subject: [PATCH 036/364] Solve issues in platform delete tag. --- .github/workflows/docker-hub-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index db4f323f1d..d97b7d738a 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -155,7 +155,7 @@ jobs: echo "Deleting tag: ${tag_to_delete}" curl -X DELETE \ - -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ - "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" + -u "${{ secrets.DOCKER_HUB_USERNAME }}:${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ + "https://cloud.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" done done From dfeb5595ba3431d9860f6a6017a1c5bca5887d2e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 01:08:03 +0100 Subject: [PATCH 037/364] Trying to test macos. --- source/loaders/node_loader/CMakeLists.txt | 4 +++- .../node_extension_test/CMakeLists.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 1f88155f1d..1592c141c2 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -202,7 +202,9 @@ target_compile_options(${target} add_link_options(${target} PRIVATE - $<$,$>:-undefined dynamic_lookup> + # $<$,$>:-Wl,-undefined,dynamic_lookup> + # $<$,$>:-undefined dynamic_lookup> + -Wl,-undefined,dynamic_lookup PUBLIC ${DEFAULT_LINKER_OPTIONS} diff --git a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt index ebd2867525..9cbd47bc16 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt @@ -177,7 +177,6 @@ add_link_options(${target} PRIVATE $<$:/IGNORE:4199> $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> - $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> $<$,$>:-undefined dynamic_lookup> PUBLIC From 2a92f107dde115aaa5f49acdd03a6b81db193233 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:03:45 +0100 Subject: [PATCH 038/364] Trying to solve delete tag in multiplatform builds. --- .github/workflows/docker-hub-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index d97b7d738a..b3d706e385 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -156,6 +156,6 @@ jobs: curl -X DELETE \ -u "${{ secrets.DOCKER_HUB_USERNAME }}:${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ - "https://cloud.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" + "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" done done From 0a40c7e407cefde43a7ce3a373fabf678adaab66 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:04:12 +0100 Subject: [PATCH 039/364] Set up backtrace plugin for Guix. --- .../plugins/backtrace_plugin/CMakeLists.txt | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index 866e7b9232..3d39838c1c 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -7,27 +7,28 @@ endif() # External dependencies # -include(FetchContent) +if(NOT OPTION_BUILD_GUIX) + include(FetchContent) -FetchContent_Declare(BackwardCpp - GIT_REPOSITORY https://github.com/bombela/backward-cpp - GIT_TAG f30744bcf726ea3735df7ecf9e9de9ddac540283 -) + FetchContent_Declare(BackwardCpp + GIT_REPOSITORY https://github.com/bombela/backward-cpp + GIT_TAG f30744bcf726ea3735df7ecf9e9de9ddac540283 + ) -FetchContent_MakeAvailable(BackwardCpp) + FetchContent_MakeAvailable(BackwardCpp) -FetchContent_GetProperties(BackwardCpp - SOURCE_DIR BackwardCpp_SOURCE - POPULATED BackwardCpp_POPULATED -) + FetchContent_GetProperties(BackwardCpp + SOURCE_DIR BackwardCpp_SOURCE + POPULATED BackwardCpp_POPULATED + ) -if(NOT BackwardCpp_POPULATED) - FetchContent_Populate(backward-cpp) + if(NOT BackwardCpp_POPULATED) + FetchContent_Populate(backward-cpp) + endif() endif() if(NOT BackwardCpp_POPULATED OR NOT BackwardCpp_SOURCE) message(STATUS "BackwardCpp could not be installed, trying to find it on the system") - return() endif() find_package(Backward From 72599a0795e3caaa857a6cdcbc18f108a3f0dad7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:04:56 +0100 Subject: [PATCH 040/364] MacOS with prebuilt node. --- tools/metacall-environment.sh | 105 ++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index d2983330bf..ee77b05d03 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -70,6 +70,13 @@ case "$(uname -s)" in *) OPERATIVE_SYSTEM="Unknown" esac +# Architecture detection +case "$(uname -m)" in + x86_64) ARCHITECTURE="amd64";; + arm64) ARCHITECTURE="arm64";; + *) ARCHITECTURE="Unknown";; +esac + # Check out for sudo if [ "`id -u`" = '0' ]; then SUDO_CMD="" @@ -520,57 +527,55 @@ sub_nodejs(){ $SUDO_CMD apk del .build-nodejs-python-deps fi elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then - # TODO: Fork https://github.com/puerts/backend-nodejs or let metacall build system compile NodeJS library itself - # if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then - # # Define node location - # NODE_PREFIX="$ROOT_DIR/build" - # # Include binaries into PATH - # export PATH="$NODE_PREFIX:$PATH" - - # # Create install path - # mkdir -p "$NODE_PREFIX" - # # Install NodeJS (TODO: Implement arm64 or amd64 detection into ${arch}) - # wget -qO- https://github.com/metacall/libnode/releases/download/v22.6.0/libnode-${arch}-macos.tar.xz | tar xvJ -C $NODE_PREFIX - # # Install NPM - # wget -qO- https://registry.npmjs.org/npm/-/npm-10.8.2.tgz | tar xvz -C $NODE_PREFIX - - # # Configure NodeJS paths - # mkdir -p "$ROOT_DIR/build" - # CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" - # echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/node" >> $CMAKE_CONFIG_PATH - # echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.127.dylib" >> $CMAKE_CONFIG_PATH - - # # Configure NPM path - # echo "-DNPM_ROOT=$NODE_PREFIX" >> $CMAKE_CONFIG_PATH - # else - - brew install node@22 - # Make node 22 the default - brew link node@22 --force --overwrite - # Execute post install scripts - brew postinstall node@22 - # Define node location - NODE_PREFIX=$(brew --prefix node@22) - # Include binaries into PATH - export PATH="$NODE_PREFIX/bin:$PATH" - - # Configure NodeJS paths - mkdir -p "$ROOT_DIR/build" - CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" - echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/bin/node" >> $CMAKE_CONFIG_PATH - # echo "-DNodeJS_INCLUDE_DIR=$NODE_PREFIX/include/node" >> $CMAKE_CONFIG_PATH - # echo "-DNodeJS_LIBRARY=$NODE_PREFIX/lib/libnode.93.dylib" >> $CMAKE_CONFIG_PATH - - # Configure NPM path - echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH - - if [ $INSTALL_C = 1 ]; then - # Required for test source/tests/metacall_node_port_c_lib_test - brew install libgit2@1.8 - brew link libgit2@1.8 --force --overwrite + # Build either using pre-compiled binaries or building node from source + if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then + # Define node location + NODE_PREFIX="$ROOT_DIR/build" + # Include binaries into PATH + export PATH="$NODE_PREFIX:$PATH" + + # Create install path + mkdir -p "$NODE_PREFIX" + + # Install NodeJS + wget -qO- https://github.com/metacall/libnode/releases/download/v22.6.0/libnode-${ARCHITECTURE}-macos.tar.xz | tar xvJ -C $NODE_PREFIX + + # Install NPM + wget -qO- https://registry.npmjs.org/npm/-/npm-10.8.2.tgz | tar xvz -C $NODE_PREFIX + + # Configure NodeJS paths + mkdir -p "$ROOT_DIR/build" + CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/node" >> $CMAKE_CONFIG_PATH + echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.127.dylib" >> $CMAKE_CONFIG_PATH + + # Configure NPM path + echo "-DNPM_ROOT=$NODE_PREFIX" >> $CMAKE_CONFIG_PATH + else + brew install node@22 + # Make node 22 the default + brew link node@22 --force --overwrite + # Execute post install scripts + brew postinstall node@22 + # Define node location + NODE_PREFIX=$(brew --prefix node@22) + # Include binaries into PATH + export PATH="$NODE_PREFIX/bin:$PATH" + + # Configure NodeJS paths + mkdir -p "$ROOT_DIR/build" + CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/bin/node" >> $CMAKE_CONFIG_PATH + + # Configure NPM path + echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + brew install libgit2@1.8 + brew link libgit2@1.8 --force --overwrite + fi fi - - # fi fi } From 7121254002143aecf1badc1018334321822b51cb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:05:10 +0100 Subject: [PATCH 041/364] Add debug for makefile. --- source/loaders/node_loader/CMakeLists.txt | 1 - tools/metacall-configure.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 1592c141c2..57ddc909da 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -204,7 +204,6 @@ add_link_options(${target} PRIVATE # $<$,$>:-Wl,-undefined,dynamic_lookup> # $<$,$>:-undefined dynamic_lookup> - -Wl,-undefined,dynamic_lookup PUBLIC ${DEFAULT_LINKER_OPTIONS} diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 206bc1e475..83eb973f24 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -532,7 +532,7 @@ sub_configure() { BUILD_STRING="$BUILD_STRING -DCMAKE_BUILD_TYPE=$BUILD_TYPE" # Execute CMake - cmake -Wno-dev -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. + cmake -Wno-dev -DCMAKE_VERBOSE_MAKEFILE=ON -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. } sub_help() { From bd1b230f054e700a6b161dd91a6dd24fa81965dc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:18:31 +0100 Subject: [PATCH 042/364] Solve npm issues macos. --- tools/metacall-environment.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index ee77b05d03..19e4e7fd20 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -532,7 +532,7 @@ sub_nodejs(){ # Define node location NODE_PREFIX="$ROOT_DIR/build" # Include binaries into PATH - export PATH="$NODE_PREFIX:$PATH" + export PATH="$NODE_PREFIX:$NODE_PREFIX/bin:$PATH" # Create install path mkdir -p "$NODE_PREFIX" @@ -550,7 +550,7 @@ sub_nodejs(){ echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.127.dylib" >> $CMAKE_CONFIG_PATH # Configure NPM path - echo "-DNPM_ROOT=$NODE_PREFIX" >> $CMAKE_CONFIG_PATH + echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH else brew install node@22 # Make node 22 the default From b1fca384079b64b12ed7fec208f35cdcf9e2ffd4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 17:37:25 +0100 Subject: [PATCH 043/364] Solve more npn issues. --- tools/metacall-environment.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 19e4e7fd20..f209566e1c 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -588,6 +588,11 @@ sub_typescript(){ $SUDO_CMD npm i react@latest -g $SUDO_CMD npm i react-dom@latest -g elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then + if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then + # Include NPM binaries into PATH + export PATH="$ROOT_DIR/build/bin:$PATH" + fi + # Install React dependencies in order to run the tests npm i react@latest -g npm i react-dom@latest -g From 62c181c5ef1138fe9513a8b1f9d5274ed7839072 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 18:06:14 +0100 Subject: [PATCH 044/364] Trying to solve macos. --- tools/metacall-environment.sh | 65 +++++++++++++---------------------- 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index f209566e1c..25a24eae0d 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -527,54 +527,42 @@ sub_nodejs(){ $SUDO_CMD apk del .build-nodejs-python-deps fi elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then + # Install NodeJS (required for source build or NPM itself) + brew install node@22 + # Make node 22 the default + brew link node@22 --force --overwrite + # Execute post install scripts + brew postinstall node@22 + # Define node location + NODE_PREFIX=$(brew --prefix node@22) + + # Configure NodeJS paths + mkdir -p "$ROOT_DIR/build" + CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + + # Configure NPM path + echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + # Build either using pre-compiled binaries or building node from source if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then # Define node location NODE_PREFIX="$ROOT_DIR/build" - # Include binaries into PATH - export PATH="$NODE_PREFIX:$NODE_PREFIX/bin:$PATH" - - # Create install path - mkdir -p "$NODE_PREFIX" - # Install NodeJS wget -qO- https://github.com/metacall/libnode/releases/download/v22.6.0/libnode-${ARCHITECTURE}-macos.tar.xz | tar xvJ -C $NODE_PREFIX - - # Install NPM - wget -qO- https://registry.npmjs.org/npm/-/npm-10.8.2.tgz | tar xvz -C $NODE_PREFIX - - # Configure NodeJS paths - mkdir -p "$ROOT_DIR/build" - CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + # Configure NodeJS path echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/node" >> $CMAKE_CONFIG_PATH - echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.127.dylib" >> $CMAKE_CONFIG_PATH - - # Configure NPM path - echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.so" >> $CMAKE_CONFIG_PATH else - brew install node@22 - # Make node 22 the default - brew link node@22 --force --overwrite - # Execute post install scripts - brew postinstall node@22 - # Define node location - NODE_PREFIX=$(brew --prefix node@22) # Include binaries into PATH export PATH="$NODE_PREFIX/bin:$PATH" - - # Configure NodeJS paths - mkdir -p "$ROOT_DIR/build" - CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + # Define executable path echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/bin/node" >> $CMAKE_CONFIG_PATH + fi - # Configure NPM path - echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH - - if [ $INSTALL_C = 1 ]; then - # Required for test source/tests/metacall_node_port_c_lib_test - brew install libgit2@1.8 - brew link libgit2@1.8 --force --overwrite - fi + if [ $INSTALL_C = 1 ]; then + # Required for test source/tests/metacall_node_port_c_lib_test + brew install libgit2@1.8 + brew link libgit2@1.8 --force --overwrite fi fi } @@ -588,11 +576,6 @@ sub_typescript(){ $SUDO_CMD npm i react@latest -g $SUDO_CMD npm i react-dom@latest -g elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then - if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then - # Include NPM binaries into PATH - export PATH="$ROOT_DIR/build/bin:$PATH" - fi - # Install React dependencies in order to run the tests npm i react@latest -g npm i react-dom@latest -g From 2baa0f4e5563d55358d857cf07ea20bd1f14c1fd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 18:17:12 +0100 Subject: [PATCH 045/364] Breaks make builds. --- tools/metacall-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 83eb973f24..206bc1e475 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -532,7 +532,7 @@ sub_configure() { BUILD_STRING="$BUILD_STRING -DCMAKE_BUILD_TYPE=$BUILD_TYPE" # Execute CMake - cmake -Wno-dev -DCMAKE_VERBOSE_MAKEFILE=ON -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. + cmake -Wno-dev -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. } sub_help() { From c97a026f25a989bdecdd0a8169f485f7631aa993 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 18:40:54 +0100 Subject: [PATCH 046/364] Solving issues with libnode. --- tools/metacall-environment.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 25a24eae0d..64982d14ee 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -548,10 +548,10 @@ sub_nodejs(){ # Define node location NODE_PREFIX="$ROOT_DIR/build" # Install NodeJS - wget -qO- https://github.com/metacall/libnode/releases/download/v22.6.0/libnode-${ARCHITECTURE}-macos.tar.xz | tar xvJ -C $NODE_PREFIX + wget -qO- https://github.com/metacall/libnode/releases/download/v22.9.0/libnode-${ARCHITECTURE}-macos.tar.xz | tar xvJ -C $NODE_PREFIX # Configure NodeJS path echo "-DNodeJS_EXECUTABLE=$NODE_PREFIX/node" >> $CMAKE_CONFIG_PATH - echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.so" >> $CMAKE_CONFIG_PATH + echo "-DNodeJS_LIBRARY=$NODE_PREFIX/libnode.dylib" >> $CMAKE_CONFIG_PATH else # Include binaries into PATH export PATH="$NODE_PREFIX/bin:$PATH" From 662cb9b2fc6d85540922c8f1580398255cb5f262 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 20:47:58 +0100 Subject: [PATCH 047/364] Trying to make node_loader work on macos. --- source/loaders/node_loader/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 57ddc909da..7df496c11a 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -192,6 +192,7 @@ target_compile_options(${target} PUBLIC ${DEFAULT_COMPILE_OPTIONS} + -Wl,-undefined,dynamic_lookup INTERFACE ) From 67b2b5b45a14c665323ed6b42a08a7618d11ca1e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 21:00:52 +0100 Subject: [PATCH 048/364] Trying to make node_loader work on macos 2. --- cmake/CompileOptions.cmake | 2 ++ source/loaders/node_loader/CMakeLists.txt | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index a5610945c3..c89fb89827 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -410,3 +410,5 @@ elseif(PROJECT_OS_HAIKU) -lpthread ) endif() + +set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 7df496c11a..57ddc909da 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -192,7 +192,6 @@ target_compile_options(${target} PUBLIC ${DEFAULT_COMPILE_OPTIONS} - -Wl,-undefined,dynamic_lookup INTERFACE ) From 7735599b3e7cd5da9be60a33f4090c6df54a4a63 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 21:18:34 +0100 Subject: [PATCH 049/364] Trying to make node_loader work on macos 3. --- cmake/CompileOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index c89fb89827..dfcecbe2ae 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -411,4 +411,4 @@ elseif(PROJECT_OS_HAIKU) ) endif() -set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup") From 3f737b02bdfea4e454220511a0c34fd6f2058071 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 21:41:54 +0100 Subject: [PATCH 050/364] Trying to make node_loader work on macos 4. --- cmake/CompileOptions.cmake | 2 -- source/loaders/node_loader/CMakeLists.txt | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index dfcecbe2ae..a5610945c3 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -410,5 +410,3 @@ elseif(PROJECT_OS_HAIKU) -lpthread ) endif() - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup") diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 57ddc909da..a448d89076 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -200,16 +200,18 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} - PRIVATE - # $<$,$>:-Wl,-undefined,dynamic_lookup> - # $<$,$>:-undefined dynamic_lookup> +set_target_properties(${target} PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup") - PUBLIC - ${DEFAULT_LINKER_OPTIONS} +# add_link_options(${target} +# PRIVATE +# # $<$,$>:-Wl,-undefined,dynamic_lookup> +# # $<$,$>:-undefined dynamic_lookup> - INTERFACE -) +# PUBLIC +# ${DEFAULT_LINKER_OPTIONS} + +# INTERFACE +# ) # # Standard options From 18e4aec6865ace48aa4415d633c1c9fa78b91b97 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 21:59:37 +0100 Subject: [PATCH 051/364] Trying to make node_loader work on macos 5. --- source/loaders/node_loader/CMakeLists.txt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index a448d89076..5536fa2023 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -200,18 +200,15 @@ target_compile_options(${target} # Linker options # -set_target_properties(${target} PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup") - -# add_link_options(${target} -# PRIVATE -# # $<$,$>:-Wl,-undefined,dynamic_lookup> -# # $<$,$>:-undefined dynamic_lookup> +target_link_options(${target} + PRIVATE + $<$,$>:-Wl,-undefined,dynamic_lookup> -# PUBLIC -# ${DEFAULT_LINKER_OPTIONS} + PUBLIC + ${DEFAULT_LINKER_OPTIONS} -# INTERFACE -# ) + INTERFACE +) # # Standard options From 7fbcce04056d9161e54f6b4f4da0fc9d01e3a4a6 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 22:45:43 +0100 Subject: [PATCH 052/364] Solve issues with macos link. --- source/adt/CMakeLists.txt | 2 +- source/benchmarks/log_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_cs_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_node_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_call_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_py_init_bench/CMakeLists.txt | 2 +- source/benchmarks/metacall_rb_call_bench/CMakeLists.txt | 2 +- source/cli/metacallcli/CMakeLists.txt | 2 +- source/cli/plugins/cli_core_plugin/CMakeLists.txt | 2 +- source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt | 2 +- source/configuration/CMakeLists.txt | 2 +- source/detour/CMakeLists.txt | 2 +- source/detours/funchook_detour/CMakeLists.txt | 2 +- source/dynlink/CMakeLists.txt | 2 +- source/environment/CMakeLists.txt | 2 +- source/examples/metacallgui/CMakeLists.txt | 2 +- source/examples/metacalllog/CMakeLists.txt | 2 +- source/examples/metacallquine/CMakeLists.txt | 2 +- source/examples/metacallweb/CMakeLists.txt | 2 +- source/extensions/plugin_extension/CMakeLists.txt | 2 +- source/filesystem/CMakeLists.txt | 2 +- source/format/CMakeLists.txt | 2 +- source/loader/CMakeLists.txt | 2 +- source/loaders/c_loader/CMakeLists.txt | 2 +- source/loaders/cob_loader/CMakeLists.txt | 2 +- source/loaders/cr_loader/CMakeLists.txt | 2 +- source/loaders/cs_loader/CMakeLists.txt | 2 +- source/loaders/dart_loader/CMakeLists.txt | 2 +- source/loaders/ext_loader/CMakeLists.txt | 2 +- source/loaders/file_loader/CMakeLists.txt | 2 +- source/loaders/java_loader/CMakeLists.txt | 2 +- source/loaders/jl_loader/CMakeLists.txt | 2 +- source/loaders/js_loader/CMakeLists.txt | 2 +- source/loaders/jsm_loader/CMakeLists.txt | 2 +- source/loaders/llvm_loader/CMakeLists.txt | 2 +- source/loaders/lua_loader/CMakeLists.txt | 2 +- source/loaders/mock_loader/CMakeLists.txt | 2 +- source/loaders/py_loader/CMakeLists.txt | 2 +- source/loaders/rb_loader/CMakeLists.txt | 2 +- source/loaders/rpc_loader/CMakeLists.txt | 2 +- source/loaders/rs_loader/CMakeLists.txt | 2 +- source/loaders/ts_loader/CMakeLists.txt | 2 +- source/loaders/wasm_loader/CMakeLists.txt | 2 +- source/log/CMakeLists.txt | 2 +- source/memory/CMakeLists.txt | 2 +- source/metacall/CMakeLists.txt | 2 +- source/plugin/CMakeLists.txt | 2 +- source/plugins/backtrace_plugin/CMakeLists.txt | 2 +- source/plugins/sandbox_plugin/CMakeLists.txt | 2 +- source/portability/CMakeLists.txt | 2 +- source/ports/cxx_port/CMakeLists.txt | 2 +- source/ports/js_port/CMakeLists.txt | 4 ++-- source/ports/rb_port/CMakeLists.txt | 2 +- source/preprocessor/CMakeLists.txt | 2 +- source/reflect/CMakeLists.txt | 2 +- source/scripts/extension/sum/CMakeLists.txt | 2 +- source/serial/CMakeLists.txt | 2 +- source/serials/metacall_serial/CMakeLists.txt | 2 +- source/serials/rapid_json_serial/CMakeLists.txt | 2 +- source/tests/adt_map_test/CMakeLists.txt | 2 +- source/tests/adt_set_test/CMakeLists.txt | 2 +- source/tests/adt_trie_test/CMakeLists.txt | 2 +- source/tests/adt_vector_test/CMakeLists.txt | 2 +- source/tests/configuration_test/CMakeLists.txt | 2 +- source/tests/detour_test/CMakeLists.txt | 2 +- source/tests/dynlink_test/CMakeLists.txt | 2 +- source/tests/environment_test/CMakeLists.txt | 2 +- source/tests/log_custom_test/CMakeLists.txt | 2 +- source/tests/log_test/CMakeLists.txt | 2 +- source/tests/metacall_backtrace_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_c_lib_test/CMakeLists.txt | 2 +- source/tests/metacall_c_test/CMakeLists.txt | 2 +- source/tests/metacall_callback_complex_test/CMakeLists.txt | 2 +- source/tests/metacall_cast_test/CMakeLists.txt | 2 +- source/tests/metacall_clear_test/CMakeLists.txt | 2 +- .../tests/metacall_cli_core_plugin_await_test/CMakeLists.txt | 2 +- source/tests/metacall_cli_core_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_cobol_test/CMakeLists.txt | 2 +- .../tests/metacall_configuration_default_test/CMakeLists.txt | 2 +- .../metacall_configuration_exec_path_test/CMakeLists.txt | 2 +- source/tests/metacall_cs_test/CMakeLists.txt | 2 +- source/tests/metacall_csharp_function_test/CMakeLists.txt | 2 +- source/tests/metacall_csharp_static_class_test/CMakeLists.txt | 2 +- source/tests/metacall_depends_test/CMakeLists.txt | 2 +- source/tests/metacall_distributable_test/CMakeLists.txt | 2 +- source/tests/metacall_ducktype_test/CMakeLists.txt | 2 +- source/tests/metacall_duplicated_handle_test/CMakeLists.txt | 2 +- source/tests/metacall_duplicated_symbols_test/CMakeLists.txt | 2 +- source/tests/metacall_dynlink_path_test/CMakeLists.txt | 2 +- source/tests/metacall_ext_test/CMakeLists.txt | 2 +- source/tests/metacall_file_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_file_glob_test/CMakeLists.txt | 2 +- source/tests/metacall_file_test/CMakeLists.txt | 2 +- source/tests/metacall_fork_test/CMakeLists.txt | 2 +- source/tests/metacall_function_test/CMakeLists.txt | 2 +- source/tests/metacall_handle_export_test/CMakeLists.txt | 2 +- source/tests/metacall_handle_get_test/CMakeLists.txt | 2 +- source/tests/metacall_init_fini_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_initialize_destroy_multiple_test/CMakeLists.txt | 2 +- source/tests/metacall_initialize_ex_test/CMakeLists.txt | 2 +- source/tests/metacall_initialize_test/CMakeLists.txt | 2 +- source/tests/metacall_inspect_test/CMakeLists.txt | 2 +- source/tests/metacall_integration_test/CMakeLists.txt | 2 +- source/tests/metacall_invalid_loader_test/CMakeLists.txt | 2 +- source/tests/metacall_java_test/CMakeLists.txt | 2 +- source/tests/metacall_julia_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- source/tests/metacall_llvm_test/CMakeLists.txt | 2 +- .../metacall_load_configuration_fail_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_load_configuration_relative_test/CMakeLists.txt | 2 +- source/tests/metacall_load_configuration_test/CMakeLists.txt | 2 +- source/tests/metacall_load_memory_empty_test/CMakeLists.txt | 2 +- source/tests/metacall_load_memory_test/CMakeLists.txt | 2 +- source/tests/metacall_logs_test/CMakeLists.txt | 2 +- source/tests/metacall_lua_test/CMakeLists.txt | 2 +- source/tests/metacall_map_await_test/CMakeLists.txt | 2 +- source/tests/metacall_map_test/CMakeLists.txt | 2 +- source/tests/metacall_node_async_multiple_test/CMakeLists.txt | 2 +- .../tests/metacall_node_async_resources_test/CMakeLists.txt | 2 +- source/tests/metacall_node_async_test/CMakeLists.txt | 2 +- source/tests/metacall_node_await_chain_test/CMakeLists.txt | 2 +- source/tests/metacall_node_call_test/CMakeLists.txt | 2 +- source/tests/metacall_node_callback_test/CMakeLists.txt | 2 +- source/tests/metacall_node_clear_mem_test/CMakeLists.txt | 2 +- source/tests/metacall_node_default_export_test/CMakeLists.txt | 2 +- .../tests/metacall_node_event_loop_signal_test/CMakeLists.txt | 2 +- source/tests/metacall_node_event_loop_test/CMakeLists.txt | 2 +- source/tests/metacall_node_exception_test/CMakeLists.txt | 2 +- source/tests/metacall_node_extension_test/CMakeLists.txt | 2 +- .../node_extension_test/CMakeLists.txt | 2 +- source/tests/metacall_node_fail_env_var_test/CMakeLists.txt | 2 +- source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt | 2 +- source/tests/metacall_node_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_node_inline_test/CMakeLists.txt | 2 +- .../metacall_node_multithread_deadlock_test/CMakeLists.txt | 2 +- source/tests/metacall_node_native_code_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_await_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_c_lib_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_rs_test/CMakeLists.txt | 2 +- source/tests/metacall_node_port_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_node_python_await_extended_test/CMakeLists.txt | 2 +- source/tests/metacall_node_python_await_test/CMakeLists.txt | 2 +- .../tests/metacall_node_python_deadlock_test/CMakeLists.txt | 2 +- .../tests/metacall_node_python_exception_test/CMakeLists.txt | 2 +- .../tests/metacall_node_python_port_mock_test/CMakeLists.txt | 2 +- .../tests/metacall_node_python_port_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_node_python_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_node_reentrant_test/CMakeLists.txt | 2 +- source/tests/metacall_node_signal_handler_test/CMakeLists.txt | 2 +- source/tests/metacall_node_test/CMakeLists.txt | 2 +- source/tests/metacall_node_typescript_test/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../tests/metacall_plugin_extension_local_test/CMakeLists.txt | 2 +- source/tests/metacall_plugin_extension_test/CMakeLists.txt | 2 +- source/tests/metacall_python_async_test/CMakeLists.txt | 2 +- source/tests/metacall_python_await_test/CMakeLists.txt | 2 +- source/tests/metacall_python_builtins_test/CMakeLists.txt | 2 +- source/tests/metacall_python_callback_test/CMakeLists.txt | 2 +- source/tests/metacall_python_dict_test/CMakeLists.txt | 2 +- source/tests/metacall_python_exception_test/CMakeLists.txt | 2 +- source/tests/metacall_python_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_python_gc_test/CMakeLists.txt | 2 +- source/tests/metacall_python_loader_port_test/CMakeLists.txt | 2 +- source/tests/metacall_python_model_test/CMakeLists.txt | 2 +- source/tests/metacall_python_node_await_test/CMakeLists.txt | 2 +- source/tests/metacall_python_object_class_test/CMakeLists.txt | 2 +- source/tests/metacall_python_open_test/CMakeLists.txt | 2 +- source/tests/metacall_python_pointer_test/CMakeLists.txt | 2 +- .../tests/metacall_python_port_callback_test/CMakeLists.txt | 2 +- source/tests/metacall_python_port_https_test/CMakeLists.txt | 2 +- source/tests/metacall_python_port_import_test/CMakeLists.txt | 2 +- source/tests/metacall_python_port_pointer_test/CMakeLists.txt | 2 +- source/tests/metacall_python_port_test/CMakeLists.txt | 2 +- source/tests/metacall_python_reentrant_test/CMakeLists.txt | 2 +- .../tests/metacall_python_relative_path_test/CMakeLists.txt | 2 +- source/tests/metacall_python_test/CMakeLists.txt | 2 +- source/tests/metacall_python_varargs_test/CMakeLists.txt | 2 +- .../metacall_python_without_env_vars_test/CMakeLists.txt | 2 +- .../metacall_python_without_functions_test/CMakeLists.txt | 2 +- source/tests/metacall_reinitialize_test/CMakeLists.txt | 2 +- source/tests/metacall_reload_functions_test/CMakeLists.txt | 2 +- source/tests/metacall_return_monad_test/CMakeLists.txt | 2 +- source/tests/metacall_rpc_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_object_class_test/CMakeLists.txt | 2 +- .../metacall_ruby_parser_integration_test/CMakeLists.txt | 2 +- .../tests/metacall_ruby_rails_integration_test/CMakeLists.txt | 2 +- source/tests/metacall_ruby_test/CMakeLists.txt | 2 +- source/tests/metacall_rust_class_test/CMakeLists.txt | 2 +- source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt | 2 +- .../metacall_rust_load_from_package_class_test/CMakeLists.txt | 2 +- .../metacall_rust_load_from_package_dep_test/CMakeLists.txt | 2 +- .../tests/metacall_rust_load_from_package_test/CMakeLists.txt | 2 +- source/tests/metacall_rust_test/CMakeLists.txt | 2 +- source/tests/metacall_sandbox_plugin_test/CMakeLists.txt | 2 +- source/tests/metacall_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_call_map_test/CMakeLists.txt | 2 +- .../tests/metacall_typescript_jsx_default_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_node_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_require_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_test/CMakeLists.txt | 2 +- .../metacall_typescript_tsx_loop_fail_test/CMakeLists.txt | 2 +- source/tests/metacall_typescript_tsx_test/CMakeLists.txt | 2 +- source/tests/metacall_version_test/CMakeLists.txt | 2 +- source/tests/metacall_wasm_python_port_test/CMakeLists.txt | 2 +- source/tests/metacall_wasm_test/CMakeLists.txt | 2 +- source/tests/portability_path_test/CMakeLists.txt | 2 +- source/tests/preprocessor_test/CMakeLists.txt | 2 +- source/tests/rb_loader_parser_test/CMakeLists.txt | 2 +- source/tests/reflect_function_test/CMakeLists.txt | 2 +- source/tests/reflect_metadata_test/CMakeLists.txt | 2 +- source/tests/reflect_object_class_test/CMakeLists.txt | 2 +- source/tests/reflect_scope_test/CMakeLists.txt | 2 +- source/tests/reflect_value_cast_test/CMakeLists.txt | 2 +- source/tests/serial_test/CMakeLists.txt | 2 +- source/threading/CMakeLists.txt | 2 +- source/version/CMakeLists.txt | 2 +- 224 files changed, 225 insertions(+), 225 deletions(-) diff --git a/source/adt/CMakeLists.txt b/source/adt/CMakeLists.txt index e97f2f59b0..6083509df2 100644 --- a/source/adt/CMakeLists.txt +++ b/source/adt/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/benchmarks/log_bench/CMakeLists.txt b/source/benchmarks/log_bench/CMakeLists.txt index 1c1175337a..f1ba5575ea 100644 --- a/source/benchmarks/log_bench/CMakeLists.txt +++ b/source/benchmarks/log_bench/CMakeLists.txt @@ -108,7 +108,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt b/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt index 751b4a0341..80db3ce393 100644 --- a/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_cs_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_node_call_bench/CMakeLists.txt b/source/benchmarks/metacall_node_call_bench/CMakeLists.txt index 8b9c696bb9..16ae8e7684 100644 --- a/source/benchmarks/metacall_node_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_node_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt b/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt index 0c0ee17bc3..08605fb08d 100644 --- a/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_c_api_bench/CMakeLists.txt @@ -121,7 +121,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_call_bench/CMakeLists.txt b/source/benchmarks/metacall_py_call_bench/CMakeLists.txt index bbc6b33763..9ed6744229 100644 --- a/source/benchmarks/metacall_py_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_py_init_bench/CMakeLists.txt b/source/benchmarks/metacall_py_init_bench/CMakeLists.txt index 1aff472c3f..eb9ecb2c79 100644 --- a/source/benchmarks/metacall_py_init_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_py_init_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt b/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt index fc66c3230f..4833bad0de 100644 --- a/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt +++ b/source/benchmarks/metacall_rb_call_bench/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/cli/metacallcli/CMakeLists.txt b/source/cli/metacallcli/CMakeLists.txt index 227a81cfd7..7d2183283e 100644 --- a/source/cli/metacallcli/CMakeLists.txt +++ b/source/cli/metacallcli/CMakeLists.txt @@ -139,7 +139,7 @@ target_compile_features(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/cli/plugins/cli_core_plugin/CMakeLists.txt b/source/cli/plugins/cli_core_plugin/CMakeLists.txt index 1e353e4d42..680417f11c 100644 --- a/source/cli/plugins/cli_core_plugin/CMakeLists.txt +++ b/source/cli/plugins/cli_core_plugin/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt b/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt index 3c777caf81..de380e948c 100644 --- a/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt +++ b/source/cli/plugins/cli_sandbox_plugin/CMakeLists.txt @@ -175,7 +175,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/configuration/CMakeLists.txt b/source/configuration/CMakeLists.txt index 6c5204d8f0..4097b1d549 100644 --- a/source/configuration/CMakeLists.txt +++ b/source/configuration/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/detour/CMakeLists.txt b/source/detour/CMakeLists.txt index fafc41c6fe..19e3a69195 100644 --- a/source/detour/CMakeLists.txt +++ b/source/detour/CMakeLists.txt @@ -157,7 +157,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index 74c39ef676..afd225e3d7 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -214,7 +214,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/dynlink/CMakeLists.txt b/source/dynlink/CMakeLists.txt index 33a62eaa77..8a9d6aed61 100644 --- a/source/dynlink/CMakeLists.txt +++ b/source/dynlink/CMakeLists.txt @@ -168,7 +168,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/environment/CMakeLists.txt b/source/environment/CMakeLists.txt index 34c36271b8..28b99aa951 100644 --- a/source/environment/CMakeLists.txt +++ b/source/environment/CMakeLists.txt @@ -150,7 +150,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/examples/metacallgui/CMakeLists.txt b/source/examples/metacallgui/CMakeLists.txt index 8bfa9b9588..485521f882 100644 --- a/source/examples/metacallgui/CMakeLists.txt +++ b/source/examples/metacallgui/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacalllog/CMakeLists.txt b/source/examples/metacalllog/CMakeLists.txt index 5a180105b1..6b4f8d234f 100644 --- a/source/examples/metacalllog/CMakeLists.txt +++ b/source/examples/metacalllog/CMakeLists.txt @@ -93,7 +93,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacallquine/CMakeLists.txt b/source/examples/metacallquine/CMakeLists.txt index 299a457627..0da78c404f 100644 --- a/source/examples/metacallquine/CMakeLists.txt +++ b/source/examples/metacallquine/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/examples/metacallweb/CMakeLists.txt b/source/examples/metacallweb/CMakeLists.txt index b4e9c095d2..6c81c8b2e1 100644 --- a/source/examples/metacallweb/CMakeLists.txt +++ b/source/examples/metacallweb/CMakeLists.txt @@ -99,7 +99,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/extensions/plugin_extension/CMakeLists.txt b/source/extensions/plugin_extension/CMakeLists.txt index 6873958a26..31baf3fbae 100644 --- a/source/extensions/plugin_extension/CMakeLists.txt +++ b/source/extensions/plugin_extension/CMakeLists.txt @@ -161,7 +161,7 @@ target_compile_features(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/filesystem/CMakeLists.txt b/source/filesystem/CMakeLists.txt index 472863df30..56024183dd 100644 --- a/source/filesystem/CMakeLists.txt +++ b/source/filesystem/CMakeLists.txt @@ -181,7 +181,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/format/CMakeLists.txt b/source/format/CMakeLists.txt index 46d4ba5453..1bf3e2c7f8 100644 --- a/source/format/CMakeLists.txt +++ b/source/format/CMakeLists.txt @@ -147,7 +147,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loader/CMakeLists.txt b/source/loader/CMakeLists.txt index dad99a6b72..953a5f3ef7 100644 --- a/source/loader/CMakeLists.txt +++ b/source/loader/CMakeLists.txt @@ -170,7 +170,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/c_loader/CMakeLists.txt b/source/loaders/c_loader/CMakeLists.txt index 7294668727..e418078d95 100644 --- a/source/loaders/c_loader/CMakeLists.txt +++ b/source/loaders/c_loader/CMakeLists.txt @@ -203,7 +203,7 @@ target_compile_features(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cob_loader/CMakeLists.txt b/source/loaders/cob_loader/CMakeLists.txt index 19890f7d53..a22cbf01e1 100644 --- a/source/loaders/cob_loader/CMakeLists.txt +++ b/source/loaders/cob_loader/CMakeLists.txt @@ -162,7 +162,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cr_loader/CMakeLists.txt b/source/loaders/cr_loader/CMakeLists.txt index b0ab7ba890..305875d48b 100644 --- a/source/loaders/cr_loader/CMakeLists.txt +++ b/source/loaders/cr_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/cs_loader/CMakeLists.txt b/source/loaders/cs_loader/CMakeLists.txt index c872d0f24f..37b4a7ac22 100644 --- a/source/loaders/cs_loader/CMakeLists.txt +++ b/source/loaders/cs_loader/CMakeLists.txt @@ -222,7 +222,7 @@ target_compile_features(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/dart_loader/CMakeLists.txt b/source/loaders/dart_loader/CMakeLists.txt index 6355e44cde..b6b48df1fa 100644 --- a/source/loaders/dart_loader/CMakeLists.txt +++ b/source/loaders/dart_loader/CMakeLists.txt @@ -165,7 +165,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/ext_loader/CMakeLists.txt b/source/loaders/ext_loader/CMakeLists.txt index b2a9545f9a..3efbb1d668 100644 --- a/source/loaders/ext_loader/CMakeLists.txt +++ b/source/loaders/ext_loader/CMakeLists.txt @@ -163,7 +163,7 @@ target_compile_features(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/file_loader/CMakeLists.txt b/source/loaders/file_loader/CMakeLists.txt index 0f03daec2a..0a3ec02b35 100644 --- a/source/loaders/file_loader/CMakeLists.txt +++ b/source/loaders/file_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/java_loader/CMakeLists.txt b/source/loaders/java_loader/CMakeLists.txt index c9b4d58577..c59eaa59ad 100644 --- a/source/loaders/java_loader/CMakeLists.txt +++ b/source/loaders/java_loader/CMakeLists.txt @@ -175,7 +175,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/jl_loader/CMakeLists.txt b/source/loaders/jl_loader/CMakeLists.txt index 8c1109f2f6..d628b69cdf 100644 --- a/source/loaders/jl_loader/CMakeLists.txt +++ b/source/loaders/jl_loader/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/js_loader/CMakeLists.txt b/source/loaders/js_loader/CMakeLists.txt index dfa627ff9a..c6e599df28 100644 --- a/source/loaders/js_loader/CMakeLists.txt +++ b/source/loaders/js_loader/CMakeLists.txt @@ -171,7 +171,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/jsm_loader/CMakeLists.txt b/source/loaders/jsm_loader/CMakeLists.txt index 36accd7ed2..00266a3f26 100644 --- a/source/loaders/jsm_loader/CMakeLists.txt +++ b/source/loaders/jsm_loader/CMakeLists.txt @@ -169,7 +169,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/llvm_loader/CMakeLists.txt b/source/loaders/llvm_loader/CMakeLists.txt index 7755ecf18b..954eba5d1d 100644 --- a/source/loaders/llvm_loader/CMakeLists.txt +++ b/source/loaders/llvm_loader/CMakeLists.txt @@ -169,7 +169,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/lua_loader/CMakeLists.txt b/source/loaders/lua_loader/CMakeLists.txt index 6a735bbd78..6816c8284e 100644 --- a/source/loaders/lua_loader/CMakeLists.txt +++ b/source/loaders/lua_loader/CMakeLists.txt @@ -167,7 +167,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/mock_loader/CMakeLists.txt b/source/loaders/mock_loader/CMakeLists.txt index 60cd93043e..6fb2c80dc3 100644 --- a/source/loaders/mock_loader/CMakeLists.txt +++ b/source/loaders/mock_loader/CMakeLists.txt @@ -154,7 +154,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/py_loader/CMakeLists.txt b/source/loaders/py_loader/CMakeLists.txt index 105bfae2c6..b2957ff0fe 100644 --- a/source/loaders/py_loader/CMakeLists.txt +++ b/source/loaders/py_loader/CMakeLists.txt @@ -209,7 +209,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index 8259079b46..e74b895401 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -186,7 +186,7 @@ endif() # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rpc_loader/CMakeLists.txt b/source/loaders/rpc_loader/CMakeLists.txt index c81839aefb..8cbb72f128 100644 --- a/source/loaders/rpc_loader/CMakeLists.txt +++ b/source/loaders/rpc_loader/CMakeLists.txt @@ -171,7 +171,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/rs_loader/CMakeLists.txt b/source/loaders/rs_loader/CMakeLists.txt index 4c97cf5990..aa84cbcce5 100644 --- a/source/loaders/rs_loader/CMakeLists.txt +++ b/source/loaders/rs_loader/CMakeLists.txt @@ -177,7 +177,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/ts_loader/CMakeLists.txt b/source/loaders/ts_loader/CMakeLists.txt index 076f40dc75..b761122500 100644 --- a/source/loaders/ts_loader/CMakeLists.txt +++ b/source/loaders/ts_loader/CMakeLists.txt @@ -164,7 +164,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/loaders/wasm_loader/CMakeLists.txt b/source/loaders/wasm_loader/CMakeLists.txt index 20ada2d79e..c51d56713e 100644 --- a/source/loaders/wasm_loader/CMakeLists.txt +++ b/source/loaders/wasm_loader/CMakeLists.txt @@ -174,7 +174,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/log/CMakeLists.txt b/source/log/CMakeLists.txt index 556c17aae7..bce9dc5938 100644 --- a/source/log/CMakeLists.txt +++ b/source/log/CMakeLists.txt @@ -220,7 +220,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/memory/CMakeLists.txt b/source/memory/CMakeLists.txt index 17a4b1b1c5..043812e4ad 100644 --- a/source/memory/CMakeLists.txt +++ b/source/memory/CMakeLists.txt @@ -161,7 +161,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/metacall/CMakeLists.txt b/source/metacall/CMakeLists.txt index ec669d7f0f..7aefaabd1a 100644 --- a/source/metacall/CMakeLists.txt +++ b/source/metacall/CMakeLists.txt @@ -244,7 +244,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugin/CMakeLists.txt b/source/plugin/CMakeLists.txt index c46756f36c..871d222b38 100644 --- a/source/plugin/CMakeLists.txt +++ b/source/plugin/CMakeLists.txt @@ -163,7 +163,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index 3d39838c1c..ba955b7d8a 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -217,7 +217,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/plugins/sandbox_plugin/CMakeLists.txt b/source/plugins/sandbox_plugin/CMakeLists.txt index 1197f9760f..e570a95283 100644 --- a/source/plugins/sandbox_plugin/CMakeLists.txt +++ b/source/plugins/sandbox_plugin/CMakeLists.txt @@ -196,7 +196,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index 65b9dd1f2e..1855258d28 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -158,7 +158,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index 07b94e752e..bc450a0689 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -147,7 +147,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/ports/js_port/CMakeLists.txt b/source/ports/js_port/CMakeLists.txt index 447e1fc10c..8613fc33b1 100644 --- a/source/ports/js_port/CMakeLists.txt +++ b/source/ports/js_port/CMakeLists.txt @@ -213,7 +213,7 @@ target_compile_options(${SWIG_MODULE_${target}_REAL_NAME} # Linker options # -add_link_options(${SWIG_MODULE_${target}_REAL_NAME} +target_link_options(${SWIG_MODULE_${target}_REAL_NAME} PRIVATE PUBLIC @@ -380,7 +380,7 @@ target_compile_options(${js_port_test} # Linker options # -add_link_options(${js_port_test} +target_link_options(${js_port_test} PRIVATE PUBLIC diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index 0e9e574fce..d227788187 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -237,7 +237,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${SWIG_MODULE_${target}_REAL_NAME} +target_link_options(${SWIG_MODULE_${target}_REAL_NAME} PRIVATE PUBLIC diff --git a/source/preprocessor/CMakeLists.txt b/source/preprocessor/CMakeLists.txt index e3c7016ad7..a850683fc9 100644 --- a/source/preprocessor/CMakeLists.txt +++ b/source/preprocessor/CMakeLists.txt @@ -179,7 +179,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/reflect/CMakeLists.txt b/source/reflect/CMakeLists.txt index 04921ad522..0131e04534 100644 --- a/source/reflect/CMakeLists.txt +++ b/source/reflect/CMakeLists.txt @@ -203,7 +203,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/scripts/extension/sum/CMakeLists.txt b/source/scripts/extension/sum/CMakeLists.txt index c076de1e1c..735866c143 100644 --- a/source/scripts/extension/sum/CMakeLists.txt +++ b/source/scripts/extension/sum/CMakeLists.txt @@ -152,7 +152,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/serial/CMakeLists.txt b/source/serial/CMakeLists.txt index 9a7a5b1e16..87de042a14 100644 --- a/source/serial/CMakeLists.txt +++ b/source/serial/CMakeLists.txt @@ -158,7 +158,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/serials/metacall_serial/CMakeLists.txt b/source/serials/metacall_serial/CMakeLists.txt index 66160ee092..5a11cbc8e5 100644 --- a/source/serials/metacall_serial/CMakeLists.txt +++ b/source/serials/metacall_serial/CMakeLists.txt @@ -158,7 +158,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/serials/rapid_json_serial/CMakeLists.txt b/source/serials/rapid_json_serial/CMakeLists.txt index aa2b189351..29fd739aa5 100644 --- a/source/serials/rapid_json_serial/CMakeLists.txt +++ b/source/serials/rapid_json_serial/CMakeLists.txt @@ -191,7 +191,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/tests/adt_map_test/CMakeLists.txt b/source/tests/adt_map_test/CMakeLists.txt index 45bca49c83..29ae7e7e9a 100644 --- a/source/tests/adt_map_test/CMakeLists.txt +++ b/source/tests/adt_map_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_set_test/CMakeLists.txt b/source/tests/adt_set_test/CMakeLists.txt index 21972409d9..d46b7064fb 100644 --- a/source/tests/adt_set_test/CMakeLists.txt +++ b/source/tests/adt_set_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_trie_test/CMakeLists.txt b/source/tests/adt_trie_test/CMakeLists.txt index 28305388ba..1bac7e403d 100644 --- a/source/tests/adt_trie_test/CMakeLists.txt +++ b/source/tests/adt_trie_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/adt_vector_test/CMakeLists.txt b/source/tests/adt_vector_test/CMakeLists.txt index cc085cb1b6..dab9ae9a6c 100644 --- a/source/tests/adt_vector_test/CMakeLists.txt +++ b/source/tests/adt_vector_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/configuration_test/CMakeLists.txt b/source/tests/configuration_test/CMakeLists.txt index e749dc9c59..c9f8049547 100644 --- a/source/tests/configuration_test/CMakeLists.txt +++ b/source/tests/configuration_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/detour_test/CMakeLists.txt b/source/tests/detour_test/CMakeLists.txt index b84f0f4a5f..7b722beeb3 100644 --- a/source/tests/detour_test/CMakeLists.txt +++ b/source/tests/detour_test/CMakeLists.txt @@ -121,7 +121,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index 53718d4079..d0e0d844d4 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/environment_test/CMakeLists.txt b/source/tests/environment_test/CMakeLists.txt index 7a7575d468..ec3e144498 100644 --- a/source/tests/environment_test/CMakeLists.txt +++ b/source/tests/environment_test/CMakeLists.txt @@ -107,7 +107,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/log_custom_test/CMakeLists.txt b/source/tests/log_custom_test/CMakeLists.txt index 4793ab64a4..73ef1f64ac 100644 --- a/source/tests/log_custom_test/CMakeLists.txt +++ b/source/tests/log_custom_test/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/log_test/CMakeLists.txt b/source/tests/log_test/CMakeLists.txt index 8fe8cca096..d3f70ddc3f 100644 --- a/source/tests/log_test/CMakeLists.txt +++ b/source/tests/log_test/CMakeLists.txt @@ -109,7 +109,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt index 2d5ad256a3..013b1d7421 100644 --- a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_c_lib_test/CMakeLists.txt b/source/tests/metacall_c_lib_test/CMakeLists.txt index d4d7aa5612..eace7e1da9 100644 --- a/source/tests/metacall_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_c_lib_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_c_test/CMakeLists.txt b/source/tests/metacall_c_test/CMakeLists.txt index 76188b304d..7599f98cbf 100644 --- a/source/tests/metacall_c_test/CMakeLists.txt +++ b/source/tests/metacall_c_test/CMakeLists.txt @@ -124,7 +124,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_callback_complex_test/CMakeLists.txt b/source/tests/metacall_callback_complex_test/CMakeLists.txt index c6c54a96a4..00183a9c2f 100644 --- a/source/tests/metacall_callback_complex_test/CMakeLists.txt +++ b/source/tests/metacall_callback_complex_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cast_test/CMakeLists.txt b/source/tests/metacall_cast_test/CMakeLists.txt index 4880ebe392..ec7b1876bf 100644 --- a/source/tests/metacall_cast_test/CMakeLists.txt +++ b/source/tests/metacall_cast_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_clear_test/CMakeLists.txt b/source/tests/metacall_clear_test/CMakeLists.txt index 32591ebc4c..bb461a5e9f 100644 --- a/source/tests/metacall_clear_test/CMakeLists.txt +++ b/source/tests/metacall_clear_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt index 8bb9fa0bc3..9c444e0847 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt @@ -123,7 +123,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt index 1f50fb8cae..8de5b40efb 100644 --- a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cobol_test/CMakeLists.txt b/source/tests/metacall_cobol_test/CMakeLists.txt index 1c66d2dd29..c524b462ca 100644 --- a/source/tests/metacall_cobol_test/CMakeLists.txt +++ b/source/tests/metacall_cobol_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_configuration_default_test/CMakeLists.txt b/source/tests/metacall_configuration_default_test/CMakeLists.txt index 589eeb1d12..571fc6786f 100644 --- a/source/tests/metacall_configuration_default_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_default_test/CMakeLists.txt @@ -129,7 +129,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt index af15809f27..e63ff23b96 100644 --- a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_cs_test/CMakeLists.txt b/source/tests/metacall_cs_test/CMakeLists.txt index 5859e5a828..084e5f8191 100644 --- a/source/tests/metacall_cs_test/CMakeLists.txt +++ b/source/tests/metacall_cs_test/CMakeLists.txt @@ -117,7 +117,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_csharp_function_test/CMakeLists.txt b/source/tests/metacall_csharp_function_test/CMakeLists.txt index e89890969d..53e8df1acc 100644 --- a/source/tests/metacall_csharp_function_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_function_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt index 1c43f950ad..9b04dac501 100644 --- a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_depends_test/CMakeLists.txt b/source/tests/metacall_depends_test/CMakeLists.txt index 4fab09eae9..ddc10ae8d4 100644 --- a/source/tests/metacall_depends_test/CMakeLists.txt +++ b/source/tests/metacall_depends_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_distributable_test/CMakeLists.txt b/source/tests/metacall_distributable_test/CMakeLists.txt index 2571897243..87354950d2 100644 --- a/source/tests/metacall_distributable_test/CMakeLists.txt +++ b/source/tests/metacall_distributable_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ducktype_test/CMakeLists.txt b/source/tests/metacall_ducktype_test/CMakeLists.txt index 11eed7096b..d092bc229f 100644 --- a/source/tests/metacall_ducktype_test/CMakeLists.txt +++ b/source/tests/metacall_ducktype_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt index 12424e2253..977c38726a 100644 --- a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt index 3b17aa0ac5..8ad6ff0c3f 100644 --- a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_dynlink_path_test/CMakeLists.txt b/source/tests/metacall_dynlink_path_test/CMakeLists.txt index 722d234a7c..70537e13e4 100644 --- a/source/tests/metacall_dynlink_path_test/CMakeLists.txt +++ b/source/tests/metacall_dynlink_path_test/CMakeLists.txt @@ -115,7 +115,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ext_test/CMakeLists.txt b/source/tests/metacall_ext_test/CMakeLists.txt index b80533149f..c7df0805ad 100644 --- a/source/tests/metacall_ext_test/CMakeLists.txt +++ b/source/tests/metacall_ext_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_fail_test/CMakeLists.txt b/source/tests/metacall_file_fail_test/CMakeLists.txt index 7e8d500721..fb4c65e7b4 100644 --- a/source/tests/metacall_file_fail_test/CMakeLists.txt +++ b/source/tests/metacall_file_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_glob_test/CMakeLists.txt b/source/tests/metacall_file_glob_test/CMakeLists.txt index ae886d2144..b5479a0f3d 100644 --- a/source/tests/metacall_file_glob_test/CMakeLists.txt +++ b/source/tests/metacall_file_glob_test/CMakeLists.txt @@ -123,7 +123,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_file_test/CMakeLists.txt b/source/tests/metacall_file_test/CMakeLists.txt index 5f1673554d..7be85a2a6a 100644 --- a/source/tests/metacall_file_test/CMakeLists.txt +++ b/source/tests/metacall_file_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_fork_test/CMakeLists.txt b/source/tests/metacall_fork_test/CMakeLists.txt index 0c526d744d..47d389592f 100644 --- a/source/tests/metacall_fork_test/CMakeLists.txt +++ b/source/tests/metacall_fork_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_function_test/CMakeLists.txt b/source/tests/metacall_function_test/CMakeLists.txt index fbe8d14ea7..2584da52b4 100644 --- a/source/tests/metacall_function_test/CMakeLists.txt +++ b/source/tests/metacall_function_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_handle_export_test/CMakeLists.txt b/source/tests/metacall_handle_export_test/CMakeLists.txt index 7320e8e924..762cb174ba 100644 --- a/source/tests/metacall_handle_export_test/CMakeLists.txt +++ b/source/tests/metacall_handle_export_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_handle_get_test/CMakeLists.txt b/source/tests/metacall_handle_get_test/CMakeLists.txt index 7a6576f360..73178da786 100644 --- a/source/tests/metacall_handle_get_test/CMakeLists.txt +++ b/source/tests/metacall_handle_get_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_init_fini_test/CMakeLists.txt b/source/tests/metacall_init_fini_test/CMakeLists.txt index 4b75590d1a..bb1783bf3c 100644 --- a/source/tests/metacall_init_fini_test/CMakeLists.txt +++ b/source/tests/metacall_init_fini_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt index 65a6858019..3d0c2ffde6 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt index 9b19bbb709..2de694d0a2 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_ex_test/CMakeLists.txt b/source/tests/metacall_initialize_ex_test/CMakeLists.txt index 3aa9967e4e..94332f3b40 100644 --- a/source/tests/metacall_initialize_ex_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_ex_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_initialize_test/CMakeLists.txt b/source/tests/metacall_initialize_test/CMakeLists.txt index fb1b6abfb3..f8b5b901a8 100644 --- a/source/tests/metacall_initialize_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_inspect_test/CMakeLists.txt b/source/tests/metacall_inspect_test/CMakeLists.txt index 3deb9cd296..ff5eaf740b 100644 --- a/source/tests/metacall_inspect_test/CMakeLists.txt +++ b/source/tests/metacall_inspect_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_integration_test/CMakeLists.txt b/source/tests/metacall_integration_test/CMakeLists.txt index 7314bdebd6..55b69ede2a 100644 --- a/source/tests/metacall_integration_test/CMakeLists.txt +++ b/source/tests/metacall_integration_test/CMakeLists.txt @@ -117,7 +117,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_invalid_loader_test/CMakeLists.txt b/source/tests/metacall_invalid_loader_test/CMakeLists.txt index d3d16ec7ae..8186d93620 100644 --- a/source/tests/metacall_invalid_loader_test/CMakeLists.txt +++ b/source/tests/metacall_invalid_loader_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_java_test/CMakeLists.txt b/source/tests/metacall_java_test/CMakeLists.txt index b1e2810fa6..d9000eeb69 100644 --- a/source/tests/metacall_java_test/CMakeLists.txt +++ b/source/tests/metacall_java_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_julia_test/CMakeLists.txt b/source/tests/metacall_julia_test/CMakeLists.txt index c5f59d1e9b..32dc65a6df 100644 --- a/source/tests/metacall_julia_test/CMakeLists.txt +++ b/source/tests/metacall_julia_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt index 552b2ecc25..e38ecba461 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_llvm_test/CMakeLists.txt b/source/tests/metacall_llvm_test/CMakeLists.txt index 31b0c3d35d..76f79b68c0 100644 --- a/source/tests/metacall_llvm_test/CMakeLists.txt +++ b/source/tests/metacall_llvm_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt index 9d3f8e8ab9..3a6293c6d7 100644 --- a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt index 86917f395a..f38f63ffbe 100644 --- a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt index b7588a561c..5d1c090426 100644 --- a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt index 90d3754bcb..4cb9cfb731 100644 --- a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_configuration_test/CMakeLists.txt b/source/tests/metacall_load_configuration_test/CMakeLists.txt index 04dca70c34..52f0a339fd 100644 --- a/source/tests/metacall_load_configuration_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt index 719056eae0..18371653f9 100644 --- a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_load_memory_test/CMakeLists.txt b/source/tests/metacall_load_memory_test/CMakeLists.txt index 014b7823fc..7e45abf253 100644 --- a/source/tests/metacall_load_memory_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_logs_test/CMakeLists.txt b/source/tests/metacall_logs_test/CMakeLists.txt index 514da4c48e..35386f0f7a 100644 --- a/source/tests/metacall_logs_test/CMakeLists.txt +++ b/source/tests/metacall_logs_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_lua_test/CMakeLists.txt b/source/tests/metacall_lua_test/CMakeLists.txt index 164aeeb3ca..b9b6a62c2c 100644 --- a/source/tests/metacall_lua_test/CMakeLists.txt +++ b/source/tests/metacall_lua_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_map_await_test/CMakeLists.txt b/source/tests/metacall_map_await_test/CMakeLists.txt index 7cb62f098c..b36cdee473 100644 --- a/source/tests/metacall_map_await_test/CMakeLists.txt +++ b/source/tests/metacall_map_await_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_map_test/CMakeLists.txt b/source/tests/metacall_map_test/CMakeLists.txt index ffe8d92c58..6022a8abdb 100644 --- a/source/tests/metacall_map_test/CMakeLists.txt +++ b/source/tests/metacall_map_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt index 2e5f9a1355..fe9cea8ae7 100644 --- a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_resources_test/CMakeLists.txt b/source/tests/metacall_node_async_resources_test/CMakeLists.txt index 6fafa70d28..a3edb0a50d 100644 --- a/source/tests/metacall_node_async_resources_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_resources_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_async_test/CMakeLists.txt b/source/tests/metacall_node_async_test/CMakeLists.txt index d6a4050aa4..3a29a55a44 100644 --- a/source/tests/metacall_node_async_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_await_chain_test/CMakeLists.txt b/source/tests/metacall_node_await_chain_test/CMakeLists.txt index 8b15b75da3..2b34facf97 100644 --- a/source/tests/metacall_node_await_chain_test/CMakeLists.txt +++ b/source/tests/metacall_node_await_chain_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_call_test/CMakeLists.txt b/source/tests/metacall_node_call_test/CMakeLists.txt index f0ac1da58a..361544791b 100644 --- a/source/tests/metacall_node_call_test/CMakeLists.txt +++ b/source/tests/metacall_node_call_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_callback_test/CMakeLists.txt b/source/tests/metacall_node_callback_test/CMakeLists.txt index 1249cc38e6..2fa56024b3 100644 --- a/source/tests/metacall_node_callback_test/CMakeLists.txt +++ b/source/tests/metacall_node_callback_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt index c91655dc4a..249b9066b7 100644 --- a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt +++ b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_default_export_test/CMakeLists.txt b/source/tests/metacall_node_default_export_test/CMakeLists.txt index 93468e1adf..56d39f320f 100644 --- a/source/tests/metacall_node_default_export_test/CMakeLists.txt +++ b/source/tests/metacall_node_default_export_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt index 7c2922950e..dbb6410c14 100644 --- a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_event_loop_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_test/CMakeLists.txt index a0d1ae8ce7..805dd2a9b8 100644 --- a/source/tests/metacall_node_event_loop_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_exception_test/CMakeLists.txt b/source/tests/metacall_node_exception_test/CMakeLists.txt index f2a47f44e9..707e529421 100644 --- a/source/tests/metacall_node_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_exception_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/CMakeLists.txt index 538385f341..1aac1018ec 100644 --- a/source/tests/metacall_node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt index 9cbd47bc16..1efbefcc03 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/node_extension_test/CMakeLists.txt @@ -173,7 +173,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE $<$:/IGNORE:4199> $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> diff --git a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt index 9125c4a7be..e8310a78cf 100644 --- a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt index 0477424f83..aaed9e5221 100644 --- a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_fail_test/CMakeLists.txt b/source/tests/metacall_node_fail_test/CMakeLists.txt index fe06183ebc..62fb239d4a 100644 --- a/source/tests/metacall_node_fail_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_inline_test/CMakeLists.txt b/source/tests/metacall_node_inline_test/CMakeLists.txt index 9f7829362a..af8f0c8b5a 100644 --- a/source/tests/metacall_node_inline_test/CMakeLists.txt +++ b/source/tests/metacall_node_inline_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt index c7c06a6899..6f3f91f478 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_native_code_test/CMakeLists.txt b/source/tests/metacall_node_native_code_test/CMakeLists.txt index 59f982c4c1..31b61509e6 100644 --- a/source/tests/metacall_node_native_code_test/CMakeLists.txt +++ b/source/tests/metacall_node_native_code_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_await_test/CMakeLists.txt b/source/tests/metacall_node_port_await_test/CMakeLists.txt index 1b87b2f23e..c72587ba48 100644 --- a/source/tests/metacall_node_port_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt index 6fb0c363a6..3c13cf6be2 100644 --- a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt @@ -128,7 +128,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_rs_test/CMakeLists.txt b/source/tests/metacall_node_port_rs_test/CMakeLists.txt index 081c44abc9..1f4f82043f 100644 --- a/source/tests/metacall_node_port_rs_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_rs_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_port_test/CMakeLists.txt b/source/tests/metacall_node_port_test/CMakeLists.txt index 2d83ab6747..86dadd93d8 100644 --- a/source/tests/metacall_node_port_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt index 435ed2445f..6388179f78 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt index 6c88f35e38..e7576cb188 100644 --- a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_await_test/CMakeLists.txt b/source/tests/metacall_node_python_await_test/CMakeLists.txt index 09f86f6baa..2edadbea76 100644 --- a/source/tests/metacall_node_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt index 0e896b1dcd..4e1fb4b715 100644 --- a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_exception_test/CMakeLists.txt b/source/tests/metacall_node_python_exception_test/CMakeLists.txt index 49aee21789..f759a0b30c 100644 --- a/source/tests/metacall_node_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_exception_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt index 5cee029fe9..105e401fc2 100644 --- a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt index faa5e03e81..06e1e46bb0 100644 --- a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt @@ -116,7 +116,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt index dbcd8c3167..a9756c0917 100644 --- a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_reentrant_test/CMakeLists.txt b/source/tests/metacall_node_reentrant_test/CMakeLists.txt index 27cdea5166..a4ec68f529 100644 --- a/source/tests/metacall_node_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_node_reentrant_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt index 312d296791..16e7cbd5e5 100644 --- a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt +++ b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_test/CMakeLists.txt b/source/tests/metacall_node_test/CMakeLists.txt index 3c311060af..238ccbd4cd 100644 --- a/source/tests/metacall_node_test/CMakeLists.txt +++ b/source/tests/metacall_node_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_node_typescript_test/CMakeLists.txt b/source/tests/metacall_node_typescript_test/CMakeLists.txt index 4a80ab646a..f0858d2465 100644 --- a/source/tests/metacall_node_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_node_typescript_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt index 29f56547cc..f110645997 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt index a4328a9cce..fc0d796609 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt @@ -115,7 +115,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt index 438ce91059..20f25e9fdd 100644 --- a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_plugin_extension_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_test/CMakeLists.txt index 3b783b815e..a6eead0013 100644 --- a/source/tests/metacall_plugin_extension_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_async_test/CMakeLists.txt b/source/tests/metacall_python_async_test/CMakeLists.txt index 3438c0ff45..3acc0f2114 100644 --- a/source/tests/metacall_python_async_test/CMakeLists.txt +++ b/source/tests/metacall_python_async_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_await_test/CMakeLists.txt b/source/tests/metacall_python_await_test/CMakeLists.txt index 9e77a645c2..767eda765f 100644 --- a/source/tests/metacall_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_builtins_test/CMakeLists.txt b/source/tests/metacall_python_builtins_test/CMakeLists.txt index 8d99ccf6c9..d9ca104c3b 100644 --- a/source/tests/metacall_python_builtins_test/CMakeLists.txt +++ b/source/tests/metacall_python_builtins_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_callback_test/CMakeLists.txt b/source/tests/metacall_python_callback_test/CMakeLists.txt index 702009b82a..4f7a4e1b30 100644 --- a/source/tests/metacall_python_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_callback_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_dict_test/CMakeLists.txt b/source/tests/metacall_python_dict_test/CMakeLists.txt index 0f08317ff7..8cc1916d7a 100644 --- a/source/tests/metacall_python_dict_test/CMakeLists.txt +++ b/source/tests/metacall_python_dict_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_exception_test/CMakeLists.txt b/source/tests/metacall_python_exception_test/CMakeLists.txt index 904d8a573d..31109d3559 100644 --- a/source/tests/metacall_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_python_exception_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_fail_test/CMakeLists.txt b/source/tests/metacall_python_fail_test/CMakeLists.txt index b8950664c9..fdf0097edf 100644 --- a/source/tests/metacall_python_fail_test/CMakeLists.txt +++ b/source/tests/metacall_python_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_gc_test/CMakeLists.txt b/source/tests/metacall_python_gc_test/CMakeLists.txt index 4155fec427..dea0f4ae2a 100644 --- a/source/tests/metacall_python_gc_test/CMakeLists.txt +++ b/source/tests/metacall_python_gc_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_loader_port_test/CMakeLists.txt b/source/tests/metacall_python_loader_port_test/CMakeLists.txt index 63bcdad979..82bfb75291 100644 --- a/source/tests/metacall_python_loader_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_loader_port_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_model_test/CMakeLists.txt b/source/tests/metacall_python_model_test/CMakeLists.txt index 86155738cf..59494beaca 100644 --- a/source/tests/metacall_python_model_test/CMakeLists.txt +++ b/source/tests/metacall_python_model_test/CMakeLists.txt @@ -122,7 +122,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_node_await_test/CMakeLists.txt b/source/tests/metacall_python_node_await_test/CMakeLists.txt index b4cf36b3c5..9995c37e0b 100644 --- a/source/tests/metacall_python_node_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_node_await_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_object_class_test/CMakeLists.txt b/source/tests/metacall_python_object_class_test/CMakeLists.txt index 71dea28cf6..475a515cae 100644 --- a/source/tests/metacall_python_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_python_object_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_open_test/CMakeLists.txt b/source/tests/metacall_python_open_test/CMakeLists.txt index 8569b85cd3..ce067050d2 100644 --- a/source/tests/metacall_python_open_test/CMakeLists.txt +++ b/source/tests/metacall_python_open_test/CMakeLists.txt @@ -131,7 +131,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_pointer_test/CMakeLists.txt b/source/tests/metacall_python_pointer_test/CMakeLists.txt index 9c807909a1..4beab7b928 100644 --- a/source/tests/metacall_python_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_pointer_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_callback_test/CMakeLists.txt b/source/tests/metacall_python_port_callback_test/CMakeLists.txt index 6ba38e2c57..95ddf1ad7c 100644 --- a/source/tests/metacall_python_port_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_callback_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_https_test/CMakeLists.txt b/source/tests/metacall_python_port_https_test/CMakeLists.txt index 961f0af9a4..fa4127119e 100644 --- a/source/tests/metacall_python_port_https_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_https_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_import_test/CMakeLists.txt b/source/tests/metacall_python_port_import_test/CMakeLists.txt index 285dea5cc3..8d1d94f1c9 100644 --- a/source/tests/metacall_python_port_import_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_import_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt index 55188da8f1..463a4e5b66 100644 --- a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_port_test/CMakeLists.txt b/source/tests/metacall_python_port_test/CMakeLists.txt index 1caa130fad..431379d4aa 100644 --- a/source/tests/metacall_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_test/CMakeLists.txt @@ -113,7 +113,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_reentrant_test/CMakeLists.txt b/source/tests/metacall_python_reentrant_test/CMakeLists.txt index f196c4f9d0..8f6a82e07f 100644 --- a/source/tests/metacall_python_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_python_reentrant_test/CMakeLists.txt @@ -114,7 +114,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_relative_path_test/CMakeLists.txt b/source/tests/metacall_python_relative_path_test/CMakeLists.txt index e6ddb60287..2a5ad0ff8f 100644 --- a/source/tests/metacall_python_relative_path_test/CMakeLists.txt +++ b/source/tests/metacall_python_relative_path_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_test/CMakeLists.txt b/source/tests/metacall_python_test/CMakeLists.txt index 77631a1fe5..5fb1bec579 100644 --- a/source/tests/metacall_python_test/CMakeLists.txt +++ b/source/tests/metacall_python_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_varargs_test/CMakeLists.txt b/source/tests/metacall_python_varargs_test/CMakeLists.txt index 9143fc44e7..bae80e62d0 100644 --- a/source/tests/metacall_python_varargs_test/CMakeLists.txt +++ b/source/tests/metacall_python_varargs_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt index 1a100f4ad3..9e871cf890 100644 --- a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_python_without_functions_test/CMakeLists.txt b/source/tests/metacall_python_without_functions_test/CMakeLists.txt index 5405951048..a4f92966ae 100644 --- a/source/tests/metacall_python_without_functions_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_functions_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_reinitialize_test/CMakeLists.txt b/source/tests/metacall_reinitialize_test/CMakeLists.txt index f57b6b85fc..73beda512e 100644 --- a/source/tests/metacall_reinitialize_test/CMakeLists.txt +++ b/source/tests/metacall_reinitialize_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_reload_functions_test/CMakeLists.txt b/source/tests/metacall_reload_functions_test/CMakeLists.txt index 4474e902e5..4398e0a2de 100644 --- a/source/tests/metacall_reload_functions_test/CMakeLists.txt +++ b/source/tests/metacall_reload_functions_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_return_monad_test/CMakeLists.txt b/source/tests/metacall_return_monad_test/CMakeLists.txt index 91874ed626..54f90028d4 100644 --- a/source/tests/metacall_return_monad_test/CMakeLists.txt +++ b/source/tests/metacall_return_monad_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rpc_test/CMakeLists.txt b/source/tests/metacall_rpc_test/CMakeLists.txt index 8fef52d0fd..091cd4196f 100644 --- a/source/tests/metacall_rpc_test/CMakeLists.txt +++ b/source/tests/metacall_rpc_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt index 1fe56e79a3..4503b7df1b 100644 --- a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_fail_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_test/CMakeLists.txt index 211d238b36..7211d396ee 100644 --- a/source/tests/metacall_ruby_fail_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt index fc9e50765e..50908e4399 100644 --- a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt index e933746a3c..49a899ecfa 100644 --- a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt index 3f19f74b4c..a2afac7514 100644 --- a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt @@ -118,7 +118,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_ruby_test/CMakeLists.txt b/source/tests/metacall_ruby_test/CMakeLists.txt index 267af49c86..41d084aade 100644 --- a/source/tests/metacall_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_class_test/CMakeLists.txt b/source/tests/metacall_rust_class_test/CMakeLists.txt index c968d31742..dd529756fa 100644 --- a/source/tests/metacall_rust_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt index 46488ba4d9..efcfafdcb7 100644 --- a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt index 757198c398..33b0b29099 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt index 3b47f2f3ec..3f9d02f865 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt index c77fcfa350..e46e552dd5 100644 --- a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_rust_test/CMakeLists.txt b/source/tests/metacall_rust_test/CMakeLists.txt index 543fac1de9..9b0cfc8b30 100644 --- a/source/tests/metacall_rust_test/CMakeLists.txt +++ b/source/tests/metacall_rust_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt index 351a271b7b..67732e3108 100644 --- a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt @@ -127,7 +127,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_test/CMakeLists.txt b/source/tests/metacall_test/CMakeLists.txt index 932f43008c..4d75fe9b7a 100644 --- a/source/tests/metacall_test/CMakeLists.txt +++ b/source/tests/metacall_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt index 55f940a6f9..46f4918045 100644 --- a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt index 1f88419a8c..a41409a5b5 100644 --- a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_node_test/CMakeLists.txt b/source/tests/metacall_typescript_node_test/CMakeLists.txt index ba02a30ff7..95954f202f 100644 --- a/source/tests/metacall_typescript_node_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_node_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_require_test/CMakeLists.txt b/source/tests/metacall_typescript_require_test/CMakeLists.txt index 7ac9c10333..2e1e327bd3 100644 --- a/source/tests/metacall_typescript_require_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_require_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_test/CMakeLists.txt b/source/tests/metacall_typescript_test/CMakeLists.txt index 92ac58a701..1ad8d87d36 100644 --- a/source/tests/metacall_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt index f88d202b52..59789903b2 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt index 2f1c5273fd..b6732071c5 100644 --- a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt @@ -111,7 +111,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_version_test/CMakeLists.txt b/source/tests/metacall_version_test/CMakeLists.txt index 1b89dd1e8f..8b3465541b 100644 --- a/source/tests/metacall_version_test/CMakeLists.txt +++ b/source/tests/metacall_version_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt index e179a04e1e..09c1efe109 100644 --- a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt @@ -112,7 +112,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/metacall_wasm_test/CMakeLists.txt b/source/tests/metacall_wasm_test/CMakeLists.txt index 8a928bef8f..5aeb8ca0a5 100644 --- a/source/tests/metacall_wasm_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_test/CMakeLists.txt @@ -110,7 +110,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/portability_path_test/CMakeLists.txt b/source/tests/portability_path_test/CMakeLists.txt index ea98857af2..37274fd9e2 100644 --- a/source/tests/portability_path_test/CMakeLists.txt +++ b/source/tests/portability_path_test/CMakeLists.txt @@ -105,7 +105,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/preprocessor_test/CMakeLists.txt b/source/tests/preprocessor_test/CMakeLists.txt index 17efabee85..68470eab20 100644 --- a/source/tests/preprocessor_test/CMakeLists.txt +++ b/source/tests/preprocessor_test/CMakeLists.txt @@ -106,7 +106,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/rb_loader_parser_test/CMakeLists.txt b/source/tests/rb_loader_parser_test/CMakeLists.txt index 30cb37c5a0..4e6162aa55 100644 --- a/source/tests/rb_loader_parser_test/CMakeLists.txt +++ b/source/tests/rb_loader_parser_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_function_test/CMakeLists.txt b/source/tests/reflect_function_test/CMakeLists.txt index 202dca6ac8..9beb3781aa 100644 --- a/source/tests/reflect_function_test/CMakeLists.txt +++ b/source/tests/reflect_function_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_metadata_test/CMakeLists.txt b/source/tests/reflect_metadata_test/CMakeLists.txt index 07291ac50b..37e635bc63 100644 --- a/source/tests/reflect_metadata_test/CMakeLists.txt +++ b/source/tests/reflect_metadata_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_object_class_test/CMakeLists.txt b/source/tests/reflect_object_class_test/CMakeLists.txt index 14d331f17f..77f8371831 100644 --- a/source/tests/reflect_object_class_test/CMakeLists.txt +++ b/source/tests/reflect_object_class_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_scope_test/CMakeLists.txt b/source/tests/reflect_scope_test/CMakeLists.txt index dfb7120943..0a4bd718cf 100644 --- a/source/tests/reflect_scope_test/CMakeLists.txt +++ b/source/tests/reflect_scope_test/CMakeLists.txt @@ -119,7 +119,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/reflect_value_cast_test/CMakeLists.txt b/source/tests/reflect_value_cast_test/CMakeLists.txt index 616715e7fd..46e51f3ae7 100644 --- a/source/tests/reflect_value_cast_test/CMakeLists.txt +++ b/source/tests/reflect_value_cast_test/CMakeLists.txt @@ -125,7 +125,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/tests/serial_test/CMakeLists.txt b/source/tests/serial_test/CMakeLists.txt index eb56ea1e18..8b32df06a0 100644 --- a/source/tests/serial_test/CMakeLists.txt +++ b/source/tests/serial_test/CMakeLists.txt @@ -124,7 +124,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} ) diff --git a/source/threading/CMakeLists.txt b/source/threading/CMakeLists.txt index 7486dced91..830545d85c 100644 --- a/source/threading/CMakeLists.txt +++ b/source/threading/CMakeLists.txt @@ -178,7 +178,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC diff --git a/source/version/CMakeLists.txt b/source/version/CMakeLists.txt index 235dd1e3af..ff0bed815d 100644 --- a/source/version/CMakeLists.txt +++ b/source/version/CMakeLists.txt @@ -151,7 +151,7 @@ target_compile_options(${target} # Linker options # -add_link_options(${target} +target_link_options(${target} PRIVATE PUBLIC From 0a19cc732b67d686752b5fd49e74f1daffa6b39c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 23:37:46 +0100 Subject: [PATCH 053/364] Remove googletest. --- tools/metacall-environment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 64982d14ee..4df23f6adb 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -110,7 +110,7 @@ sub_base(){ $SUDO_CMD apk add --no-cache g++ make git cmake gtest-dev wget gnupg ca-certificates fi elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then - brew install llvm cmake git googletest wget gnupg ca-certificates + brew install llvm cmake git wget gnupg ca-certificates # googletest fi } From 30ac8a9b9f54bbbc80226ddb2b1c5c73e9a87fa1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 23:43:50 +0100 Subject: [PATCH 054/364] Add debug info for build. --- tools/metacall-build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index d2074c1afb..196bdfb64e 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -73,6 +73,9 @@ sub_build() { # Build the project make -j$(getconf _NPROCESSORS_ONLN) + # Debug the make output + ls -la + # Tests (coverage needs to run the tests) if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE From a36aa9166d3d4ef94433546f8f63451c2dcad007 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Feb 2025 23:59:11 +0100 Subject: [PATCH 055/364] Remove gtest. --- tools/metacall-environment.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 4df23f6adb..92cbd780fb 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -104,13 +104,13 @@ sub_base(){ if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then $SUDO_CMD apt-get update - $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends build-essential git cmake libgtest-dev wget apt-utils apt-transport-https gnupg dirmngr ca-certificates + $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends build-essential git cmake wget apt-utils apt-transport-https gnupg dirmngr ca-certificates elif [ "${LINUX_DISTRO}" = "alpine" ]; then $SUDO_CMD apk update - $SUDO_CMD apk add --no-cache g++ make git cmake gtest-dev wget gnupg ca-certificates + $SUDO_CMD apk add --no-cache g++ make git cmake wget gnupg ca-certificates fi elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then - brew install llvm cmake git wget gnupg ca-certificates # googletest + brew install llvm cmake git wget gnupg ca-certificates fi } From 3f8ecf50c78c894e1f72585b763e66ebdc6237a8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 00:07:17 +0100 Subject: [PATCH 056/364] Add more debug macos. --- tools/metacall-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index 196bdfb64e..4796146df4 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -75,6 +75,7 @@ sub_build() { # Debug the make output ls -la + find . -name "*funchook*" # Tests (coverage needs to run the tests) if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then From fbb2aa7d202b7ab4d2343e5978cefffe208ffa46 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 00:20:14 +0100 Subject: [PATCH 057/364] Solve issues with libfunchook. --- source/detours/funchook_detour/CMakeLists.txt | 13 ++++++++++--- tools/metacall-build.sh | 4 ---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index afd225e3d7..d50fcb4aef 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -33,12 +33,11 @@ if(WIN32) set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") else() set(FUNCHOOK_BUILD_TARGET "install") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/lib/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") endif() set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") -set(FUNCHOOK_CMAKE_INSTALL_BINDIR "${PROJECT_OUTPUT_DIR}") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") ExternalProject_Add(${target_depends} @@ -46,7 +45,15 @@ ExternalProject_Add(${target_depends} SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_INSTALL_BINDIR=${FUNCHOOK_CMAKE_INSTALL_BINDIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . + CMAKE_ARGS + -G "${CMAKE_GENERATOR}" + -DCMAKE_BUILD_PARALLEL_LEVEL=1 + -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON + -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DFUNCHOOK_BUILD_SHARED=ON + -DFUNCHOOK_BUILD_TESTS=OFF + -DFUNCHOOK_BUILD_STATIC=OFF BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} UPDATE_COMMAND "" BUILD_IN_SOURCE ON diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index 4796146df4..d2074c1afb 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -73,10 +73,6 @@ sub_build() { # Build the project make -j$(getconf _NPROCESSORS_ONLN) - # Debug the make output - ls -la - find . -name "*funchook*" - # Tests (coverage needs to run the tests) if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE From 04220ad5b038da8263aa4015598363daa83213eb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 00:34:39 +0100 Subject: [PATCH 058/364] Solve more issues funchook. --- source/detours/funchook_detour/CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index d50fcb4aef..7811dce8bd 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -45,15 +45,7 @@ ExternalProject_Add(${target_depends} SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" - CMAKE_ARGS - -G "${CMAKE_GENERATOR}" - -DCMAKE_BUILD_PARALLEL_LEVEL=1 - -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON - -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DFUNCHOOK_BUILD_SHARED=ON - -DFUNCHOOK_BUILD_TESTS=OFF - -DFUNCHOOK_BUILD_STATIC=OFF + CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} UPDATE_COMMAND "" BUILD_IN_SOURCE ON From 837033273b640d6771389171c90b120e0878576b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 00:49:02 +0100 Subject: [PATCH 059/364] Solving issues funchook. --- source/detours/funchook_detour/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index 7811dce8bd..bf9ba843d8 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -33,7 +33,7 @@ if(WIN32) set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") else() set(FUNCHOOK_BUILD_TARGET "install") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/lib/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") endif() @@ -43,10 +43,10 @@ set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") ExternalProject_Add(${target_depends} PREFIX funchook SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} - INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} + # INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" # --target ${FUNCHOOK_BUILD_TARGET} UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON From 49fb30a6ea18e7aef960618e3be85cf4b52a2b91 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 01:02:59 +0100 Subject: [PATCH 060/364] Solving funchook. --- source/detours/funchook_detour/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index bf9ba843d8..6291f09db7 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -46,7 +46,7 @@ ExternalProject_Add(${target_depends} # INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" # --target ${FUNCHOOK_BUILD_TARGET} + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON From bebf51eaa80d2ba77c136930a01eca0474a3b69d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 01:10:18 +0100 Subject: [PATCH 061/364] Disable install. --- source/detours/funchook_detour/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index 6291f09db7..eceb90a5ea 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -46,7 +46,7 @@ ExternalProject_Add(${target_depends} # INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} # && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON From 74899d377d062d3c5aec490f6e329d43ef849634 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 01:10:55 +0100 Subject: [PATCH 062/364] Disable install 2. --- source/detours/funchook_detour/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index eceb90a5ea..de2c1f55bb 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -43,10 +43,10 @@ set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") ExternalProject_Add(${target_depends} PREFIX funchook SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} - # INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} + INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} # && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON From 1b881169d96c063a157c2ce5f92d2929a21a3868 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 01:28:32 +0100 Subject: [PATCH 063/364] Trying something. --- source/detours/funchook_detour/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index de2c1f55bb..837487fd68 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -46,7 +46,7 @@ ExternalProject_Add(${target_depends} INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} # && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON From a07199a5ac0f88a0b87a12b64d7b9cd6f791ec30 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 01:42:50 +0100 Subject: [PATCH 064/364] Solving issues funchook. --- source/detours/funchook_detour/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index 837487fd68..bb17e9612d 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -30,14 +30,17 @@ set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") if(WIN32) set(FUNCHOOK_BUILD_TARGET "INSTALL") set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") + set(FUNCHOOK_LIBRARY_INSTALL_NAME "funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") + set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") else() set(FUNCHOOK_BUILD_TARGET "install") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_INSTALL_NAME "libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") endif() set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") +set(FUNCHOOK_LIBRARY "${FUNCHOOK_INSTALL_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") ExternalProject_Add(${target_depends} @@ -46,7 +49,8 @@ ExternalProject_Add(${target_depends} INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target ${FUNCHOOK_BUILD_TARGET} # && ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" + BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" UPDATE_COMMAND "" BUILD_IN_SOURCE ON LOG_DOWNLOAD ON @@ -174,7 +178,7 @@ target_include_directories(${target} target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - ${FUNCHOOK_LIBRARY_DIR} # FuncHook libraries + ${FUNCHOOK_LIBRARY} # FuncHook libraries PUBLIC ${DEFAULT_LIBRARIES} @@ -228,7 +232,7 @@ target_link_options(${target} # Dependency install(FILES - ${FUNCHOOK_LIBRARY_INSTALL_DIR} + ${FUNCHOOK_LIBRARY} DESTINATION ${INSTALL_LIB} COMPONENT runtime ) From 7cb91d1b489d10fe9efb98a247f6d2af407f01bb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 17:10:44 +0100 Subject: [PATCH 065/364] Testing platform ci. --- .github/workflows/docker-hub-platform.yml | 239 +++++++++++----------- 1 file changed, 120 insertions(+), 119 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index b3d706e385..88100ac349 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -20,127 +20,127 @@ env: BUILDKIT_VERSION: 0.13.0 jobs: - build: - name: Build - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/386 - - linux/arm64 - - linux/riscv64 - - linux/ppc64le - - linux/s390x - - linux/arm/v7 - - linux/arm/v6 - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3 - with: - version: v${{ env.BUILDKIT_VERSION }} - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build MetaCall Docker Images - env: - METACALL_PLATFORM: ${{ matrix.platform }} - run: | - ./docker-compose.sh platform - - - name: Tag Platform Images - run: | - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - echo "Platform Tag: ${platform_tag}" - for tag in "deps" "dev" "runtime" "cli"; do - docker tag metacall/${IMAGE_NAME}:${tag} \ - ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - - name: Push Platform Images - run: | - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - for tag in "deps" "dev" "runtime" "cli"; do - echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" - docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - - name: Run Tests - run: | - set -exuo pipefail - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - cat < Dockerfile.test - FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} - RUN echo "console.log('abcde')" > script.js - RUN metacallcli script.js - EOF - - docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - docker run --rm --platform=${{ matrix.platform }} test-image - - manifest: - name: Create and Push Manifest Lists - needs: build - runs-on: ubuntu-latest - steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Create and Push Manifest Lists - run: | - for tag in "deps" "dev" "runtime" "cli"; do - echo "Creating manifest for tag: $tag" - platform_tags="" - for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do - platform_tag=$(echo "${platform}" | tr '/' '-') - platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" - done - echo "Creating manifest with tags: ${platform_tags}" - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} - done - - - name: Create Version Specific Tags - if: startsWith(github.ref, 'refs/tags/') - run: | - VERSION=${GITHUB_REF#refs/tags/v} - tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") - for tag in "${tags[@]}"; do - platform_tags="" - for platform in "${platforms[@]}"; do - platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" - done - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} - done - - cli_platform_tags="" - for platform in ${{ matrix.platform }}; do - cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" - done - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + # build: + # name: Build + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # platform: + # - linux/amd64 + # - linux/386 + # - linux/arm64 + # - linux/riscv64 + # - linux/ppc64le + # - linux/s390x + # - linux/arm/v7 + # - linux/arm/v6 + # steps: + # - name: Checkout Repository + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + + # - name: Set up Docker BuildX + # uses: docker/setup-buildx-action@v3 + # with: + # version: v${{ env.BUILDKIT_VERSION }} + + # - name: Login to Docker Hub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + # - name: Build MetaCall Docker Images + # env: + # METACALL_PLATFORM: ${{ matrix.platform }} + # run: | + # ./docker-compose.sh platform + + # - name: Tag Platform Images + # run: | + # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + # echo "Platform Tag: ${platform_tag}" + # for tag in "deps" "dev" "runtime" "cli"; do + # docker tag metacall/${IMAGE_NAME}:${tag} \ + # ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + # done + + # - name: Push Platform Images + # run: | + # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + # for tag in "deps" "dev" "runtime" "cli"; do + # echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + # docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + # done + + # - name: Run Tests + # run: | + # set -exuo pipefail + # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + # cat < Dockerfile.test + # FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + # RUN echo "console.log('abcde')" > script.js + # RUN metacallcli script.js + # EOF + + # docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + # docker run --rm --platform=${{ matrix.platform }} test-image + + # manifest: + # name: Create and Push Manifest Lists + # needs: build + # runs-on: ubuntu-latest + # steps: + # - name: Login to Docker Hub + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_HUB_USERNAME }} + # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + # - name: Create and Push Manifest Lists + # run: | + # for tag in "deps" "dev" "runtime" "cli"; do + # echo "Creating manifest for tag: $tag" + # platform_tags="" + # for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do + # platform_tag=$(echo "${platform}" | tr '/' '-') + # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + # done + # echo "Creating manifest with tags: ${platform_tags}" + # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend + # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} + # done + + # - name: Create Version Specific Tags + # if: startsWith(github.ref, 'refs/tags/') + # run: | + # VERSION=${GITHUB_REF#refs/tags/v} + # tags=("deps" "dev" "runtime" "cli") + # platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + # for tag in "${tags[@]}"; do + # platform_tags="" + # for platform in "${platforms[@]}"; do + # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" + # done + # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + # done + + # cli_platform_tags="" + # for platform in ${{ matrix.platform }}; do + # cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" + # done + # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend + # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest cleanup: name: Cleanup Platform Specific Tags - needs: [build, manifest] + # needs: [build, manifest] runs-on: ubuntu-latest if: always() steps: @@ -153,9 +153,10 @@ jobs: for tag in "${tags[@]}"; do tag_to_delete="${tag}-${platform}" echo "Deleting tag: ${tag_to_delete}" + echo "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" curl -X DELETE \ - -u "${{ secrets.DOCKER_HUB_USERNAME }}:${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" \ + -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN_DELETE }}" \ "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" done done From cd131792ee400948343b24fb78cc2ff15aac168d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 17:25:52 +0100 Subject: [PATCH 066/364] Enabled github platform. --- .github/workflows/docker-hub-platform.yml | 236 +++++++++++----------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index 88100ac349..6a004d1ebe 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -20,127 +20,127 @@ env: BUILDKIT_VERSION: 0.13.0 jobs: - # build: - # name: Build - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # matrix: - # platform: - # - linux/amd64 - # - linux/386 - # - linux/arm64 - # - linux/riscv64 - # - linux/ppc64le - # - linux/s390x - # - linux/arm/v7 - # - linux/arm/v6 - # steps: - # - name: Checkout Repository - # uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - - # - name: Set up Docker BuildX - # uses: docker/setup-buildx-action@v3 - # with: - # version: v${{ env.BUILDKIT_VERSION }} - - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - # - name: Build MetaCall Docker Images - # env: - # METACALL_PLATFORM: ${{ matrix.platform }} - # run: | - # ./docker-compose.sh platform - - # - name: Tag Platform Images - # run: | - # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - # echo "Platform Tag: ${platform_tag}" - # for tag in "deps" "dev" "runtime" "cli"; do - # docker tag metacall/${IMAGE_NAME}:${tag} \ - # ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - # done - - # - name: Push Platform Images - # run: | - # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - # for tag in "deps" "dev" "runtime" "cli"; do - # echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" - # docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - # done - - # - name: Run Tests - # run: | - # set -exuo pipefail - # platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - # cat < Dockerfile.test - # FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} - # RUN echo "console.log('abcde')" > script.js - # RUN metacallcli script.js - # EOF - - # docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - # docker run --rm --platform=${{ matrix.platform }} test-image - - # manifest: - # name: Create and Push Manifest Lists - # needs: build - # runs-on: ubuntu-latest - # steps: - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - # - name: Create and Push Manifest Lists - # run: | - # for tag in "deps" "dev" "runtime" "cli"; do - # echo "Creating manifest for tag: $tag" - # platform_tags="" - # for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do - # platform_tag=$(echo "${platform}" | tr '/' '-') - # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" - # done - # echo "Creating manifest with tags: ${platform_tags}" - # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend - # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} - # done - - # - name: Create Version Specific Tags - # if: startsWith(github.ref, 'refs/tags/') - # run: | - # VERSION=${GITHUB_REF#refs/tags/v} - # tags=("deps" "dev" "runtime" "cli") - # platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") - # for tag in "${tags[@]}"; do - # platform_tags="" - # for platform in "${platforms[@]}"; do - # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" - # done - # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend - # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} - # done - - # cli_platform_tags="" - # for platform in ${{ matrix.platform }}; do - # cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" - # done - # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend - # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + build: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/386 + - linux/arm64 + - linux/riscv64 + - linux/ppc64le + - linux/s390x + - linux/arm/v7 + - linux/arm/v6 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + with: + version: v${{ env.BUILDKIT_VERSION }} + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build MetaCall Docker Images + env: + METACALL_PLATFORM: ${{ matrix.platform }} + run: | + ./docker-compose.sh platform + + - name: Tag Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + echo "Platform Tag: ${platform_tag}" + for tag in "deps" "dev" "runtime" "cli"; do + docker tag metacall/${IMAGE_NAME}:${tag} \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done + + - name: Push Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + for tag in "deps" "dev" "runtime" "cli"; do + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done + + - name: Run Tests + run: | + set -exuo pipefail + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + cat < Dockerfile.test + FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + RUN echo "console.log('abcde')" > script.js + RUN metacallcli script.js + EOF + + docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker run --rm --platform=${{ matrix.platform }} test-image + + manifest: + name: Create and Push Manifest Lists + needs: build + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Create and Push Manifest Lists + run: | + for tag in "deps" "dev" "runtime" "cli"; do + echo "Creating manifest for tag: $tag" + platform_tags="" + for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + echo "Creating manifest with tags: ${platform_tags}" + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} + done + + - name: Create Version Specific Tags + if: startsWith(github.ref, 'refs/tags/') + run: | + VERSION=${GITHUB_REF#refs/tags/v} + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + for tag in "${tags[@]}"; do + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + done + + cli_platform_tags="" + for platform in ${{ matrix.platform }}; do + cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest cleanup: name: Cleanup Platform Specific Tags - # needs: [build, manifest] + needs: [build, manifest] runs-on: ubuntu-latest if: always() steps: From 53620afdbf158b9be6451670cf724446d11cef60 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 21:55:54 +0100 Subject: [PATCH 067/364] Add dynamic detection of asan paths. --- cmake/CompileOptions.cmake | 40 +++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index a5610945c3..0dad28d80d 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -149,17 +149,51 @@ else() set(SANITIZER_COMPILE_DEFINITIONS) endif() +function(find_sanitizer NAME LINK_OPTION) + string(TOUPPER "${NAME}" NAME_UPPER) + set(SANITIZER_PROGRAM_CODE "int main() {return 0;}") + message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate.cpp") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate.cpp" "${SANITIZER_PROGRAM_CODE}") + + try_compile( + STATUS + ${PROJECT_OUTPUT_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate.cpp + OUTPUT_VARIABLE SANITIZER_COMPILER_OUTPUT + LINK_OPTIONS ${LINK_OPTION} + COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate + ) + + if(NOT STATUS) + message(FATAL_ERROR "Could not find location for lib${NAME}: ${SANITIZER_COMPILER_OUTPUT}") + return() + endif() + + file(GET_RUNTIME_DEPENDENCIES + EXECUTABLES ${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate + RESOLVED_DEPENDENCIES_VAR SANITIZER_PROGRAM_LIBRARIES + ) + + foreach(DEPENDENCY IN LISTS SANITIZER_PROGRAM_LIBRARIES) + string(FIND "${DEPENDENCY}" "${NAME}" POSITION) + if(POSITION GREATER -1) + set(LIB${NAME_UPPER}_PATH "${DEPENDENCY}" PARENT_SCOPE) + return() + endif() + endforeach() +endfunction() + if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") if(OPTION_BUILD_THREAD_SANITIZER) - execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libtsan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBTSAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + find_sanitizer(tsan -fsanitize=thread) set(SANITIZER_LIBRARIES_PATH "${LIBTSAN_PATH}" ) elseif(OPTION_BUILD_MEMORY_SANITIZER) set(SANITIZER_LIBRARIES_PATH) # TODO elseif(OPTION_BUILD_ADDRESS_SANITIZER) - execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libasan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBASAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process(COMMAND ${CMAKE_C_COMPILER} -print-file-name=libubsan${CMAKE_SHARED_LIBRARY_SUFFIX} OUTPUT_VARIABLE LIBUBSAN_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) + find_sanitizer(asan -fsanitize=address) + find_sanitizer(ubsan -fsanitize=undefined) set(SANITIZER_LIBRARIES_PATH "${LIBASAN_PATH}" "${LIBUBSAN_PATH}" From f8c7b4cfd958f98fe5ecad1e94ee4c2502caca5e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 26 Feb 2025 22:44:21 +0100 Subject: [PATCH 068/364] Solve issues on funchook windows. --- cmake/CompileOptions.cmake | 1 - source/detours/funchook_detour/CMakeLists.txt | 13 ++++++++----- source/loaders/node_loader/CMakeLists.txt | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index 0dad28d80d..e72d648a19 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -152,7 +152,6 @@ endif() function(find_sanitizer NAME LINK_OPTION) string(TOUPPER "${NAME}" NAME_UPPER) set(SANITIZER_PROGRAM_CODE "int main() {return 0;}") - message(STATUS "${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate.cpp") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sanitizer_locate.cpp" "${SANITIZER_PROGRAM_CODE}") try_compile( diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index bb17e9612d..2f953a4116 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -29,18 +29,21 @@ set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") if(WIN32) set(FUNCHOOK_BUILD_TARGET "INSTALL") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_NAME "funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_NAME}") set(FUNCHOOK_LIBRARY_INSTALL_NAME "funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") else() set(FUNCHOOK_BUILD_TARGET "install") - set(FUNCHOOK_LIBRARY_INSTALL_NAME "libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") + set(FUNCHOOK_LIBRARY_NAME "libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") + set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_NAME}") + set(FUNCHOOK_LIBRARY_INSTALL_NAME "${FUNCHOOK_LIBRARY_NAME}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") endif() set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") -set(FUNCHOOK_LIBRARY "${FUNCHOOK_INSTALL_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") +set(FUNCHOOK_LIBRARY "${PROJECT_OUTPUT_DIR}/${FUNCHOOK_LIBRARY_NAME}") +set(FUNCHOOK_LIBRARY_INSTALL "${PROJECT_OUTPUT_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") ExternalProject_Add(${target_depends} @@ -232,7 +235,7 @@ target_link_options(${target} # Dependency install(FILES - ${FUNCHOOK_LIBRARY} + ${FUNCHOOK_LIBRARY_INSTALL} DESTINATION ${INSTALL_LIB} COMPONENT runtime ) diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 5536fa2023..e557fba418 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -157,6 +157,7 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library + # TODO: Replace this by /FORCE:UNRESOLVED on MSVC for later on resolving it ourselves? $<$:${NodeJS_LIBRARY}> # NodeJS library PUBLIC From 06d548199898bd39a96672a5e19559428a816558 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 27 Feb 2025 19:40:44 +0100 Subject: [PATCH 069/364] Solve issues in funchook windows. --- source/detours/funchook_detour/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/funchook_detour/CMakeLists.txt index 2f953a4116..ac782f31d5 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/funchook_detour/CMakeLists.txt @@ -30,19 +30,18 @@ set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") if(WIN32) set(FUNCHOOK_BUILD_TARGET "INSTALL") set(FUNCHOOK_LIBRARY_NAME "funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_NAME}") + set(FUNCHOOK_LIBRARY "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_NAME}") set(FUNCHOOK_LIBRARY_INSTALL_NAME "funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") else() set(FUNCHOOK_BUILD_TARGET "install") set(FUNCHOOK_LIBRARY_NAME "libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_NAME}") + set(FUNCHOOK_LIBRARY "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_NAME}") set(FUNCHOOK_LIBRARY_INSTALL_NAME "${FUNCHOOK_LIBRARY_NAME}") - set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY_DIR}") + set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY}") endif() set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") -set(FUNCHOOK_LIBRARY "${PROJECT_OUTPUT_DIR}/${FUNCHOOK_LIBRARY_NAME}") set(FUNCHOOK_LIBRARY_INSTALL "${PROJECT_OUTPUT_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") From 120a38322c6142dfbc1e1499ef7d03826c8b236a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 27 Feb 2025 19:41:18 +0100 Subject: [PATCH 070/364] Solve issues in github platform. --- .github/workflows/docker-hub-platform.yml | 57 ++++++++++++++--------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml index 6a004d1ebe..123c572b48 100644 --- a/.github/workflows/docker-hub-platform.yml +++ b/.github/workflows/docker-hub-platform.yml @@ -94,6 +94,8 @@ jobs: manifest: name: Create and Push Manifest Lists needs: build + # Only run when master or when tagging a version + if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Login to Docker Hub @@ -104,10 +106,15 @@ jobs: - name: Create and Push Manifest Lists run: | - for tag in "deps" "dev" "runtime" "cli"; do + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + + echo "Create all the tags by platform" + + for tag in "${tags[@]}"; do echo "Creating manifest for tag: $tag" platform_tags="" - for platform in "linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6"; do + for platform in "${platforms[@]}"; do platform_tag=$(echo "${platform}" | tr '/' '-') platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" done @@ -116,28 +123,32 @@ jobs: docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} done - - name: Create Version Specific Tags - if: startsWith(github.ref, 'refs/tags/') - run: | - VERSION=${GITHUB_REF#refs/tags/v} - tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") - for tag in "${tags[@]}"; do - platform_tags="" - for platform in "${platforms[@]}"; do - platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform}" - done - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} - done + echo "Create the latest tag" cli_platform_tags="" - for platform in ${{ matrix.platform }}; do - cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform}" + for platform in ${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag}" done docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + + echo "Create the version ${VERSION} tag" + + for tag in "${tags[@]}"; do + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + done + fi + cleanup: name: Cleanup Platform Specific Tags needs: [build, manifest] @@ -146,12 +157,14 @@ jobs: steps: - name: Remove Platform-Specific Tags run: | - platforms=("linux-amd64" "linux-386" "linux-arm64" "linux-riscv64" "linux-ppc64le" "linux-s390x" "linux-arm-v7" "linux-arm-v6") tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + + for tag in "${tags[@]}"; do + for platform in "${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + tag_to_delete="${tag}-${platform_tag}" - for platform in "${platforms[@]}"; do - for tag in "${tags[@]}"; do - tag_to_delete="${tag}-${platform}" echo "Deleting tag: ${tag_to_delete}" echo "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" From 95a2663abd3a5be0aa1cf03fcfd02843dae44349 Mon Sep 17 00:00:00 2001 From: -NoName <108888519+Bishoywadea@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:47:41 +0200 Subject: [PATCH 071/364] fxing linux ci after updating tinycc (#553) * adding C to macos CI and updating tcc commit sha * adding branch to ci triggers * modifying md5 hash for tinycc * typo in MD5 * replace TCC_RELOCATE_AUTO in the code * update code according to new signature of tcc_relocate function * remove branch name from macos ci * remove branch from linux ci * remove branch from windows ci * remove c from macos ci * Update metacall-environment.sh --------- Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- cmake/InstallLibTCC.cmake | 4 ++-- source/loaders/c_loader/source/c_loader_impl.cpp | 4 ++-- tools/metacall-environment.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/InstallLibTCC.cmake b/cmake/InstallLibTCC.cmake index 096f447c9b..ca33a0c102 100644 --- a/cmake/InstallLibTCC.cmake +++ b/cmake/InstallLibTCC.cmake @@ -125,7 +125,7 @@ else() endif() set(LIBTCC_TARGET libtcc-depends) -set(LIBTCC_COMMIT_SHA "afc1362") +set(LIBTCC_COMMIT_SHA "6ec4a10") if(PROJECT_OS_FAMILY STREQUAL macos) # TODO: --disable-static is not working on MacOS, this should be reported or further investigated, remove this when it is solved set(LIBTTC_LIBRARY_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}tcc${CMAKE_STATIC_LIBRARY_SUFFIX}") @@ -146,7 +146,7 @@ set(LIBTTC_RUNTIME_FILES ExternalProject_Add(${LIBTCC_TARGET} DOWNLOAD_NAME tinycc.tar.gz URL https://github.com/metacall/tinycc/archive/${LIBTCC_COMMIT_SHA}.tar.gz - URL_MD5 5582b17ee5848aeec28bee13773843f7 + URL_MD5 1d25d1a07a39c6d6671b7221d5286dc1 CONFIGURE_COMMAND ${LIBTCC_CONFIGURE} BUILD_COMMAND ${LIBTCC_BUILD} BUILD_IN_SOURCE true diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index 4ad6689bfe..819bcceeae 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -1224,7 +1224,7 @@ loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path p } } - if (tcc_relocate(c_handle->state, TCC_RELOCATE_AUTO) == -1) + if (tcc_relocate(c_handle->state) == -1) { log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate"); goto error; @@ -1256,7 +1256,7 @@ loader_handle c_loader_impl_load_from_memory(loader_impl impl, const loader_name goto error; } - if (tcc_relocate(c_handle->state, TCC_RELOCATE_AUTO) == -1) + if (tcc_relocate(c_handle->state) == -1) { log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate"); goto error; diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 92cbd780fb..1c1524e286 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -643,10 +643,10 @@ sub_java(){ # C sub_c(){ echo "configure c" + cd $ROOT_DIR + LLVM_VERSION_STRING=14 if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then - LLVM_VERSION_STRING=14 - if [ "${LINUX_DISTRO}" = "debian" ]; then UBUNTU_CODENAME="" CODENAME_FROM_ARGUMENTS="" From 3a5ae97267d11ff8b53f6cbec918faca50b6edd9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 28 Feb 2025 08:54:33 +0100 Subject: [PATCH 072/364] Disable cross compiling macos on tcc. --- cmake/InstallLibTCC.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/InstallLibTCC.cmake b/cmake/InstallLibTCC.cmake index ca33a0c102..18483bba24 100644 --- a/cmake/InstallLibTCC.cmake +++ b/cmake/InstallLibTCC.cmake @@ -84,7 +84,7 @@ elseif(PROJECT_OS_FAMILY STREQUAL macos) # AddressSanitizer can not provide additional info. # SUMMARY: AddressSanitizer: BUS (libsystem_c.dylib:x86_64+0x3647db0f) in off32 - set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG} --enable-cross) # --disable-static + set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG}) # --disable-static elseif(PROJECT_OS_FAMILY STREQUAL win32) if(PROJECT_OS_NAME STREQUAL MinGW) set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG} --config-mingw32 --disable-static) From 6b2936c20d231e291c203e79fc53deb1dc58c8c1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 28 Feb 2025 08:55:53 +0100 Subject: [PATCH 073/364] Add support for c in macos. --- .github/workflows/macos-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 64a7687572..f46dd9256e 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -77,7 +77,7 @@ jobs: - name: Set up the environment run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS env: - METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python nodejs typescript c java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage - name: Configure run: | @@ -85,7 +85,7 @@ jobs: . .env bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS env: - METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage + METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript c java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage - name: Build working-directory: ./build From cecb0c2f529fb447c0f1b81aa1cfe9ad458db863 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 28 Feb 2025 17:06:48 +0100 Subject: [PATCH 074/364] Multiplatform builds for docker by default. --- .github/workflows/docker-hub-platform.yml | 175 ---------------------- .github/workflows/docker-hub.yml | 170 ++++++++++++++++++--- .github/workflows/macos-test.yml | 4 +- 3 files changed, 148 insertions(+), 201 deletions(-) delete mode 100644 .github/workflows/docker-hub-platform.yml diff --git a/.github/workflows/docker-hub-platform.yml b/.github/workflows/docker-hub-platform.yml deleted file mode 100644 index 123c572b48..0000000000 --- a/.github/workflows/docker-hub-platform.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: Build and Push Docker Image for Multiple Architectures - -on: - pull_request: - push: - branches: - - master - - develop - tags: - - 'v*.*.*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - DOCKER_REGISTRY: index.docker.io - DOCKER_USERNAME: metacall - IMAGE_NAME: core - BUILDKIT_VERSION: 0.13.0 - -jobs: - build: - name: Build - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/386 - - linux/arm64 - - linux/riscv64 - - linux/ppc64le - - linux/s390x - - linux/arm/v7 - - linux/arm/v6 - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3 - with: - version: v${{ env.BUILDKIT_VERSION }} - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Build MetaCall Docker Images - env: - METACALL_PLATFORM: ${{ matrix.platform }} - run: | - ./docker-compose.sh platform - - - name: Tag Platform Images - run: | - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - echo "Platform Tag: ${platform_tag}" - for tag in "deps" "dev" "runtime" "cli"; do - docker tag metacall/${IMAGE_NAME}:${tag} \ - ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - - name: Push Platform Images - run: | - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - for tag in "deps" "dev" "runtime" "cli"; do - echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" - docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - - name: Run Tests - run: | - set -exuo pipefail - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - cat < Dockerfile.test - FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} - RUN echo "console.log('abcde')" > script.js - RUN metacallcli script.js - EOF - - docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - docker run --rm --platform=${{ matrix.platform }} test-image - - manifest: - name: Create and Push Manifest Lists - needs: build - # Only run when master or when tagging a version - if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' - runs-on: ubuntu-latest - steps: - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Create and Push Manifest Lists - run: | - tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") - - echo "Create all the tags by platform" - - for tag in "${tags[@]}"; do - echo "Creating manifest for tag: $tag" - platform_tags="" - for platform in "${platforms[@]}"; do - platform_tag=$(echo "${platform}" | tr '/' '-') - platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" - done - echo "Creating manifest with tags: ${platform_tags}" - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} - done - - echo "Create the latest tag" - - cli_platform_tags="" - for platform in ${platforms[@]}"; do - platform_tag=$(echo "${platform}" | tr '/' '-') - cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag}" - done - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest - - if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]]; then - VERSION=${GITHUB_REF#refs/tags/v} - - echo "Create the version ${VERSION} tag" - - for tag in "${tags[@]}"; do - platform_tags="" - for platform in "${platforms[@]}"; do - platform_tag=$(echo "${platform}" | tr '/' '-') - platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" - done - docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend - docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} - done - fi - - cleanup: - name: Cleanup Platform Specific Tags - needs: [build, manifest] - runs-on: ubuntu-latest - if: always() - steps: - - name: Remove Platform-Specific Tags - run: | - tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") - - for tag in "${tags[@]}"; do - for platform in "${platforms[@]}"; do - platform_tag=$(echo "${platform}" | tr '/' '-') - tag_to_delete="${tag}-${platform_tag}" - - echo "Deleting tag: ${tag_to_delete}" - echo "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" - - curl -X DELETE \ - -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN_DELETE }}" \ - "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" - done - done diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 12375d985f..123c572b48 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -1,13 +1,11 @@ -name: Build and Push Docker Image +name: Build and Push Docker Image for Multiple Architectures on: - # To enable manual triggering of this workflow - workflow_dispatch: - - # Trigger for pushes to master and tags + pull_request: push: branches: - master + - develop tags: - 'v*.*.*' @@ -16,38 +14,162 @@ concurrency: cancel-in-progress: true env: - IMAGE_NAME: index.docker.io/metacall/core + DOCKER_REGISTRY: index.docker.io + DOCKER_USERNAME: metacall + IMAGE_NAME: core + BUILDKIT_VERSION: 0.13.0 jobs: build: - runs-on: ubuntu-latest name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/386 + - linux/arm64 + - linux/riscv64 + - linux/ppc64le + - linux/s390x + - linux/arm/v7 + - linux/arm/v6 steps: - - name: Checkout the code + - name: Checkout Repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Login to DockerHub - run: docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" -p "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v3 + with: + version: v${{ env.BUILDKIT_VERSION }} - - name: Pull MetaCall Docker Images - run: bash ./docker-compose.sh pull + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Build MetaCall Docker Images - run: bash ./docker-compose.sh build + env: + METACALL_PLATFORM: ${{ matrix.platform }} + run: | + ./docker-compose.sh platform + + - name: Tag Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + echo "Platform Tag: ${platform_tag}" + for tag in "deps" "dev" "runtime" "cli"; do + docker tag metacall/${IMAGE_NAME}:${tag} \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done + + - name: Push Platform Images + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + for tag in "deps" "dev" "runtime" "cli"; do + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done - # TODO: Build with alpine and provide multiple tags (debian & alpine) once all tests pass - - name: Push MetaCall Docker Image to DockerHub + - name: Run Tests run: | - if [[ "${{ github.ref == 'refs/heads/master' }}" = true ]]; then - bash ./docker-compose.sh push - elif [[ "${{ contains(github.ref, 'refs/tags/') }}" = true ]]; then - bash ./docker-compose.sh version - else - echo "Failed to push the docker images" - exit 1 + set -exuo pipefail + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + cat < Dockerfile.test + FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + RUN echo "console.log('abcde')" > script.js + RUN metacallcli script.js + EOF + + docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker run --rm --platform=${{ matrix.platform }} test-image + + manifest: + name: Create and Push Manifest Lists + needs: build + # Only run when master or when tagging a version + if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Create and Push Manifest Lists + run: | + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + + echo "Create all the tags by platform" + + for tag in "${tags[@]}"; do + echo "Creating manifest for tag: $tag" + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + echo "Creating manifest with tags: ${platform_tags}" + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} + done + + echo "Create the latest tag" + + cli_platform_tags="" + for platform in ${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest + + if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]]; then + VERSION=${GITHUB_REF#refs/tags/v} + + echo "Create the version ${VERSION} tag" + + for tag in "${tags[@]}"; do + platform_tags="" + for platform in "${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}" + done + docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend + docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} + done fi - - name: Logout from DockerHub - run: docker logout + cleanup: + name: Cleanup Platform Specific Tags + needs: [build, manifest] + runs-on: ubuntu-latest + if: always() + steps: + - name: Remove Platform-Specific Tags + run: | + tags=("deps" "dev" "runtime" "cli") + platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + + for tag in "${tags[@]}"; do + for platform in "${platforms[@]}"; do + platform_tag=$(echo "${platform}" | tr '/' '-') + tag_to_delete="${tag}-${platform_tag}" + + echo "Deleting tag: ${tag_to_delete}" + echo "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" + + curl -X DELETE \ + -H "Authorization: Bearer ${{ secrets.DOCKER_HUB_ACCESS_TOKEN_DELETE }}" \ + "https://hub.docker.com/v2/repositories/$%7BDOCKER_USERNAME%7D/$%7BIMAGE_NAME%7D/tags/$%7Btag_to_delete%7D/" + done + done diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index f46dd9256e..64a7687572 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -77,7 +77,7 @@ jobs: - name: Set up the environment run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS env: - METACALL_INSTALL_OPTIONS: base python nodejs typescript c java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage - name: Configure run: | @@ -85,7 +85,7 @@ jobs: . .env bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS env: - METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript c java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage + METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage - name: Build working-directory: ./build From 6273bc7126ce8b1e3634de7b094e228d8dc92348 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 28 Feb 2025 17:07:18 +0100 Subject: [PATCH 075/364] Base support for llvm / c loader macos. --- tools/metacall-environment.sh | 1 - tools/metacall-runtime.sh | 18 ++++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 1c1524e286..28c9a69342 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -686,7 +686,6 @@ sub_c(){ $SUDO_CMD apt-get install -y --no-install-recommends libffi-dev libclang-${LLVM_VERSION_STRING}-dev elif [ "${LINUX_DISTRO}" = "alpine" ]; then $SUDO_CMD apk add --no-cache libffi-dev - $SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing tcc $SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main clang-libs=13.0.1-r1 clang-dev=13.0.1-r1 fi elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then diff --git a/tools/metacall-runtime.sh b/tools/metacall-runtime.sh index 70855f10d3..aad2512430 100755 --- a/tools/metacall-runtime.sh +++ b/tools/metacall-runtime.sh @@ -252,10 +252,10 @@ sub_java(){ # C sub_c(){ echo "configure c" + cd $ROOT_DIR + LLVM_VERSION_STRING=14 if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then - LLVM_VERSION_STRING=14 - if [ "${LINUX_DISTRO}" = "debian" ]; then UBUNTU_CODENAME="" CODENAME_FROM_ARGUMENTS="" @@ -293,9 +293,19 @@ sub_c(){ sub_apt_install_hold libffi libclang-${LLVM_VERSION_STRING} elif [ "${LINUX_DISTRO}" = "ubuntu" ]; then sub_apt_install_hold libffi libclang-${LLVM_VERSION_STRING} + elif [ "${LINUX_DISTRO}" = "alpine" ]; then + $SUDO_CMD apk add --no-cache libffi-dev + $SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main clang-libs=13.0.1-r1 clang-dev=13.0.1-r1 fi - - # TODO: Implement Alpine and Darwin + elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then + brew install libffi + brew install llvm@$LLVM_VERSION_STRING + brew link llvm@$LLVM_VERSION_STRING --force --overwrite + mkdir -p "$ROOT_DIR/build" + CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt" + LIBCLANG_PREFIX=$(brew --prefix llvm@$LLVM_VERSION_STRING) + echo "-DLibClang_INCLUDE_DIR=${LIBCLANG_PREFIX}/include" >> $CMAKE_CONFIG_PATH + echo "-DLibClang_LIBRARY=${LIBCLANG_PREFIX}/lib/libclang.dylib" >> $CMAKE_CONFIG_PATH fi } From 064ac362563135d95f84a604587a8b9d6ae665b3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 3 Mar 2025 18:35:05 +0100 Subject: [PATCH 076/364] Update version to v0.8.8. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 35864a97fe..5c5cbb3b8f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.7 \ No newline at end of file +0.8.8 \ No newline at end of file From 7a954ca874b6e95e2579566bd29e22be46254e43 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 11 Mar 2025 20:30:40 +0100 Subject: [PATCH 077/364] Minor improvement to git2. --- cmake/FindLibGit2.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/FindLibGit2.cmake b/cmake/FindLibGit2.cmake index 787b5319c4..f9f4497e3a 100644 --- a/cmake/FindLibGit2.cmake +++ b/cmake/FindLibGit2.cmake @@ -27,6 +27,10 @@ include(FindPackageHandleStandardArgs) find_package(PkgConfig QUIET) pkg_check_modules(PKG_GIT2 QUIET libgit2) +if(NOT PKG_GIT2_FOUND) + return() +endif() + if(NOT LibGit2_DEFINITIONS) set(LibGit2_DEFINITIONS ${PKG_GIT2_CFLAGS_OTHER}) endif() From af9cad19dd29a5fad4fcba71ac6e1c52f589165b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 11 Mar 2025 20:42:46 +0100 Subject: [PATCH 078/364] Update copyright. --- .env | 2 +- CMakeLists.txt | 2 +- Dockerfile | 2 +- LICENSE | 2 +- cmake/CMakeDebug.cmake | 2 +- cmake/CheckCCompilerFlagStackSmashing.cmake | 2 +- cmake/CheckCXXCompilerFlagStackSmashing.cmake | 2 +- cmake/Coverage.cmake | 2 +- cmake/FindCobol.cmake | 2 +- cmake/FindCoreCLR.cmake | 2 +- cmake/FindDotNET.cmake | 2 +- cmake/FindGBench.cmake | 2 +- cmake/FindJulia.cmake | 2 +- cmake/FindLibClang.cmake | 2 +- cmake/FindLibFFI.cmake | 2 +- cmake/FindLibTCC.cmake | 2 +- cmake/FindMetaCall.cmake | 2 +- cmake/FindNPM.cmake | 2 +- cmake/FindNodeJS.cmake | 2 +- cmake/FindPatchelf.cmake | 2 +- cmake/FindRapidJSON.cmake | 2 +- cmake/FindRust.cmake | 2 +- cmake/FindSpiderMonkey.cmake | 2 +- cmake/FindV8.cmake | 2 +- cmake/FindWasmtime.cmake | 2 +- cmake/FindZig.cmake | 2 +- cmake/InstallGBench.cmake | 2 +- cmake/InstallGTest.cmake | 2 +- cmake/InstallLibTCC.cmake | 2 +- cmake/InstallPatchelf.cmake | 2 +- cmake/InstallRapidJSON.cmake | 2 +- cmake/Portability.cmake | 2 +- cmake/ScriptProject.cmake | 2 +- cmake/SecurityFlags.cmake | 2 +- cmake/TestEnvironmentVariables.cmake | 2 +- cmake/Warnings.cmake | 2 +- deploy/packages/postinst | 2 +- docker-compose.cache.yml | 2 +- docker-compose.platform.yml | 2 +- docker-compose.sh | 2 +- docker-compose.test.yml | 2 +- docker-compose.yml | 2 +- docs/README.md | 2 +- metacall-config-version.cmake.in | 2 +- metacall-config.cmake.in | 2 +- source/adt/include/adt/adt.h | 2 +- source/adt/include/adt/adt_bucket.h | 2 +- source/adt/include/adt/adt_comparable.h | 2 +- source/adt/include/adt/adt_hash.h | 2 +- source/adt/include/adt/adt_map.h | 2 +- source/adt/include/adt/adt_set.h | 2 +- source/adt/include/adt/adt_string.h | 2 +- source/adt/include/adt/adt_trie.h | 2 +- source/adt/include/adt/adt_vector.h | 2 +- source/adt/source/adt.c | 4 ++-- source/adt/source/adt_bucket.c | 2 +- source/adt/source/adt_comparable.c | 2 +- source/adt/source/adt_hash.c | 2 +- source/adt/source/adt_map.c | 2 +- source/adt/source/adt_set.c | 2 +- source/adt/source/adt_trie.c | 2 +- source/adt/source/adt_vector.c | 2 +- source/benchmarks/log_bench/source/log_bench.cpp | 2 +- .../metacall_cs_call_bench/source/metacall_cs_call_bench.cpp | 2 +- .../source/metacall_node_call_bench.cpp | 2 +- .../source/metacall_py_c_api_bench.cpp | 2 +- .../metacall_py_call_bench/source/metacall_py_call_bench.cpp | 2 +- .../metacall_py_init_bench/source/metacall_py_init_bench.cpp | 2 +- .../metacall_rb_call_bench/source/metacall_rb_call_bench.cpp | 2 +- source/cli/metacallcli/include/metacallcli/application.hpp | 2 +- source/cli/metacallcli/source/application.cpp | 2 +- source/cli/metacallcli/source/main.cpp | 2 +- .../cli_cmd_plugin/include/cli_cmd_plugin/cli_cmd_plugin.hpp | 2 +- .../cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h | 2 +- source/cli/plugins/cli_core_plugin/source/cli_core_plugin.cpp | 4 ++-- .../include/cli_sandbox_plugin/cli_sandbox_plugin.h | 2 +- .../plugins/cli_sandbox_plugin/source/cli_sandbox_plugin.cpp | 2 +- source/configuration/include/configuration/configuration.h | 2 +- .../configuration/include/configuration/configuration_impl.h | 2 +- .../include/configuration/configuration_object.h | 2 +- .../include/configuration/configuration_object_handle.h | 2 +- .../include/configuration/configuration_singleton.h | 2 +- source/configuration/source/configuration.c | 4 ++-- source/configuration/source/configuration_impl.c | 2 +- source/configuration/source/configuration_object.c | 2 +- source/configuration/source/configuration_singleton.c | 2 +- source/detour/include/detour/detour.h | 2 +- source/detour/include/detour/detour_handle.h | 2 +- source/detour/include/detour/detour_interface.h | 2 +- source/detour/source/detour.c | 4 ++-- .../funchook_detour/include/funchook_detour/funchook_detour.h | 2 +- .../include/funchook_detour/funchook_detour_impl.h | 2 +- source/detours/funchook_detour/source/funchook_detour.c | 4 ++-- source/detours/funchook_detour/source/funchook_detour_impl.c | 2 +- source/dynlink/include/dynlink/dynlink.h | 2 +- source/dynlink/include/dynlink/dynlink_flags.h | 2 +- source/dynlink/include/dynlink/dynlink_impl.h | 2 +- source/dynlink/include/dynlink/dynlink_impl_beos.h | 2 +- source/dynlink/include/dynlink/dynlink_impl_macos.h | 2 +- source/dynlink/include/dynlink/dynlink_impl_unix.h | 2 +- source/dynlink/include/dynlink/dynlink_impl_win32.h | 2 +- source/dynlink/include/dynlink/dynlink_interface.h | 2 +- source/dynlink/include/dynlink/dynlink_type.h | 2 +- source/dynlink/source/dynlink.c | 4 ++-- source/dynlink/source/dynlink_impl.c | 2 +- source/dynlink/source/dynlink_impl_beos.c | 2 +- source/dynlink/source/dynlink_impl_macos.c | 2 +- source/dynlink/source/dynlink_impl_unix.c | 2 +- source/dynlink/source/dynlink_impl_win32.c | 2 +- source/dynlink/source/dynlink_interface.c | 2 +- source/environment/include/environment/environment.h | 2 +- source/environment/include/environment/environment_variable.h | 2 +- .../include/environment/environment_variable_path.h | 2 +- source/environment/source/environment.c | 4 ++-- source/environment/source/environment_variable.c | 2 +- source/environment/source/environment_variable_path.c | 2 +- source/examples/metacalllog/main.cpp | 2 +- source/examples/metacallquine/main.cpp | 2 +- source/examples/metacallweb/main.cpp | 2 +- .../include/plugin_extension/plugin_extension.h | 2 +- .../extensions/plugin_extension/source/plugin_extension.cpp | 2 +- source/filesystem/include/filesystem/filesystem.h | 2 +- .../include/filesystem/filesystem_directory_descriptor.h | 2 +- .../include/filesystem/filesystem_file_descriptor.h | 2 +- source/filesystem/source/filesystem.c | 4 ++-- source/filesystem/source/filesystem_directory_descriptor.c | 2 +- source/filesystem/source/filesystem_file_descriptor.c | 2 +- source/format/include/format/format.h | 2 +- source/format/include/format/format_print.h | 2 +- source/format/include/format/format_specifier.h | 2 +- source/format/source/format.c | 4 ++-- source/loader/include/loader/loader.h | 2 +- source/loader/include/loader/loader_handle.h | 2 +- source/loader/include/loader/loader_host.h | 2 +- source/loader/include/loader/loader_impl.h | 2 +- source/loader/include/loader/loader_impl_data.h | 2 +- source/loader/include/loader/loader_impl_interface.h | 2 +- source/loader/include/loader/loader_manager_impl.h | 2 +- source/loader/include/loader/loader_naming.h | 2 +- source/loader/source/loader.c | 4 ++-- source/loader/source/loader_host.c | 2 +- source/loader/source/loader_impl.c | 2 +- source/loader/source/loader_manager_impl.c | 2 +- source/loaders/c_loader/include/c_loader/c_loader.h | 2 +- source/loaders/c_loader/include/c_loader/c_loader_impl.h | 2 +- source/loaders/c_loader/source/c_loader.c | 4 ++-- source/loaders/c_loader/source/c_loader_impl.cpp | 2 +- source/loaders/cob_loader/include/cob_loader/cob_loader.h | 2 +- .../loaders/cob_loader/include/cob_loader/cob_loader_impl.h | 2 +- source/loaders/cob_loader/source/cob_loader.c | 4 ++-- source/loaders/cob_loader/source/cob_loader_impl.cpp | 2 +- source/loaders/cr_loader/crystal/cr_loader_impl.cr | 2 +- source/loaders/cr_loader/crystal/main.cr | 2 +- source/loaders/cr_loader/crystal/metacall.cr | 2 +- source/loaders/cr_loader/include/cr_loader/cr_loader.h | 2 +- source/loaders/cr_loader/include/cr_loader/cr_loader_impl.h | 2 +- .../loaders/cr_loader/include/cr_loader/cr_loader_impl_main.h | 2 +- source/loaders/cr_loader/source/cr_loader.c | 4 ++-- source/loaders/cs_loader/include/cs_loader/defs.h | 2 +- source/loaders/cs_loader/include/cs_loader/host_environment.h | 2 +- source/loaders/cs_loader/include/cs_loader/netcore.h | 2 +- source/loaders/cs_loader/include/cs_loader/netcore_linux.h | 2 +- source/loaders/cs_loader/include/cs_loader/netcore_win.h | 2 +- source/loaders/cs_loader/include/cs_loader/simple_netcore.h | 2 +- source/loaders/cs_loader/include/cs_loader/string_buffer.h | 2 +- source/loaders/cs_loader/include/cs_loader/utils.hpp | 2 +- source/loaders/cs_loader/source/cs_loader.c | 2 +- source/loaders/cs_loader/source/cs_loader_impl.c | 2 +- source/loaders/cs_loader/source/host_environment.cpp | 2 +- source/loaders/cs_loader/source/netcore.cpp | 2 +- source/loaders/cs_loader/source/netcore_linux.cpp | 2 +- source/loaders/cs_loader/source/simple_netcore.cpp | 2 +- source/loaders/cs_loader/source/string_buffer.cpp | 2 +- source/loaders/dart_loader/include/dart_loader/dart_loader.h | 2 +- .../dart_loader/include/dart_loader/dart_loader_impl.h | 2 +- source/loaders/dart_loader/source/dart_loader.c | 4 ++-- source/loaders/dart_loader/source/dart_loader_impl.cc | 2 +- source/loaders/ext_loader/include/ext_loader/ext_loader.h | 2 +- .../loaders/ext_loader/include/ext_loader/ext_loader_impl.h | 2 +- source/loaders/ext_loader/source/ext_loader.c | 4 ++-- source/loaders/ext_loader/source/ext_loader_impl.cpp | 2 +- source/loaders/file_loader/include/file_loader/file_loader.h | 2 +- .../file_loader/include/file_loader/file_loader_impl.h | 2 +- source/loaders/file_loader/source/file_loader.c | 4 ++-- source/loaders/file_loader/source/file_loader_impl.c | 2 +- source/loaders/java_loader/include/java_loader/java_loader.h | 2 +- .../java_loader/include/java_loader/java_loader_impl.h | 2 +- source/loaders/java_loader/source/java_loader.c | 4 ++-- source/loaders/java_loader/source/java_loader_impl.cpp | 2 +- source/loaders/jl_loader/bootstrap/lib/bootstrap.jl | 2 +- source/loaders/jl_loader/include/jl_loader/jl_loader.h | 2 +- source/loaders/jl_loader/include/jl_loader/jl_loader_impl.h | 2 +- source/loaders/jl_loader/source/jl_loader.c | 4 ++-- source/loaders/jl_loader/source/jl_loader_impl.cpp | 2 +- source/loaders/js_loader/include/js_loader/js_loader.h | 2 +- source/loaders/js_loader/include/js_loader/js_loader_impl.h | 2 +- .../js_loader/include/js_loader/js_loader_impl_guard.hpp | 2 +- source/loaders/js_loader/source/js_loader.c | 4 ++-- source/loaders/js_loader/source/js_loader_impl.cpp | 2 +- source/loaders/js_loader/source/js_loader_impl_guard.cpp | 2 +- source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h | 2 +- .../loaders/jsm_loader/include/jsm_loader/jsm_loader_impl.h | 2 +- source/loaders/jsm_loader/source/jsm_loader.c | 4 ++-- source/loaders/jsm_loader/source/jsm_loader_impl.cpp | 2 +- source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h | 2 +- .../llvm_loader/include/llvm_loader/llvm_loader_impl.h | 2 +- source/loaders/llvm_loader/source/llvm_loader.c | 4 ++-- source/loaders/llvm_loader/source/llvm_loader_impl.cpp | 2 +- source/loaders/loaders.h.in | 2 +- source/loaders/lua_loader/include/lua_loader/lua_loader.h | 2 +- .../loaders/lua_loader/include/lua_loader/lua_loader_impl.h | 2 +- source/loaders/lua_loader/source/lua_loader.c | 4 ++-- source/loaders/lua_loader/source/lua_loader_impl.c | 2 +- source/loaders/mock_loader/include/mock_loader/mock_loader.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_descriptor.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_export.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_function.h | 2 +- .../include/mock_loader/mock_loader_function_interface.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_handle.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_impl.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_interface.h | 2 +- .../mock_loader/include/mock_loader/mock_loader_print.h | 2 +- source/loaders/mock_loader/source/mock_loader.c | 4 ++-- source/loaders/mock_loader/source/mock_loader_descriptor.c | 2 +- source/loaders/mock_loader/source/mock_loader_export.c | 2 +- source/loaders/mock_loader/source/mock_loader_function.c | 2 +- .../mock_loader/source/mock_loader_function_interface.c | 2 +- source/loaders/mock_loader/source/mock_loader_handle.c | 2 +- source/loaders/mock_loader/source/mock_loader_impl.c | 2 +- source/loaders/mock_loader/source/mock_loader_interface.c | 2 +- source/loaders/mock_loader/source/mock_loader_print.c | 4 ++-- source/loaders/node_loader/include/node_loader/node_loader.h | 2 +- .../node_loader/include/node_loader/node_loader_bootstrap.h | 2 +- .../node_loader/include/node_loader/node_loader_impl.h | 2 +- .../node_loader/include/node_loader/node_loader_port.h | 2 +- .../node_loader/include/node_loader/node_loader_trampoline.h | 2 +- .../include/node_loader/node_loader_win32_delay_load.h | 2 +- source/loaders/node_loader/source/node_loader.c | 4 ++-- source/loaders/node_loader/source/node_loader_impl.cpp | 2 +- source/loaders/node_loader/source/node_loader_port.cpp | 2 +- source/loaders/node_loader/source/node_loader_trampoline.cpp | 2 +- source/loaders/py_loader/include/py_loader/py_loader.h | 2 +- source/loaders/py_loader/include/py_loader/py_loader_dict.h | 2 +- source/loaders/py_loader/include/py_loader/py_loader_impl.h | 2 +- source/loaders/py_loader/include/py_loader/py_loader_port.h | 2 +- .../loaders/py_loader/include/py_loader/py_loader_threading.h | 2 +- source/loaders/py_loader/source/py_loader.c | 4 ++-- source/loaders/py_loader/source/py_loader_dict.c | 2 +- source/loaders/py_loader/source/py_loader_impl.c | 2 +- source/loaders/py_loader/source/py_loader_port.c | 2 +- source/loaders/py_loader/source/py_loader_threading.cpp | 2 +- source/loaders/rb_loader/include/rb_loader/rb_loader.h | 2 +- source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h | 2 +- .../rb_loader/include/rb_loader/rb_loader_impl_parser.h | 2 +- source/loaders/rb_loader/source/rb_loader.c | 4 ++-- source/loaders/rb_loader/source/rb_loader_impl.c | 2 +- source/loaders/rb_loader/source/rb_loader_impl_parser.c | 2 +- source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h | 2 +- .../loaders/rpc_loader/include/rpc_loader/rpc_loader_impl.h | 2 +- source/loaders/rpc_loader/source/rpc_loader.c | 4 ++-- source/loaders/rpc_loader/source/rpc_loader_impl.cpp | 2 +- source/loaders/rs_loader/include/rs_loader/rs_loader.h | 2 +- source/loaders/rs_loader/include/rs_loader/rs_loader_impl.h | 2 +- source/loaders/rs_loader/source/rs_loader.c | 4 ++-- source/loaders/ts_loader/include/ts_loader/ts_loader.h | 2 +- source/loaders/ts_loader/include/ts_loader/ts_loader_impl.h | 2 +- source/loaders/ts_loader/source/ts_loader.c | 4 ++-- source/loaders/ts_loader/source/ts_loader_impl.cpp | 2 +- source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h | 2 +- .../wasm_loader/include/wasm_loader/wasm_loader_function.h | 2 +- .../wasm_loader/include/wasm_loader/wasm_loader_handle.h | 2 +- .../wasm_loader/include/wasm_loader/wasm_loader_impl.h | 2 +- source/loaders/wasm_loader/source/wasm_loader.c | 4 ++-- source/loaders/wasm_loader/source/wasm_loader_impl.c | 2 +- source/log/include/log/log.h | 2 +- source/log/include/log/log_aspect.h | 2 +- source/log/include/log/log_aspect_format.h | 2 +- source/log/include/log/log_aspect_schedule.h | 2 +- source/log/include/log/log_aspect_storage.h | 2 +- source/log/include/log/log_aspect_stream.h | 2 +- source/log/include/log/log_handle.h | 2 +- source/log/include/log/log_impl.h | 2 +- source/log/include/log/log_level.h | 2 +- source/log/include/log/log_map.h | 2 +- source/log/include/log/log_policy.h | 2 +- source/log/include/log/log_policy_format.h | 2 +- source/log/include/log/log_policy_format_binary.h | 2 +- source/log/include/log/log_policy_format_custom.h | 2 +- source/log/include/log/log_policy_format_text.h | 2 +- source/log/include/log/log_policy_schedule.h | 2 +- source/log/include/log/log_policy_schedule_async.h | 2 +- source/log/include/log/log_policy_schedule_sync.h | 2 +- source/log/include/log/log_policy_storage.h | 2 +- source/log/include/log/log_policy_storage_batch.h | 2 +- source/log/include/log/log_policy_storage_sequential.h | 2 +- source/log/include/log/log_policy_stream.h | 2 +- source/log/include/log/log_policy_stream_custom.h | 2 +- source/log/include/log/log_policy_stream_file.h | 2 +- source/log/include/log/log_policy_stream_nginx.h | 2 +- source/log/include/log/log_policy_stream_socket.h | 2 +- source/log/include/log/log_policy_stream_stdio.h | 2 +- source/log/include/log/log_policy_stream_syslog.h | 2 +- source/log/include/log/log_preprocessor.h | 2 +- source/log/include/log/log_record.h | 2 +- source/log/include/log/log_singleton.h | 2 +- source/log/include/log/log_valid_size.h | 2 +- source/log/source/log.c | 4 ++-- source/log/source/log_aspect.c | 2 +- source/log/source/log_aspect_format.c | 2 +- source/log/source/log_aspect_schedule.c | 2 +- source/log/source/log_aspect_storage.c | 2 +- source/log/source/log_aspect_stream.c | 2 +- source/log/source/log_handle.c | 2 +- source/log/source/log_impl.c | 2 +- source/log/source/log_level.c | 2 +- source/log/source/log_map.c | 2 +- source/log/source/log_policy.c | 2 +- source/log/source/log_policy_format.c | 2 +- source/log/source/log_policy_format_binary.c | 2 +- source/log/source/log_policy_format_custom.c | 2 +- source/log/source/log_policy_format_text.c | 2 +- source/log/source/log_policy_schedule.c | 2 +- source/log/source/log_policy_schedule_async.c | 2 +- source/log/source/log_policy_schedule_sync.c | 2 +- source/log/source/log_policy_storage.c | 2 +- source/log/source/log_policy_storage_batch.c | 2 +- source/log/source/log_policy_storage_sequential.c | 2 +- source/log/source/log_policy_stream.c | 2 +- source/log/source/log_policy_stream_custom.c | 2 +- source/log/source/log_policy_stream_file.c | 2 +- source/log/source/log_policy_stream_nginx.c | 2 +- source/log/source/log_policy_stream_socket.c | 2 +- source/log/source/log_policy_stream_stdio.c | 2 +- source/log/source/log_policy_stream_syslog.c | 2 +- source/log/source/log_record.c | 2 +- source/log/source/log_singleton.c | 2 +- source/log/source/log_valid_size.c | 2 +- source/memory/include/memory/memory.h | 2 +- source/memory/include/memory/memory_allocator.h | 2 +- source/memory/include/memory/memory_allocator_iface.h | 2 +- source/memory/include/memory/memory_allocator_impl.h | 2 +- source/memory/include/memory/memory_allocator_nginx.h | 2 +- source/memory/include/memory/memory_allocator_nginx_impl.h | 2 +- source/memory/include/memory/memory_allocator_std.h | 2 +- source/memory/include/memory/memory_allocator_std_impl.h | 2 +- source/memory/source/memory.c | 4 ++-- source/memory/source/memory_allocator.c | 2 +- source/memory/source/memory_allocator_nginx.c | 2 +- source/memory/source/memory_allocator_nginx_impl.c | 2 +- source/memory/source/memory_allocator_std.c | 2 +- source/memory/source/memory_allocator_std_impl.c | 2 +- source/metacall/include/metacall/metacall.h | 2 +- source/metacall/include/metacall/metacall_allocator.h | 2 +- source/metacall/include/metacall/metacall_error.h | 2 +- source/metacall/include/metacall/metacall_fork.h | 2 +- source/metacall/include/metacall/metacall_link.h | 2 +- source/metacall/include/metacall/metacall_log.h | 2 +- source/metacall/include/metacall/metacall_value.h | 2 +- source/metacall/metacall_def.h.in | 2 +- source/metacall/source/metacall.c | 4 ++-- source/metacall/source/metacall_allocator.c | 2 +- source/metacall/source/metacall_error.c | 2 +- source/metacall/source/metacall_fork.c | 2 +- source/metacall/source/metacall_link.c | 2 +- source/metacall/source/metacall_log.c | 2 +- source/metacall/source/metacall_value.c | 2 +- source/plugin/include/plugin/plugin.h | 2 +- source/plugin/include/plugin/plugin_descriptor.h | 2 +- source/plugin/include/plugin/plugin_impl.h | 2 +- source/plugin/include/plugin/plugin_interface.hpp | 2 +- source/plugin/include/plugin/plugin_loader.h | 2 +- source/plugin/include/plugin/plugin_manager.h | 2 +- source/plugin/source/plugin.c | 4 ++-- source/plugin/source/plugin_descriptor.c | 2 +- source/plugin/source/plugin_impl.c | 2 +- source/plugin/source/plugin_loader.c | 2 +- source/plugin/source/plugin_manager.c | 2 +- .../include/backtrace_plugin/backtrace_plugin.h | 2 +- source/plugins/backtrace_plugin/source/backtrace_plugin.cpp | 2 +- source/plugins/sandbox_plugin/cmake/FindLibSecComp.cmake | 2 +- .../sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h | 2 +- source/plugins/sandbox_plugin/source/sandbox_plugin.cpp | 2 +- source/portability/include/portability/portability.h | 2 +- source/portability/include/portability/portability_assert.h | 2 +- source/portability/include/portability/portability_atexit.h | 2 +- source/portability/include/portability/portability_compiler.h | 2 +- .../portability/include/portability/portability_constructor.h | 2 +- .../include/portability/portability_executable_path.h | 2 +- .../include/portability/portability_library_path.h | 2 +- source/portability/include/portability/portability_path.h | 2 +- .../include/portability/portability_working_path.h | 2 +- source/portability/source/portability.c | 4 ++-- source/portability/source/portability_atexit.c | 2 +- source/portability/source/portability_executable_path.c | 2 +- source/portability/source/portability_library_path.c | 2 +- source/portability/source/portability_path.c | 2 +- source/portability/source/portability_working_path.c | 2 +- source/ports/CMakeLists.txt | 2 +- source/ports/cxx_port/include/metacall/metacall.hpp | 2 +- source/ports/cxx_port/inline/metacall/metacall.inl | 2 +- source/ports/cxx_port/source/metacall.cpp | 2 +- source/ports/go_port/source/await.go | 2 +- source/ports/go_port/source/go_port.go | 2 +- source/ports/go_port/source/pointer.go | 2 +- source/ports/js_port/include/js_port/js_port.h | 2 +- source/ports/js_port/interface/js_port/js_port.i | 2 +- source/ports/js_port/interface/js_port/js_port_impl.i | 2 +- source/ports/js_port/source/js_port.c | 2 +- source/ports/js_port/test/main.cpp | 2 +- source/ports/nim_port/LICENSE | 2 +- source/ports/node_port/LICENSE | 2 +- source/ports/node_port/index.js | 2 +- source/ports/node_port/test.js | 2 +- source/ports/node_port/test/index.js | 2 +- source/ports/node_port/upload.sh | 2 +- source/ports/py_port/LICENSE.txt | 2 +- source/ports/py_port/helper/__init__.py | 2 +- source/ports/py_port/metacall/__init__.py | 2 +- source/ports/py_port/metacall/api.py | 2 +- source/ports/py_port/metacall/module_linux.py | 2 +- source/ports/py_port/metacall/module_win32.py | 2 +- source/ports/py_port/setup.py | 2 +- source/ports/py_port/upload.sh | 2 +- source/ports/rb_port/include/rb_port/rb_port.h | 2 +- source/ports/rb_port/interface/rb_port/rb_port.i | 2 +- source/ports/rb_port/interface/rb_port/rb_port_impl.i | 2 +- source/ports/rb_port/source/rb_port.c | 2 +- source/ports/rs_port/LICENSE.txt | 2 +- source/ports/rs_port/src/lib.rs | 2 +- source/ports/rs_port/upload.sh | 2 +- source/preprocessor/cmake/preprocessor_arguments.cmake | 2 +- source/preprocessor/cmake/preprocessor_arithmetic.cmake | 2 +- source/preprocessor/cmake/preprocessor_boolean.cmake | 2 +- source/preprocessor/cmake/preprocessor_for.cmake | 2 +- source/preprocessor/cmake/preprocessor_template.cmake | 2 +- source/preprocessor/cmake/preprocessor_template.h.in | 2 +- source/preprocessor/include/preprocessor/preprocessor.h | 2 +- .../include/preprocessor/preprocessor_arguments.h | 2 +- .../include/preprocessor/preprocessor_arithmetic.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_bit.h | 2 +- .../preprocessor/include/preprocessor/preprocessor_boolean.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_comma.h | 2 +- .../include/preprocessor/preprocessor_comparison.h | 2 +- .../include/preprocessor/preprocessor_complement.h | 2 +- .../include/preprocessor/preprocessor_concatenation.h | 2 +- .../include/preprocessor/preprocessor_detection.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_empty.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_for.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_if.h | 2 +- .../preprocessor/include/preprocessor/preprocessor_serial.h | 2 +- .../include/preprocessor/preprocessor_stringify.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_tuple.h | 2 +- source/preprocessor/source/preprocessor.c | 4 ++-- source/reflect/include/reflect/reflect.h | 2 +- source/reflect/include/reflect/reflect_accessor.h | 2 +- source/reflect/include/reflect/reflect_async.h | 2 +- source/reflect/include/reflect/reflect_attribute.h | 2 +- source/reflect/include/reflect/reflect_attribute_decl.h | 2 +- source/reflect/include/reflect/reflect_class.h | 2 +- source/reflect/include/reflect/reflect_class_decl.h | 2 +- source/reflect/include/reflect/reflect_class_visibility.h | 2 +- source/reflect/include/reflect/reflect_constructor.h | 2 +- source/reflect/include/reflect/reflect_constructor_decl.h | 2 +- source/reflect/include/reflect/reflect_context.h | 2 +- source/reflect/include/reflect/reflect_exception.h | 2 +- source/reflect/include/reflect/reflect_function.h | 2 +- source/reflect/include/reflect/reflect_future.h | 2 +- source/reflect/include/reflect/reflect_memory_tracker.h | 2 +- source/reflect/include/reflect/reflect_method.h | 2 +- source/reflect/include/reflect/reflect_method_decl.h | 2 +- source/reflect/include/reflect/reflect_object.h | 2 +- source/reflect/include/reflect/reflect_scope.h | 2 +- source/reflect/include/reflect/reflect_signature.h | 2 +- source/reflect/include/reflect/reflect_throwable.h | 2 +- source/reflect/include/reflect/reflect_type.h | 2 +- source/reflect/include/reflect/reflect_type_id.h | 2 +- source/reflect/include/reflect/reflect_value.h | 2 +- source/reflect/include/reflect/reflect_value_type.h | 2 +- source/reflect/include/reflect/reflect_value_type_cast.h | 2 +- source/reflect/include/reflect/reflect_value_type_demotion.h | 2 +- source/reflect/include/reflect/reflect_value_type_id_size.h | 2 +- source/reflect/include/reflect/reflect_value_type_promotion.h | 2 +- source/reflect/source/reflect.c | 4 ++-- source/reflect/source/reflect_attribute.c | 2 +- source/reflect/source/reflect_class.c | 2 +- source/reflect/source/reflect_class_visibility.c | 2 +- source/reflect/source/reflect_constructor.c | 2 +- source/reflect/source/reflect_context.c | 2 +- source/reflect/source/reflect_exception.c | 2 +- source/reflect/source/reflect_function.c | 2 +- source/reflect/source/reflect_future.c | 2 +- source/reflect/source/reflect_memory_tracker.c | 2 +- source/reflect/source/reflect_method.c | 2 +- source/reflect/source/reflect_object.c | 2 +- source/reflect/source/reflect_scope.c | 2 +- source/reflect/source/reflect_signature.c | 2 +- source/reflect/source/reflect_throwable.c | 2 +- source/reflect/source/reflect_type.c | 2 +- source/reflect/source/reflect_type_id.c | 2 +- source/reflect/source/reflect_value.c | 2 +- source/reflect/source/reflect_value_type.c | 2 +- source/reflect/source/reflect_value_type_cast.c | 2 +- source/reflect/source/reflect_value_type_demotion.c | 2 +- source/reflect/source/reflect_value_type_id_size.c | 2 +- source/reflect/source/reflect_value_type_promotion.c | 2 +- source/scripts/c/cmake/CProject.cmake | 2 +- source/scripts/c/cmake/CProject.cmake.in | 2 +- source/scripts/cobol/cmake/CobolProject.cmake | 2 +- source/scripts/cobol/cmake/CobolProject.cmake.in | 2 +- source/scripts/csharp/cmake/CSharpProject.cmake | 2 +- source/scripts/csharp/cmake/CSharpProject.cmake.in | 2 +- source/scripts/csharp/cmake/CSharpProject.json.in | 2 +- .../extension/sum/include/sum_extension/sum_extension.h | 2 +- source/scripts/extension/sum/source/sum_extension.cpp | 2 +- source/scripts/file/cmake/FileProject.cmake | 2 +- source/scripts/file/cmake/FileProject.cmake.in | 2 +- source/scripts/java/cmake/JavaJarProject.cmake.in | 2 +- source/scripts/java/cmake/JavaProject.cmake | 2 +- source/scripts/java/cmake/JavaProject.cmake.in | 2 +- source/scripts/javascript/cmake/JavaScriptProject.cmake | 2 +- source/scripts/javascript/cmake/JavaScriptProject.cmake.in | 2 +- source/scripts/javascript/cmake/JavaScriptProject.json.in | 2 +- source/scripts/julia/cmake/JuliaProject.cmake | 2 +- source/scripts/julia/cmake/JuliaProject.cmake.in | 2 +- source/scripts/llvm/cmake/LLVMProject.cmake | 2 +- source/scripts/llvm/cmake/LLVMProject.cmake.in | 2 +- source/scripts/lua/cmake/LuaProject.cmake | 2 +- source/scripts/lua/cmake/LuaProject.cmake.in | 2 +- source/scripts/node/cmake/NodeJSProject.cmake | 2 +- source/scripts/node/cmake/NodeJSProject.cmake.in | 2 +- source/scripts/node/cmake/NodeJSProject.json.in | 2 +- source/scripts/python/cmake/PythonProject.cmake | 2 +- source/scripts/python/cmake/PythonProject.cmake.in | 2 +- source/scripts/python/cmake/PythonProject.py.in | 2 +- source/scripts/python/rsasample/source/rsasample.py | 2 +- source/scripts/python/rsasample/source/sample/rsa_strings.py | 2 +- source/scripts/rpc/cmake/RPCProject.cmake | 2 +- source/scripts/rpc/cmake/RPCProject.cmake.in | 2 +- source/scripts/ruby/cmake/RubyProject.cmake | 2 +- source/scripts/ruby/cmake/RubyProject.cmake.in | 2 +- source/scripts/ruby/cmake/RubyProject.rb.in | 2 +- source/scripts/rust/cmake/RustProject.cmake | 2 +- source/scripts/rust/cmake/RustProject.cmake.in | 2 +- source/scripts/typescript/cmake/TypeScriptProject.cmake | 2 +- source/scripts/typescript/cmake/TypeScriptProject.cmake.in | 2 +- source/scripts/typescript/cmake/TypeScriptProject.json.in | 2 +- source/scripts/wasm/cmake/WasmProject.cmake | 2 +- source/scripts/wasm/cmake/WasmProject.cmake.in | 2 +- source/serial/include/serial/serial.h | 2 +- source/serial/include/serial/serial_handle.h | 2 +- source/serial/include/serial/serial_interface.h | 2 +- source/serial/source/serial.c | 4 ++-- .../metacall_serial/include/metacall_serial/metacall_serial.h | 2 +- .../include/metacall_serial/metacall_serial_impl.h | 2 +- .../metacall_serial/metacall_serial_impl_deserialize.h | 2 +- .../include/metacall_serial/metacall_serial_impl_serialize.h | 2 +- source/serials/metacall_serial/source/metacall_serial.c | 4 ++-- source/serials/metacall_serial/source/metacall_serial_impl.c | 2 +- .../metacall_serial/source/metacall_serial_impl_deserialize.c | 2 +- .../metacall_serial/source/metacall_serial_impl_serialize.c | 2 +- .../include/rapid_json_serial/rapid_json_serial.h | 2 +- .../include/rapid_json_serial/rapid_json_serial_impl.h | 2 +- source/serials/rapid_json_serial/source/rapid_json_serial.c | 4 ++-- .../rapid_json_serial/source/rapid_json_serial_impl.cpp | 2 +- source/tests/adt_map_test/source/adt_map_test.cpp | 2 +- source/tests/adt_map_test/source/main.cpp | 2 +- source/tests/adt_set_test/source/adt_set_test.cpp | 2 +- source/tests/adt_set_test/source/main.cpp | 2 +- source/tests/adt_trie_test/source/adt_trie_test.cpp | 2 +- source/tests/adt_trie_test/source/main.cpp | 2 +- source/tests/adt_vector_test/source/adt_vector_test.cpp | 2 +- source/tests/adt_vector_test/source/main.cpp | 2 +- source/tests/configuration_test/source/configuration_test.cpp | 2 +- source/tests/configuration_test/source/main.cpp | 2 +- source/tests/detour_test/source/detour_test.cpp | 2 +- source/tests/detour_test/source/main.cpp | 2 +- source/tests/dynlink_test/source/dynlink_test.cpp | 2 +- source/tests/dynlink_test/source/main.cpp | 2 +- source/tests/environment_test/source/environment_test.cpp | 2 +- source/tests/environment_test/source/main.cpp | 2 +- source/tests/log_custom_test/source/log_custom_test.cpp | 2 +- source/tests/log_custom_test/source/main.cpp | 2 +- source/tests/log_test/source/log_test.cpp | 2 +- source/tests/log_test/source/main.cpp | 2 +- source/tests/metacall_backtrace_plugin_test/source/main.cpp | 2 +- .../source/metacall_backtrace_plugin_test.cpp | 2 +- source/tests/metacall_c_lib_test/source/main.cpp | 2 +- .../tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp | 2 +- source/tests/metacall_c_test/source/main.cpp | 2 +- source/tests/metacall_c_test/source/metacall_c_test.cpp | 2 +- source/tests/metacall_callback_complex_test/source/main.cpp | 2 +- .../source/metacall_callback_complex_test.cpp | 2 +- source/tests/metacall_cast_test/source/main.cpp | 2 +- source/tests/metacall_cast_test/source/metacall_cast_test.cpp | 2 +- source/tests/metacall_clear_test/source/main.cpp | 2 +- .../tests/metacall_clear_test/source/metacall_clear_test.cpp | 2 +- .../tests/metacall_cli_core_plugin_await_test/source/main.cpp | 2 +- .../source/metacall_cli_core_plugin_await_test.cpp | 2 +- source/tests/metacall_cli_core_plugin_test/source/main.cpp | 2 +- .../source/metacall_cli_core_plugin_test.cpp | 2 +- source/tests/metacall_cobol_test/source/main.cpp | 2 +- .../tests/metacall_cobol_test/source/metacall_cobol_test.cpp | 2 +- .../tests/metacall_configuration_default_test/source/main.cpp | 2 +- .../source/metacall_configuration_default_test.cpp | 2 +- .../metacall_configuration_exec_path_test/source/main.cpp | 2 +- .../source/metacall_configuration_exec_path_test.cpp | 2 +- .../metacall_cs_test/include/metacall-cs-test/environment.hpp | 2 +- source/tests/metacall_cs_test/source/environment.cpp | 2 +- source/tests/metacall_cs_test/source/main.cpp | 2 +- source/tests/metacall_cs_test/source/metacall_cs_test.cpp | 2 +- source/tests/metacall_csharp_function_test/source/main.cpp | 2 +- .../source/metacall_csharp_function_test.cpp | 2 +- .../tests/metacall_csharp_static_class_test/source/main.cpp | 2 +- .../source/metacall_csharp_static_class_test.cpp | 2 +- source/tests/metacall_depends_test/source/main.cpp | 2 +- .../metacall_depends_test/source/metacall_depends_test.cpp | 2 +- source/tests/metacall_distributable_test/source/main.cpp | 2 +- .../source/metacall_distributable_test.cpp | 2 +- source/tests/metacall_ducktype_test/source/main.cpp | 2 +- .../metacall_ducktype_test/source/metacall_ducktype_test.cpp | 2 +- source/tests/metacall_duplicated_handle_test/source/main.cpp | 2 +- .../source/metacall_duplicated_handle_test.cpp | 2 +- source/tests/metacall_duplicated_symbols_test/source/main.cpp | 2 +- .../source/metacall_duplicated_symbols_test.cpp | 2 +- source/tests/metacall_dynlink_path_test/source/main.cpp | 2 +- .../source/metacall_dynlink_path_test.cpp | 2 +- source/tests/metacall_ext_test/source/main.cpp | 2 +- source/tests/metacall_ext_test/source/metacall_ext_test.cpp | 2 +- source/tests/metacall_file_fail_test/source/main.cpp | 2 +- .../source/metacall_file_fail_test.cpp | 2 +- source/tests/metacall_file_glob_test/source/main.cpp | 2 +- .../source/metacall_file_glob_test.cpp | 2 +- source/tests/metacall_file_test/source/main.cpp | 2 +- source/tests/metacall_file_test/source/metacall_file_test.cpp | 2 +- source/tests/metacall_fork_test/source/main.cpp | 2 +- source/tests/metacall_fork_test/source/metacall_fork_test.cpp | 2 +- source/tests/metacall_function_test/source/main.cpp | 2 +- .../metacall_function_test/source/metacall_function_test.cpp | 2 +- source/tests/metacall_handle_export_test/source/main.cpp | 2 +- .../source/metacall_handle_export_test.cpp | 2 +- source/tests/metacall_handle_get_test/source/main.cpp | 2 +- .../source/metacall_handle_get_test.cpp | 2 +- source/tests/metacall_init_fini_test/source/main.cpp | 2 +- .../source/metacall_init_fini_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_initialize_destroy_multiple_node_test.cpp | 2 +- .../metacall_initialize_destroy_multiple_test/source/main.cpp | 2 +- .../source/metacall_initialize_destroy_multiple_test.cpp | 2 +- source/tests/metacall_initialize_ex_test/source/main.cpp | 2 +- .../source/metacall_initialize_ex_test.cpp | 2 +- source/tests/metacall_initialize_test/source/main.cpp | 2 +- .../source/metacall_initialize_test.cpp | 2 +- source/tests/metacall_inspect_test/source/main.cpp | 2 +- .../metacall_inspect_test/source/metacall_inspect_test.cpp | 2 +- .../include/metacall-integration-test/environment.hpp | 2 +- source/tests/metacall_integration_test/source/environment.cpp | 2 +- source/tests/metacall_integration_test/source/main.cpp | 2 +- .../source/metacall_integration_test.cpp | 2 +- source/tests/metacall_invalid_loader_test/source/main.cpp | 2 +- .../source/metacall_invalid_loader_test.cpp | 2 +- source/tests/metacall_java_test/source/main.cpp | 2 +- source/tests/metacall_java_test/source/metacall_java_test.cpp | 2 +- source/tests/metacall_julia_test/source/main.cpp | 2 +- .../tests/metacall_julia_test/source/metacall_julia_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_library_path_without_env_vars_test.cpp | 2 +- source/tests/metacall_llvm_test/source/main.cpp | 2 +- source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp | 2 +- .../metacall_load_configuration_fail_test/source/main.cpp | 2 +- .../source/metacall_load_configuration_fail_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_load_configuration_node_python_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_load_configuration_python_node_test.cpp | 2 +- .../metacall_load_configuration_relative_test.h.in | 2 +- .../metacall_load_configuration_relative_test/source/main.cpp | 2 +- .../source/metacall_load_configuration_relative_test.cpp | 2 +- source/tests/metacall_load_configuration_test/source/main.cpp | 2 +- .../source/metacall_load_configuration_test.cpp | 2 +- source/tests/metacall_load_memory_empty_test/source/main.cpp | 2 +- .../source/metacall_load_memory_empty_test.cpp | 2 +- source/tests/metacall_load_memory_test/source/main.cpp | 2 +- .../source/metacall_load_memory_test.cpp | 2 +- source/tests/metacall_logs_test/source/main.cpp | 2 +- source/tests/metacall_logs_test/source/metacall_logs_test.cpp | 2 +- source/tests/metacall_lua_test/source/main.cpp | 2 +- source/tests/metacall_lua_test/source/metacall_lua_test.cpp | 2 +- source/tests/metacall_map_await_test/source/main.cpp | 2 +- .../source/metacall_map_await_test.cpp | 2 +- source/tests/metacall_map_test/source/main.cpp | 2 +- source/tests/metacall_map_test/source/metacall_map_test.cpp | 2 +- .../tests/metacall_node_async_multiple_test/source/main.cpp | 2 +- .../source/metacall_node_async_multiple_test.cpp | 2 +- .../tests/metacall_node_async_resources_test/source/main.cpp | 2 +- .../source/metacall_node_async_resources_test.cpp | 2 +- source/tests/metacall_node_async_test/source/main.cpp | 2 +- .../source/metacall_node_async_test.cpp | 2 +- source/tests/metacall_node_await_chain_test/source/main.cpp | 2 +- .../source/metacall_node_await_chain_test.cpp | 2 +- source/tests/metacall_node_call_test/source/main.cpp | 2 +- .../source/metacall_node_call_test.cpp | 2 +- source/tests/metacall_node_callback_test/source/main.cpp | 2 +- .../source/metacall_node_callback_test.cpp | 2 +- source/tests/metacall_node_clear_mem_test/source/main.cpp | 2 +- .../source/metacall_node_clear_mem_test.cpp | 2 +- .../tests/metacall_node_default_export_test/source/main.cpp | 2 +- .../source/metacall_node_default_export_test.cpp | 2 +- .../metacall_node_event_loop_signal_test/source/main.cpp | 2 +- .../source/metacall_node_event_loop_signal_test.cpp | 2 +- source/tests/metacall_node_event_loop_test/source/main.cpp | 2 +- .../source/metacall_node_event_loop_test.cpp | 2 +- source/tests/metacall_node_exception_test/source/main.cpp | 2 +- .../source/metacall_node_exception_test.cpp | 2 +- .../node_extension_test/source/node_extension_test.c | 2 +- .../source/node_extension_test_win32_delay_load.cpp | 2 +- source/tests/metacall_node_extension_test/source/main.cpp | 2 +- .../source/metacall_node_extension_test.cpp | 2 +- source/tests/metacall_node_fail_env_var_test/source/main.cpp | 2 +- .../source/metacall_node_fail_env_var_test.cpp | 2 +- .../tests/metacall_node_fail_load_leak_test/source/main.cpp | 2 +- .../source/metacall_node_fail_load_leak_test.cpp | 2 +- source/tests/metacall_node_fail_test/source/main.cpp | 2 +- .../source/metacall_node_fail_test.cpp | 2 +- source/tests/metacall_node_inline_test/source/main.cpp | 2 +- .../source/metacall_node_inline_test.cpp | 2 +- .../metacall_node_multithread_deadlock_test/source/main.cpp | 2 +- .../source/metacall_node_multithread_deadlock_test.cpp | 2 +- source/tests/metacall_node_native_code_test/source/main.cpp | 2 +- .../source/metacall_node_native_code_test.cpp | 2 +- source/tests/metacall_node_port_await_test/source/main.cpp | 2 +- .../source/metacall_node_port_await_test.cpp | 2 +- source/tests/metacall_node_port_c_lib_test/source/main.cpp | 2 +- .../source/metacall_node_port_c_lib_test.cpp | 2 +- source/tests/metacall_node_port_rs_test/source/main.cpp | 2 +- .../source/metacall_node_port_rs_test.cpp | 2 +- source/tests/metacall_node_port_test/source/main.cpp | 2 +- .../source/metacall_node_port_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_node_python_async_after_destroy_test.cpp | 2 +- .../metacall_node_python_await_extended_test/source/main.cpp | 2 +- .../source/metacall_node_python_await_extended_test.cpp | 2 +- source/tests/metacall_node_python_await_test/source/main.cpp | 2 +- .../source/metacall_node_python_await_test.cpp | 2 +- .../tests/metacall_node_python_deadlock_test/source/main.cpp | 2 +- .../source/metacall_node_python_deadlock_test.cpp | 2 +- .../tests/metacall_node_python_exception_test/source/main.cpp | 2 +- .../source/metacall_node_python_exception_test.cpp | 2 +- .../tests/metacall_node_python_port_mock_test/source/main.cpp | 2 +- .../source/metacall_node_python_port_mock_test.cpp | 2 +- .../tests/metacall_node_python_port_ruby_test/source/main.cpp | 2 +- .../source/metacall_node_python_port_ruby_test.cpp | 2 +- source/tests/metacall_node_python_ruby_test/source/main.cpp | 2 +- .../source/metacall_node_python_ruby_test.cpp | 2 +- source/tests/metacall_node_reentrant_test/source/main.cpp | 2 +- .../source/metacall_node_reentrant_test.cpp | 2 +- .../tests/metacall_node_signal_handler_test/source/main.cpp | 2 +- .../source/metacall_node_signal_handler_test.cpp | 2 +- source/tests/metacall_node_test/source/main.cpp | 2 +- source/tests/metacall_node_test/source/metacall_node_test.cpp | 2 +- source/tests/metacall_node_typescript_test/source/main.cpp | 2 +- .../source/metacall_node_typescript_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_plugin_extension_destroy_order_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_plugin_extension_invalid_path_test.cpp | 2 +- .../metacall_plugin_extension_local_test/source/main.cpp | 2 +- .../source/metacall_plugin_extension_local_test.cpp | 2 +- source/tests/metacall_plugin_extension_test/source/main.cpp | 2 +- .../source/metacall_plugin_extension_test.cpp | 2 +- source/tests/metacall_python_await_test/source/main.cpp | 2 +- .../source/metacall_python_await_test.cpp | 2 +- source/tests/metacall_python_builtins_test/source/main.cpp | 2 +- .../source/metacall_python_builtins_test.cpp | 2 +- source/tests/metacall_python_callback_test/source/main.cpp | 2 +- .../source/metacall_python_callback_test.cpp | 2 +- source/tests/metacall_python_dict_test/source/main.cpp | 2 +- .../source/metacall_python_dict_test.cpp | 2 +- source/tests/metacall_python_exception_test/source/main.cpp | 2 +- .../source/metacall_python_exception_test.cpp | 2 +- source/tests/metacall_python_fail_test/source/main.cpp | 2 +- .../source/metacall_python_fail_test.cpp | 2 +- source/tests/metacall_python_gc_test/source/main.cpp | 2 +- .../source/metacall_python_gc_test.cpp | 2 +- source/tests/metacall_python_loader_port_test/source/main.cpp | 2 +- .../source/metacall_python_loader_port_test.cpp | 2 +- source/tests/metacall_python_model_test/source/main.cpp | 2 +- .../source/metacall_python_model_test.cpp | 2 +- source/tests/metacall_python_node_await_test/source/main.cpp | 2 +- .../source/metacall_python_node_await_test.cpp | 2 +- .../tests/metacall_python_object_class_test/source/main.cpp | 2 +- .../source/metacall_python_object_class_test.cpp | 2 +- source/tests/metacall_python_open_test/source/main.cpp | 2 +- .../source/metacall_python_open_test.cpp | 2 +- source/tests/metacall_python_pointer_test/source/main.cpp | 2 +- .../source/metacall_python_pointer_test.cpp | 2 +- .../tests/metacall_python_port_callback_test/source/main.cpp | 2 +- .../source/metacall_python_port_callback_test.cpp | 2 +- source/tests/metacall_python_port_https_test/source/main.cpp | 2 +- .../source/metacall_python_port_https_test.cpp | 2 +- source/tests/metacall_python_port_import_test/source/main.cpp | 2 +- .../source/metacall_python_port_import_test.cpp | 2 +- .../tests/metacall_python_port_pointer_test/source/main.cpp | 2 +- .../source/metacall_python_port_pointer_test.cpp | 2 +- source/tests/metacall_python_port_test/source/main.cpp | 2 +- .../source/metacall_python_port_test.cpp | 2 +- source/tests/metacall_python_reentrant_test/source/main.cpp | 2 +- .../source/metacall_python_reentrant_test.cpp | 2 +- .../tests/metacall_python_relative_path_test/source/main.cpp | 2 +- .../source/metacall_python_relative_path_test.cpp | 2 +- source/tests/metacall_python_test/source/main.cpp | 2 +- .../metacall_python_test/source/metacall_python_test.cpp | 2 +- source/tests/metacall_python_varargs_test/source/main.cpp | 2 +- .../source/metacall_python_varargs_test.cpp | 2 +- .../metacall_python_without_env_vars_test/source/main.cpp | 2 +- .../source/metacall_python_without_env_vars_test.cpp | 2 +- .../metacall_python_without_functions_test/source/main.cpp | 2 +- .../source/metacall_python_without_functions_test.cpp | 2 +- source/tests/metacall_reinitialize_test/source/main.cpp | 2 +- .../source/metacall_reinitialize_test.cpp | 2 +- source/tests/metacall_reload_functions_test/source/main.cpp | 2 +- .../source/metacall_reload_functions_test.cpp | 2 +- source/tests/metacall_return_monad_test/source/main.cpp | 2 +- .../source/metacall_return_monad_test.cpp | 2 +- source/tests/metacall_rpc_test/source/main.cpp | 2 +- source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp | 2 +- source/tests/metacall_ruby_fail_empty_test/source/main.cpp | 2 +- .../source/metacall_ruby_fail_empty_test.cpp | 2 +- source/tests/metacall_ruby_fail_test/source/main.cpp | 2 +- .../source/metacall_ruby_fail_test.cpp | 2 +- source/tests/metacall_ruby_object_class_test/source/main.cpp | 2 +- .../source/metacall_ruby_object_class_test.cpp | 2 +- .../metacall_ruby_parser_integration_test/source/main.cpp | 2 +- .../source/metacall_ruby_parser_integration_test.cpp | 2 +- .../metacall_ruby_rails_integration_test/source/main.cpp | 2 +- .../source/metacall_ruby_rails_integration_test.cpp | 2 +- source/tests/metacall_ruby_test/source/main.cpp | 2 +- source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp | 2 +- source/tests/metacall_rust_class_test/source/main.cpp | 2 +- .../source/metacall_rust_class_test.cpp | 2 +- source/tests/metacall_rust_load_from_mem_test/source/main.cpp | 2 +- .../source/metacall_rust_load_from_mem_test.cpp | 2 +- .../source/main.cpp | 2 +- .../source/metacall_rust_load_from_package_class_test.cpp | 2 +- .../metacall_rust_load_from_package_dep_test/source/main.cpp | 2 +- .../source/metacall_rust_load_from_package_dep_test.cpp | 2 +- .../metacall_rust_load_from_package_test/source/main.cpp | 2 +- .../source/metacall_rust_load_from_package_test.cpp | 2 +- source/tests/metacall_rust_test/source/main.cpp | 2 +- source/tests/metacall_rust_test/source/metacall_rust_test.cpp | 2 +- source/tests/metacall_sandbox_plugin_test/source/main.cpp | 2 +- .../source/metacall_sandbox_plugin_test.cpp | 2 +- source/tests/metacall_test/source/main.cpp | 2 +- source/tests/metacall_test/source/metacall_test.cpp | 2 +- source/tests/metacall_test/source/metacall_test_split.cpp | 2 +- .../tests/metacall_typescript_call_map_test/source/main.cpp | 2 +- .../source/metacall_typescript_call_map_test.cpp | 2 +- .../metacall_typescript_jsx_default_test/source/main.cpp | 2 +- .../source/metacall_typescript_jsx_default_test.cpp | 2 +- source/tests/metacall_typescript_node_test/source/main.cpp | 2 +- .../source/metacall_typescript_node_test.cpp | 2 +- source/tests/metacall_typescript_require_test/source/main.cpp | 2 +- .../source/metacall_typescript_require_test.cpp | 2 +- source/tests/metacall_typescript_test/source/main.cpp | 2 +- .../source/metacall_typescript_test.cpp | 2 +- .../metacall_typescript_tsx_loop_fail_test/source/main.cpp | 2 +- .../source/metacall_typescript_tsx_loop_fail_test.cpp | 2 +- source/tests/metacall_typescript_tsx_test/source/main.cpp | 2 +- .../source/metacall_typescript_tsx_test.cpp | 2 +- source/tests/metacall_version_test/source/main.cpp | 2 +- .../metacall_version_test/source/metacall_version_test.cpp | 2 +- source/tests/metacall_wasm_python_port_test/source/main.cpp | 2 +- .../source/metacall_wasm_python_port_test.cpp | 2 +- source/tests/metacall_wasm_test/source/main.cpp | 2 +- source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp | 2 +- source/tests/portability_path_test/source/main.cpp | 2 +- .../portability_path_test/source/portability_path_test.cpp | 2 +- source/tests/preprocessor_test/source/main.cpp | 2 +- source/tests/preprocessor_test/source/preprocessor_test.cpp | 2 +- source/tests/rb_loader_parser_test/source/main.cpp | 2 +- .../rb_loader_parser_test/source/rb_loader_parser_test.cpp | 2 +- source/tests/reflect_function_test/source/main.cpp | 2 +- .../reflect_function_test/source/reflect_function_test.cpp | 2 +- source/tests/reflect_metadata_test/source/main.cpp | 2 +- .../reflect_metadata_test/source/reflect_metadata_test.cpp | 2 +- source/tests/reflect_object_class_test/source/main.cpp | 2 +- .../source/reflect_object_class_test.cpp | 2 +- source/tests/reflect_scope_test/source/main.cpp | 2 +- source/tests/reflect_scope_test/source/reflect_scope_test.cpp | 2 +- source/tests/reflect_value_cast_test/source/main.cpp | 2 +- .../source/reflect_value_cast_bool_test.cpp | 2 +- .../source/reflect_value_cast_char_test.cpp | 2 +- .../source/reflect_value_cast_double_test.cpp | 2 +- .../source/reflect_value_cast_float_test.cpp | 2 +- .../source/reflect_value_cast_int_test.cpp | 2 +- .../source/reflect_value_cast_long_test.cpp | 2 +- .../source/reflect_value_cast_short_test.cpp | 2 +- source/tests/serial_test/source/main.cpp | 2 +- source/tests/serial_test/source/serial_test.cpp | 2 +- source/threading/include/threading/threading.h | 2 +- source/threading/include/threading/threading_atomic.h | 2 +- .../threading/include/threading/threading_atomic_ref_count.h | 2 +- source/threading/include/threading/threading_atomic_win32.h | 2 +- source/threading/include/threading/threading_mutex.h | 2 +- source/threading/include/threading/threading_thread_id.h | 2 +- source/threading/source/threading.c | 4 ++-- source/threading/source/threading_mutex_macos.c | 2 +- source/threading/source/threading_mutex_pthread.c | 2 +- source/threading/source/threading_mutex_win32.c | 2 +- source/threading/source/threading_thread_id.c | 2 +- source/version/include/version/version.h | 2 +- source/version/include/version/version.h.in | 2 +- source/version/source/version.c | 4 ++-- tools/cli/Dockerfile | 2 +- tools/deps/Dockerfile | 2 +- tools/dev/Dockerfile | 2 +- tools/metacall-build.ps1 | 2 +- tools/metacall-build.sh | 2 +- tools/metacall-configure.ps1 | 2 +- tools/metacall-configure.sh | 2 +- tools/metacall-environment.ps1 | 2 +- tools/metacall-environment.sh | 2 +- tools/metacall-license.sh | 4 ++-- tools/metacall-runtime.sh | 2 +- tools/metacall-sanitizer.sh | 2 +- tools/runtime/Dockerfile | 2 +- 925 files changed, 969 insertions(+), 969 deletions(-) diff --git a/.env b/.env index 2e5bae29aa..cf3ae699c0 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/CMakeLists.txt b/CMakeLists.txt index 75da78355e..f543559e6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # A library for providing a foreing function interface calls. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/Dockerfile b/Dockerfile index 915d0f4a50..a81cfd453b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/LICENSE b/LICENSE index 2e591e57ad..d56ad81fad 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2024 Vicente Eduardo Ferrer Garcia + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmake/CMakeDebug.cmake b/cmake/CMakeDebug.cmake index 632183fa18..dd80a221b9 100644 --- a/cmake/CMakeDebug.cmake +++ b/cmake/CMakeDebug.cmake @@ -2,7 +2,7 @@ # CMake Debug Utilities by Parra Studios # CMake debugging utilities and inspection facilities. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/CheckCCompilerFlagStackSmashing.cmake b/cmake/CheckCCompilerFlagStackSmashing.cmake index 1662f40231..ea31ed5d77 100644 --- a/cmake/CheckCCompilerFlagStackSmashing.cmake +++ b/cmake/CheckCCompilerFlagStackSmashing.cmake @@ -2,7 +2,7 @@ # Compiler checker for stack smashing flags by Parra Studios # Tests if a defined stack smashing security flag is available. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/CheckCXXCompilerFlagStackSmashing.cmake b/cmake/CheckCXXCompilerFlagStackSmashing.cmake index eff0c6bfa2..9fa7f95891 100644 --- a/cmake/CheckCXXCompilerFlagStackSmashing.cmake +++ b/cmake/CheckCXXCompilerFlagStackSmashing.cmake @@ -2,7 +2,7 @@ # Compiler checker for stack smashing flags by Parra Studios # Tests if a defined stack smashing security flag is available. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/Coverage.cmake b/cmake/Coverage.cmake index e363f5a58d..4a15b0efcb 100644 --- a/cmake/Coverage.cmake +++ b/cmake/Coverage.cmake @@ -2,7 +2,7 @@ # Coverage CMake support by Parra Studios # Cross-compiler code coverage utility. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindCobol.cmake b/cmake/FindCobol.cmake index 4a943d0744..c85a5cb466 100644 --- a/cmake/FindCobol.cmake +++ b/cmake/FindCobol.cmake @@ -2,7 +2,7 @@ # CMake Find GNU/Cobol by Parra Studios # CMake script to find GNU/Cobol compiler and runtime. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindCoreCLR.cmake b/cmake/FindCoreCLR.cmake index 1ae2a4455b..884d3c1132 100644 --- a/cmake/FindCoreCLR.cmake +++ b/cmake/FindCoreCLR.cmake @@ -2,7 +2,7 @@ # CMake Find CoreCLR NET Engine by Parra Studios # CMake script to find CoreCLR NET Engine. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindDotNET.cmake b/cmake/FindDotNET.cmake index 859b4977b6..57c2d4dc95 100644 --- a/cmake/FindDotNET.cmake +++ b/cmake/FindDotNET.cmake @@ -2,7 +2,7 @@ # CMake Find Dot NET Engine by Parra Studios # CMake script to find DotNET Engine. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindGBench.cmake b/cmake/FindGBench.cmake index 9584029791..74eacb0b8a 100644 --- a/cmake/FindGBench.cmake +++ b/cmake/FindGBench.cmake @@ -2,7 +2,7 @@ # CMake Find Google Benchmark by Parra Studios # CMake script to find Google Benchmark library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindJulia.cmake b/cmake/FindJulia.cmake index 3557748462..bf3c30d3b8 100644 --- a/cmake/FindJulia.cmake +++ b/cmake/FindJulia.cmake @@ -2,7 +2,7 @@ # CMake Find Julia Runtime by Parra Studios # CMake script to find Julia runtime. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindLibClang.cmake b/cmake/FindLibClang.cmake index 9b07a6b366..bbf4d2c25f 100644 --- a/cmake/FindLibClang.cmake +++ b/cmake/FindLibClang.cmake @@ -2,7 +2,7 @@ # CMake Find Clang library by Parra Studios # CMake script to find Clang C API library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindLibFFI.cmake b/cmake/FindLibFFI.cmake index b86cf7d8d3..313925b13e 100644 --- a/cmake/FindLibFFI.cmake +++ b/cmake/FindLibFFI.cmake @@ -2,7 +2,7 @@ # CMake Find Foreing Function Interface library by Parra Studios # CMake script to find FFI library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindLibTCC.cmake b/cmake/FindLibTCC.cmake index c75c694196..83c2e4ac59 100644 --- a/cmake/FindLibTCC.cmake +++ b/cmake/FindLibTCC.cmake @@ -2,7 +2,7 @@ # CMake Find Tiny C Compiler library by Parra Studios # CMake script to find TCC library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindMetaCall.cmake b/cmake/FindMetaCall.cmake index f25310921e..f974e9509d 100644 --- a/cmake/FindMetaCall.cmake +++ b/cmake/FindMetaCall.cmake @@ -2,7 +2,7 @@ # CMake Find MetaCall library by Parra Studios # CMake script to find and include MetaCall library for development. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindNPM.cmake b/cmake/FindNPM.cmake index 1cdcda92d0..2a61990e25 100644 --- a/cmake/FindNPM.cmake +++ b/cmake/FindNPM.cmake @@ -2,7 +2,7 @@ # CMake Find NPM by Parra Studios # CMake script to find NodeJS Package Manager. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindNodeJS.cmake b/cmake/FindNodeJS.cmake index a4c7db2928..1bec27069e 100644 --- a/cmake/FindNodeJS.cmake +++ b/cmake/FindNodeJS.cmake @@ -1,6 +1,6 @@ # # CMake Find NodeJS JavaScript Runtime by Parra Studios -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Find NodeJS executable and include paths diff --git a/cmake/FindPatchelf.cmake b/cmake/FindPatchelf.cmake index af0dd619c6..044cd412d0 100644 --- a/cmake/FindPatchelf.cmake +++ b/cmake/FindPatchelf.cmake @@ -2,7 +2,7 @@ # CMake Find Patchelf by Parra Studios # CMake script to find Patchelf executable. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindRapidJSON.cmake b/cmake/FindRapidJSON.cmake index af111fafed..26b0d6b1e1 100644 --- a/cmake/FindRapidJSON.cmake +++ b/cmake/FindRapidJSON.cmake @@ -2,7 +2,7 @@ # CMake Find RapidJSON by Parra Studios # CMake script to find RapidJSON library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindRust.cmake b/cmake/FindRust.cmake index 58e61876c9..c9ef316aa2 100644 --- a/cmake/FindRust.cmake +++ b/cmake/FindRust.cmake @@ -2,7 +2,7 @@ # CMake Find Rust by Parra Studios # CMake script to find Rust compiler and tools. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindSpiderMonkey.cmake b/cmake/FindSpiderMonkey.cmake index 8da1d52549..a952c9e4e9 100644 --- a/cmake/FindSpiderMonkey.cmake +++ b/cmake/FindSpiderMonkey.cmake @@ -2,7 +2,7 @@ # CMake Find Mozilla SpiderMonkey JavaScript Engine by Parra Studios # CMake script to find Mozilla SpiderMonkey Javascript Engine. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindV8.cmake b/cmake/FindV8.cmake index a995b1d3c7..aedb8a8d7d 100644 --- a/cmake/FindV8.cmake +++ b/cmake/FindV8.cmake @@ -2,7 +2,7 @@ # CMake Find V8 Google JavaScript Engine by Parra Studios # CMake script to find V8 JavaScript Engine. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/FindWasmtime.cmake b/cmake/FindWasmtime.cmake index a68272c0c2..bf086293a9 100644 --- a/cmake/FindWasmtime.cmake +++ b/cmake/FindWasmtime.cmake @@ -1,6 +1,6 @@ # # CMake Find Wasmtime WebAssembly Runtime by Parra Studios -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Find Wasmtime library and include paths diff --git a/cmake/FindZig.cmake b/cmake/FindZig.cmake index 286ec5f53c..cb2764032c 100644 --- a/cmake/FindZig.cmake +++ b/cmake/FindZig.cmake @@ -2,7 +2,7 @@ # CMake Find Zig by Parra Studios # CMake script to find Zig compiler and tools. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/InstallGBench.cmake b/cmake/InstallGBench.cmake index 5d6956a537..ccf3073d7a 100644 --- a/cmake/InstallGBench.cmake +++ b/cmake/InstallGBench.cmake @@ -2,7 +2,7 @@ # CMake Install Google Benchmark by Parra Studios # CMake script to install Google Benchmark library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/InstallGTest.cmake b/cmake/InstallGTest.cmake index f6d025c795..7977751f06 100644 --- a/cmake/InstallGTest.cmake +++ b/cmake/InstallGTest.cmake @@ -2,7 +2,7 @@ # CMake Install Google Test by Parra Studios # CMake script to install Google Test library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/InstallLibTCC.cmake b/cmake/InstallLibTCC.cmake index 18483bba24..23a780e264 100644 --- a/cmake/InstallLibTCC.cmake +++ b/cmake/InstallLibTCC.cmake @@ -2,7 +2,7 @@ # CMake Install Tiny C Compiler by Parra Studios # CMake script to install TCC library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/InstallPatchelf.cmake b/cmake/InstallPatchelf.cmake index a001e136df..72b44a952d 100644 --- a/cmake/InstallPatchelf.cmake +++ b/cmake/InstallPatchelf.cmake @@ -2,7 +2,7 @@ # CMake Find Patchelf by Parra Studios # CMake script to find Patchelf executable. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/InstallRapidJSON.cmake b/cmake/InstallRapidJSON.cmake index 44938fceb0..41c302027b 100644 --- a/cmake/InstallRapidJSON.cmake +++ b/cmake/InstallRapidJSON.cmake @@ -2,7 +2,7 @@ # CMake Install RapidJSON by Parra Studios # CMake script to install RapidJSON library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/Portability.cmake b/cmake/Portability.cmake index 75dc09c2f6..86193291c8 100644 --- a/cmake/Portability.cmake +++ b/cmake/Portability.cmake @@ -2,7 +2,7 @@ # Portability CMake support by Parra Studios # Cross-platform and architecture detection utility. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/ScriptProject.cmake b/cmake/ScriptProject.cmake index b078526fe8..fb7d138355 100644 --- a/cmake/ScriptProject.cmake +++ b/cmake/ScriptProject.cmake @@ -2,7 +2,7 @@ # Script project generator by Parra Studios # Generates a script project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/SecurityFlags.cmake b/cmake/SecurityFlags.cmake index 515dc6f85c..b31ccbbf7d 100644 --- a/cmake/SecurityFlags.cmake +++ b/cmake/SecurityFlags.cmake @@ -2,7 +2,7 @@ # Compiler and linker options for hardening flags by Parra Studios # Enables hardening security flags if available. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/TestEnvironmentVariables.cmake b/cmake/TestEnvironmentVariables.cmake index 43189a72eb..1255f2bb46 100644 --- a/cmake/TestEnvironmentVariables.cmake +++ b/cmake/TestEnvironmentVariables.cmake @@ -2,7 +2,7 @@ # Test Environment Variables by Parra Studios # Utility for defining cross-platform environment variables in tests. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/Warnings.cmake b/cmake/Warnings.cmake index 5c9b44da73..685d3b6a8c 100644 --- a/cmake/Warnings.cmake +++ b/cmake/Warnings.cmake @@ -2,7 +2,7 @@ # Cross-compiler warning utility by Parra Studios # Utility to enable cross-compiler warnings. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/deploy/packages/postinst b/deploy/packages/postinst index d798c724d0..8ae7a6fa6c 100755 --- a/deploy/packages/postinst +++ b/deploy/packages/postinst @@ -4,7 +4,7 @@ # MetaCall Dependencies Bash Script by Parra Studios # Remove all packages and unused data from MetaCall building and testing. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker-compose.cache.yml b/docker-compose.cache.yml index 231525f1c2..63b1b455c7 100644 --- a/docker-compose.cache.yml +++ b/docker-compose.cache.yml @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker compose infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker-compose.platform.yml b/docker-compose.platform.yml index 46b3b08256..b22964bf5c 100644 --- a/docker-compose.platform.yml +++ b/docker-compose.platform.yml @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker compose infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker-compose.sh b/docker-compose.sh index 9c075acf8b..f2f134230d 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -4,7 +4,7 @@ # MetaCall Build Bash Script by Parra Studios # Build and install bash script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker-compose.test.yml b/docker-compose.test.yml index db095b5334..5dadee3cb7 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker compose infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docker-compose.yml b/docker-compose.yml index d7383d6548..38e167b446 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker compose infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/README.md b/docs/README.md index ff4002b4ba..4465697880 100644 --- a/docs/README.md +++ b/docs/README.md @@ -868,7 +868,7 @@ Where `script.js` is a script contained in host folder `$HOME/metacall` that wil **METACALL** is licensed under **[Apache License Version 2.0](/LICENSE)**. -> Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia <> +> Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <> > > Licensed under the Apache License, Version 2.0 (the "License"); > you may not use this file except in compliance with the License. diff --git a/metacall-config-version.cmake.in b/metacall-config-version.cmake.in index c26ac86e96..a25c169f21 100644 --- a/metacall-config-version.cmake.in +++ b/metacall-config-version.cmake.in @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # A library for providing a foreing function interface calls. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/metacall-config.cmake.in b/metacall-config.cmake.in index b7f9f5b163..eb193eed48 100644 --- a/metacall-config.cmake.in +++ b/metacall-config.cmake.in @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # A library for providing a foreing function interface calls. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/adt/include/adt/adt.h b/source/adt/include/adt/adt.h index e957f0fc96..040bd1fc50 100644 --- a/source/adt/include/adt/adt.h +++ b/source/adt/include/adt/adt.h @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/include/adt/adt_bucket.h b/source/adt/include/adt/adt_bucket.h index 52a536aa1c..4fb799f189 100644 --- a/source/adt/include/adt/adt_bucket.h +++ b/source/adt/include/adt/adt_bucket.h @@ -1,6 +1,6 @@ /* * Abstract Data Type Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A abstract data type library providing generic containers. * diff --git a/source/adt/include/adt/adt_comparable.h b/source/adt/include/adt/adt_comparable.h index d6ede66274..54fc2d2b84 100644 --- a/source/adt/include/adt/adt_comparable.h +++ b/source/adt/include/adt/adt_comparable.h @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/include/adt/adt_hash.h b/source/adt/include/adt/adt_hash.h index d2eefc6117..3601d4676c 100644 --- a/source/adt/include/adt/adt_hash.h +++ b/source/adt/include/adt/adt_hash.h @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/include/adt/adt_map.h b/source/adt/include/adt/adt_map.h index 351ce57fd8..8fe9e1c5eb 100644 --- a/source/adt/include/adt/adt_map.h +++ b/source/adt/include/adt/adt_map.h @@ -1,6 +1,6 @@ /* * Abstract Data Type Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A abstract data type library providing generic containers. * diff --git a/source/adt/include/adt/adt_set.h b/source/adt/include/adt/adt_set.h index a69457d697..64af951760 100644 --- a/source/adt/include/adt/adt_set.h +++ b/source/adt/include/adt/adt_set.h @@ -1,6 +1,6 @@ /* * Abstract Data Type Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A abstract data type library providing generic containers. * diff --git a/source/adt/include/adt/adt_string.h b/source/adt/include/adt/adt_string.h index 3ef21e06b0..1b50369a8d 100644 --- a/source/adt/include/adt/adt_string.h +++ b/source/adt/include/adt/adt_string.h @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/include/adt/adt_trie.h b/source/adt/include/adt/adt_trie.h index f6eec21a99..899e1f9296 100644 --- a/source/adt/include/adt/adt_trie.h +++ b/source/adt/include/adt/adt_trie.h @@ -1,6 +1,6 @@ /* * Abstract Data Type Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A abstract data type library providing generic containers. * diff --git a/source/adt/include/adt/adt_vector.h b/source/adt/include/adt/adt_vector.h index 7cb7404b4a..d727171687 100644 --- a/source/adt/include/adt/adt_vector.h +++ b/source/adt/include/adt/adt_vector.h @@ -1,6 +1,6 @@ /* * Abstract Data Type Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A abstract data type library providing generic containers. * diff --git a/source/adt/source/adt.c b/source/adt/source/adt.c index 227fbb9c94..eeaf243223 100644 --- a/source/adt/source/adt.c +++ b/source/adt/source/adt.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *adt_print_info(void) { static const char adt_info[] = "Abstract Data Type Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef ADT_STATIC_DEFINE "Compiled as static library type" diff --git a/source/adt/source/adt_bucket.c b/source/adt/source/adt_bucket.c index fa039301d0..98f7398751 100644 --- a/source/adt/source/adt_bucket.c +++ b/source/adt/source/adt_bucket.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_comparable.c b/source/adt/source/adt_comparable.c index 0b7133621c..037be1f9be 100644 --- a/source/adt/source/adt_comparable.c +++ b/source/adt/source/adt_comparable.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_hash.c b/source/adt/source/adt_hash.c index 766c68c477..2800af3b60 100644 --- a/source/adt/source/adt_hash.c +++ b/source/adt/source/adt_hash.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 75d5bcdaba..9f54b623f9 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index a25d6d8a0d..d7f38ea958 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_trie.c b/source/adt/source/adt_trie.c index 71065b6ea4..12b934243f 100644 --- a/source/adt/source/adt_trie.c +++ b/source/adt/source/adt_trie.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/adt/source/adt_vector.c b/source/adt/source/adt_vector.c index d4a725773e..0047cc1185 100644 --- a/source/adt/source/adt_vector.c +++ b/source/adt/source/adt_vector.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/log_bench/source/log_bench.cpp b/source/benchmarks/log_bench/source/log_bench.cpp index 9ca700767d..73bb489fe9 100644 --- a/source/benchmarks/log_bench/source/log_bench.cpp +++ b/source/benchmarks/log_bench/source/log_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp b/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp index d0acd24cce..179dfaf6c0 100644 --- a/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp +++ b/source/benchmarks/metacall_cs_call_bench/source/metacall_cs_call_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp b/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp index 15861f5257..16d2c987b5 100644 --- a/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp +++ b/source/benchmarks/metacall_node_call_bench/source/metacall_node_call_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_py_c_api_bench/source/metacall_py_c_api_bench.cpp b/source/benchmarks/metacall_py_c_api_bench/source/metacall_py_c_api_bench.cpp index de8f43d8bc..e1db6bb14b 100644 --- a/source/benchmarks/metacall_py_c_api_bench/source/metacall_py_c_api_bench.cpp +++ b/source/benchmarks/metacall_py_c_api_bench/source/metacall_py_c_api_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp b/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp index 74d0bc7c52..68b0bf5890 100644 --- a/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp +++ b/source/benchmarks/metacall_py_call_bench/source/metacall_py_call_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp b/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp index ee60fee48c..9a1ef4a886 100644 --- a/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp +++ b/source/benchmarks/metacall_py_init_bench/source/metacall_py_init_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp b/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp index 903530eae1..4dc75e9424 100644 --- a/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp +++ b/source/benchmarks/metacall_rb_call_bench/source/metacall_rb_call_bench.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/cli/metacallcli/include/metacallcli/application.hpp b/source/cli/metacallcli/include/metacallcli/application.hpp index 0fc2f788d4..c2e7863a8e 100644 --- a/source/cli/metacallcli/include/metacallcli/application.hpp +++ b/source/cli/metacallcli/include/metacallcli/application.hpp @@ -1,6 +1,6 @@ /* * MetaCall Command Line Interface by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A command line interface example as metacall wrapper. * diff --git a/source/cli/metacallcli/source/application.cpp b/source/cli/metacallcli/source/application.cpp index 0ba037683e..0f439da613 100644 --- a/source/cli/metacallcli/source/application.cpp +++ b/source/cli/metacallcli/source/application.cpp @@ -1,6 +1,6 @@ /* * MetaCall Command Line Interface by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A command line interface example as metacall wrapper. * diff --git a/source/cli/metacallcli/source/main.cpp b/source/cli/metacallcli/source/main.cpp index 1821d04b5e..8c41f19157 100644 --- a/source/cli/metacallcli/source/main.cpp +++ b/source/cli/metacallcli/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Command Line Interface by Parra Studios * A command line interface example as metacall wrapper. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/cli/plugins/cli_cmd_plugin/include/cli_cmd_plugin/cli_cmd_plugin.hpp b/source/cli/plugins/cli_cmd_plugin/include/cli_cmd_plugin/cli_cmd_plugin.hpp index 9565754caa..3a82b78469 100644 --- a/source/cli/plugins/cli_cmd_plugin/include/cli_cmd_plugin/cli_cmd_plugin.hpp +++ b/source/cli/plugins/cli_cmd_plugin/include/cli_cmd_plugin/cli_cmd_plugin.hpp @@ -2,7 +2,7 @@ * CLI Command Plugin by Parra Studios * A plugin implementing command line functionality for MetaCall CLI. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h b/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h index 6c4446d9eb..5f43a1358d 100644 --- a/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h +++ b/source/cli/plugins/cli_core_plugin/include/cli_core_plugin/cli_core_plugin.h @@ -2,7 +2,7 @@ * CLI Core Plugin by Parra Studios * A plugin implementing core functionality for MetaCall CLI. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/cli/plugins/cli_core_plugin/source/cli_core_plugin.cpp b/source/cli/plugins/cli_core_plugin/source/cli_core_plugin.cpp index 5563fc4266..ea19c681d4 100644 --- a/source/cli/plugins/cli_core_plugin/source/cli_core_plugin.cpp +++ b/source/cli/plugins/cli_core_plugin/source/cli_core_plugin.cpp @@ -2,7 +2,7 @@ * CLI Core Plugin by Parra Studios * A plugin implementing core functionality for MetaCall CLI. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ std::cout << "MetaCall Command Line Interface by Parra Studios" << std::endl; \ std::cout << "A command line interface for MetaCall Core" << std::endl; \ std::cout << std::endl; \ - std::cout << "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia " << std::endl; \ + std::cout << "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia " << std::endl; \ } while (0) template diff --git a/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h b/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h index a11ef6abc0..f731ac1c0e 100644 --- a/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h +++ b/source/cli/plugins/cli_sandbox_plugin/include/cli_sandbox_plugin/cli_sandbox_plugin.h @@ -2,7 +2,7 @@ * CLI Sandbox Plugin by Parra Studios * A plugin implementing sandboxing functionality for MetaCall CLI. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/cli/plugins/cli_sandbox_plugin/source/cli_sandbox_plugin.cpp b/source/cli/plugins/cli_sandbox_plugin/source/cli_sandbox_plugin.cpp index f7a78b130c..8a5390fab5 100644 --- a/source/cli/plugins/cli_sandbox_plugin/source/cli_sandbox_plugin.cpp +++ b/source/cli/plugins/cli_sandbox_plugin/source/cli_sandbox_plugin.cpp @@ -2,7 +2,7 @@ * CLI Sandbox Plugin by Parra Studios * A plugin implementing sandboxing functionality for MetaCall CLI. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/configuration/include/configuration/configuration.h b/source/configuration/include/configuration/configuration.h index 9182d8a090..3fa7811fad 100644 --- a/source/configuration/include/configuration/configuration.h +++ b/source/configuration/include/configuration/configuration.h @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * diff --git a/source/configuration/include/configuration/configuration_impl.h b/source/configuration/include/configuration/configuration_impl.h index bac8d2e89f..7c733b762b 100644 --- a/source/configuration/include/configuration/configuration_impl.h +++ b/source/configuration/include/configuration/configuration_impl.h @@ -2,7 +2,7 @@ * Configuration Library by Parra Studios * A cross-platform library for managing multiple configuration formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/configuration/include/configuration/configuration_object.h b/source/configuration/include/configuration/configuration_object.h index d98e920dd2..2c22e6eb24 100644 --- a/source/configuration/include/configuration/configuration_object.h +++ b/source/configuration/include/configuration/configuration_object.h @@ -2,7 +2,7 @@ * Configuration Library by Parra Studios * A cross-platform library for managing multiple configuration formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/configuration/include/configuration/configuration_object_handle.h b/source/configuration/include/configuration/configuration_object_handle.h index 73bfc7f04e..67b5011b92 100644 --- a/source/configuration/include/configuration/configuration_object_handle.h +++ b/source/configuration/include/configuration/configuration_object_handle.h @@ -2,7 +2,7 @@ * Configuration Library by Parra Studios * A cross-platform library for managing multiple configuration formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/configuration/include/configuration/configuration_singleton.h b/source/configuration/include/configuration/configuration_singleton.h index 44b1e52d12..5dbc6fa833 100644 --- a/source/configuration/include/configuration/configuration_singleton.h +++ b/source/configuration/include/configuration/configuration_singleton.h @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * diff --git a/source/configuration/source/configuration.c b/source/configuration/source/configuration.c index 0d287e7b37..365fdaf0cb 100644 --- a/source/configuration/source/configuration.c +++ b/source/configuration/source/configuration.c @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * @@ -254,7 +254,7 @@ const char *configuration_print_info(void) { static const char configuration_info[] = "Configuration Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef CONFIGURATION_STATIC_DEFINE "Compiled as static library type" diff --git a/source/configuration/source/configuration_impl.c b/source/configuration/source/configuration_impl.c index 137645119e..ca61ed14be 100644 --- a/source/configuration/source/configuration_impl.c +++ b/source/configuration/source/configuration_impl.c @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index f7044c97b7..2509992bf5 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * diff --git a/source/configuration/source/configuration_singleton.c b/source/configuration/source/configuration_singleton.c index 5b31812677..ea440cc7cd 100644 --- a/source/configuration/source/configuration_singleton.c +++ b/source/configuration/source/configuration_singleton.c @@ -1,6 +1,6 @@ /* * Configuration Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple configuration formats. * diff --git a/source/detour/include/detour/detour.h b/source/detour/include/detour/detour.h index d061bf19bd..fca7d3ee16 100644 --- a/source/detour/include/detour/detour.h +++ b/source/detour/include/detour/detour.h @@ -1,6 +1,6 @@ /* * Detour Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library providing detours, function hooks and trampolines. * diff --git a/source/detour/include/detour/detour_handle.h b/source/detour/include/detour/detour_handle.h index 7e9dde1b8e..28f21848d7 100644 --- a/source/detour/include/detour/detour_handle.h +++ b/source/detour/include/detour/detour_handle.h @@ -2,7 +2,7 @@ * Detour Library by Parra Studios * A cross-platform library providing detours, function hooks and trampolines. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/detour/include/detour/detour_interface.h b/source/detour/include/detour/detour_interface.h index 425ba151d7..5207622bac 100644 --- a/source/detour/include/detour/detour_interface.h +++ b/source/detour/include/detour/detour_interface.h @@ -2,7 +2,7 @@ * Detour Library by Parra Studios * A cross-platform library providing detours, function hooks and trampolines. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/detour/source/detour.c b/source/detour/source/detour.c index 5503f44941..9da330372a 100644 --- a/source/detour/source/detour.c +++ b/source/detour/source/detour.c @@ -1,6 +1,6 @@ /* * Detour Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library providing detours, function hooks and trampolines. * @@ -169,7 +169,7 @@ const char *detour_print_info(void) { static const char detour_info[] = "Detour Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef DETOUR_STATIC_DEFINE "Compiled as static library type" diff --git a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h b/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h index 551ace90b6..98a71ea435 100644 --- a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h +++ b/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h @@ -2,7 +2,7 @@ * Detour Library by Parra Studios * A cross-platform library providing detours, function hooks and trampolines. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h b/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h index 33b68d9e10..37cb640cdf 100644 --- a/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h +++ b/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h @@ -2,7 +2,7 @@ * Detour Library by Parra Studios * A cross-platform library providing detours, function hooks and trampolines. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/detours/funchook_detour/source/funchook_detour.c b/source/detours/funchook_detour/source/funchook_detour.c index 93b6801652..9a15057fa6 100644 --- a/source/detours/funchook_detour/source/funchook_detour.c +++ b/source/detours/funchook_detour/source/funchook_detour.c @@ -1,6 +1,6 @@ /* * Detour Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library providing detours, function hooks and trampolines. * @@ -31,7 +31,7 @@ const char *funchook_detour_print_info(void) { static const char funchook_detour_info[] = "FuncHook Detour Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef FUNCHOOK_DETOUR_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/detours/funchook_detour/source/funchook_detour_impl.c b/source/detours/funchook_detour/source/funchook_detour_impl.c index 3eccf95451..83c25a1dc0 100644 --- a/source/detours/funchook_detour/source/funchook_detour_impl.c +++ b/source/detours/funchook_detour/source/funchook_detour_impl.c @@ -1,6 +1,6 @@ /* * Detour Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library providing detours, function hooks and trampolines. * diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index d1bdaf8d01..28080638ac 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_flags.h b/source/dynlink/include/dynlink/dynlink_flags.h index 9b870abae8..2f64619e76 100644 --- a/source/dynlink/include/dynlink/dynlink_flags.h +++ b/source/dynlink/include/dynlink/dynlink_flags.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_impl.h b/source/dynlink/include/dynlink/dynlink_impl.h index 8f09c51951..f6af1d6fbb 100644 --- a/source/dynlink/include/dynlink/dynlink_impl.h +++ b/source/dynlink/include/dynlink/dynlink_impl.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_impl_beos.h b/source/dynlink/include/dynlink/dynlink_impl_beos.h index 60efcdc2a1..52b2bea368 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_beos.h +++ b/source/dynlink/include/dynlink/dynlink_impl_beos.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_impl_macos.h b/source/dynlink/include/dynlink/dynlink_impl_macos.h index 404235e30c..51a7ec6cb2 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_macos.h +++ b/source/dynlink/include/dynlink/dynlink_impl_macos.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_impl_unix.h b/source/dynlink/include/dynlink/dynlink_impl_unix.h index cb239a1d8c..972b23c903 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_unix.h +++ b/source/dynlink/include/dynlink/dynlink_impl_unix.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_impl_win32.h b/source/dynlink/include/dynlink/dynlink_impl_win32.h index 9bd39af77e..a44fb9d821 100644 --- a/source/dynlink/include/dynlink/dynlink_impl_win32.h +++ b/source/dynlink/include/dynlink/dynlink_impl_win32.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_interface.h b/source/dynlink/include/dynlink/dynlink_interface.h index 0a33fa6086..80b34fc399 100644 --- a/source/dynlink/include/dynlink/dynlink_interface.h +++ b/source/dynlink/include/dynlink/dynlink_interface.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/include/dynlink/dynlink_type.h b/source/dynlink/include/dynlink/dynlink_type.h index 5347eb51a0..cc759e25fc 100644 --- a/source/dynlink/include/dynlink/dynlink_type.h +++ b/source/dynlink/include/dynlink/dynlink_type.h @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index bc2a6b843f..16266c1639 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -196,7 +196,7 @@ const char *dynlink_print_info(void) { static const char dynlink_info[] = "Dynamic Link Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef DYNLINK_STATIC_DEFINE "Compiled as static library type" diff --git a/source/dynlink/source/dynlink_impl.c b/source/dynlink/source/dynlink_impl.c index 2c2da41e6e..86092ad435 100644 --- a/source/dynlink/source/dynlink_impl.c +++ b/source/dynlink/source/dynlink_impl.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink_impl_beos.c b/source/dynlink/source/dynlink_impl_beos.c index bc28312af9..7f9adbbae2 100644 --- a/source/dynlink/source/dynlink_impl_beos.c +++ b/source/dynlink/source/dynlink_impl_beos.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink_impl_macos.c b/source/dynlink/source/dynlink_impl_macos.c index 672b39771b..4cfe042092 100644 --- a/source/dynlink/source/dynlink_impl_macos.c +++ b/source/dynlink/source/dynlink_impl_macos.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index 4c00300c65..8892797f95 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 60532c4636..8009aea547 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/dynlink/source/dynlink_interface.c b/source/dynlink/source/dynlink_interface.c index f35642217e..adc7b623aa 100644 --- a/source/dynlink/source/dynlink_interface.c +++ b/source/dynlink/source/dynlink_interface.c @@ -2,7 +2,7 @@ * Dynamic Link Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/environment/include/environment/environment.h b/source/environment/include/environment/environment.h index fab2ee2beb..7646f3f823 100644 --- a/source/environment/include/environment/environment.h +++ b/source/environment/include/environment/environment.h @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/environment/include/environment/environment_variable.h b/source/environment/include/environment/environment_variable.h index 11332c09ac..730dc3c857 100644 --- a/source/environment/include/environment/environment_variable.h +++ b/source/environment/include/environment/environment_variable.h @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/environment/include/environment/environment_variable_path.h b/source/environment/include/environment/environment_variable_path.h index 5b5f83da4b..d5492d8f6c 100644 --- a/source/environment/include/environment/environment_variable_path.h +++ b/source/environment/include/environment/environment_variable_path.h @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/environment/source/environment.c b/source/environment/source/environment.c index ae95bac494..e5c3270e8a 100644 --- a/source/environment/source/environment.c +++ b/source/environment/source/environment.c @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ const char *environment_print_info(void) { static const char environment_info[] = "Format Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef LOG_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/environment/source/environment_variable.c b/source/environment/source/environment_variable.c index d608cee434..9323e0163a 100644 --- a/source/environment/source/environment_variable.c +++ b/source/environment/source/environment_variable.c @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/environment/source/environment_variable_path.c b/source/environment/source/environment_variable_path.c index 8bfd3d50c0..53f492dc39 100644 --- a/source/environment/source/environment_variable_path.c +++ b/source/environment/source/environment_variable_path.c @@ -2,7 +2,7 @@ * Environment Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/examples/metacalllog/main.cpp b/source/examples/metacalllog/main.cpp index 0b4ac01a92..397d6bf371 100644 --- a/source/examples/metacalllog/main.cpp +++ b/source/examples/metacalllog/main.cpp @@ -2,7 +2,7 @@ * MetaCall Log by Parra Studios * Example of advanced logging in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/examples/metacallquine/main.cpp b/source/examples/metacallquine/main.cpp index a06008caff..639d69e77b 100644 --- a/source/examples/metacallquine/main.cpp +++ b/source/examples/metacallquine/main.cpp @@ -2,7 +2,7 @@ * MetaCall Quine by Parra Studios * A quine relay proof of concept intercomunicating between multiple programming languages. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/examples/metacallweb/main.cpp b/source/examples/metacallweb/main.cpp index f9f1cbb1e4..e82ba481a6 100644 --- a/source/examples/metacallweb/main.cpp +++ b/source/examples/metacallweb/main.cpp @@ -2,7 +2,7 @@ * MetaCall Web Service by Parra Studios * A complete web service example using metacall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h b/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h index 7b65599132..f009d33426 100644 --- a/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h +++ b/source/extensions/plugin_extension/include/plugin_extension/plugin_extension.h @@ -2,7 +2,7 @@ * Extension Library by Parra Studios * An extension for loading a folder of plugins based on metacall.json files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/extensions/plugin_extension/source/plugin_extension.cpp b/source/extensions/plugin_extension/source/plugin_extension.cpp index 3035b2b9e7..f787bdfe3e 100644 --- a/source/extensions/plugin_extension/source/plugin_extension.cpp +++ b/source/extensions/plugin_extension/source/plugin_extension.cpp @@ -2,7 +2,7 @@ * Extension Library by Parra Studios * An extension for loading a folder of plugins based on metacall.json files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/filesystem/include/filesystem/filesystem.h b/source/filesystem/include/filesystem/filesystem.h index 1bcc454f9d..0fead82850 100644 --- a/source/filesystem/include/filesystem/filesystem.h +++ b/source/filesystem/include/filesystem/filesystem.h @@ -2,7 +2,7 @@ * File System Library by Parra Studios * A cross-platform library for managing file system, paths and files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/filesystem/include/filesystem/filesystem_directory_descriptor.h b/source/filesystem/include/filesystem/filesystem_directory_descriptor.h index e4315e3f39..358329de2f 100644 --- a/source/filesystem/include/filesystem/filesystem_directory_descriptor.h +++ b/source/filesystem/include/filesystem/filesystem_directory_descriptor.h @@ -2,7 +2,7 @@ * File System Library by Parra Studios * A cross-platform library for managing file system, paths and files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/filesystem/include/filesystem/filesystem_file_descriptor.h b/source/filesystem/include/filesystem/filesystem_file_descriptor.h index 65469a983c..043be0534a 100644 --- a/source/filesystem/include/filesystem/filesystem_file_descriptor.h +++ b/source/filesystem/include/filesystem/filesystem_file_descriptor.h @@ -2,7 +2,7 @@ * File System Library by Parra Studios * A cross-platform library for managing file system, paths and files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/filesystem/source/filesystem.c b/source/filesystem/source/filesystem.c index 47d17ec11c..b9e2df00f1 100644 --- a/source/filesystem/source/filesystem.c +++ b/source/filesystem/source/filesystem.c @@ -1,6 +1,6 @@ /* * File System Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing file system, paths and files. * @@ -154,7 +154,7 @@ const char *filesystem_print_info(void) { static const char filesystem_info[] = "File System Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef FILESYSTEM_STATIC_DEFINE "Compiled as static library type" diff --git a/source/filesystem/source/filesystem_directory_descriptor.c b/source/filesystem/source/filesystem_directory_descriptor.c index 22d531fe1f..7d7f161544 100644 --- a/source/filesystem/source/filesystem_directory_descriptor.c +++ b/source/filesystem/source/filesystem_directory_descriptor.c @@ -2,7 +2,7 @@ * File System Library by Parra Studios * A cross-platform library for managing file system, paths and files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/filesystem/source/filesystem_file_descriptor.c b/source/filesystem/source/filesystem_file_descriptor.c index 04f92c9eb8..f03603279b 100644 --- a/source/filesystem/source/filesystem_file_descriptor.c +++ b/source/filesystem/source/filesystem_file_descriptor.c @@ -2,7 +2,7 @@ * File System Library by Parra Studios * A cross-platform library for managing file system, paths and files. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/format/include/format/format.h b/source/format/include/format/format.h index 239a1c74d4..81138d96b2 100644 --- a/source/format/include/format/format.h +++ b/source/format/include/format/format.h @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/format/include/format/format_print.h b/source/format/include/format/format_print.h index 0ad41f5a6b..c30f995e84 100644 --- a/source/format/include/format/format_print.h +++ b/source/format/include/format/format_print.h @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/format/include/format/format_specifier.h b/source/format/include/format/format_specifier.h index ff9344e571..947c51eb43 100644 --- a/source/format/include/format/format_specifier.h +++ b/source/format/include/format/format_specifier.h @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/format/source/format.c b/source/format/source/format.c index ef5deb66f4..cf35393df5 100644 --- a/source/format/source/format.c +++ b/source/format/source/format.c @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ const char *format_print_info(void) { static const char format_info[] = "Format Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef FORMAT_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index a108b3c5cb..b4b8816a3b 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_handle.h b/source/loader/include/loader/loader_handle.h index 68fc94ae7c..1d388fff94 100644 --- a/source/loader/include/loader/loader_handle.h +++ b/source/loader/include/loader/loader_handle.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_host.h b/source/loader/include/loader/loader_host.h index ce41c3c3d0..e5844e1256 100644 --- a/source/loader/include/loader/loader_host.h +++ b/source/loader/include/loader/loader_host.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index c4f6c8706f..f7c7d56cbf 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_impl_data.h b/source/loader/include/loader/loader_impl_data.h index 8148886762..d999280323 100644 --- a/source/loader/include/loader/loader_impl_data.h +++ b/source/loader/include/loader/loader_impl_data.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_impl_interface.h b/source/loader/include/loader/loader_impl_interface.h index 1e56f3ac88..7fa5e1b0cf 100644 --- a/source/loader/include/loader/loader_impl_interface.h +++ b/source/loader/include/loader/loader_impl_interface.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_manager_impl.h b/source/loader/include/loader/loader_manager_impl.h index 4e1253c125..124aaf55c8 100644 --- a/source/loader/include/loader/loader_manager_impl.h +++ b/source/loader/include/loader/loader_manager_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/include/loader/loader_naming.h b/source/loader/include/loader/loader_naming.h index e49b528076..b04627f784 100644 --- a/source/loader/include/loader/loader_naming.h +++ b/source/loader/include/loader/loader_naming.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index e29ef684f4..02ec13573c 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -854,7 +854,7 @@ const char *loader_print_info(void) { static const char loader_info[] = "Loader Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loader/source/loader_host.c b/source/loader/source/loader_host.c index 28f9ebf72d..440e3d36aa 100644 --- a/source/loader/source/loader_host.c +++ b/source/loader/source/loader_host.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 7db5c35d5a..2ad8034d8a 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loader/source/loader_manager_impl.c b/source/loader/source/loader_manager_impl.c index f3f4375a63..7e6308d4b6 100644 --- a/source/loader/source/loader_manager_impl.c +++ b/source/loader/source/loader_manager_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/c_loader/include/c_loader/c_loader.h b/source/loaders/c_loader/include/c_loader/c_loader.h index 159d45a62a..9d92fd0f7a 100644 --- a/source/loaders/c_loader/include/c_loader/c_loader.h +++ b/source/loaders/c_loader/include/c_loader/c_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading c code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/c_loader/include/c_loader/c_loader_impl.h b/source/loaders/c_loader/include/c_loader/c_loader_impl.h index fa9b9fafa4..46de1b4ac9 100644 --- a/source/loaders/c_loader/include/c_loader/c_loader_impl.h +++ b/source/loaders/c_loader/include/c_loader/c_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading c code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/c_loader/source/c_loader.c b/source/loaders/c_loader/source/c_loader.c index 42ace7dc06..328db89cc5 100644 --- a/source/loaders/c_loader/source/c_loader.c +++ b/source/loaders/c_loader/source/c_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading c code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *c_loader_print_info(void) { static const char c_loader_info[] = "C Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef C_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index 819bcceeae..f9530b7ab3 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading c code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cob_loader/include/cob_loader/cob_loader.h b/source/loaders/cob_loader/include/cob_loader/cob_loader.h index 4344cf2571..f7a3b7d667 100644 --- a/source/loaders/cob_loader/include/cob_loader/cob_loader.h +++ b/source/loaders/cob_loader/include/cob_loader/cob_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading cobol code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cob_loader/include/cob_loader/cob_loader_impl.h b/source/loaders/cob_loader/include/cob_loader/cob_loader_impl.h index 71a50c9493..5822c4008d 100644 --- a/source/loaders/cob_loader/include/cob_loader/cob_loader_impl.h +++ b/source/loaders/cob_loader/include/cob_loader/cob_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading cobol code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cob_loader/source/cob_loader.c b/source/loaders/cob_loader/source/cob_loader.c index 450fc82a01..ddeb4851ef 100644 --- a/source/loaders/cob_loader/source/cob_loader.c +++ b/source/loaders/cob_loader/source/cob_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading cobol code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *cob_loader_print_info(void) { static const char cob_loader_info[] = "Cobol Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef COB_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/cob_loader/source/cob_loader_impl.cpp b/source/loaders/cob_loader/source/cob_loader_impl.cpp index 6fff1d4712..b74589782f 100644 --- a/source/loaders/cob_loader/source/cob_loader_impl.cpp +++ b/source/loaders/cob_loader/source/cob_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading cobol code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/crystal/cr_loader_impl.cr b/source/loaders/cr_loader/crystal/cr_loader_impl.cr index 8f1274f98c..34c33a319e 100644 --- a/source/loaders/cr_loader/crystal/cr_loader_impl.cr +++ b/source/loaders/cr_loader/crystal/cr_loader_impl.cr @@ -2,7 +2,7 @@ # Loader Library by Parra Studios # A plugin for loading crystal code at run-time into a process. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/crystal/main.cr b/source/loaders/cr_loader/crystal/main.cr index 3068b919b5..4060807e12 100644 --- a/source/loaders/cr_loader/crystal/main.cr +++ b/source/loaders/cr_loader/crystal/main.cr @@ -2,7 +2,7 @@ # Loader Library by Parra Studios # A plugin for loading crystal code at run-time into a process. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/crystal/metacall.cr b/source/loaders/cr_loader/crystal/metacall.cr index a6b306d71c..d266a534a0 100644 --- a/source/loaders/cr_loader/crystal/metacall.cr +++ b/source/loaders/cr_loader/crystal/metacall.cr @@ -2,7 +2,7 @@ # Loader Library by Parra Studios # A plugin for loading crystal code at run-time into a process. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/include/cr_loader/cr_loader.h b/source/loaders/cr_loader/include/cr_loader/cr_loader.h index 33e01700f6..936dade8a0 100644 --- a/source/loaders/cr_loader/include/cr_loader/cr_loader.h +++ b/source/loaders/cr_loader/include/cr_loader/cr_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading crystal code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/include/cr_loader/cr_loader_impl.h b/source/loaders/cr_loader/include/cr_loader/cr_loader_impl.h index 7abbf29aba..daa8e1edb6 100644 --- a/source/loaders/cr_loader/include/cr_loader/cr_loader_impl.h +++ b/source/loaders/cr_loader/include/cr_loader/cr_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading crystal code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/include/cr_loader/cr_loader_impl_main.h b/source/loaders/cr_loader/include/cr_loader/cr_loader_impl_main.h index c4142210e0..9c30090887 100644 --- a/source/loaders/cr_loader/include/cr_loader/cr_loader_impl_main.h +++ b/source/loaders/cr_loader/include/cr_loader/cr_loader_impl_main.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading crystal code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cr_loader/source/cr_loader.c b/source/loaders/cr_loader/source/cr_loader.c index 8788d6a7a9..f96bbe3b5d 100644 --- a/source/loaders/cr_loader/source/cr_loader.c +++ b/source/loaders/cr_loader/source/cr_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading crystal code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *cr_loader_print_info(void) { static const char cr_loader_info[] = "Crystal Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef CR_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/cs_loader/include/cs_loader/defs.h b/source/loaders/cs_loader/include/cs_loader/defs.h index ba55028007..9498288aa5 100644 --- a/source/loaders/cs_loader/include/cs_loader/defs.h +++ b/source/loaders/cs_loader/include/cs_loader/defs.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/host_environment.h b/source/loaders/cs_loader/include/cs_loader/host_environment.h index 27f57baa3a..81388cab50 100644 --- a/source/loaders/cs_loader/include/cs_loader/host_environment.h +++ b/source/loaders/cs_loader/include/cs_loader/host_environment.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/netcore.h b/source/loaders/cs_loader/include/cs_loader/netcore.h index a61d3a2e07..3d5cf0b5f0 100644 --- a/source/loaders/cs_loader/include/cs_loader/netcore.h +++ b/source/loaders/cs_loader/include/cs_loader/netcore.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/netcore_linux.h b/source/loaders/cs_loader/include/cs_loader/netcore_linux.h index 803d656d82..09369c3890 100644 --- a/source/loaders/cs_loader/include/cs_loader/netcore_linux.h +++ b/source/loaders/cs_loader/include/cs_loader/netcore_linux.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/netcore_win.h b/source/loaders/cs_loader/include/cs_loader/netcore_win.h index ae9ee3f4cb..8de3705bc0 100644 --- a/source/loaders/cs_loader/include/cs_loader/netcore_win.h +++ b/source/loaders/cs_loader/include/cs_loader/netcore_win.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/simple_netcore.h b/source/loaders/cs_loader/include/cs_loader/simple_netcore.h index 557d83df2d..01582ec94f 100644 --- a/source/loaders/cs_loader/include/cs_loader/simple_netcore.h +++ b/source/loaders/cs_loader/include/cs_loader/simple_netcore.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/string_buffer.h b/source/loaders/cs_loader/include/cs_loader/string_buffer.h index 8b0b387e86..a89ecf6dc1 100644 --- a/source/loaders/cs_loader/include/cs_loader/string_buffer.h +++ b/source/loaders/cs_loader/include/cs_loader/string_buffer.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/include/cs_loader/utils.hpp b/source/loaders/cs_loader/include/cs_loader/utils.hpp index 60311047e7..1a36b45e96 100644 --- a/source/loaders/cs_loader/include/cs_loader/utils.hpp +++ b/source/loaders/cs_loader/include/cs_loader/utils.hpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/cs_loader.c b/source/loaders/cs_loader/source/cs_loader.c index f13e90e8d6..4b19bd5053 100644 --- a/source/loaders/cs_loader/source/cs_loader.c +++ b/source/loaders/cs_loader/source/cs_loader.c @@ -34,7 +34,7 @@ const char *cs_loader_print_info(void) { static const char cs_loader_info[] = "Net Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef CS_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/cs_loader/source/cs_loader_impl.c b/source/loaders/cs_loader/source/cs_loader_impl.c index e33bb466bb..96508759c5 100644 --- a/source/loaders/cs_loader/source/cs_loader_impl.c +++ b/source/loaders/cs_loader/source/cs_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/host_environment.cpp b/source/loaders/cs_loader/source/host_environment.cpp index ba6e51d0e8..9254891e2f 100644 --- a/source/loaders/cs_loader/source/host_environment.cpp +++ b/source/loaders/cs_loader/source/host_environment.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/netcore.cpp b/source/loaders/cs_loader/source/netcore.cpp index 831853825b..b3eb9561dc 100644 --- a/source/loaders/cs_loader/source/netcore.cpp +++ b/source/loaders/cs_loader/source/netcore.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/netcore_linux.cpp b/source/loaders/cs_loader/source/netcore_linux.cpp index 68e6f0fdc2..8f8c38bcdc 100644 --- a/source/loaders/cs_loader/source/netcore_linux.cpp +++ b/source/loaders/cs_loader/source/netcore_linux.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/simple_netcore.cpp b/source/loaders/cs_loader/source/simple_netcore.cpp index 852b0d8040..93e82b2ade 100644 --- a/source/loaders/cs_loader/source/simple_netcore.cpp +++ b/source/loaders/cs_loader/source/simple_netcore.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/cs_loader/source/string_buffer.cpp b/source/loaders/cs_loader/source/string_buffer.cpp index e482f8b4d9..b5a2ab9197 100644 --- a/source/loaders/cs_loader/source/string_buffer.cpp +++ b/source/loaders/cs_loader/source/string_buffer.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading net code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/dart_loader/include/dart_loader/dart_loader.h b/source/loaders/dart_loader/include/dart_loader/dart_loader.h index 15dab7185a..1f88094559 100644 --- a/source/loaders/dart_loader/include/dart_loader/dart_loader.h +++ b/source/loaders/dart_loader/include/dart_loader/dart_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading dart code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/dart_loader/include/dart_loader/dart_loader_impl.h b/source/loaders/dart_loader/include/dart_loader/dart_loader_impl.h index 7e19d115b7..f89691f7f9 100644 --- a/source/loaders/dart_loader/include/dart_loader/dart_loader_impl.h +++ b/source/loaders/dart_loader/include/dart_loader/dart_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading dart code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/dart_loader/source/dart_loader.c b/source/loaders/dart_loader/source/dart_loader.c index df693fc416..c1486b9a8d 100644 --- a/source/loaders/dart_loader/source/dart_loader.c +++ b/source/loaders/dart_loader/source/dart_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading dart code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *dart_loader_print_info(void) { static const char dart_loader_info[] = "Dart Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef DART_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/dart_loader/source/dart_loader_impl.cc b/source/loaders/dart_loader/source/dart_loader_impl.cc index 92dac094b1..750d52cc7f 100644 --- a/source/loaders/dart_loader/source/dart_loader_impl.cc +++ b/source/loaders/dart_loader/source/dart_loader_impl.cc @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading dart code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/ext_loader/include/ext_loader/ext_loader.h b/source/loaders/ext_loader/include/ext_loader/ext_loader.h index d1a9db118c..0ca69aafb8 100644 --- a/source/loaders/ext_loader/include/ext_loader/ext_loader.h +++ b/source/loaders/ext_loader/include/ext_loader/ext_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading extension code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/ext_loader/include/ext_loader/ext_loader_impl.h b/source/loaders/ext_loader/include/ext_loader/ext_loader_impl.h index 7ba7345670..08ef3c1183 100644 --- a/source/loaders/ext_loader/include/ext_loader/ext_loader_impl.h +++ b/source/loaders/ext_loader/include/ext_loader/ext_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading extension code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/ext_loader/source/ext_loader.c b/source/loaders/ext_loader/source/ext_loader.c index 0f2fa35fa1..54dd4aa0d6 100644 --- a/source/loaders/ext_loader/source/ext_loader.c +++ b/source/loaders/ext_loader/source/ext_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading extension code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *ext_loader_print_info(void) { static const char ext_loader_info[] = "Extension Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef FILE_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/ext_loader/source/ext_loader_impl.cpp b/source/loaders/ext_loader/source/ext_loader_impl.cpp index caa235182f..c41db8f1b4 100644 --- a/source/loaders/ext_loader/source/ext_loader_impl.cpp +++ b/source/loaders/ext_loader/source/ext_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading extension code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/file_loader/include/file_loader/file_loader.h b/source/loaders/file_loader/include/file_loader/file_loader.h index 4fff999e25..a2fc929b47 100644 --- a/source/loaders/file_loader/include/file_loader/file_loader.h +++ b/source/loaders/file_loader/include/file_loader/file_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading file code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/file_loader/include/file_loader/file_loader_impl.h b/source/loaders/file_loader/include/file_loader/file_loader_impl.h index f54d81b457..fd37c415c3 100644 --- a/source/loaders/file_loader/include/file_loader/file_loader_impl.h +++ b/source/loaders/file_loader/include/file_loader/file_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading file code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/file_loader/source/file_loader.c b/source/loaders/file_loader/source/file_loader.c index ec13b8d4c9..1646c1abfa 100644 --- a/source/loaders/file_loader/source/file_loader.c +++ b/source/loaders/file_loader/source/file_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading file code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *file_loader_print_info(void) { static const char file_loader_info[] = "File Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef FILE_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/file_loader/source/file_loader_impl.c b/source/loaders/file_loader/source/file_loader_impl.c index c6596d2ff3..74bad13282 100644 --- a/source/loaders/file_loader/source/file_loader_impl.c +++ b/source/loaders/file_loader/source/file_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading file code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/java_loader/include/java_loader/java_loader.h b/source/loaders/java_loader/include/java_loader/java_loader.h index b0aaa901d0..d241030cd8 100644 --- a/source/loaders/java_loader/include/java_loader/java_loader.h +++ b/source/loaders/java_loader/include/java_loader/java_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading java code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/java_loader/include/java_loader/java_loader_impl.h b/source/loaders/java_loader/include/java_loader/java_loader_impl.h index 2232b5641d..36d42df355 100644 --- a/source/loaders/java_loader/include/java_loader/java_loader_impl.h +++ b/source/loaders/java_loader/include/java_loader/java_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading java code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/java_loader/source/java_loader.c b/source/loaders/java_loader/source/java_loader.c index 9f802a875e..36126eb2e4 100644 --- a/source/loaders/java_loader/source/java_loader.c +++ b/source/loaders/java_loader/source/java_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading java code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *java_loader_print_info(void) { static const char java_loader_info[] = "C Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef JAVA_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/java_loader/source/java_loader_impl.cpp b/source/loaders/java_loader/source/java_loader_impl.cpp index 0baa237f9e..1714679c77 100644 --- a/source/loaders/java_loader/source/java_loader_impl.cpp +++ b/source/loaders/java_loader/source/java_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading java code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jl_loader/bootstrap/lib/bootstrap.jl b/source/loaders/jl_loader/bootstrap/lib/bootstrap.jl index dfefa917dd..0b838303b3 100644 --- a/source/loaders/jl_loader/bootstrap/lib/bootstrap.jl +++ b/source/loaders/jl_loader/bootstrap/lib/bootstrap.jl @@ -2,7 +2,7 @@ # Loader Library by Parra Studios # A plugin for loading Julia code at run-time into a process. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/loaders/jl_loader/include/jl_loader/jl_loader.h b/source/loaders/jl_loader/include/jl_loader/jl_loader.h index 02d588657b..b77da20f2a 100644 --- a/source/loaders/jl_loader/include/jl_loader/jl_loader.h +++ b/source/loaders/jl_loader/include/jl_loader/jl_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading Julia code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jl_loader/include/jl_loader/jl_loader_impl.h b/source/loaders/jl_loader/include/jl_loader/jl_loader_impl.h index 6abcd5ab01..e40530c9be 100644 --- a/source/loaders/jl_loader/include/jl_loader/jl_loader_impl.h +++ b/source/loaders/jl_loader/include/jl_loader/jl_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading Julia code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jl_loader/source/jl_loader.c b/source/loaders/jl_loader/source/jl_loader.c index 6819873849..dfee6cf030 100644 --- a/source/loaders/jl_loader/source/jl_loader.c +++ b/source/loaders/jl_loader/source/jl_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading Julia code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *jl_loader_print_info(void) { static const char jl_loader_info[] = "Julia Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef JL_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/jl_loader/source/jl_loader_impl.cpp b/source/loaders/jl_loader/source/jl_loader_impl.cpp index 9c9620e897..cb042d7113 100644 --- a/source/loaders/jl_loader/source/jl_loader_impl.cpp +++ b/source/loaders/jl_loader/source/jl_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading Julia code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/js_loader/include/js_loader/js_loader.h b/source/loaders/js_loader/include/js_loader/js_loader.h index 7bbcce7f70..7da9697a9a 100644 --- a/source/loaders/js_loader/include/js_loader/js_loader.h +++ b/source/loaders/js_loader/include/js_loader/js_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/js_loader/include/js_loader/js_loader_impl.h b/source/loaders/js_loader/include/js_loader/js_loader_impl.h index 78926f39e3..ce79543ebc 100644 --- a/source/loaders/js_loader/include/js_loader/js_loader_impl.h +++ b/source/loaders/js_loader/include/js_loader/js_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/js_loader/include/js_loader/js_loader_impl_guard.hpp b/source/loaders/js_loader/include/js_loader/js_loader_impl_guard.hpp index 5105ba6ba0..18198c69cd 100644 --- a/source/loaders/js_loader/include/js_loader/js_loader_impl_guard.hpp +++ b/source/loaders/js_loader/include/js_loader/js_loader_impl_guard.hpp @@ -3,7 +3,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/js_loader/source/js_loader.c b/source/loaders/js_loader/source/js_loader.c index eaf44404d9..4cb6c5c300 100644 --- a/source/loaders/js_loader/source/js_loader.c +++ b/source/loaders/js_loader/source/js_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *js_loader_print_info(void) { static const char js_loader_info[] = "Javascript Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef JS_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/js_loader/source/js_loader_impl.cpp b/source/loaders/js_loader/source/js_loader_impl.cpp index 845a4f5a0f..ccc79a8203 100644 --- a/source/loaders/js_loader/source/js_loader_impl.cpp +++ b/source/loaders/js_loader/source/js_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/js_loader/source/js_loader_impl_guard.cpp b/source/loaders/js_loader/source/js_loader_impl_guard.cpp index 0d7c199768..c3d4e82084 100644 --- a/source/loaders/js_loader/source/js_loader_impl_guard.cpp +++ b/source/loaders/js_loader/source/js_loader_impl_guard.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h index 6b74e75197..19f98f33db 100644 --- a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h +++ b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader_impl.h b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader_impl.h index 015e4830ae..6cc08d96da 100644 --- a/source/loaders/jsm_loader/include/jsm_loader/jsm_loader_impl.h +++ b/source/loaders/jsm_loader/include/jsm_loader/jsm_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/jsm_loader/source/jsm_loader.c b/source/loaders/jsm_loader/source/jsm_loader.c index 175269eff5..3725797aa4 100644 --- a/source/loaders/jsm_loader/source/jsm_loader.c +++ b/source/loaders/jsm_loader/source/jsm_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ const char *jsm_loader_print_info(void) { static const char jsm_loader_info[] = "Javascript Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef JSM_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/jsm_loader/source/jsm_loader_impl.cpp b/source/loaders/jsm_loader/source/jsm_loader_impl.cpp index 591f352f9c..f5ff0bddff 100644 --- a/source/loaders/jsm_loader/source/jsm_loader_impl.cpp +++ b/source/loaders/jsm_loader/source/jsm_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading javascript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h index e395b8ccc2..b8cf75aca6 100644 --- a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h +++ b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading LLVM code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader_impl.h b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader_impl.h index d5949a9f15..b9637ae90c 100644 --- a/source/loaders/llvm_loader/include/llvm_loader/llvm_loader_impl.h +++ b/source/loaders/llvm_loader/include/llvm_loader/llvm_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading LLVM code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/llvm_loader/source/llvm_loader.c b/source/loaders/llvm_loader/source/llvm_loader.c index 0ffb622c45..4d3e8abd1f 100644 --- a/source/loaders/llvm_loader/source/llvm_loader.c +++ b/source/loaders/llvm_loader/source/llvm_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading LLVM code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *llvm_loader_print_info(void) { static const char llvm_loader_info[] = "LLVM Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef llvm_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/llvm_loader/source/llvm_loader_impl.cpp b/source/loaders/llvm_loader/source/llvm_loader_impl.cpp index bad187313e..f6bfd1d217 100644 --- a/source/loaders/llvm_loader/source/llvm_loader_impl.cpp +++ b/source/loaders/llvm_loader/source/llvm_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading LLVM code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/loaders.h.in b/source/loaders/loaders.h.in index d5d9dec8e3..f3b24b6edf 100644 --- a/source/loaders/loaders.h.in +++ b/source/loaders/loaders.h.in @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A library for loading executable code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/lua_loader/include/lua_loader/lua_loader.h b/source/loaders/lua_loader/include/lua_loader/lua_loader.h index 8117509070..9179d5e50f 100644 --- a/source/loaders/lua_loader/include/lua_loader/lua_loader.h +++ b/source/loaders/lua_loader/include/lua_loader/lua_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading lua code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/lua_loader/include/lua_loader/lua_loader_impl.h b/source/loaders/lua_loader/include/lua_loader/lua_loader_impl.h index 8861c9ba12..4c08972184 100644 --- a/source/loaders/lua_loader/include/lua_loader/lua_loader_impl.h +++ b/source/loaders/lua_loader/include/lua_loader/lua_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading lua code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/lua_loader/source/lua_loader.c b/source/loaders/lua_loader/source/lua_loader.c index fa56317ac9..b7cc942aae 100644 --- a/source/loaders/lua_loader/source/lua_loader.c +++ b/source/loaders/lua_loader/source/lua_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading lua code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *lua_loader_print_info(void) { static const char lua_loader_info[] = "Lua Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef LUA_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/lua_loader/source/lua_loader_impl.c b/source/loaders/lua_loader/source/lua_loader_impl.c index 63f8fdd660..58d89f20a5 100644 --- a/source/loaders/lua_loader/source/lua_loader_impl.c +++ b/source/loaders/lua_loader/source/lua_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading lua code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader.h b/source/loaders/mock_loader/include/mock_loader/mock_loader.h index 2f0302fdf4..e2c17c49e9 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_descriptor.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_descriptor.h index 5be7934722..9c48015f3b 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_descriptor.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_descriptor.h @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading mock code at run-time into a process. * diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_export.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_export.h index 3c474f8b17..6da9c5cb19 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_export.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_export.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_function.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_function.h index ee3c9e7bb6..8ea6d30316 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_function.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_function.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_function_interface.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_function_interface.h index ffcc0449a9..ece86e5fe6 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_function_interface.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_function_interface.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_handle.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_handle.h index 62322b4528..d0c7f23e11 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_handle.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_handle.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_impl.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_impl.h index 2d8992c737..e064db708d 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_impl.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_interface.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_interface.h index bb3dd7a47a..f8b9bb5ea0 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_interface.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_interface.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/include/mock_loader/mock_loader_print.h b/source/loaders/mock_loader/include/mock_loader/mock_loader_print.h index 09785d67ba..727d39ad78 100644 --- a/source/loaders/mock_loader/include/mock_loader/mock_loader_print.h +++ b/source/loaders/mock_loader/include/mock_loader/mock_loader_print.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/source/mock_loader.c b/source/loaders/mock_loader/source/mock_loader.c index 949ac2289e..6dddee2a32 100644 --- a/source/loaders/mock_loader/source/mock_loader.c +++ b/source/loaders/mock_loader/source/mock_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *mock_loader_print_info(void) { static const char mock_loader_info[] = "Mock Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef MOCK_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/mock_loader/source/mock_loader_descriptor.c b/source/loaders/mock_loader/source/mock_loader_descriptor.c index 74e8f76c2c..c88c90abb3 100644 --- a/source/loaders/mock_loader/source/mock_loader_descriptor.c +++ b/source/loaders/mock_loader/source/mock_loader_descriptor.c @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading mock code at run-time into a process. * diff --git a/source/loaders/mock_loader/source/mock_loader_export.c b/source/loaders/mock_loader/source/mock_loader_export.c index 7623d32852..e79fcfcda4 100644 --- a/source/loaders/mock_loader/source/mock_loader_export.c +++ b/source/loaders/mock_loader/source/mock_loader_export.c @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading mock code at run-time into a process. * diff --git a/source/loaders/mock_loader/source/mock_loader_function.c b/source/loaders/mock_loader/source/mock_loader_function.c index 7b2d8a64c9..f8a88864f0 100644 --- a/source/loaders/mock_loader/source/mock_loader_function.c +++ b/source/loaders/mock_loader/source/mock_loader_function.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/source/mock_loader_function_interface.c b/source/loaders/mock_loader/source/mock_loader_function_interface.c index 7310fa4153..92ead2583a 100644 --- a/source/loaders/mock_loader/source/mock_loader_function_interface.c +++ b/source/loaders/mock_loader/source/mock_loader_function_interface.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/source/mock_loader_handle.c b/source/loaders/mock_loader/source/mock_loader_handle.c index 8160483962..567ff46077 100644 --- a/source/loaders/mock_loader/source/mock_loader_handle.c +++ b/source/loaders/mock_loader/source/mock_loader_handle.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/source/mock_loader_impl.c b/source/loaders/mock_loader/source/mock_loader_impl.c index e63c7a1f11..7f8940e548 100644 --- a/source/loaders/mock_loader/source/mock_loader_impl.c +++ b/source/loaders/mock_loader/source/mock_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading mock code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/mock_loader/source/mock_loader_interface.c b/source/loaders/mock_loader/source/mock_loader_interface.c index 11368a61a9..0d24545f1b 100644 --- a/source/loaders/mock_loader/source/mock_loader_interface.c +++ b/source/loaders/mock_loader/source/mock_loader_interface.c @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading mock code at run-time into a process. * diff --git a/source/loaders/mock_loader/source/mock_loader_print.c b/source/loaders/mock_loader/source/mock_loader_print.c index c1a27cb27a..1539d5dbce 100644 --- a/source/loaders/mock_loader/source/mock_loader_print.c +++ b/source/loaders/mock_loader/source/mock_loader_print.c @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading mock code at run-time into a process. * @@ -14,7 +14,7 @@ const char *mock_loader_print_info(void) { static const char mock_loader_info[] = "Mock Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef MOCK_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/node_loader/include/node_loader/node_loader.h b/source/loaders/node_loader/include/node_loader/node_loader.h index 84b1009bea..fc9af4c427 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader.h +++ b/source/loaders/node_loader/include/node_loader/node_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/include/node_loader/node_loader_bootstrap.h b/source/loaders/node_loader/include/node_loader/node_loader_bootstrap.h index 58e51d9040..1178d14738 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_bootstrap.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_bootstrap.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/include/node_loader/node_loader_impl.h b/source/loaders/node_loader/include/node_loader/node_loader_impl.h index b41893a623..094f3b24ef 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_impl.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/include/node_loader/node_loader_port.h b/source/loaders/node_loader/include/node_loader/node_loader_port.h index effd3f06a9..0555f12471 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_port.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_port.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h b/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h index 84ea34ccfc..09c4ec6a32 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_trampoline.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h b/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h index 73fcb6f57d..47d425ceeb 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/source/node_loader.c b/source/loaders/node_loader/source/node_loader.c index e768a8f89a..96b5b37bf8 100644 --- a/source/loaders/node_loader/source/node_loader.c +++ b/source/loaders/node_loader/source/node_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading nodejs code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *node_loader_print_info(void) { static const char node_loader_info[] = "Javascript Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef JS_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 281221d40a..e15575fec8 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading nodejs code at run-time into a process. * diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index 4a4e224212..f96f1f2956 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -2,7 +2,7 @@ * MetaCall NodeJS Port by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/node_loader/source/node_loader_trampoline.cpp b/source/loaders/node_loader/source/node_loader_trampoline.cpp index 7ed654358b..9083223a15 100644 --- a/source/loaders/node_loader/source/node_loader_trampoline.cpp +++ b/source/loaders/node_loader/source/node_loader_trampoline.cpp @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading nodejs code at run-time into a process. * diff --git a/source/loaders/py_loader/include/py_loader/py_loader.h b/source/loaders/py_loader/include/py_loader/py_loader.h index cdc88d4155..54b1515860 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader.h +++ b/source/loaders/py_loader/include/py_loader/py_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/include/py_loader/py_loader_dict.h b/source/loaders/py_loader/include/py_loader/py_loader_dict.h index 6c874786ee..be17ab153b 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_dict.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_dict.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/include/py_loader/py_loader_impl.h b/source/loaders/py_loader/include/py_loader/py_loader_impl.h index efa286a6ea..f06b3d6038 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_impl.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/include/py_loader/py_loader_port.h b/source/loaders/py_loader/include/py_loader/py_loader_port.h index 8e4e18eb27..07dd6589f4 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_port.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_port.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/include/py_loader/py_loader_threading.h b/source/loaders/py_loader/include/py_loader/py_loader_threading.h index 6dbc9dc4d0..b4f0fb4999 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_threading.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_threading.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/source/py_loader.c b/source/loaders/py_loader/source/py_loader.c index f3bf421fb2..ecdc14e009 100644 --- a/source/loaders/py_loader/source/py_loader.c +++ b/source/loaders/py_loader/source/py_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *py_loader_print_info(void) { static const char py_loader_info[] = "Python Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef PY_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index 022ff7c9a8..2982a43676 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 0c495ee073..79d655d019 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index 3ae0ac918a..3bece75cd4 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 75f11f230a..c49add1c36 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader.h b/source/loaders/rb_loader/include/rb_loader/rb_loader.h index 4d727e5079..52e07d650e 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h index 39b2744d0e..3a86aaaa96 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h index 77a232b2a7..6a854d079a 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rb_loader/source/rb_loader.c b/source/loaders/rb_loader/source/rb_loader.c index 7bea40663c..8603917e35 100644 --- a/source/loaders/rb_loader/source/rb_loader.c +++ b/source/loaders/rb_loader/source/rb_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *rb_loader_print_info(void) { static const char rb_loader_info[] = "Ruby Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef RB_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 6cb99ae050..ea3f817ae6 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading ruby code at run-time into a process. * diff --git a/source/loaders/rb_loader/source/rb_loader_impl_parser.c b/source/loaders/rb_loader/source/rb_loader_impl_parser.c index dc8cd5dde2..3f3759d01f 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl_parser.c +++ b/source/loaders/rb_loader/source/rb_loader_impl_parser.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h index a4e399d16e..a5d71dca59 100644 --- a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h +++ b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rpc endpoints at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader_impl.h b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader_impl.h index 12d580e6a9..85e9d9fde2 100644 --- a/source/loaders/rpc_loader/include/rpc_loader/rpc_loader_impl.h +++ b/source/loaders/rpc_loader/include/rpc_loader/rpc_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rpc endpoints at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rpc_loader/source/rpc_loader.c b/source/loaders/rpc_loader/source/rpc_loader.c index c5fb1cba6f..91055fbf57 100644 --- a/source/loaders/rpc_loader/source/rpc_loader.c +++ b/source/loaders/rpc_loader/source/rpc_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rpc endpoints at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *rpc_loader_print_info(void) { static const char rpc_loader_info[] = "RPC Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef RPC_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/rpc_loader/source/rpc_loader_impl.cpp b/source/loaders/rpc_loader/source/rpc_loader_impl.cpp index 4ae44faf2f..abb4b55aa4 100644 --- a/source/loaders/rpc_loader/source/rpc_loader_impl.cpp +++ b/source/loaders/rpc_loader/source/rpc_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rpc endpoints at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use thiz file except in compliance with the License. diff --git a/source/loaders/rs_loader/include/rs_loader/rs_loader.h b/source/loaders/rs_loader/include/rs_loader/rs_loader.h index 61e9c11e85..6d8a75468d 100644 --- a/source/loaders/rs_loader/include/rs_loader/rs_loader.h +++ b/source/loaders/rs_loader/include/rs_loader/rs_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rust code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rs_loader/include/rs_loader/rs_loader_impl.h b/source/loaders/rs_loader/include/rs_loader/rs_loader_impl.h index 1f34c30487..3890545e57 100644 --- a/source/loaders/rs_loader/include/rs_loader/rs_loader_impl.h +++ b/source/loaders/rs_loader/include/rs_loader/rs_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rust code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/rs_loader/source/rs_loader.c b/source/loaders/rs_loader/source/rs_loader.c index dc8317e360..3bd6062539 100644 --- a/source/loaders/rs_loader/source/rs_loader.c +++ b/source/loaders/rs_loader/source/rs_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading rust code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ const char *rs_loader_print_info(void) { static const char rs_loader_info[] = "Rust Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef RS_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/ts_loader/include/ts_loader/ts_loader.h b/source/loaders/ts_loader/include/ts_loader/ts_loader.h index b433fd9411..e30ce52c3f 100644 --- a/source/loaders/ts_loader/include/ts_loader/ts_loader.h +++ b/source/loaders/ts_loader/include/ts_loader/ts_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading TypeScript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/ts_loader/include/ts_loader/ts_loader_impl.h b/source/loaders/ts_loader/include/ts_loader/ts_loader_impl.h index d96bb82356..1cab73388c 100644 --- a/source/loaders/ts_loader/include/ts_loader/ts_loader_impl.h +++ b/source/loaders/ts_loader/include/ts_loader/ts_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading TypeScript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/ts_loader/source/ts_loader.c b/source/loaders/ts_loader/source/ts_loader.c index b93b632b33..2afd1d79c9 100644 --- a/source/loaders/ts_loader/source/ts_loader.c +++ b/source/loaders/ts_loader/source/ts_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading TypeScript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *ts_loader_print_info(void) { static const char ts_loader_info[] = "TypeScript Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef TS_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/ts_loader/source/ts_loader_impl.cpp b/source/loaders/ts_loader/source/ts_loader_impl.cpp index 6be97f9f0a..57f9a42f0a 100644 --- a/source/loaders/ts_loader/source/ts_loader_impl.cpp +++ b/source/loaders/ts_loader/source/ts_loader_impl.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading TypeScript code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h index 067ea4856f..a7f481ffd1 100644 --- a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h +++ b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_function.h b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_function.h index a8a59fd64f..a427503b9f 100644 --- a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_function.h +++ b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_function.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_handle.h b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_handle.h index e775e00762..411aa0095f 100644 --- a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_handle.h +++ b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_handle.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_impl.h b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_impl.h index 8750a55158..de0c630005 100644 --- a/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_impl.h +++ b/source/loaders/wasm_loader/include/wasm_loader/wasm_loader_impl.h @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/loaders/wasm_loader/source/wasm_loader.c b/source/loaders/wasm_loader/source/wasm_loader.c index f28af43b83..6ac5fbabce 100644 --- a/source/loaders/wasm_loader/source/wasm_loader.c +++ b/source/loaders/wasm_loader/source/wasm_loader.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ const char *wasm_loader_print_info(void) { static const char wasm_loader_info[] = "WebAssembly Loader Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef wasm_LOADER_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/loaders/wasm_loader/source/wasm_loader_impl.c b/source/loaders/wasm_loader/source/wasm_loader_impl.c index 3073bb4f13..558ea02156 100644 --- a/source/loaders/wasm_loader/source/wasm_loader_impl.c +++ b/source/loaders/wasm_loader/source/wasm_loader_impl.c @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading WebAssembly code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log.h b/source/log/include/log/log.h index f39afdb646..784b605552 100644 --- a/source/log/include/log/log.h +++ b/source/log/include/log/log.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_aspect.h b/source/log/include/log/log_aspect.h index 9112d29d66..649dd56fa4 100644 --- a/source/log/include/log/log_aspect.h +++ b/source/log/include/log/log_aspect.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_aspect_format.h b/source/log/include/log/log_aspect_format.h index da4ef2ca27..9f0804491f 100644 --- a/source/log/include/log/log_aspect_format.h +++ b/source/log/include/log/log_aspect_format.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_aspect_schedule.h b/source/log/include/log/log_aspect_schedule.h index 96c04c7ba7..9345d498ea 100644 --- a/source/log/include/log/log_aspect_schedule.h +++ b/source/log/include/log/log_aspect_schedule.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_aspect_storage.h b/source/log/include/log/log_aspect_storage.h index c7909bbe46..dba9475765 100644 --- a/source/log/include/log/log_aspect_storage.h +++ b/source/log/include/log/log_aspect_storage.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_aspect_stream.h b/source/log/include/log/log_aspect_stream.h index e667ba6eb3..4a9fe93b0d 100644 --- a/source/log/include/log/log_aspect_stream.h +++ b/source/log/include/log/log_aspect_stream.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_handle.h b/source/log/include/log/log_handle.h index f5c1256c98..24fbe66332 100644 --- a/source/log/include/log/log_handle.h +++ b/source/log/include/log/log_handle.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_impl.h b/source/log/include/log/log_impl.h index 49121ef1dd..567ac35589 100644 --- a/source/log/include/log/log_impl.h +++ b/source/log/include/log/log_impl.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_level.h b/source/log/include/log/log_level.h index 02598159c9..fe5658d16c 100644 --- a/source/log/include/log/log_level.h +++ b/source/log/include/log/log_level.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_map.h b/source/log/include/log/log_map.h index 58504eef0f..91a8388c08 100644 --- a/source/log/include/log/log_map.h +++ b/source/log/include/log/log_map.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy.h b/source/log/include/log/log_policy.h index 2340673c3c..b0d558cb86 100644 --- a/source/log/include/log/log_policy.h +++ b/source/log/include/log/log_policy.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_policy_format.h b/source/log/include/log/log_policy_format.h index d31fc18747..9047688c06 100644 --- a/source/log/include/log/log_policy_format.h +++ b/source/log/include/log/log_policy_format.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_format_binary.h b/source/log/include/log/log_policy_format_binary.h index f2811526e7..896ba96ffa 100644 --- a/source/log/include/log/log_policy_format_binary.h +++ b/source/log/include/log/log_policy_format_binary.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_format_custom.h b/source/log/include/log/log_policy_format_custom.h index e58d96c73d..4112ab177d 100644 --- a/source/log/include/log/log_policy_format_custom.h +++ b/source/log/include/log/log_policy_format_custom.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_format_text.h b/source/log/include/log/log_policy_format_text.h index 83e041a74f..f764fa6ec5 100644 --- a/source/log/include/log/log_policy_format_text.h +++ b/source/log/include/log/log_policy_format_text.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_schedule.h b/source/log/include/log/log_policy_schedule.h index 85d2121355..c3a53c0d21 100644 --- a/source/log/include/log/log_policy_schedule.h +++ b/source/log/include/log/log_policy_schedule.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_schedule_async.h b/source/log/include/log/log_policy_schedule_async.h index 1acc0992aa..92826e61bf 100644 --- a/source/log/include/log/log_policy_schedule_async.h +++ b/source/log/include/log/log_policy_schedule_async.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_schedule_sync.h b/source/log/include/log/log_policy_schedule_sync.h index dea6dc2a15..451b20ce4c 100644 --- a/source/log/include/log/log_policy_schedule_sync.h +++ b/source/log/include/log/log_policy_schedule_sync.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_storage.h b/source/log/include/log/log_policy_storage.h index 21ed8cb437..04ba13e6e1 100644 --- a/source/log/include/log/log_policy_storage.h +++ b/source/log/include/log/log_policy_storage.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_storage_batch.h b/source/log/include/log/log_policy_storage_batch.h index cb5839a82d..6f14bbd3fd 100644 --- a/source/log/include/log/log_policy_storage_batch.h +++ b/source/log/include/log/log_policy_storage_batch.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_storage_sequential.h b/source/log/include/log/log_policy_storage_sequential.h index 6ec9c39c72..7233f2dba7 100644 --- a/source/log/include/log/log_policy_storage_sequential.h +++ b/source/log/include/log/log_policy_storage_sequential.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream.h b/source/log/include/log/log_policy_stream.h index 2bd99a4c5c..239e646f10 100644 --- a/source/log/include/log/log_policy_stream.h +++ b/source/log/include/log/log_policy_stream.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_custom.h b/source/log/include/log/log_policy_stream_custom.h index e8d718fbba..7322e1f4c4 100644 --- a/source/log/include/log/log_policy_stream_custom.h +++ b/source/log/include/log/log_policy_stream_custom.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_file.h b/source/log/include/log/log_policy_stream_file.h index d901f49163..466195f479 100644 --- a/source/log/include/log/log_policy_stream_file.h +++ b/source/log/include/log/log_policy_stream_file.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_nginx.h b/source/log/include/log/log_policy_stream_nginx.h index 70d0da145a..22eb7036df 100644 --- a/source/log/include/log/log_policy_stream_nginx.h +++ b/source/log/include/log/log_policy_stream_nginx.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_socket.h b/source/log/include/log/log_policy_stream_socket.h index 3fc5932975..be98efbe07 100644 --- a/source/log/include/log/log_policy_stream_socket.h +++ b/source/log/include/log/log_policy_stream_socket.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_stdio.h b/source/log/include/log/log_policy_stream_stdio.h index 20d118796d..dd6f543c94 100644 --- a/source/log/include/log/log_policy_stream_stdio.h +++ b/source/log/include/log/log_policy_stream_stdio.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_policy_stream_syslog.h b/source/log/include/log/log_policy_stream_syslog.h index 558e5de775..a5fab536d9 100644 --- a/source/log/include/log/log_policy_stream_syslog.h +++ b/source/log/include/log/log_policy_stream_syslog.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_preprocessor.h b/source/log/include/log/log_preprocessor.h index e2dfb62dc6..66676cd21d 100644 --- a/source/log/include/log/log_preprocessor.h +++ b/source/log/include/log/log_preprocessor.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/include/log/log_record.h b/source/log/include/log/log_record.h index 4250471e39..c93967af7b 100644 --- a/source/log/include/log/log_record.h +++ b/source/log/include/log/log_record.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_singleton.h b/source/log/include/log/log_singleton.h index 23edd30a8e..31dce2ddb4 100644 --- a/source/log/include/log/log_singleton.h +++ b/source/log/include/log/log_singleton.h @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/include/log/log_valid_size.h b/source/log/include/log/log_valid_size.h index d822da16ae..29cfdd547b 100644 --- a/source/log/include/log/log_valid_size.h +++ b/source/log/include/log/log_valid_size.h @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log.c b/source/log/source/log.c index 3d22b45416..6643b7b89d 100644 --- a/source/log/source/log.c +++ b/source/log/source/log.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -248,7 +248,7 @@ const char *log_print_info(void) { static const char log_info[] = "Logger Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef LOG_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/log/source/log_aspect.c b/source/log/source/log_aspect.c index aeb11efe5b..360077dc8a 100644 --- a/source/log/source/log_aspect.c +++ b/source/log/source/log_aspect.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log_aspect_format.c b/source/log/source/log_aspect_format.c index 4aa81b0cca..f28dfe262c 100644 --- a/source/log/source/log_aspect_format.c +++ b/source/log/source/log_aspect_format.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_aspect_schedule.c b/source/log/source/log_aspect_schedule.c index d951f8aee0..421d6e9ecb 100644 --- a/source/log/source/log_aspect_schedule.c +++ b/source/log/source/log_aspect_schedule.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_aspect_storage.c b/source/log/source/log_aspect_storage.c index ce23ac8914..f6ffeb15d8 100644 --- a/source/log/source/log_aspect_storage.c +++ b/source/log/source/log_aspect_storage.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_aspect_stream.c b/source/log/source/log_aspect_stream.c index 01cfac3616..2a1aaa57da 100644 --- a/source/log/source/log_aspect_stream.c +++ b/source/log/source/log_aspect_stream.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_handle.c b/source/log/source/log_handle.c index e79c9a1ddd..ff691fc45d 100644 --- a/source/log/source/log_handle.c +++ b/source/log/source/log_handle.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log_impl.c b/source/log/source/log_impl.c index 875321d73a..6b412c20cd 100644 --- a/source/log/source/log_impl.c +++ b/source/log/source/log_impl.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log_level.c b/source/log/source/log_level.c index 17b453dbe6..a11a790af3 100644 --- a/source/log/source/log_level.c +++ b/source/log/source/log_level.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log_map.c b/source/log/source/log_map.c index 6bbbcc569f..8796e0515a 100644 --- a/source/log/source/log_map.c +++ b/source/log/source/log_map.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy.c b/source/log/source/log_policy.c index 5afce576a2..7b569330a0 100644 --- a/source/log/source/log_policy.c +++ b/source/log/source/log_policy.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/log/source/log_policy_format.c b/source/log/source/log_policy_format.c index a54e306f9e..f02907228a 100644 --- a/source/log/source/log_policy_format.c +++ b/source/log/source/log_policy_format.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_format_binary.c b/source/log/source/log_policy_format_binary.c index 3730e91f1e..4c4774521f 100644 --- a/source/log/source/log_policy_format_binary.c +++ b/source/log/source/log_policy_format_binary.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_format_custom.c b/source/log/source/log_policy_format_custom.c index 7cb4b8a93c..459eb9437d 100644 --- a/source/log/source/log_policy_format_custom.c +++ b/source/log/source/log_policy_format_custom.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_format_text.c b/source/log/source/log_policy_format_text.c index 0ae0e13ed5..1deea2c22f 100644 --- a/source/log/source/log_policy_format_text.c +++ b/source/log/source/log_policy_format_text.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_schedule.c b/source/log/source/log_policy_schedule.c index 211400762b..491b7111ef 100644 --- a/source/log/source/log_policy_schedule.c +++ b/source/log/source/log_policy_schedule.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_schedule_async.c b/source/log/source/log_policy_schedule_async.c index 27f0ba3f2c..a3164f2992 100644 --- a/source/log/source/log_policy_schedule_async.c +++ b/source/log/source/log_policy_schedule_async.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_schedule_sync.c b/source/log/source/log_policy_schedule_sync.c index 9d6c78b608..1e5683f2ff 100644 --- a/source/log/source/log_policy_schedule_sync.c +++ b/source/log/source/log_policy_schedule_sync.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_storage.c b/source/log/source/log_policy_storage.c index 9a95e52a1b..9f73737903 100644 --- a/source/log/source/log_policy_storage.c +++ b/source/log/source/log_policy_storage.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_storage_batch.c b/source/log/source/log_policy_storage_batch.c index d34f9e7941..c763875ea1 100644 --- a/source/log/source/log_policy_storage_batch.c +++ b/source/log/source/log_policy_storage_batch.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_storage_sequential.c b/source/log/source/log_policy_storage_sequential.c index 1abb17e270..20ef428a06 100644 --- a/source/log/source/log_policy_storage_sequential.c +++ b/source/log/source/log_policy_storage_sequential.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream.c b/source/log/source/log_policy_stream.c index 1792d80b69..fa65c9504c 100644 --- a/source/log/source/log_policy_stream.c +++ b/source/log/source/log_policy_stream.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_custom.c b/source/log/source/log_policy_stream_custom.c index d20bd4761e..de0a61789e 100644 --- a/source/log/source/log_policy_stream_custom.c +++ b/source/log/source/log_policy_stream_custom.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_file.c b/source/log/source/log_policy_stream_file.c index 8453d46fb1..28770a67d8 100644 --- a/source/log/source/log_policy_stream_file.c +++ b/source/log/source/log_policy_stream_file.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_nginx.c b/source/log/source/log_policy_stream_nginx.c index 5309c1408e..6d75b49375 100644 --- a/source/log/source/log_policy_stream_nginx.c +++ b/source/log/source/log_policy_stream_nginx.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_socket.c b/source/log/source/log_policy_stream_socket.c index bc99b80e48..d433286de4 100644 --- a/source/log/source/log_policy_stream_socket.c +++ b/source/log/source/log_policy_stream_socket.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_stdio.c b/source/log/source/log_policy_stream_stdio.c index 610a2c5e4f..cea63699dd 100644 --- a/source/log/source/log_policy_stream_stdio.c +++ b/source/log/source/log_policy_stream_stdio.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_policy_stream_syslog.c b/source/log/source/log_policy_stream_syslog.c index 22aefbef11..3cae6c9f0a 100644 --- a/source/log/source/log_policy_stream_syslog.c +++ b/source/log/source/log_policy_stream_syslog.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_record.c b/source/log/source/log_record.c index bdb6f2a6cb..f99237b630 100644 --- a/source/log/source/log_record.c +++ b/source/log/source/log_record.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_singleton.c b/source/log/source/log_singleton.c index cd6aefa400..63e63f2d01 100644 --- a/source/log/source/log_singleton.c +++ b/source/log/source/log_singleton.c @@ -1,6 +1,6 @@ /* * Logger Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic logger library providing application execution reports. * diff --git a/source/log/source/log_valid_size.c b/source/log/source/log_valid_size.c index 5583c000c2..96db31c69e 100644 --- a/source/log/source/log_valid_size.c +++ b/source/log/source/log_valid_size.c @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory.h b/source/memory/include/memory/memory.h index e1ce6a244f..ec664adb5a 100644 --- a/source/memory/include/memory/memory.h +++ b/source/memory/include/memory/memory.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator.h b/source/memory/include/memory/memory_allocator.h index b8448027ea..668177a07f 100644 --- a/source/memory/include/memory/memory_allocator.h +++ b/source/memory/include/memory/memory_allocator.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_iface.h b/source/memory/include/memory/memory_allocator_iface.h index 9249b263b6..b87cf8c980 100644 --- a/source/memory/include/memory/memory_allocator_iface.h +++ b/source/memory/include/memory/memory_allocator_iface.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_impl.h b/source/memory/include/memory/memory_allocator_impl.h index 73c4369b22..5476e6a3ef 100644 --- a/source/memory/include/memory/memory_allocator_impl.h +++ b/source/memory/include/memory/memory_allocator_impl.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_nginx.h b/source/memory/include/memory/memory_allocator_nginx.h index 4bb005c0a1..2e35fd648b 100644 --- a/source/memory/include/memory/memory_allocator_nginx.h +++ b/source/memory/include/memory/memory_allocator_nginx.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_nginx_impl.h b/source/memory/include/memory/memory_allocator_nginx_impl.h index 73aa5a4f20..b2dff3bb2a 100644 --- a/source/memory/include/memory/memory_allocator_nginx_impl.h +++ b/source/memory/include/memory/memory_allocator_nginx_impl.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_std.h b/source/memory/include/memory/memory_allocator_std.h index 0f27a83fe7..779bce0883 100644 --- a/source/memory/include/memory/memory_allocator_std.h +++ b/source/memory/include/memory/memory_allocator_std.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/include/memory/memory_allocator_std_impl.h b/source/memory/include/memory/memory_allocator_std_impl.h index 20fc8bb451..f25819d550 100644 --- a/source/memory/include/memory/memory_allocator_std_impl.h +++ b/source/memory/include/memory/memory_allocator_std_impl.h @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/source/memory.c b/source/memory/source/memory.c index cb41b078bf..87107f32f2 100644 --- a/source/memory/source/memory.c +++ b/source/memory/source/memory.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *memory_print_info(void) { static const char memory_info[] = "Memory Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef MEMORY_STATIC_DEFINE "Compiled as static library type" diff --git a/source/memory/source/memory_allocator.c b/source/memory/source/memory_allocator.c index c6962d83af..5d853b30a9 100644 --- a/source/memory/source/memory_allocator.c +++ b/source/memory/source/memory_allocator.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/source/memory_allocator_nginx.c b/source/memory/source/memory_allocator_nginx.c index 000dffb4b7..dc5385648d 100644 --- a/source/memory/source/memory_allocator_nginx.c +++ b/source/memory/source/memory_allocator_nginx.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/source/memory_allocator_nginx_impl.c b/source/memory/source/memory_allocator_nginx_impl.c index 5acec5ef1d..cd5534a974 100644 --- a/source/memory/source/memory_allocator_nginx_impl.c +++ b/source/memory/source/memory_allocator_nginx_impl.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/source/memory_allocator_std.c b/source/memory/source/memory_allocator_std.c index 9d5bf58070..ce755c4fd6 100644 --- a/source/memory/source/memory_allocator_std.c +++ b/source/memory/source/memory_allocator_std.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/memory/source/memory_allocator_std_impl.c b/source/memory/source/memory_allocator_std_impl.c index 5d1cebf03f..77b36f8a87 100644 --- a/source/memory/source/memory_allocator_std_impl.c +++ b/source/memory/source/memory_allocator_std_impl.c @@ -2,7 +2,7 @@ * Memory Library by Parra Studios * A generic cross-platform memory utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall.h b/source/metacall/include/metacall/metacall.h index b7788e2232..8ef64fd3e6 100644 --- a/source/metacall/include/metacall/metacall.h +++ b/source/metacall/include/metacall/metacall.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_allocator.h b/source/metacall/include/metacall/metacall_allocator.h index 46fc614c45..c7d8017c66 100644 --- a/source/metacall/include/metacall/metacall_allocator.h +++ b/source/metacall/include/metacall/metacall_allocator.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_error.h b/source/metacall/include/metacall/metacall_error.h index e65d5f9865..ae030b965b 100644 --- a/source/metacall/include/metacall/metacall_error.h +++ b/source/metacall/include/metacall/metacall_error.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_fork.h b/source/metacall/include/metacall/metacall_fork.h index 0cbfb86d15..fd9915fce7 100644 --- a/source/metacall/include/metacall/metacall_fork.h +++ b/source/metacall/include/metacall/metacall_fork.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index 9d5f7d8901..fc4f3a2c46 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_log.h b/source/metacall/include/metacall/metacall_log.h index ee28ccdbc1..582ed8ea55 100644 --- a/source/metacall/include/metacall/metacall_log.h +++ b/source/metacall/include/metacall/metacall_log.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/include/metacall/metacall_value.h b/source/metacall/include/metacall/metacall_value.h index 932cc75f08..eda910b123 100644 --- a/source/metacall/include/metacall/metacall_value.h +++ b/source/metacall/include/metacall/metacall_value.h @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/metacall_def.h.in b/source/metacall/metacall_def.h.in index 3486a1ceae..3e9d92a83b 100644 --- a/source/metacall/metacall_def.h.in +++ b/source/metacall/metacall_def.h.in @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 2fdc314b56..dec8182d28 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2438,7 +2438,7 @@ const char *metacall_print_info(void) { static const char metacall_info[] = "MetaCall Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef METACALL_STATIC_DEFINE "Compiled as static library type" diff --git a/source/metacall/source/metacall_allocator.c b/source/metacall/source/metacall_allocator.c index ee88cdd545..7500b9f829 100644 --- a/source/metacall/source/metacall_allocator.c +++ b/source/metacall/source/metacall_allocator.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall_error.c b/source/metacall/source/metacall_error.c index e6833fc52c..4bceddc720 100644 --- a/source/metacall/source/metacall_error.c +++ b/source/metacall/source/metacall_error.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index cd1ec50229..422c00a0ef 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 946d37a390..3526c6b188 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall_log.c b/source/metacall/source/metacall_log.c index 0678f738d3..c2acb82b05 100644 --- a/source/metacall/source/metacall_log.c +++ b/source/metacall/source/metacall_log.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/metacall/source/metacall_value.c b/source/metacall/source/metacall_value.c index b598e599bd..821b6bc250 100644 --- a/source/metacall/source/metacall_value.c +++ b/source/metacall/source/metacall_value.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin.h b/source/plugin/include/plugin/plugin.h index 8f856a36f4..17464f042c 100644 --- a/source/plugin/include/plugin/plugin.h +++ b/source/plugin/include/plugin/plugin.h @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin_descriptor.h b/source/plugin/include/plugin/plugin_descriptor.h index 47eb54fc82..770f081b1f 100644 --- a/source/plugin/include/plugin/plugin_descriptor.h +++ b/source/plugin/include/plugin/plugin_descriptor.h @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin_impl.h b/source/plugin/include/plugin/plugin_impl.h index 3a0d108b2a..c747061977 100644 --- a/source/plugin/include/plugin/plugin_impl.h +++ b/source/plugin/include/plugin/plugin_impl.h @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin_interface.hpp b/source/plugin/include/plugin/plugin_interface.hpp index c3719abfb6..8ec8177557 100644 --- a/source/plugin/include/plugin/plugin_interface.hpp +++ b/source/plugin/include/plugin/plugin_interface.hpp @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin_loader.h b/source/plugin/include/plugin/plugin_loader.h index 2113010cbe..4862918616 100644 --- a/source/plugin/include/plugin/plugin_loader.h +++ b/source/plugin/include/plugin/plugin_loader.h @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/include/plugin/plugin_manager.h b/source/plugin/include/plugin/plugin_manager.h index 8698733b59..724db1c30a 100644 --- a/source/plugin/include/plugin/plugin_manager.h +++ b/source/plugin/include/plugin/plugin_manager.h @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/source/plugin.c b/source/plugin/source/plugin.c index 4089f2d026..b8b325cbc9 100644 --- a/source/plugin/source/plugin.c +++ b/source/plugin/source/plugin.c @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ const char *plugin_print_info(void) { static const char plugin_info[] = "Plugin Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef PLUGIN_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/plugin/source/plugin_descriptor.c b/source/plugin/source/plugin_descriptor.c index 00f463079c..2a5ff1d12c 100644 --- a/source/plugin/source/plugin_descriptor.c +++ b/source/plugin/source/plugin_descriptor.c @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/source/plugin_impl.c b/source/plugin/source/plugin_impl.c index 785a55834d..1de83e55f9 100644 --- a/source/plugin/source/plugin_impl.c +++ b/source/plugin/source/plugin_impl.c @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/source/plugin_loader.c b/source/plugin/source/plugin_loader.c index a88ccda719..7b3ff0774f 100644 --- a/source/plugin/source/plugin_loader.c +++ b/source/plugin/source/plugin_loader.c @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index 353eaded5c..94e6cc5d3b 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -2,7 +2,7 @@ * Plugin Library by Parra Studios * A library for plugins at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h b/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h index 7a2ce1f079..8277dc2e47 100644 --- a/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h +++ b/source/plugins/backtrace_plugin/include/backtrace_plugin/backtrace_plugin.h @@ -2,7 +2,7 @@ * Backtrace Plugin by Parra Studios * A plugin implementing backtracing functionality for MetaCall Core. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugins/backtrace_plugin/source/backtrace_plugin.cpp b/source/plugins/backtrace_plugin/source/backtrace_plugin.cpp index c3e826fd33..16f8fe0ff3 100644 --- a/source/plugins/backtrace_plugin/source/backtrace_plugin.cpp +++ b/source/plugins/backtrace_plugin/source/backtrace_plugin.cpp @@ -2,7 +2,7 @@ * Backtrace Plugin by Parra Studios * A plugin implementing backtracing functionality for MetaCall Core. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugins/sandbox_plugin/cmake/FindLibSecComp.cmake b/source/plugins/sandbox_plugin/cmake/FindLibSecComp.cmake index 9293d405ef..8265541fa4 100644 --- a/source/plugins/sandbox_plugin/cmake/FindLibSecComp.cmake +++ b/source/plugins/sandbox_plugin/cmake/FindLibSecComp.cmake @@ -2,7 +2,7 @@ # CMake Find LibSecComp library by Parra Studios # CMake script to find SecComp library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h b/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h index 68d6d23f42..1fc338afe5 100644 --- a/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h +++ b/source/plugins/sandbox_plugin/include/sandbox_plugin/sandbox_plugin.h @@ -2,7 +2,7 @@ * Sandbox Plugin by Parra Studios * A plugin implementing sandboxing functionality for MetaCall Core. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp b/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp index 06eed5fd97..8843426330 100644 --- a/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp +++ b/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp @@ -2,7 +2,7 @@ * Sandbox Plugin by Parra Studios * A plugin implementing sandboxing functionality for MetaCall Core. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability.h b/source/portability/include/portability/portability.h index 75af3411bb..f440b5050e 100644 --- a/source/portability/include/portability/portability.h +++ b/source/portability/include/portability/portability.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_assert.h b/source/portability/include/portability/portability_assert.h index bb90a39b5d..60e67d1221 100644 --- a/source/portability/include/portability/portability_assert.h +++ b/source/portability/include/portability/portability_assert.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_atexit.h b/source/portability/include/portability/portability_atexit.h index 78c107b1a1..dc1ad0356e 100644 --- a/source/portability/include/portability/portability_atexit.h +++ b/source/portability/include/portability/portability_atexit.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_compiler.h b/source/portability/include/portability/portability_compiler.h index 871adf1811..3fa5481cc7 100644 --- a/source/portability/include/portability/portability_compiler.h +++ b/source/portability/include/portability/portability_compiler.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_constructor.h b/source/portability/include/portability/portability_constructor.h index 9dc72a8389..bb2879473d 100644 --- a/source/portability/include/portability/portability_constructor.h +++ b/source/portability/include/portability/portability_constructor.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_executable_path.h b/source/portability/include/portability/portability_executable_path.h index 15494b0027..0813ef3d51 100644 --- a/source/portability/include/portability/portability_executable_path.h +++ b/source/portability/include/portability/portability_executable_path.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_library_path.h b/source/portability/include/portability/portability_library_path.h index e31bd7d493..5e266a5a3a 100644 --- a/source/portability/include/portability/portability_library_path.h +++ b/source/portability/include/portability/portability_library_path.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_path.h b/source/portability/include/portability/portability_path.h index 5453c37ad7..36885514ad 100644 --- a/source/portability/include/portability/portability_path.h +++ b/source/portability/include/portability/portability_path.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/include/portability/portability_working_path.h b/source/portability/include/portability/portability_working_path.h index 00866a3a90..15c8d5af51 100644 --- a/source/portability/include/portability/portability_working_path.h +++ b/source/portability/include/portability/portability_working_path.h @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/source/portability.c b/source/portability/source/portability.c index 7c57003ffa..4893aff52b 100644 --- a/source/portability/source/portability.c +++ b/source/portability/source/portability.c @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *portability_print_info(void) { static const char portability_info[] = "Portability Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef PORTABILITY_STATIC_DEFINE "Compiled as static library type" diff --git a/source/portability/source/portability_atexit.c b/source/portability/source/portability_atexit.c index d08ee3653f..5dafc48a90 100644 --- a/source/portability/source/portability_atexit.c +++ b/source/portability/source/portability_atexit.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/source/portability_executable_path.c b/source/portability/source/portability_executable_path.c index 7c63917d71..b5492bfc6d 100644 --- a/source/portability/source/portability_executable_path.c +++ b/source/portability/source/portability_executable_path.c @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index a8b763cb29..8bf167036d 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/source/portability_path.c b/source/portability/source/portability_path.c index 3a1a02ac7c..9e5232c277 100644 --- a/source/portability/source/portability_path.c +++ b/source/portability/source/portability_path.c @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/portability/source/portability_working_path.c b/source/portability/source/portability_working_path.c index 1511cef35c..b571b6f0aa 100644 --- a/source/portability/source/portability_working_path.c +++ b/source/portability/source/portability_working_path.c @@ -2,7 +2,7 @@ * Portability Library by Parra Studios * A generic cross-platform portability utility. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/CMakeLists.txt b/source/ports/CMakeLists.txt index c27949d5f4..056f9e97a5 100644 --- a/source/ports/CMakeLists.txt +++ b/source/ports/CMakeLists.txt @@ -2,7 +2,7 @@ # MetaCall Ports by Parra Studios # A complete infrastructure for supporting multiple language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 8e2a1ef66c..7995efa3e6 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/cxx_port/inline/metacall/metacall.inl b/source/ports/cxx_port/inline/metacall/metacall.inl index 743c6a0c84..7789dff867 100644 --- a/source/ports/cxx_port/inline/metacall/metacall.inl +++ b/source/ports/cxx_port/inline/metacall/metacall.inl @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/cxx_port/source/metacall.cpp b/source/ports/cxx_port/source/metacall.cpp index d1a7cbe8f9..80f7ea357f 100644 --- a/source/ports/cxx_port/source/metacall.cpp +++ b/source/ports/cxx_port/source/metacall.cpp @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting formatted input / output. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/go_port/source/await.go b/source/ports/go_port/source/await.go index 11661b2dcf..2f1ecea86b 100644 --- a/source/ports/go_port/source/await.go +++ b/source/ports/go_port/source/await.go @@ -2,7 +2,7 @@ * MetaCall Go Port by Parra Studios * A frontend for Go language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/go_port/source/go_port.go b/source/ports/go_port/source/go_port.go index 4a7e125745..21692582a6 100644 --- a/source/ports/go_port/source/go_port.go +++ b/source/ports/go_port/source/go_port.go @@ -2,7 +2,7 @@ * MetaCall Go Port by Parra Studios * A frontend for Go language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/go_port/source/pointer.go b/source/ports/go_port/source/pointer.go index 5317378ecf..6bbac8dbf8 100644 --- a/source/ports/go_port/source/pointer.go +++ b/source/ports/go_port/source/pointer.go @@ -2,7 +2,7 @@ * MetaCall Go Port by Parra Studios * A frontend for Go language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/js_port/include/js_port/js_port.h b/source/ports/js_port/include/js_port/js_port.h index 245d537f15..20b6be901a 100644 --- a/source/ports/js_port/include/js_port/js_port.h +++ b/source/ports/js_port/include/js_port/js_port.h @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/js_port/interface/js_port/js_port.i b/source/ports/js_port/interface/js_port/js_port.i index be171c7100..bb6a9e17b6 100644 --- a/source/ports/js_port/interface/js_port/js_port.i +++ b/source/ports/js_port/interface/js_port/js_port.i @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/js_port/interface/js_port/js_port_impl.i b/source/ports/js_port/interface/js_port/js_port_impl.i index 711d560a49..994d689238 100644 --- a/source/ports/js_port/interface/js_port/js_port_impl.i +++ b/source/ports/js_port/interface/js_port/js_port_impl.i @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/js_port/source/js_port.c b/source/ports/js_port/source/js_port.c index a2a304400f..3ac626eede 100644 --- a/source/ports/js_port/source/js_port.c +++ b/source/ports/js_port/source/js_port.c @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/js_port/test/main.cpp b/source/ports/js_port/test/main.cpp index ea4d06e988..5338c28295 100644 --- a/source/ports/js_port/test/main.cpp +++ b/source/ports/js_port/test/main.cpp @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/nim_port/LICENSE b/source/ports/nim_port/LICENSE index 2e591e57ad..d56ad81fad 100644 --- a/source/ports/nim_port/LICENSE +++ b/source/ports/nim_port/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2024 Vicente Eduardo Ferrer Garcia + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/source/ports/node_port/LICENSE b/source/ports/node_port/LICENSE index 2e591e57ad..d56ad81fad 100644 --- a/source/ports/node_port/LICENSE +++ b/source/ports/node_port/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2024 Vicente Eduardo Ferrer Garcia + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 9e3b5793f8..0df0a75904 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -2,7 +2,7 @@ * MetaCall NodeJS Port by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/node_port/test.js b/source/ports/node_port/test.js index fb04ea5b13..6dd49fbc32 100644 --- a/source/ports/node_port/test.js +++ b/source/ports/node_port/test.js @@ -2,7 +2,7 @@ * MetaCall NodeJS Port by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/node_port/test/index.js b/source/ports/node_port/test/index.js index c6a71114c2..e7ef89a58b 100644 --- a/source/ports/node_port/test/index.js +++ b/source/ports/node_port/test/index.js @@ -2,7 +2,7 @@ * MetaCall NodeJS Port by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/node_port/upload.sh b/source/ports/node_port/upload.sh index 297ced5a9a..a38301bd8c 100755 --- a/source/ports/node_port/upload.sh +++ b/source/ports/node_port/upload.sh @@ -4,7 +4,7 @@ # MetaCall NodeJS Port Deploy Script by Parra Studios # Script utility for deploying MetaCall NodeJS Port to NPM. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt index 2e591e57ad..d56ad81fad 100644 --- a/source/ports/py_port/LICENSE.txt +++ b/source/ports/py_port/LICENSE.txt @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2024 Vicente Eduardo Ferrer Garcia + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/helper/__init__.py b/source/ports/py_port/helper/__init__.py index e410e78683..3534e2a450 100644 --- a/source/ports/py_port/helper/__init__.py +++ b/source/ports/py_port/helper/__init__.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/metacall/__init__.py b/source/ports/py_port/metacall/__init__.py index ef8a6fd075..412cd2dd18 100644 --- a/source/ports/py_port/metacall/__init__.py +++ b/source/ports/py_port/metacall/__init__.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/metacall/api.py b/source/ports/py_port/metacall/api.py index 6bfb290cca..1c1d328b86 100644 --- a/source/ports/py_port/metacall/api.py +++ b/source/ports/py_port/metacall/api.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/metacall/module_linux.py b/source/ports/py_port/metacall/module_linux.py index 0a18b32603..cf9fdd6342 100644 --- a/source/ports/py_port/metacall/module_linux.py +++ b/source/ports/py_port/metacall/module_linux.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/metacall/module_win32.py b/source/ports/py_port/metacall/module_win32.py index aed098254c..4c5c8e4e85 100644 --- a/source/ports/py_port/metacall/module_win32.py +++ b/source/ports/py_port/metacall/module_win32.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index e085fcfebb..d34742d73d 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -3,7 +3,7 @@ # MetaCall Python Port by Parra Studios # A frontend for Python language bindings in MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index 2ca4f09fde..5e86354329 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -4,7 +4,7 @@ # MetaCall Python Port Deploy Script by Parra Studios # Script utility for deploying MetaCall Python Port to PyPi. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/ports/rb_port/include/rb_port/rb_port.h b/source/ports/rb_port/include/rb_port/rb_port.h index d2682f4b82..8e88024dd4 100644 --- a/source/ports/rb_port/include/rb_port/rb_port.h +++ b/source/ports/rb_port/include/rb_port/rb_port.h @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/rb_port/interface/rb_port/rb_port.i b/source/ports/rb_port/interface/rb_port/rb_port.i index 7316e756f5..6968ab129f 100644 --- a/source/ports/rb_port/interface/rb_port/rb_port.i +++ b/source/ports/rb_port/interface/rb_port/rb_port.i @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/rb_port/interface/rb_port/rb_port_impl.i b/source/ports/rb_port/interface/rb_port/rb_port_impl.i index bd0820f2b3..ddbd3e7055 100644 --- a/source/ports/rb_port/interface/rb_port/rb_port_impl.i +++ b/source/ports/rb_port/interface/rb_port/rb_port_impl.i @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/rb_port/source/rb_port.c b/source/ports/rb_port/source/rb_port.c index 81e52cbcf8..b9a5fc4d3c 100644 --- a/source/ports/rb_port/source/rb_port.c +++ b/source/ports/rb_port/source/rb_port.c @@ -2,7 +2,7 @@ * MetaCall SWIG Wrapper by Parra Studios * A complete infrastructure for supporting multiple language bindings in MetaCall. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/rs_port/LICENSE.txt b/source/ports/rs_port/LICENSE.txt index 2e591e57ad..d56ad81fad 100644 --- a/source/ports/rs_port/LICENSE.txt +++ b/source/ports/rs_port/LICENSE.txt @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2024 Vicente Eduardo Ferrer Garcia + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index 0f1f282a0c..ac93df572d 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -9,7 +9,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/ports/rs_port/upload.sh b/source/ports/rs_port/upload.sh index a081a7037a..c85fac1475 100644 --- a/source/ports/rs_port/upload.sh +++ b/source/ports/rs_port/upload.sh @@ -4,7 +4,7 @@ # MetaCall Rust Port Deploy Script by Parra Studios # Script utility for deploying MetaCall Rust Port to Crates. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_arguments.cmake b/source/preprocessor/cmake/preprocessor_arguments.cmake index 38014c9b8c..fa35626a3f 100644 --- a/source/preprocessor/cmake/preprocessor_arguments.cmake +++ b/source/preprocessor/cmake/preprocessor_arguments.cmake @@ -2,7 +2,7 @@ # Preprocessor Library by Parra Studios # A generic header-only preprocessor metaprogramming library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_arithmetic.cmake b/source/preprocessor/cmake/preprocessor_arithmetic.cmake index eca9525db6..3c3b33f6b5 100644 --- a/source/preprocessor/cmake/preprocessor_arithmetic.cmake +++ b/source/preprocessor/cmake/preprocessor_arithmetic.cmake @@ -2,7 +2,7 @@ # Preprocessor Library by Parra Studios # A generic header-only preprocessor metaprogramming library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_boolean.cmake b/source/preprocessor/cmake/preprocessor_boolean.cmake index 444336b646..f4dda84e0b 100644 --- a/source/preprocessor/cmake/preprocessor_boolean.cmake +++ b/source/preprocessor/cmake/preprocessor_boolean.cmake @@ -2,7 +2,7 @@ # Preprocessor Library by Parra Studios # A generic header-only preprocessor metaprogramming library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_for.cmake b/source/preprocessor/cmake/preprocessor_for.cmake index abded5af57..883276b6ed 100644 --- a/source/preprocessor/cmake/preprocessor_for.cmake +++ b/source/preprocessor/cmake/preprocessor_for.cmake @@ -2,7 +2,7 @@ # Preprocessor Library by Parra Studios # A generic header-only preprocessor metaprogramming library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_template.cmake b/source/preprocessor/cmake/preprocessor_template.cmake index 11d99a682b..782e5b07c9 100644 --- a/source/preprocessor/cmake/preprocessor_template.cmake +++ b/source/preprocessor/cmake/preprocessor_template.cmake @@ -2,7 +2,7 @@ # Preprocessor Library by Parra Studios # A generic header-only preprocessor metaprogramming library. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/preprocessor/cmake/preprocessor_template.h.in b/source/preprocessor/cmake/preprocessor_template.h.in index 41b0d1825d..59c5270672 100644 --- a/source/preprocessor/cmake/preprocessor_template.h.in +++ b/source/preprocessor/cmake/preprocessor_template.h.in @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor.h b/source/preprocessor/include/preprocessor/preprocessor.h index e223cf40f4..62c66cbcfb 100644 --- a/source/preprocessor/include/preprocessor/preprocessor.h +++ b/source/preprocessor/include/preprocessor/preprocessor.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_arguments.h b/source/preprocessor/include/preprocessor/preprocessor_arguments.h index 2f114d9132..c78bc4e06e 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_arguments.h +++ b/source/preprocessor/include/preprocessor/preprocessor_arguments.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_arithmetic.h b/source/preprocessor/include/preprocessor/preprocessor_arithmetic.h index b1a9c96479..6b7974ba43 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_arithmetic.h +++ b/source/preprocessor/include/preprocessor/preprocessor_arithmetic.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_bit.h b/source/preprocessor/include/preprocessor/preprocessor_bit.h index f2aee9d4de..952078a2a0 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_bit.h +++ b/source/preprocessor/include/preprocessor/preprocessor_bit.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_boolean.h b/source/preprocessor/include/preprocessor/preprocessor_boolean.h index e042d9ff5e..3cb26ad412 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_boolean.h +++ b/source/preprocessor/include/preprocessor/preprocessor_boolean.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_comma.h b/source/preprocessor/include/preprocessor/preprocessor_comma.h index 62ce258cc8..cf4a4b972a 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_comma.h +++ b/source/preprocessor/include/preprocessor/preprocessor_comma.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_comparison.h b/source/preprocessor/include/preprocessor/preprocessor_comparison.h index b4839e1246..5308f0699e 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_comparison.h +++ b/source/preprocessor/include/preprocessor/preprocessor_comparison.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_complement.h b/source/preprocessor/include/preprocessor/preprocessor_complement.h index a7300fc45a..78b6688bf2 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_complement.h +++ b/source/preprocessor/include/preprocessor/preprocessor_complement.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_concatenation.h b/source/preprocessor/include/preprocessor/preprocessor_concatenation.h index f54986f00b..4f63401fa6 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_concatenation.h +++ b/source/preprocessor/include/preprocessor/preprocessor_concatenation.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_detection.h b/source/preprocessor/include/preprocessor/preprocessor_detection.h index 6306765067..d64e511347 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_detection.h +++ b/source/preprocessor/include/preprocessor/preprocessor_detection.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_empty.h b/source/preprocessor/include/preprocessor/preprocessor_empty.h index 0ce59a48cd..91f774f9a4 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_empty.h +++ b/source/preprocessor/include/preprocessor/preprocessor_empty.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index b391df429b..89821d92d5 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/include/preprocessor/preprocessor_if.h b/source/preprocessor/include/preprocessor/preprocessor_if.h index 622397e892..9a491f60df 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_if.h +++ b/source/preprocessor/include/preprocessor/preprocessor_if.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_serial.h b/source/preprocessor/include/preprocessor/preprocessor_serial.h index b4e222c1a8..6b64c2d7c4 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_serial.h +++ b/source/preprocessor/include/preprocessor/preprocessor_serial.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_stringify.h b/source/preprocessor/include/preprocessor/preprocessor_stringify.h index 322b2806a2..4cb637c333 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_stringify.h +++ b/source/preprocessor/include/preprocessor/preprocessor_stringify.h @@ -1,6 +1,6 @@ /* * Preprocessor Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A generic header-only preprocessor metaprogramming library. * diff --git a/source/preprocessor/include/preprocessor/preprocessor_tuple.h b/source/preprocessor/include/preprocessor/preprocessor_tuple.h index 817ecd3bfa..1c8ba1eadb 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_tuple.h +++ b/source/preprocessor/include/preprocessor/preprocessor_tuple.h @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/preprocessor/source/preprocessor.c b/source/preprocessor/source/preprocessor.c index e6730f45c9..d9124af879 100644 --- a/source/preprocessor/source/preprocessor.c +++ b/source/preprocessor/source/preprocessor.c @@ -2,7 +2,7 @@ * Preprocessor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ const char *preprocessor_print_info(void) { static const char preprocessor_info[] = "Preprocessor Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef PREPROCSSOR_STATIC_DEFINE "Compiled as static library type" diff --git a/source/reflect/include/reflect/reflect.h b/source/reflect/include/reflect/reflect.h index 469e1b8c59..967df3bafb 100644 --- a/source/reflect/include/reflect/reflect.h +++ b/source/reflect/include/reflect/reflect.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_accessor.h b/source/reflect/include/reflect/reflect_accessor.h index 0dd824051e..8b6b7db349 100644 --- a/source/reflect/include/reflect/reflect_accessor.h +++ b/source/reflect/include/reflect/reflect_accessor.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_async.h b/source/reflect/include/reflect/reflect_async.h index 0ce7ed4236..09b9a2e59c 100644 --- a/source/reflect/include/reflect/reflect_async.h +++ b/source/reflect/include/reflect/reflect_async.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_attribute.h b/source/reflect/include/reflect/reflect_attribute.h index 72c1ecdae4..0a628a30c6 100644 --- a/source/reflect/include/reflect/reflect_attribute.h +++ b/source/reflect/include/reflect/reflect_attribute.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_attribute_decl.h b/source/reflect/include/reflect/reflect_attribute_decl.h index d3bb74370d..61bc8dffb0 100644 --- a/source/reflect/include/reflect/reflect_attribute_decl.h +++ b/source/reflect/include/reflect/reflect_attribute_decl.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_class.h b/source/reflect/include/reflect/reflect_class.h index 5056602f0e..16aa01f36d 100644 --- a/source/reflect/include/reflect/reflect_class.h +++ b/source/reflect/include/reflect/reflect_class.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_class_decl.h b/source/reflect/include/reflect/reflect_class_decl.h index 44c739433a..4252569d79 100644 --- a/source/reflect/include/reflect/reflect_class_decl.h +++ b/source/reflect/include/reflect/reflect_class_decl.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_class_visibility.h b/source/reflect/include/reflect/reflect_class_visibility.h index c5641a28a2..5a557782df 100644 --- a/source/reflect/include/reflect/reflect_class_visibility.h +++ b/source/reflect/include/reflect/reflect_class_visibility.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_constructor.h b/source/reflect/include/reflect/reflect_constructor.h index cfccebdf0c..d0fc0de022 100644 --- a/source/reflect/include/reflect/reflect_constructor.h +++ b/source/reflect/include/reflect/reflect_constructor.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_constructor_decl.h b/source/reflect/include/reflect/reflect_constructor_decl.h index 54ebace012..74565b45bc 100644 --- a/source/reflect/include/reflect/reflect_constructor_decl.h +++ b/source/reflect/include/reflect/reflect_constructor_decl.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_context.h b/source/reflect/include/reflect/reflect_context.h index 93b0782467..00c3fa0159 100644 --- a/source/reflect/include/reflect/reflect_context.h +++ b/source/reflect/include/reflect/reflect_context.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_exception.h b/source/reflect/include/reflect/reflect_exception.h index 89dedc55ff..81ff9a3a80 100644 --- a/source/reflect/include/reflect/reflect_exception.h +++ b/source/reflect/include/reflect/reflect_exception.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_function.h b/source/reflect/include/reflect/reflect_function.h index ccfdfbda08..c085541a88 100644 --- a/source/reflect/include/reflect/reflect_function.h +++ b/source/reflect/include/reflect/reflect_function.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_future.h b/source/reflect/include/reflect/reflect_future.h index 9c93fb0463..891c1c8c2e 100644 --- a/source/reflect/include/reflect/reflect_future.h +++ b/source/reflect/include/reflect/reflect_future.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_memory_tracker.h b/source/reflect/include/reflect/reflect_memory_tracker.h index 7aefbc2249..19ce783423 100644 --- a/source/reflect/include/reflect/reflect_memory_tracker.h +++ b/source/reflect/include/reflect/reflect_memory_tracker.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_method.h b/source/reflect/include/reflect/reflect_method.h index 18be52a15a..cbcb688fb2 100644 --- a/source/reflect/include/reflect/reflect_method.h +++ b/source/reflect/include/reflect/reflect_method.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_method_decl.h b/source/reflect/include/reflect/reflect_method_decl.h index a20a0f2ee4..48cc778ce8 100644 --- a/source/reflect/include/reflect/reflect_method_decl.h +++ b/source/reflect/include/reflect/reflect_method_decl.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_object.h b/source/reflect/include/reflect/reflect_object.h index 84ab9cc793..6536d89ebc 100644 --- a/source/reflect/include/reflect/reflect_object.h +++ b/source/reflect/include/reflect/reflect_object.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_scope.h b/source/reflect/include/reflect/reflect_scope.h index 8b5fe5e9d1..98ea815de7 100644 --- a/source/reflect/include/reflect/reflect_scope.h +++ b/source/reflect/include/reflect/reflect_scope.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_signature.h b/source/reflect/include/reflect/reflect_signature.h index e5e424460d..7982e9940d 100644 --- a/source/reflect/include/reflect/reflect_signature.h +++ b/source/reflect/include/reflect/reflect_signature.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_throwable.h b/source/reflect/include/reflect/reflect_throwable.h index fdc12b4fe7..fe6a40e312 100644 --- a/source/reflect/include/reflect/reflect_throwable.h +++ b/source/reflect/include/reflect/reflect_throwable.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_type.h b/source/reflect/include/reflect/reflect_type.h index e7048a2206..80bbc8b7a5 100644 --- a/source/reflect/include/reflect/reflect_type.h +++ b/source/reflect/include/reflect/reflect_type.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_type_id.h b/source/reflect/include/reflect/reflect_type_id.h index 45930c1b62..0028b33577 100644 --- a/source/reflect/include/reflect/reflect_type_id.h +++ b/source/reflect/include/reflect/reflect_type_id.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value.h b/source/reflect/include/reflect/reflect_value.h index 8b68387bb9..249770027d 100644 --- a/source/reflect/include/reflect/reflect_value.h +++ b/source/reflect/include/reflect/reflect_value.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value_type.h b/source/reflect/include/reflect/reflect_value_type.h index fdb7856b7a..ce4cf58a21 100644 --- a/source/reflect/include/reflect/reflect_value_type.h +++ b/source/reflect/include/reflect/reflect_value_type.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value_type_cast.h b/source/reflect/include/reflect/reflect_value_type_cast.h index 734b1d749d..22b7420b29 100644 --- a/source/reflect/include/reflect/reflect_value_type_cast.h +++ b/source/reflect/include/reflect/reflect_value_type_cast.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value_type_demotion.h b/source/reflect/include/reflect/reflect_value_type_demotion.h index f2aad7af23..a3060f2893 100644 --- a/source/reflect/include/reflect/reflect_value_type_demotion.h +++ b/source/reflect/include/reflect/reflect_value_type_demotion.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value_type_id_size.h b/source/reflect/include/reflect/reflect_value_type_id_size.h index 88c5a14375..294897d897 100644 --- a/source/reflect/include/reflect/reflect_value_type_id_size.h +++ b/source/reflect/include/reflect/reflect_value_type_id_size.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/include/reflect/reflect_value_type_promotion.h b/source/reflect/include/reflect/reflect_value_type_promotion.h index 21ba8da10e..c8b59d3072 100644 --- a/source/reflect/include/reflect/reflect_value_type_promotion.h +++ b/source/reflect/include/reflect/reflect_value_type_promotion.h @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect.c b/source/reflect/source/reflect.c index c8c283d11b..724628a0d9 100644 --- a/source/reflect/source/reflect.c +++ b/source/reflect/source/reflect.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *reflect_print_info(void) { static const char reflect_info[] = "Reflect Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef REFLECT_STATIC_DEFINE "Compiled as static library type" diff --git a/source/reflect/source/reflect_attribute.c b/source/reflect/source/reflect_attribute.c index 7f4421ff11..420ff150e3 100644 --- a/source/reflect/source/reflect_attribute.c +++ b/source/reflect/source/reflect_attribute.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index 650318b76c..77ea42baad 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_class_visibility.c b/source/reflect/source/reflect_class_visibility.c index e32a3d504e..93cd90c865 100644 --- a/source/reflect/source/reflect_class_visibility.c +++ b/source/reflect/source/reflect_class_visibility.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_constructor.c b/source/reflect/source/reflect_constructor.c index bb264e1a69..c12a9c25f9 100644 --- a/source/reflect/source/reflect_constructor.c +++ b/source/reflect/source/reflect_constructor.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_context.c b/source/reflect/source/reflect_context.c index bf203b8b42..e0e7ee3262 100644 --- a/source/reflect/source/reflect_context.c +++ b/source/reflect/source/reflect_context.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_exception.c b/source/reflect/source/reflect_exception.c index 1225031218..179aa237a5 100644 --- a/source/reflect/source/reflect_exception.c +++ b/source/reflect/source/reflect_exception.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_function.c b/source/reflect/source/reflect_function.c index 692ca28d5a..d64ab1c90e 100644 --- a/source/reflect/source/reflect_function.c +++ b/source/reflect/source/reflect_function.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_future.c b/source/reflect/source/reflect_future.c index e2b7ebb926..86ab560ab7 100644 --- a/source/reflect/source/reflect_future.c +++ b/source/reflect/source/reflect_future.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_memory_tracker.c b/source/reflect/source/reflect_memory_tracker.c index ba13440573..e810571fe1 100644 --- a/source/reflect/source/reflect_memory_tracker.c +++ b/source/reflect/source/reflect_memory_tracker.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_method.c b/source/reflect/source/reflect_method.c index 7f47a2b41e..e4b4bc6880 100644 --- a/source/reflect/source/reflect_method.c +++ b/source/reflect/source/reflect_method.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_object.c b/source/reflect/source/reflect_object.c index 6d64cbcd97..1938d55ec7 100644 --- a/source/reflect/source/reflect_object.c +++ b/source/reflect/source/reflect_object.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_scope.c b/source/reflect/source/reflect_scope.c index f7d82f35c5..a8fbe49444 100644 --- a/source/reflect/source/reflect_scope.c +++ b/source/reflect/source/reflect_scope.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_signature.c b/source/reflect/source/reflect_signature.c index 94536d8d14..04c7ba3d61 100644 --- a/source/reflect/source/reflect_signature.c +++ b/source/reflect/source/reflect_signature.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_throwable.c b/source/reflect/source/reflect_throwable.c index 56929e0edb..d64c767407 100644 --- a/source/reflect/source/reflect_throwable.c +++ b/source/reflect/source/reflect_throwable.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_type.c b/source/reflect/source/reflect_type.c index ea46ed69e2..ed7786b792 100644 --- a/source/reflect/source/reflect_type.c +++ b/source/reflect/source/reflect_type.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_type_id.c b/source/reflect/source/reflect_type_id.c index 1b5f99d207..b168dd6fa9 100644 --- a/source/reflect/source/reflect_type_id.c +++ b/source/reflect/source/reflect_type_id.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_value.c b/source/reflect/source/reflect_value.c index 8fa3537526..6b8b19b6ba 100644 --- a/source/reflect/source/reflect_value.c +++ b/source/reflect/source/reflect_value.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_value_type.c b/source/reflect/source/reflect_value_type.c index dcae4ce6f0..6775aac44a 100644 --- a/source/reflect/source/reflect_value_type.c +++ b/source/reflect/source/reflect_value_type.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_value_type_cast.c b/source/reflect/source/reflect_value_type_cast.c index 126ddcd6e4..7b7410da32 100644 --- a/source/reflect/source/reflect_value_type_cast.c +++ b/source/reflect/source/reflect_value_type_cast.c @@ -1,6 +1,6 @@ /* * Reflect Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A library for provide reflection and metadata representation. * diff --git a/source/reflect/source/reflect_value_type_demotion.c b/source/reflect/source/reflect_value_type_demotion.c index 01f25a0388..580c813854 100644 --- a/source/reflect/source/reflect_value_type_demotion.c +++ b/source/reflect/source/reflect_value_type_demotion.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_value_type_id_size.c b/source/reflect/source/reflect_value_type_id_size.c index 2ad67dc0b3..bf18225cd2 100644 --- a/source/reflect/source/reflect_value_type_id_size.c +++ b/source/reflect/source/reflect_value_type_id_size.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/reflect/source/reflect_value_type_promotion.c b/source/reflect/source/reflect_value_type_promotion.c index f7d255028d..2eb66183fe 100644 --- a/source/reflect/source/reflect_value_type_promotion.c +++ b/source/reflect/source/reflect_value_type_promotion.c @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/scripts/c/cmake/CProject.cmake b/source/scripts/c/cmake/CProject.cmake index 473c00be61..a68a08c41a 100644 --- a/source/scripts/c/cmake/CProject.cmake +++ b/source/scripts/c/cmake/CProject.cmake @@ -2,7 +2,7 @@ # C project generator by Parra Studios # Generates a C project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/c/cmake/CProject.cmake.in b/source/scripts/c/cmake/CProject.cmake.in index 7ebe352086..0a81fe64be 100644 --- a/source/scripts/c/cmake/CProject.cmake.in +++ b/source/scripts/c/cmake/CProject.cmake.in @@ -2,7 +2,7 @@ # C project generator by Parra Studios # Generates a C project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/cobol/cmake/CobolProject.cmake b/source/scripts/cobol/cmake/CobolProject.cmake index 0e860b289b..509053219a 100644 --- a/source/scripts/cobol/cmake/CobolProject.cmake +++ b/source/scripts/cobol/cmake/CobolProject.cmake @@ -2,7 +2,7 @@ # Cobol project generator by Parra Studios # Generates a Cobol project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/cobol/cmake/CobolProject.cmake.in b/source/scripts/cobol/cmake/CobolProject.cmake.in index 5392b9d530..a982974ee9 100644 --- a/source/scripts/cobol/cmake/CobolProject.cmake.in +++ b/source/scripts/cobol/cmake/CobolProject.cmake.in @@ -2,7 +2,7 @@ # Cobol project generator by Parra Studios # Generates a Cobol project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/csharp/cmake/CSharpProject.cmake b/source/scripts/csharp/cmake/CSharpProject.cmake index add3f9a838..9d8d9c708b 100644 --- a/source/scripts/csharp/cmake/CSharpProject.cmake +++ b/source/scripts/csharp/cmake/CSharpProject.cmake @@ -2,7 +2,7 @@ # CSharp project generator by Parra Studios # Generates a csharp project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/csharp/cmake/CSharpProject.cmake.in b/source/scripts/csharp/cmake/CSharpProject.cmake.in index d405caf5d7..63cd335d8e 100644 --- a/source/scripts/csharp/cmake/CSharpProject.cmake.in +++ b/source/scripts/csharp/cmake/CSharpProject.cmake.in @@ -2,7 +2,7 @@ # CSharp project generator by Parra Studios # Generates a csharp project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/csharp/cmake/CSharpProject.json.in b/source/scripts/csharp/cmake/CSharpProject.json.in index 0a0ae67d41..2e04025712 100644 --- a/source/scripts/csharp/cmake/CSharpProject.json.in +++ b/source/scripts/csharp/cmake/CSharpProject.json.in @@ -3,7 +3,7 @@ # CSharp project generator by Parra Studios # Generates a csharp project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/extension/sum/include/sum_extension/sum_extension.h b/source/scripts/extension/sum/include/sum_extension/sum_extension.h index 386bd4d761..f3f966fc70 100644 --- a/source/scripts/extension/sum/include/sum_extension/sum_extension.h +++ b/source/scripts/extension/sum/include/sum_extension/sum_extension.h @@ -2,7 +2,7 @@ * Extension Library by Parra Studios * An extension for sum numbers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/scripts/extension/sum/source/sum_extension.cpp b/source/scripts/extension/sum/source/sum_extension.cpp index e4856306d2..1c707b93d1 100644 --- a/source/scripts/extension/sum/source/sum_extension.cpp +++ b/source/scripts/extension/sum/source/sum_extension.cpp @@ -2,7 +2,7 @@ * Extension Library by Parra Studios * An extension for sum numbers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/scripts/file/cmake/FileProject.cmake b/source/scripts/file/cmake/FileProject.cmake index 3ee6aedaab..e8a3e13564 100644 --- a/source/scripts/file/cmake/FileProject.cmake +++ b/source/scripts/file/cmake/FileProject.cmake @@ -2,7 +2,7 @@ # File project generator by Parra Studios # Generates a file project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/file/cmake/FileProject.cmake.in b/source/scripts/file/cmake/FileProject.cmake.in index 7a41294423..ff059ec858 100644 --- a/source/scripts/file/cmake/FileProject.cmake.in +++ b/source/scripts/file/cmake/FileProject.cmake.in @@ -2,7 +2,7 @@ # File project generator by Parra Studios # Generates a file project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/java/cmake/JavaJarProject.cmake.in b/source/scripts/java/cmake/JavaJarProject.cmake.in index 03bad21cd2..d6c0d87477 100644 --- a/source/scripts/java/cmake/JavaJarProject.cmake.in +++ b/source/scripts/java/cmake/JavaJarProject.cmake.in @@ -2,7 +2,7 @@ # Java project generator by Parra Studios # Generates a java project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/java/cmake/JavaProject.cmake b/source/scripts/java/cmake/JavaProject.cmake index 46e4b0c30c..51874c9093 100644 --- a/source/scripts/java/cmake/JavaProject.cmake +++ b/source/scripts/java/cmake/JavaProject.cmake @@ -2,7 +2,7 @@ # Java project generator by Parra Studios # Generates a java project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/java/cmake/JavaProject.cmake.in b/source/scripts/java/cmake/JavaProject.cmake.in index 5d2472b854..0b74b6bdfa 100644 --- a/source/scripts/java/cmake/JavaProject.cmake.in +++ b/source/scripts/java/cmake/JavaProject.cmake.in @@ -2,7 +2,7 @@ # Java project generator by Parra Studios # Generates a java project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/javascript/cmake/JavaScriptProject.cmake b/source/scripts/javascript/cmake/JavaScriptProject.cmake index f7dd907d39..d5762770bc 100644 --- a/source/scripts/javascript/cmake/JavaScriptProject.cmake +++ b/source/scripts/javascript/cmake/JavaScriptProject.cmake @@ -2,7 +2,7 @@ # JavaScript project generator by Parra Studios # Generates a javascript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/javascript/cmake/JavaScriptProject.cmake.in b/source/scripts/javascript/cmake/JavaScriptProject.cmake.in index d0da4daae8..91375592f1 100644 --- a/source/scripts/javascript/cmake/JavaScriptProject.cmake.in +++ b/source/scripts/javascript/cmake/JavaScriptProject.cmake.in @@ -2,7 +2,7 @@ # JavaScript project generator by Parra Studios # Generates a javascript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/javascript/cmake/JavaScriptProject.json.in b/source/scripts/javascript/cmake/JavaScriptProject.json.in index ea997c6ec5..82ff04239f 100644 --- a/source/scripts/javascript/cmake/JavaScriptProject.json.in +++ b/source/scripts/javascript/cmake/JavaScriptProject.json.in @@ -3,7 +3,7 @@ # JavaScript project generator by Parra Studios # Generates a javascript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/julia/cmake/JuliaProject.cmake b/source/scripts/julia/cmake/JuliaProject.cmake index 770e8cfc37..3e5f2af41b 100644 --- a/source/scripts/julia/cmake/JuliaProject.cmake +++ b/source/scripts/julia/cmake/JuliaProject.cmake @@ -2,7 +2,7 @@ # Julia project generator by Parra Studios # Generates a Julia project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/julia/cmake/JuliaProject.cmake.in b/source/scripts/julia/cmake/JuliaProject.cmake.in index 95aa5c3397..b4f049b2e3 100644 --- a/source/scripts/julia/cmake/JuliaProject.cmake.in +++ b/source/scripts/julia/cmake/JuliaProject.cmake.in @@ -2,7 +2,7 @@ # Julia project generator by Parra Studios # Generates a Julia project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/llvm/cmake/LLVMProject.cmake b/source/scripts/llvm/cmake/LLVMProject.cmake index 7f2a70d337..173360dfc1 100644 --- a/source/scripts/llvm/cmake/LLVMProject.cmake +++ b/source/scripts/llvm/cmake/LLVMProject.cmake @@ -2,7 +2,7 @@ # LLVM project generator by Parra Studios # Generates a LLVM project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/llvm/cmake/LLVMProject.cmake.in b/source/scripts/llvm/cmake/LLVMProject.cmake.in index 9a6ad77707..bc379d3b08 100644 --- a/source/scripts/llvm/cmake/LLVMProject.cmake.in +++ b/source/scripts/llvm/cmake/LLVMProject.cmake.in @@ -2,7 +2,7 @@ # LLVM project generator by Parra Studios # Generates a LLVM project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/lua/cmake/LuaProject.cmake b/source/scripts/lua/cmake/LuaProject.cmake index da4ee1247d..46c8b81035 100644 --- a/source/scripts/lua/cmake/LuaProject.cmake +++ b/source/scripts/lua/cmake/LuaProject.cmake @@ -2,7 +2,7 @@ # Lua project generator by Parra Studios # Generates a lua project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/lua/cmake/LuaProject.cmake.in b/source/scripts/lua/cmake/LuaProject.cmake.in index 8bc5b2eec2..bc094e00f2 100644 --- a/source/scripts/lua/cmake/LuaProject.cmake.in +++ b/source/scripts/lua/cmake/LuaProject.cmake.in @@ -2,7 +2,7 @@ # Lua project generator by Parra Studios # Generates a Lua project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/node/cmake/NodeJSProject.cmake b/source/scripts/node/cmake/NodeJSProject.cmake index 60a093c88a..32dc8e45f4 100644 --- a/source/scripts/node/cmake/NodeJSProject.cmake +++ b/source/scripts/node/cmake/NodeJSProject.cmake @@ -2,7 +2,7 @@ # NodeJS project generator by Parra Studios # Generates a nodejs project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/node/cmake/NodeJSProject.cmake.in b/source/scripts/node/cmake/NodeJSProject.cmake.in index f9c3d86a6b..da69b7730a 100644 --- a/source/scripts/node/cmake/NodeJSProject.cmake.in +++ b/source/scripts/node/cmake/NodeJSProject.cmake.in @@ -2,7 +2,7 @@ # NodeJS project generator by Parra Studios # Generates a NodeJS project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/node/cmake/NodeJSProject.json.in b/source/scripts/node/cmake/NodeJSProject.json.in index 980b150d32..80006864dd 100644 --- a/source/scripts/node/cmake/NodeJSProject.json.in +++ b/source/scripts/node/cmake/NodeJSProject.json.in @@ -3,7 +3,7 @@ # NodeJS project generator by Parra Studios # Generates a nodejs project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/python/cmake/PythonProject.cmake b/source/scripts/python/cmake/PythonProject.cmake index ae14b9f78d..7e38133687 100644 --- a/source/scripts/python/cmake/PythonProject.cmake +++ b/source/scripts/python/cmake/PythonProject.cmake @@ -2,7 +2,7 @@ # Python project generator by Parra Studios # Generates a python project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/python/cmake/PythonProject.cmake.in b/source/scripts/python/cmake/PythonProject.cmake.in index b423832f82..97fba6cedb 100644 --- a/source/scripts/python/cmake/PythonProject.cmake.in +++ b/source/scripts/python/cmake/PythonProject.cmake.in @@ -2,7 +2,7 @@ # Python project generator by Parra Studios # Generates a python project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/python/cmake/PythonProject.py.in b/source/scripts/python/cmake/PythonProject.py.in index cba8a94dec..521db16ceb 100644 --- a/source/scripts/python/cmake/PythonProject.py.in +++ b/source/scripts/python/cmake/PythonProject.py.in @@ -4,7 +4,7 @@ # Python project generator by Parra Studios # Generates a python project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/python/rsasample/source/rsasample.py b/source/scripts/python/rsasample/source/rsasample.py index b1aa868c77..fb9ccbfc01 100644 --- a/source/scripts/python/rsasample/source/rsasample.py +++ b/source/scripts/python/rsasample/source/rsasample.py @@ -4,7 +4,7 @@ # RSA String Encriptation Decriptation Sample by Parra Studios # Python RSA encriptation decriptation sample. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/python/rsasample/source/sample/rsa_strings.py b/source/scripts/python/rsasample/source/sample/rsa_strings.py index 80591575de..b4ccfcb36d 100644 --- a/source/scripts/python/rsasample/source/sample/rsa_strings.py +++ b/source/scripts/python/rsasample/source/sample/rsa_strings.py @@ -4,7 +4,7 @@ # RSA String Encriptation Decriptation Sample by Parra Studios # Python RSA encriptation decriptation sample. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/rpc/cmake/RPCProject.cmake b/source/scripts/rpc/cmake/RPCProject.cmake index 38f4bac0c7..a1a89df770 100644 --- a/source/scripts/rpc/cmake/RPCProject.cmake +++ b/source/scripts/rpc/cmake/RPCProject.cmake @@ -2,7 +2,7 @@ # RPC project generator by Parra Studios # Generates a rpc project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/rpc/cmake/RPCProject.cmake.in b/source/scripts/rpc/cmake/RPCProject.cmake.in index 0a5b9e215e..4eb4d931ec 100644 --- a/source/scripts/rpc/cmake/RPCProject.cmake.in +++ b/source/scripts/rpc/cmake/RPCProject.cmake.in @@ -2,7 +2,7 @@ # RPC project generator by Parra Studios # Generates a RPC project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/ruby/cmake/RubyProject.cmake b/source/scripts/ruby/cmake/RubyProject.cmake index bfa73a1f4e..12f50be55d 100644 --- a/source/scripts/ruby/cmake/RubyProject.cmake +++ b/source/scripts/ruby/cmake/RubyProject.cmake @@ -2,7 +2,7 @@ # Ruby project generator by Parra Studios # Generates a ruby project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/ruby/cmake/RubyProject.cmake.in b/source/scripts/ruby/cmake/RubyProject.cmake.in index 7c81d82031..2bf28ee0ad 100644 --- a/source/scripts/ruby/cmake/RubyProject.cmake.in +++ b/source/scripts/ruby/cmake/RubyProject.cmake.in @@ -2,7 +2,7 @@ # Ruby project generator by Parra Studios # Generates a ruby project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/ruby/cmake/RubyProject.rb.in b/source/scripts/ruby/cmake/RubyProject.rb.in index 66fe0cf541..0e8ae4100f 100644 --- a/source/scripts/ruby/cmake/RubyProject.rb.in +++ b/source/scripts/ruby/cmake/RubyProject.rb.in @@ -4,7 +4,7 @@ # Ruby project generator by Parra Studios # Generates a ruby project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/rust/cmake/RustProject.cmake b/source/scripts/rust/cmake/RustProject.cmake index 5694e29e56..762f8dd097 100644 --- a/source/scripts/rust/cmake/RustProject.cmake +++ b/source/scripts/rust/cmake/RustProject.cmake @@ -2,7 +2,7 @@ # Rust project generator by Parra Studios # Generates a Rust project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/rust/cmake/RustProject.cmake.in b/source/scripts/rust/cmake/RustProject.cmake.in index c1a52cef58..c61e9f3d7e 100644 --- a/source/scripts/rust/cmake/RustProject.cmake.in +++ b/source/scripts/rust/cmake/RustProject.cmake.in @@ -2,7 +2,7 @@ # WebAssembly project generator by Parra Studios # Generates a WebAssembly project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/typescript/cmake/TypeScriptProject.cmake b/source/scripts/typescript/cmake/TypeScriptProject.cmake index 7d25517ba5..525b083d06 100644 --- a/source/scripts/typescript/cmake/TypeScriptProject.cmake +++ b/source/scripts/typescript/cmake/TypeScriptProject.cmake @@ -2,7 +2,7 @@ # TypeScript project generator by Parra Studios # Generates a typescript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/typescript/cmake/TypeScriptProject.cmake.in b/source/scripts/typescript/cmake/TypeScriptProject.cmake.in index b07786e8cb..55efff8931 100644 --- a/source/scripts/typescript/cmake/TypeScriptProject.cmake.in +++ b/source/scripts/typescript/cmake/TypeScriptProject.cmake.in @@ -2,7 +2,7 @@ # TypeScript project generator by Parra Studios # Generates a typescript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/typescript/cmake/TypeScriptProject.json.in b/source/scripts/typescript/cmake/TypeScriptProject.json.in index f609c81ecc..e709dbb6d7 100644 --- a/source/scripts/typescript/cmake/TypeScriptProject.json.in +++ b/source/scripts/typescript/cmake/TypeScriptProject.json.in @@ -3,7 +3,7 @@ # TypeScript project generator by Parra Studios # Generates a typescript project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/wasm/cmake/WasmProject.cmake b/source/scripts/wasm/cmake/WasmProject.cmake index 776675b044..aa326a7401 100644 --- a/source/scripts/wasm/cmake/WasmProject.cmake +++ b/source/scripts/wasm/cmake/WasmProject.cmake @@ -2,7 +2,7 @@ # WebAssembly project generator by Parra Studios # Generates a WebAssembly project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/scripts/wasm/cmake/WasmProject.cmake.in b/source/scripts/wasm/cmake/WasmProject.cmake.in index b3a3c02653..630c875bea 100644 --- a/source/scripts/wasm/cmake/WasmProject.cmake.in +++ b/source/scripts/wasm/cmake/WasmProject.cmake.in @@ -2,7 +2,7 @@ # WebAssembly project generator by Parra Studios # Generates a WebAssembly project embedded into CMake. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/source/serial/include/serial/serial.h b/source/serial/include/serial/serial.h index 720640c4c6..f10f9ea761 100644 --- a/source/serial/include/serial/serial.h +++ b/source/serial/include/serial/serial.h @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * diff --git a/source/serial/include/serial/serial_handle.h b/source/serial/include/serial/serial_handle.h index fa4bdc66f6..9c049fcbca 100644 --- a/source/serial/include/serial/serial_handle.h +++ b/source/serial/include/serial/serial_handle.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serial/include/serial/serial_interface.h b/source/serial/include/serial/serial_interface.h index e06b55a169..f83a0af8e8 100644 --- a/source/serial/include/serial/serial_interface.h +++ b/source/serial/include/serial/serial_interface.h @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * diff --git a/source/serial/source/serial.c b/source/serial/source/serial.c index 74bbb01861..7a7e71faba 100644 --- a/source/serial/source/serial.c +++ b/source/serial/source/serial.c @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * @@ -144,7 +144,7 @@ const char *serial_print_info(void) { static const char serial_info[] = "Serial Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef SERIAL_STATIC_DEFINE "Compiled as static library type" diff --git a/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h b/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h index fb80de34c5..d6aece4e79 100644 --- a/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h +++ b/source/serials/metacall_serial/include/metacall_serial/metacall_serial.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl.h b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl.h index 541fe4bd60..8dd25ce64a 100644 --- a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl.h +++ b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl.h @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * diff --git a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_deserialize.h b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_deserialize.h index 6f3d0a3f09..f6324b4412 100644 --- a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_deserialize.h +++ b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_deserialize.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_serialize.h b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_serialize.h index dbe14b5900..21c0eb0601 100644 --- a/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_serialize.h +++ b/source/serials/metacall_serial/include/metacall_serial/metacall_serial_impl_serialize.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/metacall_serial/source/metacall_serial.c b/source/serials/metacall_serial/source/metacall_serial.c index 2bf699644a..70b16af396 100644 --- a/source/serials/metacall_serial/source/metacall_serial.c +++ b/source/serials/metacall_serial/source/metacall_serial.c @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * @@ -32,7 +32,7 @@ const char *metacall_serial_print_info(void) { static const char metacall_serial_info[] = "MetaCall Native Format Serial Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef METACALL_SERIAL_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/serials/metacall_serial/source/metacall_serial_impl.c b/source/serials/metacall_serial/source/metacall_serial_impl.c index 1c69c47c6b..8e48d1e7d5 100644 --- a/source/serials/metacall_serial/source/metacall_serial_impl.c +++ b/source/serials/metacall_serial/source/metacall_serial_impl.c @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * diff --git a/source/serials/metacall_serial/source/metacall_serial_impl_deserialize.c b/source/serials/metacall_serial/source/metacall_serial_impl_deserialize.c index 2487545d71..3f415ade35 100644 --- a/source/serials/metacall_serial/source/metacall_serial_impl_deserialize.c +++ b/source/serials/metacall_serial/source/metacall_serial_impl_deserialize.c @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c b/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c index 93852bbe62..e618f935e0 100644 --- a/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c +++ b/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h index 106acb20e6..12bfd53432 100644 --- a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h +++ b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial_impl.h b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial_impl.h index 936bcd34d1..7d7fda83e7 100644 --- a/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial_impl.h +++ b/source/serials/rapid_json_serial/include/rapid_json_serial/rapid_json_serial_impl.h @@ -2,7 +2,7 @@ * Serial Library by Parra Studios * A cross-platform library for managing multiple serialization and deserialization formats. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/serials/rapid_json_serial/source/rapid_json_serial.c b/source/serials/rapid_json_serial/source/rapid_json_serial.c index 12760dca9a..e7671b55a0 100644 --- a/source/serials/rapid_json_serial/source/rapid_json_serial.c +++ b/source/serials/rapid_json_serial/source/rapid_json_serial.c @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * @@ -32,7 +32,7 @@ const char *rapid_json_serial_print_info(void) { static const char rapid_json_serial_info[] = "Rapid JSON Serial Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef RAPID_JSON_SERIAL_STATIC_DEFINE "Compiled as static library type\n" diff --git a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp index a196b672a6..973c06da3e 100644 --- a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp +++ b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp @@ -1,6 +1,6 @@ /* * Serial Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A cross-platform library for managing multiple serialization and deserialization formats. * diff --git a/source/tests/adt_map_test/source/adt_map_test.cpp b/source/tests/adt_map_test/source/adt_map_test.cpp index 72124f34d0..9fb876427b 100644 --- a/source/tests/adt_map_test/source/adt_map_test.cpp +++ b/source/tests/adt_map_test/source/adt_map_test.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_map_test/source/main.cpp b/source/tests/adt_map_test/source/main.cpp index 1888b3214a..24fae6af69 100644 --- a/source/tests/adt_map_test/source/main.cpp +++ b/source/tests/adt_map_test/source/main.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_set_test/source/adt_set_test.cpp b/source/tests/adt_set_test/source/adt_set_test.cpp index 98edb9c550..b148b7a2ea 100644 --- a/source/tests/adt_set_test/source/adt_set_test.cpp +++ b/source/tests/adt_set_test/source/adt_set_test.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_set_test/source/main.cpp b/source/tests/adt_set_test/source/main.cpp index 1888b3214a..24fae6af69 100644 --- a/source/tests/adt_set_test/source/main.cpp +++ b/source/tests/adt_set_test/source/main.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_trie_test/source/adt_trie_test.cpp b/source/tests/adt_trie_test/source/adt_trie_test.cpp index 86eb087606..cb1edbf28c 100644 --- a/source/tests/adt_trie_test/source/adt_trie_test.cpp +++ b/source/tests/adt_trie_test/source/adt_trie_test.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_trie_test/source/main.cpp b/source/tests/adt_trie_test/source/main.cpp index 1888b3214a..24fae6af69 100644 --- a/source/tests/adt_trie_test/source/main.cpp +++ b/source/tests/adt_trie_test/source/main.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_vector_test/source/adt_vector_test.cpp b/source/tests/adt_vector_test/source/adt_vector_test.cpp index a334471370..816c3bcf59 100644 --- a/source/tests/adt_vector_test/source/adt_vector_test.cpp +++ b/source/tests/adt_vector_test/source/adt_vector_test.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/adt_vector_test/source/main.cpp b/source/tests/adt_vector_test/source/main.cpp index 1888b3214a..24fae6af69 100644 --- a/source/tests/adt_vector_test/source/main.cpp +++ b/source/tests/adt_vector_test/source/main.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/configuration_test/source/configuration_test.cpp b/source/tests/configuration_test/source/configuration_test.cpp index 657f8dff24..056d99493f 100644 --- a/source/tests/configuration_test/source/configuration_test.cpp +++ b/source/tests/configuration_test/source/configuration_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/configuration_test/source/main.cpp b/source/tests/configuration_test/source/main.cpp index 4e6c7d2629..4b3063b2f5 100644 --- a/source/tests/configuration_test/source/main.cpp +++ b/source/tests/configuration_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/detour_test/source/detour_test.cpp b/source/tests/detour_test/source/detour_test.cpp index 3595eda99d..6b84295fd3 100644 --- a/source/tests/detour_test/source/detour_test.cpp +++ b/source/tests/detour_test/source/detour_test.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/detour_test/source/main.cpp b/source/tests/detour_test/source/main.cpp index d678d80ae7..ccd0ee35a6 100644 --- a/source/tests/detour_test/source/main.cpp +++ b/source/tests/detour_test/source/main.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 3d69b74a27..ed6aec9979 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/dynlink_test/source/main.cpp b/source/tests/dynlink_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/dynlink_test/source/main.cpp +++ b/source/tests/dynlink_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/environment_test/source/environment_test.cpp b/source/tests/environment_test/source/environment_test.cpp index 4b484a2422..dee6341416 100644 --- a/source/tests/environment_test/source/environment_test.cpp +++ b/source/tests/environment_test/source/environment_test.cpp @@ -2,7 +2,7 @@ * Format Library by Parra Studios * A cross-platform library for supporting platform specific environment features. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/environment_test/source/main.cpp b/source/tests/environment_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/environment_test/source/main.cpp +++ b/source/tests/environment_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/log_custom_test/source/log_custom_test.cpp b/source/tests/log_custom_test/source/log_custom_test.cpp index 98af5d1b03..51754be999 100644 --- a/source/tests/log_custom_test/source/log_custom_test.cpp +++ b/source/tests/log_custom_test/source/log_custom_test.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/log_custom_test/source/main.cpp b/source/tests/log_custom_test/source/main.cpp index d678d80ae7..ccd0ee35a6 100644 --- a/source/tests/log_custom_test/source/main.cpp +++ b/source/tests/log_custom_test/source/main.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/log_test/source/log_test.cpp b/source/tests/log_test/source/log_test.cpp index 8f2939f742..2a1505e715 100644 --- a/source/tests/log_test/source/log_test.cpp +++ b/source/tests/log_test/source/log_test.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/log_test/source/main.cpp b/source/tests/log_test/source/main.cpp index d678d80ae7..ccd0ee35a6 100644 --- a/source/tests/log_test/source/main.cpp +++ b/source/tests/log_test/source/main.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_backtrace_plugin_test/source/main.cpp b/source/tests/metacall_backtrace_plugin_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_backtrace_plugin_test/source/main.cpp +++ b/source/tests/metacall_backtrace_plugin_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp b/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp index 6f70caf081..ff2844f7ad 100644 --- a/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp +++ b/source/tests/metacall_backtrace_plugin_test/source/metacall_backtrace_plugin_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_c_lib_test/source/main.cpp b/source/tests/metacall_c_lib_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_c_lib_test/source/main.cpp +++ b/source/tests/metacall_c_lib_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp index 83aa1a8de1..cabe0100b3 100644 --- a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp +++ b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_c_test/source/main.cpp b/source/tests/metacall_c_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_c_test/source/main.cpp +++ b/source/tests/metacall_c_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index dc4cc606b7..46cce764e4 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_callback_complex_test/source/main.cpp b/source/tests/metacall_callback_complex_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_callback_complex_test/source/main.cpp +++ b/source/tests/metacall_callback_complex_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp b/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp index daf5717e58..9906b0824e 100644 --- a/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp +++ b/source/tests/metacall_callback_complex_test/source/metacall_callback_complex_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cast_test/source/main.cpp b/source/tests/metacall_cast_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_cast_test/source/main.cpp +++ b/source/tests/metacall_cast_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cast_test/source/metacall_cast_test.cpp b/source/tests/metacall_cast_test/source/metacall_cast_test.cpp index c22c55cc76..9b73a35de2 100644 --- a/source/tests/metacall_cast_test/source/metacall_cast_test.cpp +++ b/source/tests/metacall_cast_test/source/metacall_cast_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_clear_test/source/main.cpp b/source/tests/metacall_clear_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_clear_test/source/main.cpp +++ b/source/tests/metacall_clear_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp index 0a59ea23a9..f6dbc7fcb1 100644 --- a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp +++ b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cli_core_plugin_await_test/source/main.cpp b/source/tests/metacall_cli_core_plugin_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/source/main.cpp +++ b/source/tests/metacall_cli_core_plugin_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp b/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp index 49a813bc5a..04461e788e 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp +++ b/source/tests/metacall_cli_core_plugin_await_test/source/metacall_cli_core_plugin_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cli_core_plugin_test/source/main.cpp b/source/tests/metacall_cli_core_plugin_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_cli_core_plugin_test/source/main.cpp +++ b/source/tests/metacall_cli_core_plugin_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp b/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp index e86f930511..7b116647c6 100644 --- a/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp +++ b/source/tests/metacall_cli_core_plugin_test/source/metacall_cli_core_plugin_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cobol_test/source/main.cpp b/source/tests/metacall_cobol_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_cobol_test/source/main.cpp +++ b/source/tests/metacall_cobol_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp b/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp index d6aae1a2cf..5f74c003ce 100644 --- a/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp +++ b/source/tests/metacall_cobol_test/source/metacall_cobol_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_configuration_default_test/source/main.cpp b/source/tests/metacall_configuration_default_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_configuration_default_test/source/main.cpp +++ b/source/tests/metacall_configuration_default_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp b/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp index e852b0f580..5cee9a0e7d 100644 --- a/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp +++ b/source/tests/metacall_configuration_default_test/source/metacall_configuration_default_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_configuration_exec_path_test/source/main.cpp b/source/tests/metacall_configuration_exec_path_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_configuration_exec_path_test/source/main.cpp +++ b/source/tests/metacall_configuration_exec_path_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp index 92fa6eac5e..7458311c05 100644 --- a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp +++ b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cs_test/include/metacall-cs-test/environment.hpp b/source/tests/metacall_cs_test/include/metacall-cs-test/environment.hpp index 0cac3e1fa9..b2efb0121c 100644 --- a/source/tests/metacall_cs_test/include/metacall-cs-test/environment.hpp +++ b/source/tests/metacall_cs_test/include/metacall-cs-test/environment.hpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cs_test/source/environment.cpp b/source/tests/metacall_cs_test/source/environment.cpp index 1affa4ae73..acd33b3c52 100644 --- a/source/tests/metacall_cs_test/source/environment.cpp +++ b/source/tests/metacall_cs_test/source/environment.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cs_test/source/main.cpp b/source/tests/metacall_cs_test/source/main.cpp index 86fc123742..41f8024b41 100644 --- a/source/tests/metacall_cs_test/source/main.cpp +++ b/source/tests/metacall_cs_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_cs_test/source/metacall_cs_test.cpp b/source/tests/metacall_cs_test/source/metacall_cs_test.cpp index 5e87a637ce..769382b155 100644 --- a/source/tests/metacall_cs_test/source/metacall_cs_test.cpp +++ b/source/tests/metacall_cs_test/source/metacall_cs_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_csharp_function_test/source/main.cpp b/source/tests/metacall_csharp_function_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_csharp_function_test/source/main.cpp +++ b/source/tests/metacall_csharp_function_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp b/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp index 799a1dc18e..541ff5476b 100644 --- a/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp +++ b/source/tests/metacall_csharp_function_test/source/metacall_csharp_function_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_csharp_static_class_test/source/main.cpp b/source/tests/metacall_csharp_static_class_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_csharp_static_class_test/source/main.cpp +++ b/source/tests/metacall_csharp_static_class_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp b/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp index 653616db1c..bfaf4f744b 100644 --- a/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp +++ b/source/tests/metacall_csharp_static_class_test/source/metacall_csharp_static_class_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_depends_test/source/main.cpp b/source/tests/metacall_depends_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_depends_test/source/main.cpp +++ b/source/tests/metacall_depends_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_depends_test/source/metacall_depends_test.cpp b/source/tests/metacall_depends_test/source/metacall_depends_test.cpp index 0f82dd0da0..4ec81006c5 100644 --- a/source/tests/metacall_depends_test/source/metacall_depends_test.cpp +++ b/source/tests/metacall_depends_test/source/metacall_depends_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_distributable_test/source/main.cpp b/source/tests/metacall_distributable_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_distributable_test/source/main.cpp +++ b/source/tests/metacall_distributable_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp index 7aaec074bc..59138c84e6 100644 --- a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp +++ b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ducktype_test/source/main.cpp b/source/tests/metacall_ducktype_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ducktype_test/source/main.cpp +++ b/source/tests/metacall_ducktype_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp index f912c04659..b9555204a8 100644 --- a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp +++ b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_duplicated_handle_test/source/main.cpp b/source/tests/metacall_duplicated_handle_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_duplicated_handle_test/source/main.cpp +++ b/source/tests/metacall_duplicated_handle_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp b/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp index 72c2a2ad56..ebd9e57322 100644 --- a/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp +++ b/source/tests/metacall_duplicated_handle_test/source/metacall_duplicated_handle_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_duplicated_symbols_test/source/main.cpp b/source/tests/metacall_duplicated_symbols_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_duplicated_symbols_test/source/main.cpp +++ b/source/tests/metacall_duplicated_symbols_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp b/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp index 4306bd1ba9..07fb659c97 100644 --- a/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp +++ b/source/tests/metacall_duplicated_symbols_test/source/metacall_duplicated_symbols_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_dynlink_path_test/source/main.cpp b/source/tests/metacall_dynlink_path_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_dynlink_path_test/source/main.cpp +++ b/source/tests/metacall_dynlink_path_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp b/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp index 645b93dad7..ac62395012 100644 --- a/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp +++ b/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ext_test/source/main.cpp b/source/tests/metacall_ext_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_ext_test/source/main.cpp +++ b/source/tests/metacall_ext_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ext_test/source/metacall_ext_test.cpp b/source/tests/metacall_ext_test/source/metacall_ext_test.cpp index 5894a32789..dde1efd0f7 100644 --- a/source/tests/metacall_ext_test/source/metacall_ext_test.cpp +++ b/source/tests/metacall_ext_test/source/metacall_ext_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_fail_test/source/main.cpp b/source/tests/metacall_file_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_file_fail_test/source/main.cpp +++ b/source/tests/metacall_file_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp b/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp index f5f4a0ba48..426e44002d 100644 --- a/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp +++ b/source/tests/metacall_file_fail_test/source/metacall_file_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_glob_test/source/main.cpp b/source/tests/metacall_file_glob_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_file_glob_test/source/main.cpp +++ b/source/tests/metacall_file_glob_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp b/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp index a5f3a2d2a2..85377d72d6 100644 --- a/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp +++ b/source/tests/metacall_file_glob_test/source/metacall_file_glob_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_test/source/main.cpp b/source/tests/metacall_file_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_file_test/source/main.cpp +++ b/source/tests/metacall_file_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_file_test/source/metacall_file_test.cpp b/source/tests/metacall_file_test/source/metacall_file_test.cpp index aa635963c1..15658125fd 100644 --- a/source/tests/metacall_file_test/source/metacall_file_test.cpp +++ b/source/tests/metacall_file_test/source/metacall_file_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_fork_test/source/main.cpp b/source/tests/metacall_fork_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_fork_test/source/main.cpp +++ b/source/tests/metacall_fork_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp index c4f18db15f..2b288b12f7 100644 --- a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp +++ b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp @@ -1,6 +1,6 @@ /* * MetaCall Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A library for providing a foreign function interface calls. * diff --git a/source/tests/metacall_function_test/source/main.cpp b/source/tests/metacall_function_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_function_test/source/main.cpp +++ b/source/tests/metacall_function_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_function_test/source/metacall_function_test.cpp b/source/tests/metacall_function_test/source/metacall_function_test.cpp index 2d015ea7f5..950bf6b1a5 100644 --- a/source/tests/metacall_function_test/source/metacall_function_test.cpp +++ b/source/tests/metacall_function_test/source/metacall_function_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_handle_export_test/source/main.cpp b/source/tests/metacall_handle_export_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_handle_export_test/source/main.cpp +++ b/source/tests/metacall_handle_export_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp b/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp index 5c19f588a3..3d1afe184a 100644 --- a/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp +++ b/source/tests/metacall_handle_export_test/source/metacall_handle_export_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_handle_get_test/source/main.cpp b/source/tests/metacall_handle_get_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_handle_get_test/source/main.cpp +++ b/source/tests/metacall_handle_get_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp index fb9202aba0..fff68579bc 100644 --- a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp +++ b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_init_fini_test/source/main.cpp b/source/tests/metacall_init_fini_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_init_fini_test/source/main.cpp +++ b/source/tests/metacall_init_fini_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp b/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp index eba4e72069..b7c64132b2 100644 --- a/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp +++ b/source/tests/metacall_init_fini_test/source/metacall_init_fini_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/source/main.cpp b/source/tests/metacall_initialize_destroy_multiple_node_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/source/main.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp b/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp index a38e648857..3435254d1f 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/source/metacall_initialize_destroy_multiple_node_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_destroy_multiple_test/source/main.cpp b/source/tests/metacall_initialize_destroy_multiple_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/source/main.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp b/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp index 337923b152..8a57d13521 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp +++ b/source/tests/metacall_initialize_destroy_multiple_test/source/metacall_initialize_destroy_multiple_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_ex_test/source/main.cpp b/source/tests/metacall_initialize_ex_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_initialize_ex_test/source/main.cpp +++ b/source/tests/metacall_initialize_ex_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp b/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp index c26f24374c..d2d9a2ce0a 100644 --- a/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp +++ b/source/tests/metacall_initialize_ex_test/source/metacall_initialize_ex_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_test/source/main.cpp b/source/tests/metacall_initialize_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_initialize_test/source/main.cpp +++ b/source/tests/metacall_initialize_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp b/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp index e1b67c480c..598f6f1ea6 100644 --- a/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp +++ b/source/tests/metacall_initialize_test/source/metacall_initialize_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_inspect_test/source/main.cpp b/source/tests/metacall_inspect_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_inspect_test/source/main.cpp +++ b/source/tests/metacall_inspect_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp b/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp index a759571d76..36e95f5f7d 100644 --- a/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp +++ b/source/tests/metacall_inspect_test/source/metacall_inspect_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_integration_test/include/metacall-integration-test/environment.hpp b/source/tests/metacall_integration_test/include/metacall-integration-test/environment.hpp index 0cac3e1fa9..b2efb0121c 100644 --- a/source/tests/metacall_integration_test/include/metacall-integration-test/environment.hpp +++ b/source/tests/metacall_integration_test/include/metacall-integration-test/environment.hpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_integration_test/source/environment.cpp b/source/tests/metacall_integration_test/source/environment.cpp index 3c2a0bb9ab..810c4af687 100644 --- a/source/tests/metacall_integration_test/source/environment.cpp +++ b/source/tests/metacall_integration_test/source/environment.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_integration_test/source/main.cpp b/source/tests/metacall_integration_test/source/main.cpp index 4f69071517..7205061c4c 100644 --- a/source/tests/metacall_integration_test/source/main.cpp +++ b/source/tests/metacall_integration_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_integration_test/source/metacall_integration_test.cpp b/source/tests/metacall_integration_test/source/metacall_integration_test.cpp index 637163e982..629f2b6672 100644 --- a/source/tests/metacall_integration_test/source/metacall_integration_test.cpp +++ b/source/tests/metacall_integration_test/source/metacall_integration_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for dynamic loading and linking shared objects at run-time. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_invalid_loader_test/source/main.cpp b/source/tests/metacall_invalid_loader_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_invalid_loader_test/source/main.cpp +++ b/source/tests/metacall_invalid_loader_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp b/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp index dc472134f0..3ae84d1469 100644 --- a/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp +++ b/source/tests/metacall_invalid_loader_test/source/metacall_invalid_loader_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_java_test/source/main.cpp b/source/tests/metacall_java_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_java_test/source/main.cpp +++ b/source/tests/metacall_java_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_java_test/source/metacall_java_test.cpp b/source/tests/metacall_java_test/source/metacall_java_test.cpp index d6a44287cf..996ff70cad 100644 --- a/source/tests/metacall_java_test/source/metacall_java_test.cpp +++ b/source/tests/metacall_java_test/source/metacall_java_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_julia_test/source/main.cpp b/source/tests/metacall_julia_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_julia_test/source/main.cpp +++ b/source/tests/metacall_julia_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_julia_test/source/metacall_julia_test.cpp b/source/tests/metacall_julia_test/source/metacall_julia_test.cpp index 384ea1ec58..d85bd9ad0d 100644 --- a/source/tests/metacall_julia_test/source/metacall_julia_test.cpp +++ b/source/tests/metacall_julia_test/source/metacall_julia_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_library_path_without_env_vars_test/source/main.cpp b/source/tests/metacall_library_path_without_env_vars_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/source/main.cpp +++ b/source/tests/metacall_library_path_without_env_vars_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp b/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp index dade10d5ea..f971670af2 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp +++ b/source/tests/metacall_library_path_without_env_vars_test/source/metacall_library_path_without_env_vars_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_llvm_test/source/main.cpp b/source/tests/metacall_llvm_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_llvm_test/source/main.cpp +++ b/source/tests/metacall_llvm_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp b/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp index 8d0100c17b..fe1e961250 100644 --- a/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp +++ b/source/tests/metacall_llvm_test/source/metacall_llvm_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_fail_test/source/main.cpp b/source/tests/metacall_load_configuration_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_configuration_fail_test/source/main.cpp +++ b/source/tests/metacall_load_configuration_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp b/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp index cdd57d8529..0fe69549c7 100644 --- a/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp +++ b/source/tests/metacall_load_configuration_fail_test/source/metacall_load_configuration_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_node_python_test/source/main.cpp b/source/tests/metacall_load_configuration_node_python_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_configuration_node_python_test/source/main.cpp +++ b/source/tests/metacall_load_configuration_node_python_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp b/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp index b9665efecd..09d50c5931 100644 --- a/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp +++ b/source/tests/metacall_load_configuration_node_python_test/source/metacall_load_configuration_node_python_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_python_node_test/source/main.cpp b/source/tests/metacall_load_configuration_python_node_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_configuration_python_node_test/source/main.cpp +++ b/source/tests/metacall_load_configuration_python_node_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp b/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp index 005ee1e336..ece10c5b20 100644 --- a/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp +++ b/source/tests/metacall_load_configuration_python_node_test/source/metacall_load_configuration_python_node_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_relative_test/include/metacall_load_configuration_relative_test/metacall_load_configuration_relative_test.h.in b/source/tests/metacall_load_configuration_relative_test/include/metacall_load_configuration_relative_test/metacall_load_configuration_relative_test.h.in index 8bfcd166dd..79701d0f7b 100644 --- a/source/tests/metacall_load_configuration_relative_test/include/metacall_load_configuration_relative_test/metacall_load_configuration_relative_test.h.in +++ b/source/tests/metacall_load_configuration_relative_test/include/metacall_load_configuration_relative_test/metacall_load_configuration_relative_test.h.in @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_relative_test/source/main.cpp b/source/tests/metacall_load_configuration_relative_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_configuration_relative_test/source/main.cpp +++ b/source/tests/metacall_load_configuration_relative_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp b/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp index 7527de8577..be9556f5e1 100644 --- a/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp +++ b/source/tests/metacall_load_configuration_relative_test/source/metacall_load_configuration_relative_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_test/source/main.cpp b/source/tests/metacall_load_configuration_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_configuration_test/source/main.cpp +++ b/source/tests/metacall_load_configuration_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp index da91461a7b..5562783fad 100644 --- a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp +++ b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_memory_empty_test/source/main.cpp b/source/tests/metacall_load_memory_empty_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_memory_empty_test/source/main.cpp +++ b/source/tests/metacall_load_memory_empty_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp b/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp index d007234460..4adffb8e4a 100644 --- a/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp +++ b/source/tests/metacall_load_memory_empty_test/source/metacall_load_memory_empty_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_memory_test/source/main.cpp b/source/tests/metacall_load_memory_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_load_memory_test/source/main.cpp +++ b/source/tests/metacall_load_memory_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp b/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp index 1201ddaa4a..9610ddf73c 100644 --- a/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp +++ b/source/tests/metacall_load_memory_test/source/metacall_load_memory_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_logs_test/source/main.cpp b/source/tests/metacall_logs_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_logs_test/source/main.cpp +++ b/source/tests/metacall_logs_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_logs_test/source/metacall_logs_test.cpp b/source/tests/metacall_logs_test/source/metacall_logs_test.cpp index 9c352db700..179554ab25 100644 --- a/source/tests/metacall_logs_test/source/metacall_logs_test.cpp +++ b/source/tests/metacall_logs_test/source/metacall_logs_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_lua_test/source/main.cpp b/source/tests/metacall_lua_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_lua_test/source/main.cpp +++ b/source/tests/metacall_lua_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_lua_test/source/metacall_lua_test.cpp b/source/tests/metacall_lua_test/source/metacall_lua_test.cpp index 50baf66e34..63c84b4375 100644 --- a/source/tests/metacall_lua_test/source/metacall_lua_test.cpp +++ b/source/tests/metacall_lua_test/source/metacall_lua_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_map_await_test/source/main.cpp b/source/tests/metacall_map_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_map_await_test/source/main.cpp +++ b/source/tests/metacall_map_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp index 11243d861d..7c68df2298 100644 --- a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp +++ b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_map_test/source/main.cpp b/source/tests/metacall_map_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_map_test/source/main.cpp +++ b/source/tests/metacall_map_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_map_test/source/metacall_map_test.cpp b/source/tests/metacall_map_test/source/metacall_map_test.cpp index 5aceb11fdb..5f98a5a5f2 100644 --- a/source/tests/metacall_map_test/source/metacall_map_test.cpp +++ b/source/tests/metacall_map_test/source/metacall_map_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_multiple_test/source/main.cpp b/source/tests/metacall_node_async_multiple_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_async_multiple_test/source/main.cpp +++ b/source/tests/metacall_node_async_multiple_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp b/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp index db398273cf..157a31a02c 100644 --- a/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp +++ b/source/tests/metacall_node_async_multiple_test/source/metacall_node_async_multiple_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_resources_test/source/main.cpp b/source/tests/metacall_node_async_resources_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_async_resources_test/source/main.cpp +++ b/source/tests/metacall_node_async_resources_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp b/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp index dc256cc038..82d2178970 100644 --- a/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp +++ b/source/tests/metacall_node_async_resources_test/source/metacall_node_async_resources_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_test/source/main.cpp b/source/tests/metacall_node_async_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_async_test/source/main.cpp +++ b/source/tests/metacall_node_async_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp b/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp index 51c0843a54..e7a8395355 100644 --- a/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp +++ b/source/tests/metacall_node_async_test/source/metacall_node_async_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_await_chain_test/source/main.cpp b/source/tests/metacall_node_await_chain_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_await_chain_test/source/main.cpp +++ b/source/tests/metacall_node_await_chain_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp b/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp index bf57f21f52..1efdd46827 100644 --- a/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp +++ b/source/tests/metacall_node_await_chain_test/source/metacall_node_await_chain_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_call_test/source/main.cpp b/source/tests/metacall_node_call_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_call_test/source/main.cpp +++ b/source/tests/metacall_node_call_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp b/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp index 3608330ee7..7117e09419 100644 --- a/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp +++ b/source/tests/metacall_node_call_test/source/metacall_node_call_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_callback_test/source/main.cpp b/source/tests/metacall_node_callback_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_callback_test/source/main.cpp +++ b/source/tests/metacall_node_callback_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp b/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp index f89070ac2d..a49f61313b 100644 --- a/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp +++ b/source/tests/metacall_node_callback_test/source/metacall_node_callback_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_clear_mem_test/source/main.cpp b/source/tests/metacall_node_clear_mem_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_clear_mem_test/source/main.cpp +++ b/source/tests/metacall_node_clear_mem_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp b/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp index 7139335818..ae63885773 100644 --- a/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp +++ b/source/tests/metacall_node_clear_mem_test/source/metacall_node_clear_mem_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_default_export_test/source/main.cpp b/source/tests/metacall_node_default_export_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_default_export_test/source/main.cpp +++ b/source/tests/metacall_node_default_export_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp b/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp index ac9bd4bd20..890c8b8726 100644 --- a/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp +++ b/source/tests/metacall_node_default_export_test/source/metacall_node_default_export_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_event_loop_signal_test/source/main.cpp b/source/tests/metacall_node_event_loop_signal_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_event_loop_signal_test/source/main.cpp +++ b/source/tests/metacall_node_event_loop_signal_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp b/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp index 463aabc6be..54d7cb8fa2 100644 --- a/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp +++ b/source/tests/metacall_node_event_loop_signal_test/source/metacall_node_event_loop_signal_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_event_loop_test/source/main.cpp b/source/tests/metacall_node_event_loop_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_event_loop_test/source/main.cpp +++ b/source/tests/metacall_node_event_loop_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp b/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp index 88e0197980..306cda37b0 100644 --- a/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp +++ b/source/tests/metacall_node_event_loop_test/source/metacall_node_event_loop_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_exception_test/source/main.cpp b/source/tests/metacall_node_exception_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_exception_test/source/main.cpp +++ b/source/tests/metacall_node_exception_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp index 794056a01f..9de8102772 100644 --- a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp +++ b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test.c b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test.c index a9b08fed4c..a0df94beac 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test.c +++ b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test.c @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp index 8ab28a9acc..a19afc5639 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp +++ b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_extension_test/source/main.cpp b/source/tests/metacall_node_extension_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_extension_test/source/main.cpp +++ b/source/tests/metacall_node_extension_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp index 6514b0c759..4e09864856 100644 --- a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp +++ b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_env_var_test/source/main.cpp b/source/tests/metacall_node_fail_env_var_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_fail_env_var_test/source/main.cpp +++ b/source/tests/metacall_node_fail_env_var_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp b/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp index 5803e2920a..b6ef3dc8a2 100644 --- a/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp +++ b/source/tests/metacall_node_fail_env_var_test/source/metacall_node_fail_env_var_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_load_leak_test/source/main.cpp b/source/tests/metacall_node_fail_load_leak_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_fail_load_leak_test/source/main.cpp +++ b/source/tests/metacall_node_fail_load_leak_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp b/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp index b99d94d2bc..a47ec3c226 100644 --- a/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp +++ b/source/tests/metacall_node_fail_load_leak_test/source/metacall_node_fail_load_leak_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_test/source/main.cpp b/source/tests/metacall_node_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_fail_test/source/main.cpp +++ b/source/tests/metacall_node_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp b/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp index 5b1038755d..e052ed25b2 100644 --- a/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp +++ b/source/tests/metacall_node_fail_test/source/metacall_node_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_inline_test/source/main.cpp b/source/tests/metacall_node_inline_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_inline_test/source/main.cpp +++ b/source/tests/metacall_node_inline_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp b/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp index 4148ae1fb0..1c578f6eab 100644 --- a/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp +++ b/source/tests/metacall_node_inline_test/source/metacall_node_inline_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_multithread_deadlock_test/source/main.cpp b/source/tests/metacall_node_multithread_deadlock_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/source/main.cpp +++ b/source/tests/metacall_node_multithread_deadlock_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp b/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp index 133d949dd2..39ff07dabe 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp +++ b/source/tests/metacall_node_multithread_deadlock_test/source/metacall_node_multithread_deadlock_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_native_code_test/source/main.cpp b/source/tests/metacall_node_native_code_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_native_code_test/source/main.cpp +++ b/source/tests/metacall_node_native_code_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp b/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp index bbf7fcf5db..4366808cc2 100644 --- a/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp +++ b/source/tests/metacall_node_native_code_test/source/metacall_node_native_code_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_await_test/source/main.cpp b/source/tests/metacall_node_port_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_port_await_test/source/main.cpp +++ b/source/tests/metacall_node_port_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp b/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp index 00766eb883..43cb8e8db0 100644 --- a/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp +++ b/source/tests/metacall_node_port_await_test/source/metacall_node_port_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_c_lib_test/source/main.cpp b/source/tests/metacall_node_port_c_lib_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_port_c_lib_test/source/main.cpp +++ b/source/tests/metacall_node_port_c_lib_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp index faa944974a..7070bbf985 100644 --- a/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp +++ b/source/tests/metacall_node_port_c_lib_test/source/metacall_node_port_c_lib_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_rs_test/source/main.cpp b/source/tests/metacall_node_port_rs_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_port_rs_test/source/main.cpp +++ b/source/tests/metacall_node_port_rs_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp b/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp index 4c57bb201b..dc54f4d0c9 100644 --- a/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp +++ b/source/tests/metacall_node_port_rs_test/source/metacall_node_port_rs_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_test/source/main.cpp b/source/tests/metacall_node_port_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_port_test/source/main.cpp +++ b/source/tests/metacall_node_port_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp index 5cfb285a20..cfe35e8b56 100644 --- a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp +++ b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_async_after_destroy_test/source/main.cpp b/source/tests/metacall_node_python_async_after_destroy_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/source/main.cpp +++ b/source/tests/metacall_node_python_async_after_destroy_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp b/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp index 43cdbde337..71ebbcdeab 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp +++ b/source/tests/metacall_node_python_async_after_destroy_test/source/metacall_node_python_async_after_destroy_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_await_extended_test/source/main.cpp b/source/tests/metacall_node_python_await_extended_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_await_extended_test/source/main.cpp +++ b/source/tests/metacall_node_python_await_extended_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp b/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp index 57e9c143be..d773f0ba76 100644 --- a/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp +++ b/source/tests/metacall_node_python_await_extended_test/source/metacall_node_python_await_extended_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_await_test/source/main.cpp b/source/tests/metacall_node_python_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_await_test/source/main.cpp +++ b/source/tests/metacall_node_python_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp b/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp index b140752acc..9e63b1aa3c 100644 --- a/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp +++ b/source/tests/metacall_node_python_await_test/source/metacall_node_python_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_deadlock_test/source/main.cpp b/source/tests/metacall_node_python_deadlock_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_deadlock_test/source/main.cpp +++ b/source/tests/metacall_node_python_deadlock_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp b/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp index 4b9ce4866e..d5cca59f22 100644 --- a/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp +++ b/source/tests/metacall_node_python_deadlock_test/source/metacall_node_python_deadlock_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_exception_test/source/main.cpp b/source/tests/metacall_node_python_exception_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_exception_test/source/main.cpp +++ b/source/tests/metacall_node_python_exception_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp b/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp index 69ed55884f..73f59386c1 100644 --- a/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp +++ b/source/tests/metacall_node_python_exception_test/source/metacall_node_python_exception_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_port_mock_test/source/main.cpp b/source/tests/metacall_node_python_port_mock_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_port_mock_test/source/main.cpp +++ b/source/tests/metacall_node_python_port_mock_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp b/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp index 7670e8d897..b1c9b76b4c 100644 --- a/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp +++ b/source/tests/metacall_node_python_port_mock_test/source/metacall_node_python_port_mock_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_port_ruby_test/source/main.cpp b/source/tests/metacall_node_python_port_ruby_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_port_ruby_test/source/main.cpp +++ b/source/tests/metacall_node_python_port_ruby_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp b/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp index 0b4edc45ca..19acb40e98 100644 --- a/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp +++ b/source/tests/metacall_node_python_port_ruby_test/source/metacall_node_python_port_ruby_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_ruby_test/source/main.cpp b/source/tests/metacall_node_python_ruby_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_python_ruby_test/source/main.cpp +++ b/source/tests/metacall_node_python_ruby_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp index a3ff9fe7ef..0ba5f3ba36 100644 --- a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp +++ b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_reentrant_test/source/main.cpp b/source/tests/metacall_node_reentrant_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_reentrant_test/source/main.cpp +++ b/source/tests/metacall_node_reentrant_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp b/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp index cfac3514f9..09f0c7af6c 100644 --- a/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp +++ b/source/tests/metacall_node_reentrant_test/source/metacall_node_reentrant_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_signal_handler_test/source/main.cpp b/source/tests/metacall_node_signal_handler_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_signal_handler_test/source/main.cpp +++ b/source/tests/metacall_node_signal_handler_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp b/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp index 869a6fd1e1..61e1ef0754 100644 --- a/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp +++ b/source/tests/metacall_node_signal_handler_test/source/metacall_node_signal_handler_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_test/source/main.cpp b/source/tests/metacall_node_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_test/source/main.cpp +++ b/source/tests/metacall_node_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_test/source/metacall_node_test.cpp b/source/tests/metacall_node_test/source/metacall_node_test.cpp index f63f67c2cc..f38954e090 100644 --- a/source/tests/metacall_node_test/source/metacall_node_test.cpp +++ b/source/tests/metacall_node_test/source/metacall_node_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_typescript_test/source/main.cpp b/source/tests/metacall_node_typescript_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_node_typescript_test/source/main.cpp +++ b/source/tests/metacall_node_typescript_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp b/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp index 984705f86c..8bf39ee566 100644 --- a/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp +++ b/source/tests/metacall_node_typescript_test/source/metacall_node_typescript_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/source/main.cpp b/source/tests/metacall_plugin_extension_destroy_order_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/source/main.cpp +++ b/source/tests/metacall_plugin_extension_destroy_order_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp b/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp index 0ad0838ab9..7d094870ca 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp +++ b/source/tests/metacall_plugin_extension_destroy_order_test/source/metacall_plugin_extension_destroy_order_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/source/main.cpp b/source/tests/metacall_plugin_extension_invalid_path_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/source/main.cpp +++ b/source/tests/metacall_plugin_extension_invalid_path_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp b/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp index fe30dd53e7..31fec9d9b4 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp +++ b/source/tests/metacall_plugin_extension_invalid_path_test/source/metacall_plugin_extension_invalid_path_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_local_test/source/main.cpp b/source/tests/metacall_plugin_extension_local_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_plugin_extension_local_test/source/main.cpp +++ b/source/tests/metacall_plugin_extension_local_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp b/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp index b7a6680f65..060200f35d 100644 --- a/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp +++ b/source/tests/metacall_plugin_extension_local_test/source/metacall_plugin_extension_local_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_test/source/main.cpp b/source/tests/metacall_plugin_extension_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_plugin_extension_test/source/main.cpp +++ b/source/tests/metacall_plugin_extension_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp b/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp index 975e70590b..4d1d4ac99a 100644 --- a/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp +++ b/source/tests/metacall_plugin_extension_test/source/metacall_plugin_extension_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_await_test/source/main.cpp b/source/tests/metacall_python_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_await_test/source/main.cpp +++ b/source/tests/metacall_python_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp b/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp index 355e712880..71ff8b6f50 100644 --- a/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp +++ b/source/tests/metacall_python_await_test/source/metacall_python_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_builtins_test/source/main.cpp b/source/tests/metacall_python_builtins_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_builtins_test/source/main.cpp +++ b/source/tests/metacall_python_builtins_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp b/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp index 5ba74c8397..a806d04427 100644 --- a/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp +++ b/source/tests/metacall_python_builtins_test/source/metacall_python_builtins_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_callback_test/source/main.cpp b/source/tests/metacall_python_callback_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_callback_test/source/main.cpp +++ b/source/tests/metacall_python_callback_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp b/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp index b62c2d021c..fa15992d94 100644 --- a/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp +++ b/source/tests/metacall_python_callback_test/source/metacall_python_callback_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_dict_test/source/main.cpp b/source/tests/metacall_python_dict_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_dict_test/source/main.cpp +++ b/source/tests/metacall_python_dict_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp index b5cb079b92..cab84c549b 100644 --- a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp +++ b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_exception_test/source/main.cpp b/source/tests/metacall_python_exception_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_exception_test/source/main.cpp +++ b/source/tests/metacall_python_exception_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp index 05726d9a46..8d902ced59 100644 --- a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp +++ b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_fail_test/source/main.cpp b/source/tests/metacall_python_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_fail_test/source/main.cpp +++ b/source/tests/metacall_python_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp b/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp index f35f187b8a..7ef4531f60 100644 --- a/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp +++ b/source/tests/metacall_python_fail_test/source/metacall_python_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_gc_test/source/main.cpp b/source/tests/metacall_python_gc_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_gc_test/source/main.cpp +++ b/source/tests/metacall_python_gc_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp index d7f1fc308b..3e21db1ab3 100644 --- a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp +++ b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_loader_port_test/source/main.cpp b/source/tests/metacall_python_loader_port_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_loader_port_test/source/main.cpp +++ b/source/tests/metacall_python_loader_port_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp index bc151f7d9c..106797f36e 100644 --- a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp +++ b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_model_test/source/main.cpp b/source/tests/metacall_python_model_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_model_test/source/main.cpp +++ b/source/tests/metacall_python_model_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp b/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp index 503e0f6c0a..ca200e45b8 100644 --- a/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp +++ b/source/tests/metacall_python_model_test/source/metacall_python_model_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_node_await_test/source/main.cpp b/source/tests/metacall_python_node_await_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_node_await_test/source/main.cpp +++ b/source/tests/metacall_python_node_await_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp b/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp index 219b8b4a68..168f3517c4 100644 --- a/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp +++ b/source/tests/metacall_python_node_await_test/source/metacall_python_node_await_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_object_class_test/source/main.cpp b/source/tests/metacall_python_object_class_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_object_class_test/source/main.cpp +++ b/source/tests/metacall_python_object_class_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp index a5a3439c24..092c58927c 100644 --- a/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp +++ b/source/tests/metacall_python_object_class_test/source/metacall_python_object_class_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_open_test/source/main.cpp b/source/tests/metacall_python_open_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_open_test/source/main.cpp +++ b/source/tests/metacall_python_open_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp index 23b30971fc..3eda60fe5c 100644 --- a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp +++ b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_pointer_test/source/main.cpp b/source/tests/metacall_python_pointer_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_pointer_test/source/main.cpp +++ b/source/tests/metacall_python_pointer_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp b/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp index 93afe1d319..cd7edd2e2d 100644 --- a/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp +++ b/source/tests/metacall_python_pointer_test/source/metacall_python_pointer_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_callback_test/source/main.cpp b/source/tests/metacall_python_port_callback_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_port_callback_test/source/main.cpp +++ b/source/tests/metacall_python_port_callback_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp b/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp index 0cf39bfe3f..c0fd5e5b21 100644 --- a/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp +++ b/source/tests/metacall_python_port_callback_test/source/metacall_python_port_callback_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_https_test/source/main.cpp b/source/tests/metacall_python_port_https_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_port_https_test/source/main.cpp +++ b/source/tests/metacall_python_port_https_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp b/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp index b005ffa1b3..e6082d2fe9 100644 --- a/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp +++ b/source/tests/metacall_python_port_https_test/source/metacall_python_port_https_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_import_test/source/main.cpp b/source/tests/metacall_python_port_import_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_port_import_test/source/main.cpp +++ b/source/tests/metacall_python_port_import_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp b/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp index 0b15fa9775..23b93ca1a4 100644 --- a/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp +++ b/source/tests/metacall_python_port_import_test/source/metacall_python_port_import_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_pointer_test/source/main.cpp b/source/tests/metacall_python_port_pointer_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_port_pointer_test/source/main.cpp +++ b/source/tests/metacall_python_port_pointer_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp b/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp index 2e48f56071..fd6214d1d5 100644 --- a/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp +++ b/source/tests/metacall_python_port_pointer_test/source/metacall_python_port_pointer_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_test/source/main.cpp b/source/tests/metacall_python_port_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_port_test/source/main.cpp +++ b/source/tests/metacall_python_port_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp index d562fd89e5..a86f7f111a 100644 --- a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp +++ b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_reentrant_test/source/main.cpp b/source/tests/metacall_python_reentrant_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_reentrant_test/source/main.cpp +++ b/source/tests/metacall_python_reentrant_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp b/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp index fa6dae3f6c..ae1d107591 100644 --- a/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp +++ b/source/tests/metacall_python_reentrant_test/source/metacall_python_reentrant_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_relative_path_test/source/main.cpp b/source/tests/metacall_python_relative_path_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_relative_path_test/source/main.cpp +++ b/source/tests/metacall_python_relative_path_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp b/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp index f1f7ce4bb2..0c44179d68 100644 --- a/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp +++ b/source/tests/metacall_python_relative_path_test/source/metacall_python_relative_path_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_test/source/main.cpp b/source/tests/metacall_python_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_test/source/main.cpp +++ b/source/tests/metacall_python_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_test/source/metacall_python_test.cpp b/source/tests/metacall_python_test/source/metacall_python_test.cpp index 35dfb9e414..690bf226af 100644 --- a/source/tests/metacall_python_test/source/metacall_python_test.cpp +++ b/source/tests/metacall_python_test/source/metacall_python_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_varargs_test/source/main.cpp b/source/tests/metacall_python_varargs_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_varargs_test/source/main.cpp +++ b/source/tests/metacall_python_varargs_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp b/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp index d5a2ee3762..e640a1f50f 100644 --- a/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp +++ b/source/tests/metacall_python_varargs_test/source/metacall_python_varargs_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_without_env_vars_test/source/main.cpp b/source/tests/metacall_python_without_env_vars_test/source/main.cpp index 3f4f3377f9..7832a63230 100644 --- a/source/tests/metacall_python_without_env_vars_test/source/main.cpp +++ b/source/tests/metacall_python_without_env_vars_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp b/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp index 9c35499a75..05ec480890 100644 --- a/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp +++ b/source/tests/metacall_python_without_env_vars_test/source/metacall_python_without_env_vars_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading python code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_without_functions_test/source/main.cpp b/source/tests/metacall_python_without_functions_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_python_without_functions_test/source/main.cpp +++ b/source/tests/metacall_python_without_functions_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp b/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp index 7c4ec16a40..9e84dbe510 100644 --- a/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp +++ b/source/tests/metacall_python_without_functions_test/source/metacall_python_without_functions_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_reinitialize_test/source/main.cpp b/source/tests/metacall_reinitialize_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_reinitialize_test/source/main.cpp +++ b/source/tests/metacall_reinitialize_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp b/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp index d3cade3233..da47af9905 100644 --- a/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp +++ b/source/tests/metacall_reinitialize_test/source/metacall_reinitialize_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_reload_functions_test/source/main.cpp b/source/tests/metacall_reload_functions_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_reload_functions_test/source/main.cpp +++ b/source/tests/metacall_reload_functions_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp b/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp index ae4bc39051..be227cf3d4 100644 --- a/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp +++ b/source/tests/metacall_reload_functions_test/source/metacall_reload_functions_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_return_monad_test/source/main.cpp b/source/tests/metacall_return_monad_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_return_monad_test/source/main.cpp +++ b/source/tests/metacall_return_monad_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp index ad07a1db83..dfcf6e70ca 100644 --- a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp +++ b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rpc_test/source/main.cpp b/source/tests/metacall_rpc_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_rpc_test/source/main.cpp +++ b/source/tests/metacall_rpc_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp b/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp index 51fb948f24..670911293b 100644 --- a/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp +++ b/source/tests/metacall_rpc_test/source/metacall_rpc_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_fail_empty_test/source/main.cpp b/source/tests/metacall_ruby_fail_empty_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ruby_fail_empty_test/source/main.cpp +++ b/source/tests/metacall_ruby_fail_empty_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp b/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp index 96b4f5c151..5ab21e63e2 100644 --- a/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp +++ b/source/tests/metacall_ruby_fail_empty_test/source/metacall_ruby_fail_empty_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_fail_test/source/main.cpp b/source/tests/metacall_ruby_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ruby_fail_test/source/main.cpp +++ b/source/tests/metacall_ruby_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp b/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp index 2fe3de533b..24c11d7981 100644 --- a/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp +++ b/source/tests/metacall_ruby_fail_test/source/metacall_ruby_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_object_class_test/source/main.cpp b/source/tests/metacall_ruby_object_class_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ruby_object_class_test/source/main.cpp +++ b/source/tests/metacall_ruby_object_class_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp b/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp index c471d24062..05d7f272cb 100644 --- a/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp +++ b/source/tests/metacall_ruby_object_class_test/source/metacall_ruby_object_class_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_parser_integration_test/source/main.cpp b/source/tests/metacall_ruby_parser_integration_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ruby_parser_integration_test/source/main.cpp +++ b/source/tests/metacall_ruby_parser_integration_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp index 295697da2e..b269fd9c21 100644 --- a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp +++ b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_rails_integration_test/source/main.cpp b/source/tests/metacall_ruby_rails_integration_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_ruby_rails_integration_test/source/main.cpp +++ b/source/tests/metacall_ruby_rails_integration_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp b/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp index 66b0fa7478..5d04ac4351 100644 --- a/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp +++ b/source/tests/metacall_ruby_rails_integration_test/source/metacall_ruby_rails_integration_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_test/source/main.cpp b/source/tests/metacall_ruby_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_ruby_test/source/main.cpp +++ b/source/tests/metacall_ruby_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp b/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp index adb9a70070..cf8bcf49ea 100644 --- a/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp +++ b/source/tests/metacall_ruby_test/source/metacall_ruby_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_class_test/source/main.cpp b/source/tests/metacall_rust_class_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_class_test/source/main.cpp +++ b/source/tests/metacall_rust_class_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp b/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp index cb0c537a05..235841a990 100644 --- a/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp +++ b/source/tests/metacall_rust_class_test/source/metacall_rust_class_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_mem_test/source/main.cpp b/source/tests/metacall_rust_load_from_mem_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_load_from_mem_test/source/main.cpp +++ b/source/tests/metacall_rust_load_from_mem_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp b/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp index 5a2f5b4406..ab09ed72b5 100644 --- a/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp +++ b/source/tests/metacall_rust_load_from_mem_test/source/metacall_rust_load_from_mem_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_class_test/source/main.cpp b/source/tests/metacall_rust_load_from_package_class_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/source/main.cpp +++ b/source/tests/metacall_rust_load_from_package_class_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp b/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp index 6d6ed2bfc0..d4f927d5b2 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp +++ b/source/tests/metacall_rust_load_from_package_class_test/source/metacall_rust_load_from_package_class_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_dep_test/source/main.cpp b/source/tests/metacall_rust_load_from_package_dep_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/source/main.cpp +++ b/source/tests/metacall_rust_load_from_package_dep_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp index dc578bb42c..bc2d7930c8 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp +++ b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_test/source/main.cpp b/source/tests/metacall_rust_load_from_package_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_load_from_package_test/source/main.cpp +++ b/source/tests/metacall_rust_load_from_package_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp index 776ce0ebb6..37f6394bbb 100644 --- a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp +++ b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_test/source/main.cpp b/source/tests/metacall_rust_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/metacall_rust_test/source/main.cpp +++ b/source/tests/metacall_rust_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp index b0a2e94073..85b9253da9 100644 --- a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp +++ b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_sandbox_plugin_test/source/main.cpp b/source/tests/metacall_sandbox_plugin_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_sandbox_plugin_test/source/main.cpp +++ b/source/tests/metacall_sandbox_plugin_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp b/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp index 6d0f186a17..3cd32dcf0f 100644 --- a/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp +++ b/source/tests/metacall_sandbox_plugin_test/source/metacall_sandbox_plugin_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_test/source/main.cpp b/source/tests/metacall_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_test/source/main.cpp +++ b/source/tests/metacall_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_test/source/metacall_test.cpp b/source/tests/metacall_test/source/metacall_test.cpp index cf9d864a2a..3f250b3cd3 100644 --- a/source/tests/metacall_test/source/metacall_test.cpp +++ b/source/tests/metacall_test/source/metacall_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_test/source/metacall_test_split.cpp b/source/tests/metacall_test/source/metacall_test_split.cpp index dead0c91e4..49d0fc8f18 100644 --- a/source/tests/metacall_test/source/metacall_test_split.cpp +++ b/source/tests/metacall_test/source/metacall_test_split.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_call_map_test/source/main.cpp b/source/tests/metacall_typescript_call_map_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_call_map_test/source/main.cpp +++ b/source/tests/metacall_typescript_call_map_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp b/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp index d9cf65a803..82af7b2944 100644 --- a/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp +++ b/source/tests/metacall_typescript_call_map_test/source/metacall_typescript_call_map_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_jsx_default_test/source/main.cpp b/source/tests/metacall_typescript_jsx_default_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_jsx_default_test/source/main.cpp +++ b/source/tests/metacall_typescript_jsx_default_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp b/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp index 0930ddff38..609bb760e3 100644 --- a/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp +++ b/source/tests/metacall_typescript_jsx_default_test/source/metacall_typescript_jsx_default_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_node_test/source/main.cpp b/source/tests/metacall_typescript_node_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_node_test/source/main.cpp +++ b/source/tests/metacall_typescript_node_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp b/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp index 95a65c98b2..4285ca809f 100644 --- a/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp +++ b/source/tests/metacall_typescript_node_test/source/metacall_typescript_node_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_require_test/source/main.cpp b/source/tests/metacall_typescript_require_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_require_test/source/main.cpp +++ b/source/tests/metacall_typescript_require_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp b/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp index 13d90c5152..b94e43fa36 100644 --- a/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp +++ b/source/tests/metacall_typescript_require_test/source/metacall_typescript_require_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_test/source/main.cpp b/source/tests/metacall_typescript_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_test/source/main.cpp +++ b/source/tests/metacall_typescript_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp b/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp index 8b3488797b..9ebd5f9f30 100644 --- a/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp +++ b/source/tests/metacall_typescript_test/source/metacall_typescript_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/source/main.cpp b/source/tests/metacall_typescript_tsx_loop_fail_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/source/main.cpp +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp b/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp index 8256b34813..54a278e394 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/source/metacall_typescript_tsx_loop_fail_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_tsx_test/source/main.cpp b/source/tests/metacall_typescript_tsx_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_typescript_tsx_test/source/main.cpp +++ b/source/tests/metacall_typescript_tsx_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp index 0723b6eed3..16404c17da 100644 --- a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp +++ b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_version_test/source/main.cpp b/source/tests/metacall_version_test/source/main.cpp index 11ddf3f599..5820341294 100644 --- a/source/tests/metacall_version_test/source/main.cpp +++ b/source/tests/metacall_version_test/source/main.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_version_test/source/metacall_version_test.cpp b/source/tests/metacall_version_test/source/metacall_version_test.cpp index 531e7bdd5f..b7023840b0 100644 --- a/source/tests/metacall_version_test/source/metacall_version_test.cpp +++ b/source/tests/metacall_version_test/source/metacall_version_test.cpp @@ -2,7 +2,7 @@ * MetaCall Library by Parra Studios * A library for providing a foreign function interface calls. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_wasm_python_port_test/source/main.cpp b/source/tests/metacall_wasm_python_port_test/source/main.cpp index 31f757ddc4..ae1380d351 100644 --- a/source/tests/metacall_wasm_python_port_test/source/main.cpp +++ b/source/tests/metacall_wasm_python_port_test/source/main.cpp @@ -1,7 +1,7 @@ /* * WebAssembly Loader Tests by Parra Studios * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_wasm_python_port_test/source/metacall_wasm_python_port_test.cpp b/source/tests/metacall_wasm_python_port_test/source/metacall_wasm_python_port_test.cpp index 7896135fe3..f233b6a52c 100644 --- a/source/tests/metacall_wasm_python_port_test/source/metacall_wasm_python_port_test.cpp +++ b/source/tests/metacall_wasm_python_port_test/source/metacall_wasm_python_port_test.cpp @@ -1,7 +1,7 @@ /* * WebAssembly Loader Tests by Parra Studios * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_wasm_test/source/main.cpp b/source/tests/metacall_wasm_test/source/main.cpp index 31f757ddc4..ae1380d351 100644 --- a/source/tests/metacall_wasm_test/source/main.cpp +++ b/source/tests/metacall_wasm_test/source/main.cpp @@ -1,7 +1,7 @@ /* * WebAssembly Loader Tests by Parra Studios * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp b/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp index 2c5515ed83..0042e45b7c 100644 --- a/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp +++ b/source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp @@ -1,7 +1,7 @@ /* * WebAssembly Loader Tests by Parra Studios * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/portability_path_test/source/main.cpp b/source/tests/portability_path_test/source/main.cpp index 1888b3214a..24fae6af69 100644 --- a/source/tests/portability_path_test/source/main.cpp +++ b/source/tests/portability_path_test/source/main.cpp @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/portability_path_test/source/portability_path_test.cpp b/source/tests/portability_path_test/source/portability_path_test.cpp index f497563480..c8b4dccc52 100644 --- a/source/tests/portability_path_test/source/portability_path_test.cpp +++ b/source/tests/portability_path_test/source/portability_path_test.cpp @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios -* Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +* Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A library for loading executable code at run-time into a process. * diff --git a/source/tests/preprocessor_test/source/main.cpp b/source/tests/preprocessor_test/source/main.cpp index d678d80ae7..ccd0ee35a6 100644 --- a/source/tests/preprocessor_test/source/main.cpp +++ b/source/tests/preprocessor_test/source/main.cpp @@ -2,7 +2,7 @@ * Logger Library by Parra Studios * A generic logger library providing application execution reports. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/preprocessor_test/source/preprocessor_test.cpp b/source/tests/preprocessor_test/source/preprocessor_test.cpp index 1c5bf3e610..80d4bad37a 100644 --- a/source/tests/preprocessor_test/source/preprocessor_test.cpp +++ b/source/tests/preprocessor_test/source/preprocessor_test.cpp @@ -2,7 +2,7 @@ * Preprocssor Library by Parra Studios * A generic header-only preprocessor metaprogramming library. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/rb_loader_parser_test/source/main.cpp b/source/tests/rb_loader_parser_test/source/main.cpp index 4537c68d36..37d4adc23f 100644 --- a/source/tests/rb_loader_parser_test/source/main.cpp +++ b/source/tests/rb_loader_parser_test/source/main.cpp @@ -2,7 +2,7 @@ * Loader Library by Parra Studios * A plugin for loading ruby code at run-time into a process. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/rb_loader_parser_test/source/rb_loader_parser_test.cpp b/source/tests/rb_loader_parser_test/source/rb_loader_parser_test.cpp index 98066bc985..a8984ff47f 100644 --- a/source/tests/rb_loader_parser_test/source/rb_loader_parser_test.cpp +++ b/source/tests/rb_loader_parser_test/source/rb_loader_parser_test.cpp @@ -1,6 +1,6 @@ /* * Loader Library by Parra Studios - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * A plugin for loading ruby code at run-time into a process. * diff --git a/source/tests/reflect_function_test/source/main.cpp b/source/tests/reflect_function_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/reflect_function_test/source/main.cpp +++ b/source/tests/reflect_function_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_function_test/source/reflect_function_test.cpp b/source/tests/reflect_function_test/source/reflect_function_test.cpp index eea9349278..7567f4505c 100644 --- a/source/tests/reflect_function_test/source/reflect_function_test.cpp +++ b/source/tests/reflect_function_test/source/reflect_function_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_metadata_test/source/main.cpp b/source/tests/reflect_metadata_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/reflect_metadata_test/source/main.cpp +++ b/source/tests/reflect_metadata_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_metadata_test/source/reflect_metadata_test.cpp b/source/tests/reflect_metadata_test/source/reflect_metadata_test.cpp index 32747c825f..6c1bc10f7a 100644 --- a/source/tests/reflect_metadata_test/source/reflect_metadata_test.cpp +++ b/source/tests/reflect_metadata_test/source/reflect_metadata_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_object_class_test/source/main.cpp b/source/tests/reflect_object_class_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/reflect_object_class_test/source/main.cpp +++ b/source/tests/reflect_object_class_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp b/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp index 275713e5fe..a0d7e0cc24 100644 --- a/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp +++ b/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_scope_test/source/main.cpp b/source/tests/reflect_scope_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/reflect_scope_test/source/main.cpp +++ b/source/tests/reflect_scope_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_scope_test/source/reflect_scope_test.cpp b/source/tests/reflect_scope_test/source/reflect_scope_test.cpp index 5287159253..2e58c50b04 100644 --- a/source/tests/reflect_scope_test/source/reflect_scope_test.cpp +++ b/source/tests/reflect_scope_test/source/reflect_scope_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/main.cpp b/source/tests/reflect_value_cast_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/reflect_value_cast_test/source/main.cpp +++ b/source/tests/reflect_value_cast_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_bool_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_bool_test.cpp index 49770adaf8..988e7a607a 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_bool_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_bool_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_char_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_char_test.cpp index 35d20ad945..0bbe2bbecf 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_char_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_char_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_double_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_double_test.cpp index 7d7fad6cbb..8991352731 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_double_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_double_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_float_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_float_test.cpp index 8c543a3815..f1ffedc062 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_float_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_float_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_int_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_int_test.cpp index 9d5a67abbf..7e6e2aa35d 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_int_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_int_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_long_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_long_test.cpp index fa5ea251a5..9258a11e32 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_long_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_long_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/reflect_value_cast_test/source/reflect_value_cast_short_test.cpp b/source/tests/reflect_value_cast_test/source/reflect_value_cast_short_test.cpp index 48211f3cbc..e33d576373 100644 --- a/source/tests/reflect_value_cast_test/source/reflect_value_cast_short_test.cpp +++ b/source/tests/reflect_value_cast_test/source/reflect_value_cast_short_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/serial_test/source/main.cpp b/source/tests/serial_test/source/main.cpp index 718fa27071..cba58797ca 100644 --- a/source/tests/serial_test/source/main.cpp +++ b/source/tests/serial_test/source/main.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/tests/serial_test/source/serial_test.cpp b/source/tests/serial_test/source/serial_test.cpp index c2216a5b8c..921a417bb3 100644 --- a/source/tests/serial_test/source/serial_test.cpp +++ b/source/tests/serial_test/source/serial_test.cpp @@ -2,7 +2,7 @@ * Reflect Library by Parra Studios * A library for provide reflection and metadata representation. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading.h b/source/threading/include/threading/threading.h index f79566a1b2..f0b7114816 100644 --- a/source/threading/include/threading/threading.h +++ b/source/threading/include/threading/threading.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading_atomic.h b/source/threading/include/threading/threading_atomic.h index a2b870d3ae..994ac9757c 100644 --- a/source/threading/include/threading/threading_atomic.h +++ b/source/threading/include/threading/threading_atomic.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading_atomic_ref_count.h b/source/threading/include/threading/threading_atomic_ref_count.h index 9e152bb0ab..165ef565c9 100644 --- a/source/threading/include/threading/threading_atomic_ref_count.h +++ b/source/threading/include/threading/threading_atomic_ref_count.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading_atomic_win32.h b/source/threading/include/threading/threading_atomic_win32.h index 0686f9a005..00c2055aa5 100644 --- a/source/threading/include/threading/threading_atomic_win32.h +++ b/source/threading/include/threading/threading_atomic_win32.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading_mutex.h b/source/threading/include/threading/threading_mutex.h index b8762b25c2..c9b346c3c8 100644 --- a/source/threading/include/threading/threading_mutex.h +++ b/source/threading/include/threading/threading_mutex.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/include/threading/threading_thread_id.h b/source/threading/include/threading/threading_thread_id.h index 1545e0faa6..af111a4fe0 100644 --- a/source/threading/include/threading/threading_thread_id.h +++ b/source/threading/include/threading/threading_thread_id.h @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/source/threading.c b/source/threading/source/threading.c index 0d82cd3055..2d795819f0 100644 --- a/source/threading/source/threading.c +++ b/source/threading/source/threading.c @@ -2,7 +2,7 @@ * Thrading Library by Parra Studios * A threading library providing utilities for lock-free data structures and more. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *threading_print_info(void) { static const char threading_info[] = "Threading Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef ADT_STATIC_DEFINE "Compiled as static library type" diff --git a/source/threading/source/threading_mutex_macos.c b/source/threading/source/threading_mutex_macos.c index dbcdd2218c..ed47663215 100644 --- a/source/threading/source/threading_mutex_macos.c +++ b/source/threading/source/threading_mutex_macos.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/source/threading_mutex_pthread.c b/source/threading/source/threading_mutex_pthread.c index 3536387eb5..4fc161d347 100644 --- a/source/threading/source/threading_mutex_pthread.c +++ b/source/threading/source/threading_mutex_pthread.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/source/threading_mutex_win32.c b/source/threading/source/threading_mutex_win32.c index 19cdef9feb..aefdcfb1e1 100644 --- a/source/threading/source/threading_mutex_win32.c +++ b/source/threading/source/threading_mutex_win32.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/threading/source/threading_thread_id.c b/source/threading/source/threading_thread_id.c index e3fa8030bd..0edf1db792 100644 --- a/source/threading/source/threading_thread_id.c +++ b/source/threading/source/threading_thread_id.c @@ -2,7 +2,7 @@ * Abstract Data Type Library by Parra Studios * A abstract data type library providing generic containers. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/version/include/version/version.h b/source/version/include/version/version.h index 9c0dbcd3d2..eae5523e89 100644 --- a/source/version/include/version/version.h +++ b/source/version/include/version/version.h @@ -2,7 +2,7 @@ * CMake Versioning Utility by Parra Studios * A template for generating versioning utilities. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/version/include/version/version.h.in b/source/version/include/version/version.h.in index 79a37cfd0f..69341f7b5b 100644 --- a/source/version/include/version/version.h.in +++ b/source/version/include/version/version.h.in @@ -2,7 +2,7 @@ * CMake Versioning Utility by Parra Studios * A template for generating versioning utilities. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/source/version/source/version.c b/source/version/source/version.c index 3dca248314..95cec396c5 100644 --- a/source/version/source/version.c +++ b/source/version/source/version.c @@ -2,7 +2,7 @@ * CMake Versioning Utility by Parra Studios * A template for generating versioning utilities. * - * Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ const char *version_print_info(void) { static const char version_info[] = "Version Library " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia \n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" #ifdef ADT_STATIC_DEFINE "Compiled as static library type" diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index ee1eaa9431..fed409c5e2 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/deps/Dockerfile b/tools/deps/Dockerfile index aa4ba69fe0..342bef8de3 100644 --- a/tools/deps/Dockerfile +++ b/tools/deps/Dockerfile @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 022c4703a9..9f5805944d 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-build.ps1 b/tools/metacall-build.ps1 index 483caa2ed6..ec95a2dd85 100755 --- a/tools/metacall-build.ps1 +++ b/tools/metacall-build.ps1 @@ -2,7 +2,7 @@ # MetaCall Build PowerShell Script by Parra Studios # Build and install powershell script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index d2074c1afb..74826e22f2 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -4,7 +4,7 @@ # MetaCall Build Shell Script by Parra Studios # Build and install shell script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-configure.ps1 b/tools/metacall-configure.ps1 index bcfaf74cfc..ea3928e666 100755 --- a/tools/metacall-configure.ps1 +++ b/tools/metacall-configure.ps1 @@ -2,7 +2,7 @@ # MetaCall Build PowerShell Script by Parra Studios # Build and install powershell script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 206bc1e475..0360f472fb 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -4,7 +4,7 @@ # MetaCall Build Shell Script by Parra Studios # Build and install shell script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index dd21915200..8d60574a72 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -2,7 +2,7 @@ # MetaCall Build PowerShell Script by Parra Studios # Build and install powershell script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 28c9a69342..5735bc28a7 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -4,7 +4,7 @@ # MetaCall Configuration Environment Shell Script by Parra Studios # Configure and install MetaCall environment script utility. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-license.sh b/tools/metacall-license.sh index 31c82f7b92..2be232899b 100755 --- a/tools/metacall-license.sh +++ b/tools/metacall-license.sh @@ -4,7 +4,7 @@ # MetaCall License Bash Script by Parra Studios # License bash script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ find "$EXEC_PATH" -type f \ -exec sh -c ' \ # Copyright - COPYRIGHT="Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia $" + COPYRIGHT="Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia $" # License LICENSE=$(cat <<-END diff --git a/tools/metacall-runtime.sh b/tools/metacall-runtime.sh index aad2512430..aea5bab164 100755 --- a/tools/metacall-runtime.sh +++ b/tools/metacall-runtime.sh @@ -4,7 +4,7 @@ # MetaCall Configuration Environment Shell Script by Parra Studios # Configure and install MetaCall environment script utility. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/metacall-sanitizer.sh b/tools/metacall-sanitizer.sh index 81ca40a4a1..49677c7344 100755 --- a/tools/metacall-sanitizer.sh +++ b/tools/metacall-sanitizer.sh @@ -4,7 +4,7 @@ # MetaCall Sanitizer Bash Script by Parra Studios # Install, build and sanitizer test bash script utility for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tools/runtime/Dockerfile b/tools/runtime/Dockerfile index 355e48397d..1276b7e11c 100644 --- a/tools/runtime/Dockerfile +++ b/tools/runtime/Dockerfile @@ -2,7 +2,7 @@ # MetaCall Library by Parra Studios # Docker image infrastructure for MetaCall. # -# Copyright (C) 2016 - 2024 Vicente Eduardo Ferrer Garcia +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 830bb3b637c90fc7f5d8f77336f00cb51d90bdde Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Mar 2025 18:26:59 +0100 Subject: [PATCH 079/364] Extended dynlink for getting symbols of the executable. --- source/dynlink/include/dynlink/dynlink.h | 24 ++++ .../dynlink/include/dynlink/dynlink_flags.h | 2 + source/dynlink/source/dynlink.c | 40 +++++- source/dynlink/source/dynlink_impl_beos.c | 36 +++-- source/dynlink/source/dynlink_impl_macos.c | 135 ++++++++++++------ source/dynlink/source/dynlink_impl_unix.c | 29 ++-- source/dynlink/source/dynlink_impl_win32.c | 26 +++- .../dynlink_test/source/dynlink_test.cpp | 37 ++++- 8 files changed, 260 insertions(+), 69 deletions(-) diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index 28080638ac..57bea7ab54 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -78,6 +78,18 @@ DYNLINK_API dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_f */ DYNLINK_API dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags); +/** +* @brief +* Get the reference of the current process +* +* @param[in] flags +* Dynamic linking flags +* +* @return +* A handle to the current process +*/ +DYNLINK_API dynlink dynlink_load_self(dynlink_flags flags); + /** * @brief * Retreive the name of the dynamically linked shared object @@ -114,6 +126,18 @@ DYNLINK_API dynlink_name dynlink_get_name_impl(dynlink handle); */ DYNLINK_API dynlink_flags dynlink_get_flags(dynlink handle); +/** +* @brief +* Retreive the internal representation of the dynamically linked shared object +* +* @param[in] handle +* Handle of dynamically linked shared object +* +* @return +* The implementation dependant handle representing the dynamically linked shared object +*/ +DYNLINK_API dynlink_impl dynlink_get_impl(dynlink handle); + /** * @brief * Get a symbol address of dynamically linked shared object by name diff --git a/source/dynlink/include/dynlink/dynlink_flags.h b/source/dynlink/include/dynlink/dynlink_flags.h index 2f64619e76..f72708a27e 100644 --- a/source/dynlink/include/dynlink/dynlink_flags.h +++ b/source/dynlink/include/dynlink/dynlink_flags.h @@ -36,6 +36,8 @@ extern "C" { #define DYNLINK_FLAGS_BIND_LOCAL (0x01 << 0x02) /**< Private visibility bind flag */ #define DYNLINK_FLAGS_BIND_GLOBAL (0x01 << 0x03) /**< Public visibility bind flag */ +#define DYNLINK_FLAGS_BIND_SELF (0x01 << 0x10) /**< Private flag for when loading the current process */ + /* -- Macros -- */ /** diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index 16266c1639..57a70b2388 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -74,7 +75,7 @@ dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) strncpy(handle->name_impl, name_impl, strnlen(name_impl, PORTABILITY_PATH_SIZE) + 1); } - handle->flags = flags; + DYNLINK_FLAGS_SET(handle->flags, flags); handle->impl = dynlink_impl_load(handle); @@ -101,7 +102,7 @@ dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) strncpy(handle->name_impl, path, strnlen(path, PORTABILITY_PATH_SIZE) + 1); - handle->flags = flags; + DYNLINK_FLAGS_SET(handle->flags, flags); handle->impl = dynlink_impl_load(handle); @@ -114,6 +115,31 @@ dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) return handle; } +dynlink dynlink_load_self(dynlink_flags flags) +{ + portability_executable_path_length path_length; + dynlink handle = malloc(sizeof(struct dynlink_type)); + + if (handle == NULL) + { + return NULL; + } + + portability_executable_path(handle->name_impl, &path_length); + portability_path_get_name(handle->name_impl, path_length + 1, handle->name, PORTABILITY_PATH_SIZE); + DYNLINK_FLAGS_SET(handle->flags, flags); + DYNLINK_FLAGS_ADD(handle->flags, DYNLINK_FLAGS_BIND_SELF); + handle->impl = dynlink_impl_load(handle); + + if (handle->impl == NULL) + { + free(handle); + return NULL; + } + + return handle; +} + dynlink_name dynlink_get_name(dynlink handle) { if (handle != NULL) @@ -144,6 +170,16 @@ dynlink_flags dynlink_get_flags(dynlink handle) return 0; } +dynlink_impl dynlink_get_impl(dynlink handle) +{ + if (handle != NULL) + { + return handle->impl; + } + + return NULL; +} + int dynlink_symbol(dynlink handle, dynlink_symbol_name symbol_name, dynlink_symbol_addr *symbol_address) { if (handle != NULL && handle->impl != NULL && symbol_name != NULL && symbol_address != NULL) diff --git a/source/dynlink/source/dynlink_impl_beos.c b/source/dynlink/source/dynlink_impl_beos.c index 7f9adbbae2..6a5e225f11 100644 --- a/source/dynlink/source/dynlink_impl_beos.c +++ b/source/dynlink/source/dynlink_impl_beos.c @@ -52,23 +52,33 @@ void dynlink_impl_interface_get_name_beos(dynlink_name name, dynlink_name_impl n dynlink_impl dynlink_impl_interface_load_beos(dynlink handle) { dynlink_flags flags = dynlink_get_flags(handle); + image_id impl = 0; - int flags_impl; - - image_id impl; + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + image_info info; + int32 cookie = 0; - DYNLINK_FLAGS_SET(flags_impl, 0); + if (get_next_image_info(0, &cookie, &info) != B_OK) + { + log_write("metacall", LOG_LEVEL_ERROR, "DynLink error: failed to load BeOS/Haiku image add-on on current executable"); + return NULL; + } - impl = load_add_on(dynlink_get_name_impl(handle)); + impl = load_add_on(info.name); + } + else + { + impl = load_add_on(dynlink_get_name_impl(handle)); + } if (impl < B_NO_ERROR) { - return (dynlink_impl)impl; + log_write("metacall", LOG_LEVEL_ERROR, "DynLink error: failed to load BeOS/Haiku image add-on with error code %d", (int)impl); + return NULL; } - log_write("metacall", LOG_LEVEL_ERROR, "DynLink error: failed to load BeOS/Haiku image add-on"); - - return NULL; + return (dynlink_impl)impl; } int dynlink_impl_interface_symbol_beos(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) @@ -92,8 +102,16 @@ int dynlink_impl_interface_symbol_beos(dynlink handle, dynlink_impl impl, dynlin int dynlink_impl_interface_unload_beos(dynlink handle, dynlink_impl impl) { + dynlink_flags flags = dynlink_get_flags(handle); + (void)handle; + /* Skip unlink when using global handle for loading symbols of the current process */ + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + return 0; + } + #if defined(__MEMORYCHECK__) || defined(__ADDRESS_SANITIZER__) || defined(__THREAD_SANITIZER__) || defined(__MEMORY_SANITIZER__) /* Disable dlclose when running with address sanitizer in order to maintain stacktraces */ (void)impl; diff --git a/source/dynlink/source/dynlink_impl_macos.c b/source/dynlink/source/dynlink_impl_macos.c index 4cfe042092..b09c8e0785 100644 --- a/source/dynlink/source/dynlink_impl_macos.c +++ b/source/dynlink/source/dynlink_impl_macos.c @@ -32,6 +32,10 @@ #include +/* -- Member Data -- */ + +static void *dynlink_impl_global_handle_macos = NULL; + /* -- Methods -- */ const char *dynlink_impl_interface_extension_macos(void) @@ -53,65 +57,69 @@ void dynlink_impl_interface_get_name_macos(dynlink_name name, dynlink_name_impl dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) { dynlink_flags flags = dynlink_get_flags(handle); - - unsigned long flags_impl; - - NSObjectFileImage image; - NSModule impl; - const char *name = dynlink_get_name_impl(handle); - - NSObjectFileImageReturnCode ret = NSCreateObjectFileImageFromFile(name, &image); - - if (ret != NSObjectFileImageSuccess) + if (!DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) { - char *error; + unsigned long flags_impl; + NSObjectFileImage image; + const char *name = dynlink_get_name_impl(handle); + NSObjectFileImageReturnCode ret = NSCreateObjectFileImageFromFile(name, &image); - switch (ret) + if (ret != NSObjectFileImageSuccess) { - case NSObjectFileImageAccess: - if (access(name, F_OK) == 0) - { - error = "DynLink error: %s permission denied"; - } - else - { - error = "DynLink error: %s no such file or directory"; - } - case NSObjectFileImageArch: - error = "DynLink error: %s is not built for the current architecture"; - break; - case NSObjectFileImageInappropriateFile: - case NSObjectFileImageFormat: - error = "DynLink error: %s is not a loadable module"; - break; - default: - error = "DynLink error: unknown error for %s"; - break; + char *error; + + switch (ret) + { + case NSObjectFileImageAccess: + if (access(name, F_OK) == 0) + { + error = "DynLink error: %s permission denied"; + } + else + { + error = "DynLink error: %s no such file or directory"; + } + case NSObjectFileImageArch: + error = "DynLink error: %s is not built for the current architecture"; + break; + case NSObjectFileImageInappropriateFile: + case NSObjectFileImageFormat: + error = "DynLink error: %s is not a loadable module"; + break; + default: + error = "DynLink error: unknown error for %s"; + break; + } + + log_write("metacall", LOG_LEVEL_ERROR, error, name); + + return NULL; } - log_write("metacall", LOG_LEVEL_ERROR, error, name); + DYNLINK_FLAGS_SET(flags_impl, NSLINKMODULE_OPTION_RETURN_ON_ERROR); - return NULL; - } + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_LOCAL)) + { + DYNLINK_FLAGS_ADD(flags_impl, NSLINKMODULE_OPTION_PRIVATE); + } + + if (!DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_LAZY)) + { + DYNLINK_FLAGS_ADD(flags_impl, NSLINKMODULE_OPTION_BINDNOW); + } - DYNLINK_FLAGS_SET(flags_impl, NSLINKMODULE_OPTION_RETURN_ON_ERROR); + impl = NSLinkModule(image, name, flags_impl); - if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_LOCAL)) - { - DYNLINK_FLAGS_ADD(flags_impl, NSLINKMODULE_OPTION_PRIVATE); + NSDestroyObjectFileImage(image); } - - if (!DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_LAZY)) + else { - DYNLINK_FLAGS_ADD(flags_impl, NSLINKMODULE_OPTION_BINDNOW); + /* We return this for identifying the global handle when loading symbols of the current process */ + impl = (void *)(&dynlink_impl_global_handle_macos); } - impl = NSLinkModule(image, name, flags_impl); - - NSDestroyObjectFileImage(image); - if (impl == NULL) { NSLinkEditErrors link_edit_errors; @@ -132,11 +140,30 @@ dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) int dynlink_impl_interface_symbol_macos(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) { - NSSymbol symbol = NSLookupSymbolInModule(impl, name); - void *symbol_addr = NSAddressOfSymbol(symbol); + dynlink_flags flags = dynlink_get_flags(handle); + NSSymbol symbol; + void *symbol_addr; (void)handle; + /* Skip unlink when using global handle for loading symbols of the current process */ + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + /* Global context, use NSLookupAndBindSymbol */ + if (!NSIsSymbolNameDefined(name)) + { + return 1; + } + + symbol = NSLookupAndBindSymbol(name); + } + else + { + symbol = NSLookupSymbolInModule(impl, name); + } + + symbol_addr = NSAddressOfSymbol(symbol); + dynlink_symbol_cast(void *, symbol_addr, *addr); return (*addr == NULL); @@ -144,9 +171,23 @@ int dynlink_impl_interface_symbol_macos(dynlink handle, dynlink_impl impl, dynli int dynlink_impl_interface_unload_macos(dynlink handle, dynlink_impl impl) { + dynlink_flags flags = dynlink_get_flags(handle); + (void)handle; + /* Skip unlink when using global handle for loading symbols of the current process */ + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + return 0; + } + +#if defined(__MEMORYCHECK__) || defined(__ADDRESS_SANITIZER__) || defined(__THREAD_SANITIZER__) || defined(__MEMORY_SANITIZER__) + /* Disable dlclose when running with address sanitizer in order to maintain stacktraces */ + (void)impl; + return 0; +#else return NSUnLinkModule(impl, 0) == TRUE ? 0 : 1; +#endif } dynlink_impl_interface dynlink_impl_interface_singleton(void) diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index 8892797f95..0354ecce71 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -60,9 +60,7 @@ void dynlink_impl_interface_get_name_unix(dynlink_name name, dynlink_name_impl n dynlink_impl dynlink_impl_interface_load_unix(dynlink handle) { dynlink_flags flags = dynlink_get_flags(handle); - int flags_impl; - void *impl; DYNLINK_FLAGS_SET(flags_impl, 0); @@ -87,16 +85,23 @@ dynlink_impl dynlink_impl_interface_load_unix(dynlink handle) DYNLINK_FLAGS_ADD(flags_impl, RTLD_GLOBAL); } - impl = dlopen(dynlink_get_name_impl(handle), flags_impl); - - if (impl != NULL) + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) { - return (dynlink_impl)impl; + impl = dlopen(NULL, flags_impl); + } + else + { + impl = dlopen(dynlink_get_name_impl(handle), flags_impl); } - log_write("metacall", LOG_LEVEL_ERROR, "DynLink error: %s", dlerror()); + if (impl == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "DynLink error: %s", dlerror()); - return NULL; + return NULL; + } + + return (dynlink_impl)impl; } int dynlink_impl_interface_symbol_unix(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) @@ -112,8 +117,16 @@ int dynlink_impl_interface_symbol_unix(dynlink handle, dynlink_impl impl, dynlin int dynlink_impl_interface_unload_unix(dynlink handle, dynlink_impl impl) { + dynlink_flags flags = dynlink_get_flags(handle); + (void)handle; + /* Skip unlink when using global handle for loading symbols of the current process */ + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + return 0; + } + #if defined(__MEMORYCHECK__) || defined(__ADDRESS_SANITIZER__) || defined(__THREAD_SANITIZER__) || defined(__MEMORY_SANITIZER__) /* Disable dlclose when running with valgrind or sanitizers in order to maintain stacktraces */ (void)impl; diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 8009aea547..5d0af2a0e1 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -56,7 +56,17 @@ void dynlink_impl_interface_get_name_win32(dynlink_name name, dynlink_name_impl dynlink_impl dynlink_impl_interface_load_win32(dynlink handle) { - HANDLE impl = LoadLibrary(dynlink_get_name_impl(handle)); + HMODULE impl; + dynlink_flags flags = dynlink_get_flags(handle); + + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + impl = GetModuleHandle(NULL); + } + else + { + impl = LoadLibrary(dynlink_get_name_impl(handle)); + } if (impl == NULL) { @@ -89,9 +99,23 @@ int dynlink_impl_interface_symbol_win32(dynlink handle, dynlink_impl impl, dynli int dynlink_impl_interface_unload_win32(dynlink handle, dynlink_impl impl) { + dynlink_flags flags = dynlink_get_flags(handle); + (void)handle; + /* Skip unlink when using global handle for loading symbols of the current process */ + if (DYNLINK_FLAGS_CHECK(flags, DYNLINK_FLAGS_BIND_SELF)) + { + return 0; + } + +#if defined(__MEMORYCHECK__) || defined(__ADDRESS_SANITIZER__) || defined(__THREAD_SANITIZER__) || defined(__MEMORY_SANITIZER__) + /* Disable dlclose when running with address sanitizer in order to maintain stacktraces */ + (void)impl; + return 0; +#else return (FreeLibrary(impl) == FALSE); +#endif } dynlink_impl_interface dynlink_impl_interface_singleton(void) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index ed6aec9979..ae8813715b 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -35,6 +35,19 @@ class dynlink_test : public testing::Test protected: }; +#ifdef _WIN32 + #define EXPORT_SYMBOL __declspec(dllexport) +#else + #define EXPORT_SYMBOL __attribute__((visibility("default"))) +#endif + +extern "C" EXPORT_SYMBOL int function_from_current_executable(void) +{ + log_write("metacall", LOG_LEVEL_INFO, "function_from_current_executable"); + + return 48; +} + TEST_F(dynlink_test, DefaultConstructor) { EXPECT_EQ((int)0, (int)log_configure("metacall", @@ -47,6 +60,7 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object extension: %s", dynlink_extension()); + /* Test library loading */ { #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) const char library_name[] = "mock_loaderd"; @@ -60,13 +74,13 @@ TEST_F(dynlink_test, DefaultConstructor) environment_variable_path_destroy(path); - EXPECT_NE(handle, (dynlink)NULL); + ASSERT_NE(handle, (dynlink)NULL); log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name_impl(handle)); if (handle != NULL) { - static dynlink_symbol_addr mock_loader_print_info_addr; + dynlink_symbol_addr mock_loader_print_info_addr; EXPECT_EQ((int)0, dynlink_symbol(handle, "mock_loader_print_info", &mock_loader_print_info_addr)); @@ -89,4 +103,23 @@ TEST_F(dynlink_test, DefaultConstructor) dynlink_unload(handle); } } + + /* Test loading symbols from current process */ + { + dynlink proc = dynlink_load_self(DYNLINK_FLAGS_BIND_GLOBAL | DYNLINK_FLAGS_BIND_LAZY); + + ASSERT_NE((dynlink)proc, (dynlink)(NULL)); + + dynlink_symbol_addr addr; + + EXPECT_EQ((int)0, dynlink_symbol(proc, "function_from_current_executable", &addr)); + + ASSERT_NE((dynlink)proc, (dynlink)(NULL)); + + int (*fn_ptr)(void) = (int (*)(void))addr; + + EXPECT_EQ((int)48, fn_ptr()); + + dynlink_unload(proc); /* Should do nothing except by freeing the handle */ + } } From a50b5a98cb84ad679a0dc97d5b941961638cc044 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 25 Mar 2025 21:37:04 +0100 Subject: [PATCH 080/364] Add base of plthook. --- .github/workflows/benchmark.yml | 2 - .github/workflows/macos-test.yml | 4 +- .github/workflows/windows-test.yml | 2 +- NOTICE | 10 +- docker-compose.test.yml | 2 +- docker-compose.yml | 2 +- docs/README.md | 8 +- source/detour/include/detour/detour.h | 90 +++++++++-- .../detour/include/detour/detour_interface.h | 13 +- source/detour/source/detour.c | 113 +++++++++---- source/detours/CMakeLists.txt | 4 +- .../funchook_detour/funchook_detour_impl.h | 92 ----------- .../funchook_detour/source/funchook_detour.c | 45 ------ .../source/funchook_detour_impl.c | 78 --------- .../CMakeLists.txt | 83 +++------- .../include/plthook_detour/plthook_detour.h} | 12 +- .../plthook_detour/plthook_detour_impl.h | 151 ++++++++++++++++++ .../plthook_detour/source/plthook_detour.c | 48 ++++++ .../source/plthook_detour_impl.c | 122 ++++++++++++++ source/dynlink/source/dynlink_impl_unix.c | 3 + source/metacall/source/metacall.c | 2 +- source/tests/detour_test/CMakeLists.txt | 10 +- .../tests/detour_test/source/detour_test.cpp | 31 ++-- .../tests/metacall_fork_test/CMakeLists.txt | 2 +- tools/metacall-environment.ps1 | 4 - tools/metacall-environment.sh | 15 -- tools/metacall-sanitizer.sh | 2 +- 27 files changed, 567 insertions(+), 383 deletions(-) delete mode 100644 source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h delete mode 100644 source/detours/funchook_detour/source/funchook_detour.c delete mode 100644 source/detours/funchook_detour/source/funchook_detour_impl.c rename source/detours/{funchook_detour => plthook_detour}/CMakeLists.txt (50%) rename source/detours/{funchook_detour/include/funchook_detour/funchook_detour.h => plthook_detour/include/plthook_detour/plthook_detour.h} (80%) create mode 100644 source/detours/plthook_detour/include/plthook_detour/plthook_detour_impl.h create mode 100644 source/detours/plthook_detour/source/plthook_detour.c create mode 100644 source/detours/plthook_detour/source/plthook_detour_impl.c diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 33349ce4d7..928da375a4 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -56,12 +56,10 @@ jobs: - name: Build working-directory: ./build - # TODO: Remove the disable option for fork safe once funchook problem is solved run: | if [ "$(uname)" == "Darwin" ]; then . .env fi - cmake -DOPTION_FORK_SAFE=OFF .. bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS env: METACALL_BUILD_OPTIONS: release benchmarks diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 64a7687572..c98f66f098 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -77,7 +77,7 @@ jobs: - name: Set up the environment run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS env: - METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson swig pack # clangformat v8rep51 coverage - name: Configure run: | @@ -89,10 +89,8 @@ jobs: - name: Build working-directory: ./build - # TODO: Remove the disable option for fork safe once funchook problem is solved run: | . .env - cmake -DOPTION_FORK_SAFE=OFF .. bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS env: METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index c7af6e0eed..c1a423616e 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -48,7 +48,7 @@ jobs: - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" env: - METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson funchook swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson swig pack # clangformat v8rep51 coverage - name: Configure run: | diff --git a/NOTICE b/NOTICE index 64d3172e01..e584ab4a74 100644 --- a/NOTICE +++ b/NOTICE @@ -19,7 +19,7 @@ All external code and licenses used by **METACALL** are always wrapped into plug - [2. Serials](#2-serials) - [2.1 RapidJSON](#21-rapidjson) - [3. Detours](#3-detours) - - [3.1 FuncHook](#31-funchook) + - [3.1 PLTHook](#31-fookhook) - [4. Ports](#4-ports) - [4.1 Swig](#41-swig) @@ -80,11 +80,11 @@ All external code and licenses used by **METACALL** are always wrapped into plug ## 3. Detours -### 3.1 FuncHook +### 3.1 PLTHook -| Software | License | -| :----------: | :-------------------------------------------------------------------------------------------------: | -| **FuncHook** | [GPLv2 or later with a GPL linking exception](https://github.com/kubo/funchook/blob/master/LICENSE) | +| Software | License | +| :----------: | :------------------------------------------------------------------------------------------: | +| **PLTHook** | [2-clause BSD-style license](https://github.com/metacall/plthook?tab=readme-ov-file#license) | ## 4. Ports diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 5dadee3cb7..0834f67a0d 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -25,7 +25,7 @@ services: build: args: METACALL_BUILD_TYPE: ${METACALL_BUILD_TYPE} - METACALL_INSTALL_OPTIONS: base python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust rapidjson funchook swig pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 + METACALL_INSTALL_OPTIONS: base python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust rapidjson swig pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 dev: image: metacall/core:dev build: diff --git a/docker-compose.yml b/docker-compose.yml index 38e167b446..ff548ba2a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,7 @@ services: METACALL_PATH: $METACALL_PATH METACALL_TOOLS_PATH: $METACALL_PATH/tools METACALL_BUILD_TYPE: $METACALL_BUILD_TYPE - METACALL_INSTALL_OPTIONS: base python ruby nodejs typescript file rpc rapidjson funchook swig pack backtrace # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python ruby nodejs typescript file rpc rapidjson swig pack backtrace # clangformat v8rep51 coverage environment: DEBIAN_FRONTEND: noninteractive # Work around https://github.com/dotnet/cli/issues/1582 until Docker releases a diff --git a/docs/README.md b/docs/README.md index 4465697880..3c348b9f8a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -66,7 +66,7 @@ Use the [installer](https://github.com/metacall/install) and try [some examples] - [5.3.2.1 MetaCall](#5321-metacall) - [5.3.2.2 RapidJSON](#5322-rapidjson) - [5.3.3 Detours](#533-detours) - - [5.3.3.1 FuncHook](#5331-funchook) + - [5.3.3.1 PLTHook](#5331-plthook) - [5.4 Ports](#54-ports) - [5.5 Serialization](#55-serialization) - [5.6 Memory Layout](#56-memory-layout) @@ -251,7 +251,7 @@ The environment variables are optional, in case you want to modify default paths - [`detours`](/source/detours) implement the [`detour`](/source/detour) interface by using a plugin architecture. The current list of available detour plugins is the following one. - - [`funchook_detour`](/source/detours/funchook_detour) implemented by means of FuncHook library. + - [`plthook_detour`](/source/detours/plthook_detour) implemented by means of PLTHook library. - [`dynlink`](/source/dynlink) implements a cross-platform method to dynamically load libraries. It is used to dynamically load plugins into **METACALL**. @@ -499,7 +499,7 @@ A loader must implement it to be considered a valid loader. #### 5.3.3 Detours -##### 5.3.3.1 FuncHook +##### 5.3.3.1 PLTHook ### 5.4 Ports @@ -666,7 +666,7 @@ It is possible to enable or disable concrete loaders, script, ports, serials or | **OPTION*BUILD_LOADERS*** | `C` `JS` `CS` `MOCK` `PY` `JSM` `NODE` `RB` `FILE` | | **OPTION*BUILD_SCRIPTS*** | `C` `CS` `JS` `NODE` `PY` `RB` `JAVA` | | **OPTION*BUILD_SERIALS*** | `METACALL` `RAPID_JSON` | -| **OPTION*BUILD_DETOURS*** | `FUNCHOOK` | +| **OPTION*BUILD_DETOURS*** | `PLTHOOK` | | **OPTION*BUILD_PORTS*** | `CS` `CXX` `D` `GO` `JAVA` `JS` `LUA` `NODE` `PHP` `PL` `PY` `R` `RB` | To format the entire C/C++ codebase use: diff --git a/source/detour/include/detour/detour.h b/source/detour/include/detour/detour.h index fca7d3ee16..fd0cc20a10 100644 --- a/source/detour/include/detour/detour.h +++ b/source/detour/include/detour/detour.h @@ -40,7 +40,7 @@ DETOUR_API int detour_initialize(void); * Create detour by @name * * @param[in] name -* Plugin will be used to detourize and detourize +* Plugin will be used for hooking * * @return * Pointer to detour on correct initialization, null otherwise @@ -63,35 +63,77 @@ DETOUR_API const char *detour_name(detour d); /** * @brief -* Get trampoline of the detour +* Initialize the detour of a library from @path * -* @param[in] handle -* Reference to the detour handle +* @param[in] d +* Reference to the detour +* +* @param[in] path +* String to the path or name of the library, in case of NULL, the current process will be used * * @return -* Pointer to the trampoline function +* Pointer to the detour handle * */ -DETOUR_API void (*detour_trampoline(detour_handle handle))(void); +DETOUR_API detour_handle detour_load_file(detour d, const char *path); /** * @brief -* Install detour from @target to @hook +* Initialize the detour of a library from @library dynlink handle * * @param[in] d * Reference to the detour * -* @param[in] target -* Reference to the function to be hooked +* @param[in] library +* Pointer to the library already opened by dynlink +* +* @return +* Pointer to the detour handle +* +*/ +DETOUR_API detour_handle detour_load_handle(detour d, dynlink library); + +/** +* @brief +* Initialize the detour of a library from @address, this function pointer +* must be a pointer to a function of the library that we want to hook +* +* @param[in] d +* Reference to the detour * -* @param[in] hook -* Reference to the function will be called instead of @target +* @param[in] address +* Pointer to a function of the library we want to hook * * @return * Pointer to the detour handle * */ -DETOUR_API detour_handle detour_install(detour d, void (*target)(void), void (*hook)(void)); +DETOUR_API detour_handle detour_load_address(detour d, void (*address)(void)); + +/** +* @brief +* Iterate all symbols of the library already opened +* +* @param[in] d +* Reference to the detour +* +* @param[in] handle +* Pointer to the detour hook implementation +* +* @param[out] position +* Pointer to the current index of the enumeration +* +* @param[out] name +* Pointer to the function name in string form +* +* @param[out] address +* Pointer to the pointer of the function pointer of the function to be hooked +* +* @return +* Return zero on success, different from zero otherwise +* +*/ +DETOUR_API int detour_enumerate(detour d, detour_handle handle, unsigned int *position, const char **name, void (***address)(void)); /** * @brief @@ -103,11 +145,33 @@ DETOUR_API detour_handle detour_install(detour d, void (*target)(void), void (*h * @param[in] handle * Reference to the detour handle * +* @param[in] function_name +* Function name to be hooked, it must belong to the library +* +* @param[in] function_addr +* Function pointer to the function that will replace the original function from the library +* +* @param[out] function_trampoline +* Function pointer to the original function from the library that will be replaced +* * @return * Return zero if success, different from zero otherwise * */ -DETOUR_API int detour_uninstall(detour d, detour_handle handle); +int detour_replace(detour d, detour_handle handle, const char *function_name, void (*function_addr)(void), void (**function_trampoline)(void)); + +/** +* @brief +* Destroy detour handle previously loaded by detour_load_* functions +* +* @param[in] d +* Reference to the detour +* +* @param[in] handle +* Reference to the detour handle +* +*/ +void detour_unload(detour d, detour_handle handle); /** * @brief diff --git a/source/detour/include/detour/detour_interface.h b/source/detour/include/detour/detour_interface.h index 5207622bac..d4ac5b5e81 100644 --- a/source/detour/include/detour/detour_interface.h +++ b/source/detour/include/detour/detour_interface.h @@ -25,6 +25,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -42,10 +44,13 @@ typedef struct detour_interface_type *detour_interface; struct detour_interface_type { - detour_impl_handle (*initialize)(void); - int (*install)(detour_impl_handle, void (**)(void), void (*)(void)); - int (*uninstall)(detour_impl_handle); - int (*destroy)(detour_impl_handle); + int (*initialize_file)(detour_impl_handle *, const char *); + int (*initialize_handle)(detour_impl_handle *, dynlink); + int (*initialize_address)(detour_impl_handle *, void (*)(void)); + int (*enumerate)(detour_impl_handle, unsigned int *, const char **, void ***); + int (*replace)(detour_impl_handle, const char *, void (*)(void), void **); + const char *(*error)(detour_impl_handle); + void (*destroy)(detour_impl_handle); }; #ifdef __cplusplus diff --git a/source/detour/source/detour.c b/source/detour/source/detour.c index 9da330372a..58c81e8922 100644 --- a/source/detour/source/detour.c +++ b/source/detour/source/detour.c @@ -34,7 +34,11 @@ static plugin_manager_declare(detour_manager); struct detour_handle_type { - void (*target)(void); + /* TODO: Implement hash map for holding the symbol table? */ + /* TODO: Optimize the replace process by exposing the internal replace function + * and store all the symbols in the hash table then iterate and replace at the + * same time, so the functions are accessed in O(1) instead of O(n) + */ detour_impl_handle impl; }; @@ -65,37 +69,59 @@ const char *detour_name(detour d) return plugin_name(d); } -void (*detour_trampoline(detour_handle handle))(void) +detour_handle detour_load_file(detour d, const char *path) { + detour_handle handle; + + if (d == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load arguments"); + + return NULL; + } + + handle = malloc(sizeof(struct detour_handle_type)); + if (handle == NULL) { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load handle allocation"); + + return NULL; + } + + if (detour_iface(d)->initialize_file(&handle->impl, path) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle initialization"); + + free(handle); + return NULL; } - return handle->target; + return handle; } -detour_handle detour_install(detour d, void (*target)(void), void (*hook)(void)) +detour_handle detour_load_handle(detour d, dynlink library) { - if (d == NULL || target == NULL || hook == NULL) + detour_handle handle; + + if (d == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour install arguments"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load arguments"); return NULL; } - detour_handle handle = malloc(sizeof(struct detour_handle_type)); + handle = malloc(sizeof(struct detour_handle_type)); if (handle == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour install handle allocation"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load handle allocation"); return NULL; } - handle->impl = detour_iface(d)->initialize(); - - if (handle->impl == NULL) + if (detour_iface(d)->initialize_handle(&handle->impl, library) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle initialization"); @@ -104,55 +130,74 @@ detour_handle detour_install(detour d, void (*target)(void), void (*hook)(void)) return NULL; } - void (**target_ptr)(void) = ⌖ + return handle; +} + +detour_handle detour_load_address(detour d, void (*address)(void)) +{ + detour_handle handle; + + if (d == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load arguments"); + + return NULL; + } + + handle = malloc(sizeof(struct detour_handle_type)); - if (detour_iface(d)->install(handle->impl, target_ptr, hook) != 0) + if (handle == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle installation"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour load handle allocation"); + + return NULL; + } - if (detour_iface(d)->destroy(handle->impl) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle destruction"); - } + if (detour_iface(d)->initialize_address(&handle->impl, address) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle initialization"); free(handle); return NULL; } - handle->target = *target_ptr; - return handle; } -int detour_uninstall(detour d, detour_handle handle) +int detour_enumerate(detour d, detour_handle handle, unsigned int *position, const char **name, void (***address)(void)) { - int result = 0; - - if (d == NULL || handle == NULL) + if (d == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid uninstall arguments"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour enumerate arguments"); return 1; } - result |= detour_iface(d)->uninstall(handle->impl); + return detour_iface(d)->enumerate(handle, position, name, (void ***)address); +} - if (result != 0) +int detour_replace(detour d, detour_handle handle, const char *function_name, void (*function_addr)(void), void (**function_trampoline)(void)) +{ + if (d == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle uninstallation"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour replace arguments"); + + return 1; } - result |= detour_iface(d)->destroy(handle->impl); + return detour_iface(d)->replace(handle, function_name, function_addr, (void **)function_trampoline); +} - if (result != 0) +void detour_unload(detour d, detour_handle handle) +{ + if (d == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour implementation handle destruction"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour replace arguments"); + return; } - free(handle); - - return result; + detour_iface(d)->destroy(handle); } int detour_clear(detour d) diff --git a/source/detours/CMakeLists.txt b/source/detours/CMakeLists.txt index c1f851b977..1a3c510302 100644 --- a/source/detours/CMakeLists.txt +++ b/source/detours/CMakeLists.txt @@ -4,7 +4,7 @@ if(NOT OPTION_BUILD_DETOURS) endif() # Detour options -option(OPTION_BUILD_DETOURS_FUNCHOOK "FuncHook library detour." ON) +option(OPTION_BUILD_DETOURS_PLTHOOK "PLTHook library detour." ON) # Detour packages -add_subdirectory(funchook_detour) # FuncHook library +add_subdirectory(plthook_detour) # PLTHook library diff --git a/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h b/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h deleted file mode 100644 index 37cb640cdf..0000000000 --- a/source/detours/funchook_detour/include/funchook_detour/funchook_detour_impl.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Detour Library by Parra Studios - * A cross-platform library providing detours, function hooks and trampolines. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef FUNCHOOK_DETOUR_IMPL_H -#define FUNCHOOK_DETOUR_IMPL_H 1 - -/* -- Headers -- */ - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Methods -- */ - -/** -* @brief -* Initialize FuncHook detour hook implementation -* -* @return -* Returns pointer to detour hook implementation on success, null pointer otherwise -* -*/ -FUNCHOOK_DETOUR_API detour_impl_handle funchook_detour_impl_initialize(void); - -/** -* @brief -* Install FuncHook detour implementation -* -* @param[in] handle -* Pointer to the detour hook implementation -* -* @param[in] target -* Pointer to the function to be intercepted -* -* @param[in] hook -* Function will be called instead of target -* -* @return -* Return zero on success, different from zero otherwise -* -*/ -FUNCHOOK_DETOUR_API int funchook_detour_impl_install(detour_impl_handle handle, void (**target)(void), void (*hook)(void)); - -/** -* @brief -* Uninstall FuncHook detour implementation -* -* @param[in] handle -* Pointer to the detour hook implementation -* -* @return -* Return zero on success, different from zero otherwise -* -*/ -FUNCHOOK_DETOUR_API int funchook_detour_impl_uninstall(detour_impl_handle handle); - -/** -* @brief -* Destroy FuncHook detour implementation -* -* @return -* Returns zero on correct destruction, distinct from zero otherwise -* -*/ -FUNCHOOK_DETOUR_API int funchook_detour_impl_destroy(detour_impl_handle handle); - -#ifdef __cplusplus -} -#endif - -#endif /* FUNCHOOK_DETOUR_IMPL_H */ diff --git a/source/detours/funchook_detour/source/funchook_detour.c b/source/detours/funchook_detour/source/funchook_detour.c deleted file mode 100644 index 9a15057fa6..0000000000 --- a/source/detours/funchook_detour/source/funchook_detour.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Detour Library by Parra Studios - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * A cross-platform library providing detours, function hooks and trampolines. - * - */ - -/* -- Headers -- */ - -#include - -#include -#include - -/* -- Methods -- */ - -detour_interface funchook_detour_impl_interface_singleton(void) -{ - static struct detour_interface_type interface_instance_funchook = { - &funchook_detour_impl_initialize, - &funchook_detour_impl_install, - &funchook_detour_impl_uninstall, - &funchook_detour_impl_destroy - }; - - return &interface_instance_funchook; -} - -const char *funchook_detour_print_info(void) -{ - static const char funchook_detour_info[] = - "FuncHook Detour Plugin " METACALL_VERSION "\n" - "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" - -#ifdef FUNCHOOK_DETOUR_STATIC_DEFINE - "Compiled as static library type\n" -#else - "Compiled as shared library type\n" -#endif - - "\n"; - - return funchook_detour_info; -} diff --git a/source/detours/funchook_detour/source/funchook_detour_impl.c b/source/detours/funchook_detour/source/funchook_detour_impl.c deleted file mode 100644 index 83c25a1dc0..0000000000 --- a/source/detours/funchook_detour/source/funchook_detour_impl.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Detour Library by Parra Studios - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * A cross-platform library providing detours, function hooks and trampolines. - * - */ - -/* -- Headers -- */ - -#include - -#include - -#include - -/* -- Member Data -- */ - -union funchook_detour_impl_cast -{ - void (*hook)(void); - void *ptr; -}; - -/* -- Methods -- */ - -detour_impl_handle funchook_detour_impl_initialize(void) -{ - return (detour_impl_handle)funchook_create(); -} - -int funchook_detour_impl_install(detour_impl_handle handle, void (**target)(void), void (*hook)(void)) -{ - funchook_t *handle_impl = handle; - - if (handle_impl != NULL && target != NULL && hook != NULL) - { - union funchook_detour_impl_cast hook_cast = { hook }; - - if (funchook_prepare(handle_impl, (void **)target, hook_cast.ptr) != FUNCHOOK_ERROR_SUCCESS) - { - return 1; - } - - if (funchook_install(handle_impl, 0) != FUNCHOOK_ERROR_SUCCESS) - { - return 1; - } - - return 0; - } - - return 1; -} - -int funchook_detour_impl_uninstall(detour_impl_handle handle) -{ - funchook_t *handle_impl = handle; - - if (handle_impl != NULL) - { - return !(funchook_uninstall(handle_impl, 0) == FUNCHOOK_ERROR_SUCCESS); - } - - return 1; -} - -int funchook_detour_impl_destroy(detour_impl_handle handle) -{ - funchook_t *handle_impl = handle; - - if (handle_impl == NULL) - { - return 0; - } - - return !(funchook_destroy(handle_impl) == FUNCHOOK_ERROR_SUCCESS); -} diff --git a/source/detours/funchook_detour/CMakeLists.txt b/source/detours/plthook_detour/CMakeLists.txt similarity index 50% rename from source/detours/funchook_detour/CMakeLists.txt rename to source/detours/plthook_detour/CMakeLists.txt index ac782f31d5..a5db591c14 100644 --- a/source/detours/funchook_detour/CMakeLists.txt +++ b/source/detours/plthook_detour/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if this detour is enabled -if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) +if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_PLTHOOK) return() endif() @@ -7,66 +7,35 @@ endif() # External dependencies # -find_package(Git REQUIRED) +# PLTHook +include(FetchContent) -# Target depends name -set(target_depends funchook_detour_depends) +set(PLTHook_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/plthook") -include(ExternalProject) - -set(FUNCHOOK_VERSION 1.1.3) +FetchContent_Declare(PLTHook + GIT_REPOSITORY https://github.com/metacall/plthook.git + GIT_TAG master + SOURCE_DIR ${PLTHook_SOURCE_DIR} +) -if(WIN32) - set(FUNCHOOK_LIBRARY_SUFFIX "lib") - set(FUNCHOOK_LIBRARY_INSTALL_SUFFIX "dll") -elseif(APPLE) - set(FUNCHOOK_LIBRARY_SUFFIX "dylib") -else() - set(FUNCHOOK_LIBRARY_SUFFIX "so") -endif() +FetchContent_MakeAvailable(PLTHook) -set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") +set(PLTHook_INCLUDE_DIR "${PLTHook_SOURCE_DIR}") -if(WIN32) - set(FUNCHOOK_BUILD_TARGET "INSTALL") - set(FUNCHOOK_LIBRARY_NAME "funchook_dll.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_NAME}") - set(FUNCHOOK_LIBRARY_INSTALL_NAME "funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") - set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") +if(APPLE) + set(PLTHook_SOURCE "${PLTHook_SOURCE_DIR}/plthook_osx.c") +elseif(WIN32 OR MINGW) + set(PLTHook_SOURCE "${PLTHook_SOURCE_DIR}/plthook_win32.c") else() - set(FUNCHOOK_BUILD_TARGET "install") - set(FUNCHOOK_LIBRARY_NAME "libfunchook.${FUNCHOOK_LIBRARY_SUFFIX}") - set(FUNCHOOK_LIBRARY "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_NAME}") - set(FUNCHOOK_LIBRARY_INSTALL_NAME "${FUNCHOOK_LIBRARY_NAME}") - set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_LIBRARY}") + set(PLTHook_SOURCE "${PLTHook_SOURCE_DIR}/plthook_elf.c") endif() -set(FUNCHOOK_INSTALL_DIR "${PROJECT_OUTPUT_DIR}") -set(FUNCHOOK_LIBRARY_INSTALL "${PROJECT_OUTPUT_DIR}/${FUNCHOOK_LIBRARY_INSTALL_NAME}") -set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") - -ExternalProject_Add(${target_depends} - PREFIX funchook - SOURCE_DIR ${FUNCHOOK_SOURCE_DIR} - INSTALL_DIR ${FUNCHOOK_INSTALL_DIR} - DOWNLOAD_COMMAND "${GIT_EXECUTABLE}" clone --single-branch --branch v${FUNCHOOK_VERSION} --recursive https://github.com/kubo/funchook.git "${FUNCHOOK_SOURCE_DIR}" - CONFIGURE_COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_BUILD_PARALLEL_LEVEL=1 -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON -DCMAKE_INSTALL_PREFIX=${FUNCHOOK_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DFUNCHOOK_BUILD_SHARED=ON -DFUNCHOOK_BUILD_TESTS=OFF -DFUNCHOOK_BUILD_STATIC=OFF . - BUILD_COMMAND ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=1 ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy "${FUNCHOOK_LIBRARY_INSTALL_DIR}" "${FUNCHOOK_INSTALL_DIR}" - UPDATE_COMMAND "" - BUILD_IN_SOURCE ON - LOG_DOWNLOAD ON - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_INSTALL ON -) - # # Library name and options # # Target name -set(target funchook_detour) +set(target plthook_detour) # Exit here if required dependencies are not met message(STATUS "Detour ${target}") @@ -96,13 +65,14 @@ set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") set(headers - ${include_path}/funchook_detour.h - ${include_path}/funchook_detour_impl.h + ${include_path}/plthook_detour.h + ${include_path}/plthook_detour_impl.h ) set(sources - ${source_path}/funchook_detour.c - ${source_path}/funchook_detour_impl.c + ${source_path}/plthook_detour.c + ${source_path}/plthook_detour_impl.c + ${PLTHook_SOURCE} # PLTHook Source ) # Group source files @@ -123,11 +93,6 @@ add_library(${target} MODULE ${headers} ) -# Add target dependencies -add_dependencies(${target} - ${target_depends} -) - # Create namespaced alias add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) @@ -162,7 +127,7 @@ target_include_directories(${target} ${CMAKE_CURRENT_BINARY_DIR}/include $ # MetaCall includes - ${FUNCHOOK_INCLUDE_DIR} # FuncHook includes + ${PLTHook_INCLUDE_DIR} # PLTHook includes PUBLIC ${DEFAULT_INCLUDE_DIRECTORIES} @@ -180,7 +145,6 @@ target_include_directories(${target} target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - ${FUNCHOOK_LIBRARY} # FuncHook libraries PUBLIC ${DEFAULT_LIBRARIES} @@ -234,7 +198,6 @@ target_link_options(${target} # Dependency install(FILES - ${FUNCHOOK_LIBRARY_INSTALL} DESTINATION ${INSTALL_LIB} COMPONENT runtime ) diff --git a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h b/source/detours/plthook_detour/include/plthook_detour/plthook_detour.h similarity index 80% rename from source/detours/funchook_detour/include/funchook_detour/funchook_detour.h rename to source/detours/plthook_detour/include/plthook_detour/plthook_detour.h index 98a71ea435..068ae11c6e 100644 --- a/source/detours/funchook_detour/include/funchook_detour/funchook_detour.h +++ b/source/detours/plthook_detour/include/plthook_detour/plthook_detour.h @@ -18,12 +18,12 @@ * */ -#ifndef FUNCHOOK_DETOUR_H -#define FUNCHOOK_DETOUR_H 1 +#ifndef PLTHOOK_DETOUR_H +#define PLTHOOK_DETOUR_H 1 /* -- Headers -- */ -#include +#include #include @@ -41,7 +41,7 @@ extern "C" { * Returns pointer to interface to be used by implementation * */ -FUNCHOOK_DETOUR_API detour_interface funchook_detour_impl_interface_singleton(void); +PLTHOOK_DETOUR_API detour_interface plthook_detour_impl_interface_singleton(void); /** * @brief @@ -51,10 +51,10 @@ FUNCHOOK_DETOUR_API detour_interface funchook_detour_impl_interface_singleton(vo * Static string containing module information * */ -FUNCHOOK_DETOUR_API const char *funchook_detour_print_info(void); +PLTHOOK_DETOUR_API const char *plthook_detour_print_info(void); #ifdef __cplusplus } #endif -#endif /* FUNCHOOK_DETOUR_H */ +#endif /* PLTHOOK_DETOUR_H */ diff --git a/source/detours/plthook_detour/include/plthook_detour/plthook_detour_impl.h b/source/detours/plthook_detour/include/plthook_detour/plthook_detour_impl.h new file mode 100644 index 0000000000..680cff01e0 --- /dev/null +++ b/source/detours/plthook_detour/include/plthook_detour/plthook_detour_impl.h @@ -0,0 +1,151 @@ +/* + * Detour Library by Parra Studios + * A cross-platform library providing detours, function hooks and trampolines. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PLTHOOK_DETOUR_IMPL_H +#define PLTHOOK_DETOUR_IMPL_H 1 + +/* -- Headers -- */ + +#include + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Methods -- */ + +/** +* @brief +* Initialize PLTHook detour hook implementation by file name +* +* @param[out] handle +* When success, it returns the pointer to the detour implementation, null otherwise +* +* @param[in] path +* String containing the path or name to the dynamic library to be opened +* +* @return +* Returns zero on success, different from zero otherwise +* +*/ +PLTHOOK_DETOUR_API int plthook_detour_impl_initialize_file(detour_impl_handle *handle, const char *path); + +/** +* @brief +* Initialize PLTHook detour hook implementation by already l +* +* @param[out] handle +* When success, it returns the pointer to the detour implementation, null otherwiseoaded dynamic library handle +* +* @param[in] library +* Pointer to the dynlink handle of the library +* +* @return +* Returns zero on success, different from zero otherwise +* +*/ +PLTHOOK_DETOUR_API int plthook_detour_impl_initialize_handle(detour_impl_handle *handle, dynlink library); + +/** +* @brief +* Initialize PLTHook detour hook implementation by a functio +* +* @param[out] handle +* When success, it returns the pointer to the detour implementation, null otherwisen pointer of a function belonging to a library +* +* @param[in] address +* Function pointer of a function belonging to the library to be hooked +* +* @return +* Returns zero on success, different from zero otherwise +* +*/ +PLTHOOK_DETOUR_API int plthook_detour_impl_initialize_address(detour_impl_handle *handle, void (*address)(void)); + +/** +* @brief +* Iterate all symbols of the library already opened +* +* @param[in] handle +* Pointer to the detour hook implementation +* +* @param[out] position +* Pointer to the current index of the enumeration +* +* @param[out] name +* Pointer to the function name in string form +* +* @param[out] address +* Pointer to the pointer of the function pointer of the function to be hooked +* +* @return +* Return zero on success, different from zero otherwise +* +*/ +PLTHOOK_DETOUR_API int plthook_detour_impl_enumerate(detour_impl_handle handle, unsigned int *position, const char **name, void ***address); + +/** +* @brief +* Replace function from a library already opened by name, returns the old function pointer +* +* @param[in] handle +* Pointer to the detour hook implementation +* +* @param[in] function_name +* String containing the function name to be replaced +* +* @param[in] function_addr +* Function pointer that will be used to replace the original one +* +* @param[out] function_old_addr +* Function pointer to the original function that has been replaced +* +* @return +* Return zero on success, different from zero otherwise +* +*/ +PLTHOOK_DETOUR_API int plthook_detour_impl_replace(detour_impl_handle handle, const char *function_name, void (*function_addr)(void), void **function_old_addr); + +/** +* @brief +* Error handling PLTHook detour implementation +* +* @return +* Returns string containing the information of the error +* +*/ +PLTHOOK_DETOUR_API const char *plthook_detour_impl_error(detour_impl_handle handle); + +/** +* @brief +* Destroy PLTHook detour implementation +* +*/ +PLTHOOK_DETOUR_API void plthook_detour_impl_destroy(detour_impl_handle handle); + +#ifdef __cplusplus +} +#endif + +#endif /* PLTHOOK_DETOUR_IMPL_H */ diff --git a/source/detours/plthook_detour/source/plthook_detour.c b/source/detours/plthook_detour/source/plthook_detour.c new file mode 100644 index 0000000000..b291b0b8e2 --- /dev/null +++ b/source/detours/plthook_detour/source/plthook_detour.c @@ -0,0 +1,48 @@ +/* + * Detour Library by Parra Studios + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * A cross-platform library providing detours, function hooks and trampolines. + * + */ + +/* -- Headers -- */ + +#include + +#include +#include + +/* -- Methods -- */ + +detour_interface plthook_detour_impl_interface_singleton(void) +{ + static struct detour_interface_type interface_instance_plthook = { + &plthook_detour_impl_initialize_file, + &plthook_detour_impl_initialize_handle, + &plthook_detour_impl_initialize_address, + &plthook_detour_impl_enumerate, + &plthook_detour_impl_replace, + &plthook_detour_impl_error, + &plthook_detour_impl_destroy + }; + + return &interface_instance_plthook; +} + +const char *plthook_detour_print_info(void) +{ + static const char plthook_detour_info[] = + "PLTHook Detour Plugin " METACALL_VERSION "\n" + "Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia \n" + +#ifdef PLTHOOK_DETOUR_STATIC_DEFINE + "Compiled as static library type\n" +#else + "Compiled as shared library type\n" +#endif + + "\n"; + + return plthook_detour_info; +} diff --git a/source/detours/plthook_detour/source/plthook_detour_impl.c b/source/detours/plthook_detour/source/plthook_detour_impl.c new file mode 100644 index 0000000000..33d23850d3 --- /dev/null +++ b/source/detours/plthook_detour/source/plthook_detour_impl.c @@ -0,0 +1,122 @@ +/* + * Detour Library by Parra Studios + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * A cross-platform library providing detours, function hooks and trampolines. + * + */ + +/* -- Headers -- */ + +#include + +#include + +/* -- Methods -- */ + +int plthook_detour_impl_initialize_file(detour_impl_handle *handle, const char *path) +{ + plthook_t *plthook; + int result; + + if (handle == NULL) + { + return 1; + } + + result = plthook_open(&plthook, path); + + if (result != PLTHOOK_SUCCESS) + { + *handle = NULL; + return result; + } + + *handle = (void *)plthook; + return 0; +} + +int plthook_detour_impl_initialize_handle(detour_impl_handle *handle, dynlink library) +{ + plthook_t *plthook; + int result; + + if (handle == NULL) + { + return 1; + } + + result = plthook_open_by_handle(&plthook, dynlink_get_impl(library)); + + if (result != PLTHOOK_SUCCESS) + { + *handle = NULL; + return result; + } + + *handle = (void *)plthook; + return 0; +} + +int plthook_detour_impl_initialize_address(detour_impl_handle *handle, void (*address)(void)) + +{ + plthook_t *plthook; + void *ptr; + int result; + + if (handle == NULL) + { + return 1; + } + + dynlink_symbol_uncast(address, ptr); + + result = plthook_open_by_address(&plthook, ptr); + + if (result != PLTHOOK_SUCCESS) + { + *handle = NULL; + return result; + } + + *handle = (void *)plthook; + return 0; +} + +int plthook_detour_impl_enumerate(detour_impl_handle handle, unsigned int *position, const char **name, void ***address) +{ + if (handle == NULL) + { + return 1; + } + + return plthook_enum(handle, position, name, address); +} + +int plthook_detour_impl_replace(detour_impl_handle handle, const char *function_name, void (*function_addr)(void), void **function_old_addr) +{ + void *ptr; + + if (handle == NULL) + { + return 1; + } + + dynlink_symbol_uncast(function_addr, ptr); + + return plthook_replace(handle, function_name, ptr, function_old_addr); +} + +const char *plthook_detour_impl_error(detour_impl_handle handle) +{ + /* TODO: The error should be stored in the handle, this must be modified from plthook library itself */ + (void)handle; + + return plthook_error(); +} + +void plthook_detour_impl_destroy(detour_impl_handle handle) +{ + plthook_close(handle); +} diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index 0354ecce71..df74485c1e 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -28,12 +28,15 @@ #include +/* Enable if needed for extended API */ +/* #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #ifndef __USE_GNU #define __USE_GNU #endif +*/ #include diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index dec8182d28..273120fa04 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -47,7 +47,7 @@ #define METACALL_ARGS_SIZE 0x10 #define METACALL_SERIAL "rapid_json" -#define METACALL_DETOUR "funchook" +#define METACALL_DETOUR "plthook" /* -- Type Definitions -- */ diff --git a/source/tests/detour_test/CMakeLists.txt b/source/tests/detour_test/CMakeLists.txt index 7b722beeb3..d73991ebc3 100644 --- a/source/tests/detour_test/CMakeLists.txt +++ b/source/tests/detour_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if detours are enabled -if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_FUNCHOOK) +if(NOT OPTION_BUILD_DETOURS OR NOT OPTION_BUILD_DETOURS_PLTHOOK) return() endif() @@ -134,6 +134,14 @@ add_test(NAME ${target} COMMAND $ ) +# +# Define dependencies +# + +add_dependencies(${target} + plthook_detour +) + # # Define test properties # diff --git a/source/tests/detour_test/source/detour_test.cpp b/source/tests/detour_test/source/detour_test.cpp index 6b84295fd3..029f6171c4 100644 --- a/source/tests/detour_test/source/detour_test.cpp +++ b/source/tests/detour_test/source/detour_test.cpp @@ -31,7 +31,8 @@ class detour_test : public testing::Test public: }; -static detour_handle handle; +static detour_handle handle = NULL; +static void (*trampoline)(void) = NULL; int hook_function(int x) { @@ -39,16 +40,22 @@ int hook_function(int x) log_write("metacall", LOG_LEVEL_DEBUG, "Hook function %d", x); - int (*target_function_ptr)(int) = (int (*)(int))detour_trampoline(handle); + int (*trampoline_ptr)(int) = (int (*)(int))trampoline; - int result = target_function_ptr(x + 2) + 2; + int result = trampoline_ptr(x + 2) + 2; log_write("metacall", LOG_LEVEL_DEBUG, "Hook function result %d", result); return result; } -int target_function(int x) +#ifdef _WIN32 + #define EXPORT_SYMBOL __declspec(dllexport) +#else + #define EXPORT_SYMBOL __attribute__((visibility("default"))) +#endif + +extern "C" EXPORT_SYMBOL int target_function(int x) { EXPECT_EQ((int)130, (int)x); @@ -59,7 +66,7 @@ int target_function(int x) TEST_F(detour_test, DefaultConstructor) { - static const char name[] = "funchook"; + static const char name[] = "plthook"; /* Initialize log */ EXPECT_EQ((int)0, (int)log_configure("metacall", @@ -71,23 +78,29 @@ TEST_F(detour_test, DefaultConstructor) /* Initialize detour */ EXPECT_EQ((int)0, (int)detour_initialize()); - /* Create detour funchook */ + /* Create detour plthook */ detour d = detour_create(name); - EXPECT_NE((detour)NULL, (detour)d); + ASSERT_NE((detour)NULL, (detour)d); EXPECT_EQ((int)0, (int)strcmp(name, detour_name(d))); + /* Load detour */ + handle = detour_load_file(d, NULL); + /* Install detour */ - handle = detour_install(d, (void (*)(void)) & target_function, (void (*)(void)) & hook_function); + detour_replace(d, handle, "target_function", (void (*)(void))(&hook_function), &trampoline); EXPECT_NE((detour_handle)NULL, (detour_handle)handle); + /* Old funciton must equal to the trampoline returned by replace */ + EXPECT_EQ((int (*)(int))trampoline, (int (*)(int))(&target_function)); + /* Call detour, it should call hooked function */ EXPECT_EQ((int)132, (int)target_function(128)); /* Uninstall detour */ - EXPECT_EQ((int)0, (int)detour_uninstall(d, handle)); + detour_unload(d, handle); /* Clear detour */ EXPECT_EQ((int)0, (int)detour_clear(d)); diff --git a/source/tests/metacall_fork_test/CMakeLists.txt b/source/tests/metacall_fork_test/CMakeLists.txt index 47d389592f..122637bdd4 100644 --- a/source/tests/metacall_fork_test/CMakeLists.txt +++ b/source/tests/metacall_fork_test/CMakeLists.txt @@ -128,7 +128,7 @@ add_test(NAME ${target} # add_dependencies(${target} - funchook_detour + plthook_detour ) # diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 8d60574a72..72ce3659bc 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -310,9 +310,6 @@ function Configure { if ("$var" -eq 'rapidjson') { Write-Output "rapidjson selected" } - if ("$var" -eq 'funchook') { - Write-Output "funchook selected" - } if (("$var" -eq 'v8') -or ("$var" -eq 'v8rep54')) { Write-Output "v8 selected" } @@ -387,7 +384,6 @@ function Help { Write-Output " netcore2" Write-Output " netcore5" Write-Output " rapidjson" - Write-Output " funchook" Write-Output " v8" Write-Output " v8rep51" Write-Output " v8rep54" diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 5735bc28a7..593ac4b93a 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -30,7 +30,6 @@ INSTALL_BASE=1 INSTALL_PYTHON=0 INSTALL_RUBY=0 INSTALL_RAPIDJSON=0 -INSTALL_FUNCHOOK=0 INSTALL_NETCORE=0 INSTALL_NETCORE2=0 INSTALL_NETCORE5=0 @@ -262,12 +261,6 @@ sub_rapidjson(){ fi } -# FuncHook -sub_funchook(){ - echo "configure funchook" - -} - # NetCore sub_netcore(){ echo "configure netcore" @@ -917,9 +910,6 @@ sub_install(){ if [ $INSTALL_RAPIDJSON = 1 ]; then sub_rapidjson fi - if [ $INSTALL_FUNCHOOK = 1 ]; then - sub_funchook - fi if [ $INSTALL_NETCORE = 1 ]; then sub_netcore fi @@ -1039,10 +1029,6 @@ sub_options(){ echo "rapidjson selected" INSTALL_RAPIDJSON=1 fi - if [ "$option" = 'funchook' ]; then - echo "funchook selected" - INSTALL_FUNCHOOK=1 - fi if [ "$option" = 'v8' ] || [ "$option" = 'v8rep54' ]; then echo "v8 selected" INSTALL_V8REPO=1 @@ -1149,7 +1135,6 @@ sub_help() { echo " netcore5" echo " netcore7" echo " rapidjson" - echo " funchook" echo " v8" echo " v8rep51" echo " v8rep54" diff --git a/tools/metacall-sanitizer.sh b/tools/metacall-sanitizer.sh index 49677c7344..d5f9ac5294 100755 --- a/tools/metacall-sanitizer.sh +++ b/tools/metacall-sanitizer.sh @@ -35,7 +35,7 @@ if [ "${BUILD_SANITIZER}" != "address-sanitizer" ] && [ "${BUILD_SANITIZER}" != fi # Install -"${SCRIPT_DIR}/metacall-environment.sh" base ${BUILD_LANGUAGES[@]} rapidjson funchook swig pack backtrace +"${SCRIPT_DIR}/metacall-environment.sh" base ${BUILD_LANGUAGES[@]} rapidjson swig pack backtrace # Configure and Build export NODE_PATH="/usr/lib/node_modules" From e6b92a2d028e2196ec104fe39f7ccd300bfbbe0f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 28 Mar 2025 18:03:18 +0100 Subject: [PATCH 081/364] Detour working properly, enum still failing. --- source/detour/source/detour.c | 14 ++-- .../tests/detour_test/source/detour_test.cpp | 72 ++++++++++++++----- 2 files changed, 60 insertions(+), 26 deletions(-) diff --git a/source/detour/source/detour.c b/source/detour/source/detour.c index 58c81e8922..d894a8d5ba 100644 --- a/source/detour/source/detour.c +++ b/source/detour/source/detour.c @@ -167,37 +167,37 @@ detour_handle detour_load_address(detour d, void (*address)(void)) int detour_enumerate(detour d, detour_handle handle, unsigned int *position, const char **name, void (***address)(void)) { - if (d == NULL) + if (d == NULL || handle == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour enumerate arguments"); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour replace arguments"); return 1; } - return detour_iface(d)->enumerate(handle, position, name, (void ***)address); + return detour_iface(d)->enumerate(handle->impl, position, name, (void ***)address); } int detour_replace(detour d, detour_handle handle, const char *function_name, void (*function_addr)(void), void (**function_trampoline)(void)) { - if (d == NULL) + if (d == NULL || handle == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour replace arguments"); return 1; } - return detour_iface(d)->replace(handle, function_name, function_addr, (void **)function_trampoline); + return detour_iface(d)->replace(handle->impl, function_name, function_addr, (void **)function_trampoline); } void detour_unload(detour d, detour_handle handle) { - if (d == NULL) + if (d == NULL || handle == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid detour replace arguments"); return; } - detour_iface(d)->destroy(handle); + detour_iface(d)->destroy(handle->impl); } int detour_clear(detour d) diff --git a/source/tests/detour_test/source/detour_test.cpp b/source/tests/detour_test/source/detour_test.cpp index 029f6171c4..f4009bf975 100644 --- a/source/tests/detour_test/source/detour_test.cpp +++ b/source/tests/detour_test/source/detour_test.cpp @@ -24,6 +24,8 @@ #include +#include + #include class detour_test : public testing::Test @@ -32,21 +34,31 @@ class detour_test : public testing::Test }; static detour_handle handle = NULL; -static void (*trampoline)(void) = NULL; +static const char *(*trampoline)(void) = NULL; -int hook_function(int x) +int check_detour_hook(const char *(*fp)(void)) { - EXPECT_EQ((int)128, (int)x); + static const char str_without_hook[] = "Detour Library"; + + const char *str = fp(); + + log_write("metacall", LOG_LEVEL_DEBUG, "Check: %s", str); - log_write("metacall", LOG_LEVEL_DEBUG, "Hook function %d", x); + return strncmp(str, str_without_hook, sizeof(str_without_hook) - 1); +} - int (*trampoline_ptr)(int) = (int (*)(int))trampoline; +const char *hook_function(void) +{ + static const char str_with_hook[] = "Yeet"; - int result = trampoline_ptr(x + 2) + 2; + log_write("metacall", LOG_LEVEL_DEBUG, "HOOK WORKING PROPERLY"); + log_write("metacall", LOG_LEVEL_DEBUG, "Original function: %s", trampoline()); - log_write("metacall", LOG_LEVEL_DEBUG, "Hook function result %d", result); + /* Here we check that we got the correct trampoline implementation (aka the original function) + and we can call it from inside of the body of the hook function */ + EXPECT_EQ((int)0, (int)check_detour_hook(trampoline)); - return result; + return str_with_hook; } #ifdef _WIN32 @@ -55,10 +67,8 @@ int hook_function(int x) #define EXPORT_SYMBOL __attribute__((visibility("default"))) #endif -extern "C" EXPORT_SYMBOL int target_function(int x) +extern "C" EXPORT_SYMBOL int test_exported_symbols_from_executable(int x) { - EXPECT_EQ((int)130, (int)x); - log_write("metacall", LOG_LEVEL_DEBUG, "Target function %d", x); return x; @@ -85,19 +95,43 @@ TEST_F(detour_test, DefaultConstructor) EXPECT_EQ((int)0, (int)strcmp(name, detour_name(d))); - /* Load detour */ + /* Load detour of detour library */ handle = detour_load_file(d, NULL); - /* Install detour */ - detour_replace(d, handle, "target_function", (void (*)(void))(&hook_function), &trampoline); + ASSERT_NE((detour_handle)NULL, (detour_handle)handle); + + /* Check if it can list exported symbols from executable */ + test_exported_symbols_from_executable(3); + + unsigned int position = 0; + const char *fn_name = NULL; + void (**addr)(void) = NULL; + bool found = false; + while (detour_enumerate(d, handle, &position, &fn_name, &addr) == 0) + { + log_write("metacall", LOG_LEVEL_DEBUG, "[%d] %p %s", position, *addr, fn_name); - EXPECT_NE((detour_handle)NULL, (detour_handle)handle); + if (strcmp("test_exported_symbols_from_executable", fn_name) == 0) + { + found = true; + EXPECT_EQ((void *)(*addr), (void *)(&test_exported_symbols_from_executable)); + break; + } + } + + EXPECT_EQ((bool)true, (bool)found); + + /* Install detour */ + union + { + const char *(**trampoline)(void); + void (**ptr)(void); + } cast = { &trampoline }; - /* Old funciton must equal to the trampoline returned by replace */ - EXPECT_EQ((int (*)(int))trampoline, (int (*)(int))(&target_function)); + ASSERT_EQ((int)0, detour_replace(d, handle, "detour_print_info", (void (*)(void))(&hook_function), cast.ptr)); - /* Call detour, it should call hooked function */ - EXPECT_EQ((int)132, (int)target_function(128)); + /* This must return "Yeet", so when checking the test it should return distinct from 0, then the funtion is properly hooked */ + EXPECT_NE((int)0, (int)check_detour_hook(&detour_print_info)); /* Uninstall detour */ detour_unload(d, handle); From 46f840b132215c62ee3779be86ba8dd6e2953fb4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Apr 2025 17:55:15 +0200 Subject: [PATCH 082/364] Solved metacall fork in linux. --- .../metacall/include/metacall/metacall_fork.h | 5 +- .../metacall/include/metacall/metacall_link.h | 5 +- source/metacall/source/metacall.c | 10 +-- source/metacall/source/metacall_fork.c | 73 +++++++++---------- source/metacall/source/metacall_link.c | 62 +++++++++------- source/ports/rs_port/src/bindings.rs | 4 +- .../ports/zig_port/src/metacall-bindings.zig | 2 +- .../tests/detour_test/source/detour_test.cpp | 20 +++++ 8 files changed, 97 insertions(+), 84 deletions(-) diff --git a/source/metacall/include/metacall/metacall_fork.h b/source/metacall/include/metacall/metacall_fork.h index fd9915fce7..53eb2478ea 100644 --- a/source/metacall/include/metacall/metacall_fork.h +++ b/source/metacall/include/metacall/metacall_fork.h @@ -88,11 +88,8 @@ METACALL_API void metacall_fork(metacall_pre_fork_callback_ptr pre_callback, met /** * @brief * Unregister fork detours and destroy shared memory -* -* @return -* Zero if success, different from zero otherwise */ -METACALL_API int metacall_fork_destroy(void); +METACALL_API void metacall_fork_destroy(void); #ifdef __cplusplus } diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index fc4f3a2c46..b9de5afff4 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -76,11 +76,8 @@ METACALL_API int metacall_link_unregister(const char *symbol); /** * @brief * Unregister link detours and destroy shared memory -* -* @return -* Zero if success, different from zero otherwise */ -METACALL_API int metacall_link_destroy(void); +METACALL_API void metacall_link_destroy(void); #ifdef __cplusplus } diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 273120fa04..12f2f14dc5 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -199,19 +199,13 @@ int metacall_plugin_extension_load(void) void metacall_detour_destructor(void) { /* Destroy link */ - if (metacall_link_destroy() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall link destruction"); - } + metacall_link_destroy(); /* Destroy fork */ #ifdef METACALL_FORK_SAFE if (metacall_config_flags & METACALL_FLAGS_FORK_SAFE) { - if (metacall_fork_destroy() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall fork destruction"); - } + metacall_fork_destroy(); } #endif /* METACALL_FORK_SAFE */ diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index 422c00a0ef..e353879fd3 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -29,6 +29,8 @@ #include +/* -- Methods -- */ + #if defined(WIN32) || defined(_WIN32) || \ defined(__CYGWIN__) || defined(__CYGWIN32__) || \ defined(__MINGW32__) || defined(__MINGW64__) @@ -43,10 +45,6 @@ #endif #include -/* -- Definitions -- */ - - #define metacall_fork_pid _getpid - /* -- Type Definitions -- */ typedef long NTSTATUS; @@ -89,8 +87,6 @@ typedef NTSTATUS(NTAPI *RtlCloneUserProcessPtr)(ULONG ProcessFlags, /* -- Methods -- */ -void (*metacall_fork_func(void))(void); - NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, PSECURITY_DESCRIPTOR ProcessSecurityDescriptor, PSECURITY_DESCRIPTOR ThreadSecurityDescriptor, @@ -104,8 +100,6 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, /* -- Methods -- */ -void (*metacall_fork_func(void))(void); - pid_t metacall_fork_hook(void); #else @@ -125,21 +119,14 @@ static metacall_post_fork_callback_ptr metacall_post_fork_callback = NULL; defined(__CYGWIN__) || defined(__CYGWIN32__) || \ defined(__MINGW32__) || defined(__MINGW64__) -void (*metacall_fork_func(void))(void) -{ - HMODULE module; - RtlCloneUserProcessPtr clone_ptr; +typedef RtlCloneUserProcessPtr metacall_fork_trampoline_type; - module = GetModuleHandle("ntdll.dll"); +static const char metacall_fork_func_name[] = "RtlCloneUserProcess"; +static metacall_fork_trampoline_type metacall_fork_trampoline = NULL; - if (!module) - { - return NULL; - } - - clone_ptr = (RtlCloneUserProcessPtr)GetProcAddress(module, "RtlCloneUserProcess"); - - return (void (*)(void))clone_ptr; +static detour_handle metacall_fork_handle(detour d) +{ + return detour_load_file(d, "ntdll.dll"); } NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, @@ -148,8 +135,6 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, HANDLE DebugPort, PRTL_USER_PROCESS_INFORMATION ProcessInformation) { - RtlCloneUserProcessPtr metacall_fork_trampoline = (RtlCloneUserProcessPtr)detour_trampoline(detour_fork_handle); - metacall_pre_fork_callback_ptr pre_callback = metacall_pre_fork_callback; metacall_post_fork_callback_ptr post_callback = metacall_post_fork_callback; @@ -213,15 +198,18 @@ NTSTATUS NTAPI metacall_fork_hook(ULONG ProcessFlags, defined(__CYGWIN__) || defined(__CYGWIN32__) || \ (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) -void (*metacall_fork_func(void))(void) +typedef pid_t (*metacall_fork_trampoline_type)(void); + +static const char metacall_fork_func_name[] = "fork"; +static metacall_fork_trampoline_type metacall_fork_trampoline = NULL; + +static detour_handle metacall_fork_handle(detour d) { - return (void (*)(void))(&fork); + return detour_load_file(d, NULL); } pid_t metacall_fork_hook(void) { - pid_t (*metacall_fork_trampoline)(void) = (pid_t(*)(void))detour_trampoline(detour_fork_handle); - metacall_pre_fork_callback_ptr pre_callback = metacall_pre_fork_callback; metacall_post_fork_callback_ptr post_callback = metacall_post_fork_callback; @@ -285,7 +273,14 @@ int metacall_fork_initialize(void) if (detour_fork_handle == NULL) { - detour_fork_handle = detour_install(d, (void (*)(void))metacall_fork_func(), (void (*)(void))(&metacall_fork_hook)); + /* Casting for getting the original function */ + union + { + metacall_fork_trampoline_type *trampoline; + void (**ptr)(void); + } cast = { &metacall_fork_trampoline }; + + detour_fork_handle = metacall_fork_handle(d); if (detour_fork_handle == NULL) { @@ -295,6 +290,15 @@ int metacall_fork_initialize(void) return 1; } + + if (detour_replace(d, detour_fork_handle, metacall_fork_func_name, (void (*)(void))(&metacall_fork_hook), cast.ptr) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork replacement"); + + metacall_link_destroy(); + + return 1; + } } return 0; @@ -306,26 +310,17 @@ void metacall_fork(metacall_pre_fork_callback_ptr pre_callback, metacall_post_fo metacall_post_fork_callback = post_callback; } -int metacall_fork_destroy(void) +void metacall_fork_destroy(void) { - int result = 0; - if (detour_fork_handle != NULL) { detour d = detour_create(metacall_detour()); - if (detour_uninstall(d, detour_fork_handle) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork uninstall"); - - result = 1; - } + detour_unload(d, detour_fork_handle); detour_fork_handle = NULL; } metacall_pre_fork_callback = NULL; metacall_post_fork_callback = NULL; - - return result; } diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 3526c6b188..9812211b2a 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -47,23 +47,22 @@ static threading_mutex_type link_mutex = THREADING_MUTEX_INITIALIZE; #include -void (*metacall_link_func(void))(void) +typedef FARPROC (*metacall_link_trampoline_type)(HMODULE, LPCSTR); + +static const char metacall_link_func_name[] = "GetProcAddress"; +static metacall_link_trampoline_type metacall_link_trampoline = NULL; + +static detour_handle metacall_link_handle(detour d) { - return (void (*)(void))(&GetProcAddress); + return detour_load_address(d, (void (*)(void))(&GetProcAddress)); } FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) { - typedef FARPROC (*metacall_link_func_ptr)(HMODULE, LPCSTR); - - metacall_link_func_ptr metacall_link_trampoline; - void *ptr; threading_mutex_lock(&link_mutex); - metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); - /* Intercept if any */ ptr = set_get(metacall_link_table, (set_key)symbol); @@ -93,18 +92,22 @@ void (*metacall_link_func(void))(void) return (void (*)(void))(&dlsym); } -void *metacall_link_hook(void *handle, const char *symbol) -{ - typedef void *(*metacall_link_func_ptr)(void *, const char *); +typedef void *(*metacall_link_trampoline_type)(void *, const char *); + +static const char metacall_link_func_name[] = "dlsym"; +static metacall_link_trampoline_type metacall_link_trampoline = NULL; - metacall_link_func_ptr metacall_link_trampoline; +static detour_handle metacall_link_handle(detour d) +{ + return detour_load_address(d, (void (*)(void))(&dlsym)); +} +void *metacall_link_hook(void *handle, const char *symbol) +{ void *ptr; threading_mutex_lock(&link_mutex); - metacall_link_trampoline = (metacall_link_func_ptr)detour_trampoline(detour_link_handle); - /* Intercept function if any */ ptr = set_get(metacall_link_table, (set_key)symbol); @@ -140,7 +143,14 @@ int metacall_link_initialize(void) if (detour_link_handle == NULL) { - detour_link_handle = detour_install(d, (void (*)(void))metacall_link_func(), (void (*)(void))(&metacall_link_hook)); + /* Casting for getting the original function */ + union + { + metacall_link_trampoline_type *trampoline; + void (**ptr)(void); + } cast = { &metacall_link_trampoline }; + + detour_link_handle = metacall_link_handle(d); if (detour_link_handle == NULL) { @@ -150,6 +160,15 @@ int metacall_link_initialize(void) return 1; } + + if (detour_replace(d, detour_link_handle, metacall_link_func_name, (void (*)(void))(&metacall_link_hook), cast.ptr) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour link replacement"); + + metacall_link_destroy(); + + return 1; + } } if (metacall_link_table == NULL) @@ -193,22 +212,15 @@ int metacall_link_unregister(const char *symbol) return (set_remove(metacall_link_table, (set_key)symbol) == NULL); } -int metacall_link_destroy(void) +void metacall_link_destroy(void) { - int result = 0; - threading_mutex_lock(&link_mutex); if (detour_link_handle != NULL) { detour d = detour_create(metacall_detour()); - if (detour_uninstall(d, detour_link_handle) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour fork uninstall"); - - result = 1; - } + detour_unload(d, detour_link_handle); detour_link_handle = NULL; } @@ -223,6 +235,4 @@ int metacall_link_destroy(void) threading_mutex_unlock(&link_mutex); threading_mutex_destroy(&link_mutex); - - return result; } diff --git a/source/ports/rs_port/src/bindings.rs b/source/ports/rs_port/src/bindings.rs index c4319b2ac2..26a41b7bd2 100644 --- a/source/ports/rs_port/src/bindings.rs +++ b/source/ports/rs_port/src/bindings.rs @@ -627,8 +627,8 @@ unsafe extern "C" { ); } unsafe extern "C" { - #[doc = " @brief\n Unregister fork detours and destroy shared memory\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_fork_destroy() -> ::std::os::raw::c_int; + #[doc = " @brief\n Unregister fork detours and destroy shared memory"] + pub fn metacall_fork_destroy(); } #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/source/ports/zig_port/src/metacall-bindings.zig b/source/ports/zig_port/src/metacall-bindings.zig index 0615eb7231..9e51c89cd2 100644 --- a/source/ports/zig_port/src/metacall-bindings.zig +++ b/source/ports/zig_port/src/metacall-bindings.zig @@ -1235,7 +1235,7 @@ pub const metacall_pre_fork_callback_ptr = ?*const fn (?*anyopaque) callconv(.C) pub const metacall_post_fork_callback_ptr = ?*const fn (metacall_pid, ?*anyopaque) callconv(.C) c_int; pub extern fn metacall_fork_initialize() c_int; pub extern fn metacall_fork(pre_callback: metacall_pre_fork_callback_ptr, post_callback: metacall_post_fork_callback_ptr) void; -pub extern fn metacall_fork_destroy() c_int; +pub extern fn metacall_fork_destroy() void; pub const struct_metacall_initialize_configuration_type = extern struct { tag: [*c]u8 = @import("std").mem.zeroes([*c]u8), options: ?*anyopaque = @import("std").mem.zeroes(?*anyopaque), diff --git a/source/tests/detour_test/source/detour_test.cpp b/source/tests/detour_test/source/detour_test.cpp index f4009bf975..15b56ec588 100644 --- a/source/tests/detour_test/source/detour_test.cpp +++ b/source/tests/detour_test/source/detour_test.cpp @@ -61,6 +61,24 @@ const char *hook_function(void) return str_with_hook; } +/* TODO: +* This test is not going to work because detour_enumeration does not walk in +* the following sections: +* T Global text symbol +* t Local text symbol +* This funtion we are searching for is stored in: +* 0000000000073630 T test_exported_symbols_from_executable +* 00000000000736e0 t _Z13hook_functionv +* 0000000000072e34 t _Z13hook_functionv.cold +* 0000000000073680 t _Z17check_detour_hookPFPKcvE +* We can find all the sections here: https://en.wikipedia.org/wiki/Nm_(Unix) +* For listing properly all the symbols we should replicate something like +* GNU libc does under the hood for dlsym, which is implemented through do_lookup: +* https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=elf/dl-lookup.c;hb=HEAD +* We will leave this for future versions, including support for GNU hashed symbols. +*/ +#define TODO_TEST_EXPORTED_SYMBOLS_FROM_EXECUTABLE 1 + #ifdef _WIN32 #define EXPORT_SYMBOL __declspec(dllexport) #else @@ -101,6 +119,7 @@ TEST_F(detour_test, DefaultConstructor) ASSERT_NE((detour_handle)NULL, (detour_handle)handle); /* Check if it can list exported symbols from executable */ +#ifndef TODO_TEST_EXPORTED_SYMBOLS_FROM_EXECUTABLE test_exported_symbols_from_executable(3); unsigned int position = 0; @@ -120,6 +139,7 @@ TEST_F(detour_test, DefaultConstructor) } EXPECT_EQ((bool)true, (bool)found); +#endif /* Install detour */ union From 0e8dcc497aaa030c34272e315bac655968dc0b8d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Apr 2025 18:35:55 +0200 Subject: [PATCH 083/364] Start to improve node loader. --- source/loaders/node_loader/CMakeLists.txt | 70 +++++++-------- .../node_loader_win32_delay_load.h | 85 ------------------- .../node_loader/source/node_loader_impl.cpp | 49 ++++++++++- 3 files changed, 79 insertions(+), 125 deletions(-) delete mode 100644 source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index e557fba418..746b684ada 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -22,6 +22,34 @@ if(NodeJS_LIBRARY_NAME_PATH AND WIN32) file(COPY "${NodeJS_LIBRARY_NAME_PATH}" DESTINATION ${PROJECT_OUTPUT_DIR}) endif() +# Runtime (pack NodeJS DLL in windows) +# TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies +# TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da +set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY}") + +if(NodeJS_LIBRARY_NAME_PATH AND WIN32) + install(FILES + "${NodeJS_LIBRARY_NAME_PATH}" + DESTINATION ${INSTALL_LIB} + COMPONENT runtime + ) + + get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY_NAME_PATH}" NAME) + set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY_NAME_PATH}") + set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") +elseif(NodeJS_BUILD_FROM_SOURCE AND NOT WIN32) + install(FILES + "${NodeJS_LIBRARY}" + DESTINATION ${INSTALL_LIB} + COMPONENT runtime + ) + + get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY}" NAME) + set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") +else() + set(NodeJS_LIBRARY_INSTALL "${NodeJS_LIBRARY}") +endif() + # # Plugin name and options # @@ -74,13 +102,6 @@ set(sources ${source_path}/node_loader_trampoline.cpp ) -if(WIN32 AND MSVC_VERSION GREATER_EQUAL 1200) - set(headers - ${headers} - ${include_path}/node_loader_win32_delay_load.h - ) -endif() - # Group source files set(header_group "Header Files (API)") set(source_group "Source Files") @@ -157,8 +178,9 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - # TODO: Replace this by /FORCE:UNRESOLVED on MSVC for later on resolving it ourselves? - $<$:${NodeJS_LIBRARY}> # NodeJS library + # Delay load for MSVC + $<$:libnode2> + $<$:delayimp> PUBLIC ${DEFAULT_LIBRARIES} @@ -172,7 +194,6 @@ target_link_libraries(${target} target_compile_definitions(${target} PRIVATE - $<$:NODEJS_LIBRARY_NAME="${NodeJS_LIBRARY_NAME}"> $<$>:_LARGEFILE_SOURCE> $<$>:_FILE_OFFSET_BITS=64> $<$,$>:_DARWIN_USE_64_BIT_INODE=1> @@ -204,6 +225,7 @@ target_compile_options(${target} target_link_options(${target} PRIVATE $<$,$>:-Wl,-undefined,dynamic_lookup> + $<$:/DELAYLOAD:${NodeJS_LIBRARY_NAME}> PUBLIC ${DEFAULT_LINKER_OPTIONS} @@ -231,34 +253,6 @@ install(TARGETS ${target} ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev ) -set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY}") - -# Runtime (pack NodeJS DLL in windows) -# TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies -# TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da -if(NodeJS_LIBRARY_NAME_PATH AND WIN32) - install(FILES - "${NodeJS_LIBRARY_NAME_PATH}" - DESTINATION ${INSTALL_LIB} - COMPONENT runtime - ) - - get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY_NAME_PATH}" NAME) - set(NodeJS_LIBRARY_DEVELOPMENT "${NodeJS_LIBRARY_NAME_PATH}") - set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") -elseif(NodeJS_BUILD_FROM_SOURCE AND NOT WIN32) - install(FILES - "${NodeJS_LIBRARY}" - DESTINATION ${INSTALL_LIB} - COMPONENT runtime - ) - - get_filename_component(NodeJS_LIBRARY_NAME "${NodeJS_LIBRARY}" NAME) - set(NodeJS_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${NodeJS_LIBRARY_NAME}") -else() - set(NodeJS_LIBRARY_INSTALL "${NodeJS_LIBRARY}") -endif() - # # Configuration # diff --git a/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h b/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h deleted file mode 100644 index 47d425ceeb..0000000000 --- a/source/loaders/node_loader/include/node_loader/node_loader_win32_delay_load.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Loader Library by Parra Studios - * A plugin for loading nodejs code at run-time into a process. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* -- Headers -- */ - -#define WIN32_LEAN_AND_MEAN -#include - -#include -#include - -inline void *node_loader_hook_import_address_table(const char *module_name, const char *function_name, void *hook) -{ - LPVOID image_base = GetModuleHandle(module_name); - PIMAGE_DOS_HEADER dos_headers = (PIMAGE_DOS_HEADER)image_base; - - if (dos_headers->e_magic != IMAGE_DOS_SIGNATURE) - { - return NULL; - } - - PIMAGE_NT_HEADERS nt_headers = (PIMAGE_NT_HEADERS)((DWORD_PTR)image_base + dos_headers->e_lfanew); - - if (nt_headers->Signature != IMAGE_NT_SIGNATURE) - { - return NULL; - } - - IMAGE_DATA_DIRECTORY *imports_directory = &nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT]; - - if (imports_directory->Size == 0 || imports_directory->VirtualAddress == 0) - { - return NULL; - } - - PIMAGE_IMPORT_DESCRIPTOR import_descriptor = (PIMAGE_IMPORT_DESCRIPTOR)(imports_directory->VirtualAddress + (DWORD_PTR)image_base); - - for (; import_descriptor->FirstThunk != NULL; ++import_descriptor) - { - PIMAGE_THUNK_DATA original_first_thunk = (PIMAGE_THUNK_DATA)((DWORD_PTR)image_base + import_descriptor->OriginalFirstThunk); // Image thunk data names - PIMAGE_THUNK_DATA first_thunk = (PIMAGE_THUNK_DATA)((DWORD_PTR)image_base + import_descriptor->FirstThunk); // Image thunk data address - - for (; original_first_thunk->u1.AddressOfData != NULL; ++original_first_thunk, ++first_thunk) - { - if ((original_first_thunk->u1.Ordinal & IMAGE_ORDINAL_FLAG) == 0) - { - PIMAGE_IMPORT_BY_NAME func = (PIMAGE_IMPORT_BY_NAME)((DWORD_PTR)image_base + original_first_thunk->u1.AddressOfData); - - if (strcmp(func->Name, function_name) == 0) - { - LPVOID original_address = (LPVOID)(first_thunk->u1.Function); - LPVOID import_func_load_address = (LPVOID)(&first_thunk->u1.Function); - DWORD old_page_protect, unused_old_page_protect; - - VirtualProtect(import_func_load_address, sizeof(void *), PAGE_EXECUTE_READWRITE, &old_page_protect); - - memcpy(import_func_load_address, &hook, sizeof(hook)); - - VirtualProtect(import_func_load_address, sizeof(void *), old_page_protect, &unused_old_page_protect); - - return (void *)original_address; - } - } - } - } - - return NULL; -} diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index e15575fec8..2008cc1111 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -899,6 +899,7 @@ static void node_loader_impl_try_destroy(loader_impl_node node_impl); /* Required for the DelayLoad hook interposition, solves bug of NodeJS extensions requiring node.exe instead of node.dll */ static HMODULE node_loader_node_dll_handle = NULL; static HMODULE (*get_module_handle_a_ptr)(_In_opt_ LPCSTR) = NULL; /* TODO: Implement W version too? */ +static detour_handle node_module_handle_a_handle = NULL; #endif /* -- Methods -- */ @@ -3690,8 +3691,38 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi /* On Windows, hook node extension loading mechanism in order to patch extensions linked to node.exe */ #if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200) - node_loader_node_dll_handle = GetModuleHandle(NODEJS_LIBRARY_NAME); - get_module_handle_a_ptr = (HMODULE(*)(_In_opt_ LPCSTR))node_loader_hook_import_address_table("kernel32.dll", "GetModuleHandleA", &get_module_handle_a_hook); + { + /* As the library handle is correctly resolved here, either to executable, library of the executable, + or the loader dependency we can directly obtain the handle of this dependency from a function pointer */ + if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, &napi_create_reference, &node_loader_node_dll_handle)) + { + napi_throw_type_error(env, nullptr, "Failed to initialize the hooking against node extensions load mechanism"); + } + + detour d = detour_create(metacall_detour()); + + node_module_handle_a_handle = detour_load_file(d, "kernel32.dll"); + + if (node_module_handle_a_handle == NULL) + { + napi_throw_type_error(env, nullptr, "Invalid creation of the detour handle for hooking node extension load mechanism"); + } + else + { + typedef HMODULE (*get_module_handle_a_type)(_In_opt_ LPCSTR); + + union + { + get_module_handle_a_type *trampoline; + void (**ptr)(void); + } cast = { &get_module_handle_a_ptr }; + + if (detour_replace(d, node_module_handle_a_handle, "GetModuleHandleA", (void (*)(void))(&get_module_handle_a_hook), cast.ptr) != 0) + { + napi_throw_type_error(env, nullptr, "Invalid replacement of GetModuleHandle for hooking node extension load mechanism"); + } + } + } #endif /* On host mode, register delayed paths */ @@ -4628,6 +4659,20 @@ int node_loader_impl_destroy(loader_impl impl) uv_thread_join(&node_impl->thread_log_id); #endif + /* On Windows, destroy the node extension hooking mechanism */ +#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200) + { + if (node_module_handle_a_handle != NULL) + { + detour d = detour_create(metacall_detour()); + + detour_unload(d, node_module_handle_a_handle); + + node_module_handle_a_handle = NULL; + } + } +#endif + /* Print NodeJS execution result */ log_write("metacall", LOG_LEVEL_DEBUG, "NodeJS execution return status %d", node_impl->result); From 73492ee71d57133b2c2382da05f73bceedbbcaa7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 9 Apr 2025 00:59:45 +0200 Subject: [PATCH 084/364] Improve dynlink and prepare it for managing the dependencies of the loaders. --- source/dynlink/include/dynlink/dynlink.h | 9 ++ source/dynlink/include/dynlink/dynlink_impl.h | 9 ++ .../include/dynlink/dynlink_interface.h | 4 +- source/dynlink/source/dynlink.c | 36 ++++++- source/dynlink/source/dynlink_impl.c | 15 ++- source/dynlink/source/dynlink_impl_beos.c | 18 ++-- source/dynlink/source/dynlink_impl_macos.c | 16 ++-- source/dynlink/source/dynlink_impl_unix.c | 18 ++-- source/dynlink/source/dynlink_impl_win32.c | 26 +++-- .../include/portability/portability_path.h | 2 + source/portability/source/portability_path.c | 55 +++++++++++ source/ports/node_port/CMakeLists.txt | 95 ++++++++++--------- .../source/metacall_serial_impl_serialize.c | 2 +- .../dynlink_test/source/dynlink_test.cpp | 78 ++++++++++++--- 14 files changed, 273 insertions(+), 110 deletions(-) diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index 57bea7ab54..3154e93fde 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -36,6 +36,15 @@ extern "C" { /* -- Methods -- */ +/** +* @brief +* Get the library prefix for specified platform (normally "lib") +* +* @return +* A constant string pointer to the platform prefix +*/ +DYNLINK_API const char *dynlink_prefix(void); + /** * @brief * Get the library extension for specified platform diff --git a/source/dynlink/include/dynlink/dynlink_impl.h b/source/dynlink/include/dynlink/dynlink_impl.h index f6af1d6fbb..69696a55df 100644 --- a/source/dynlink/include/dynlink/dynlink_impl.h +++ b/source/dynlink/include/dynlink/dynlink_impl.h @@ -35,6 +35,15 @@ extern "C" { /* -- Methods -- */ +/** +* @brief +* Dynamically linked shared object handle prefix implementation (normally "lib") +* +* @return +* A const string reference to the prefix depending on the OS implementation +*/ +DYNLINK_API const char *dynlink_impl_prefix(void); + /** * @brief * Dynamically linked shared object handle extension implementation diff --git a/source/dynlink/include/dynlink/dynlink_interface.h b/source/dynlink/include/dynlink/dynlink_interface.h index 80b34fc399..f9b55e1d63 100644 --- a/source/dynlink/include/dynlink/dynlink_interface.h +++ b/source/dynlink/include/dynlink/dynlink_interface.h @@ -54,16 +54,16 @@ extern "C" { typedef dynlink_symbol_addr *dynlink_symbol_addr_ptr; +typedef const char *(*dynlink_impl_interface_prefix)(void); typedef const char *(*dynlink_impl_interface_extension)(void); -typedef void (*dynlink_impl_interface_get_name)(dynlink_name, dynlink_name_impl, size_t); typedef dynlink_impl (*dynlink_impl_interface_load)(dynlink); typedef int (*dynlink_impl_interface_symbol)(dynlink, dynlink_impl, dynlink_symbol_name, dynlink_symbol_addr_ptr); typedef int (*dynlink_impl_interface_unload)(dynlink, dynlink_impl); struct dynlink_impl_interface_type { + dynlink_impl_interface_prefix prefix; dynlink_impl_interface_extension extension; - dynlink_impl_interface_get_name get_name; dynlink_impl_interface_load load; dynlink_impl_interface_symbol symbol; dynlink_impl_interface_unload unload; diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index 57a70b2388..ced93d585c 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -43,6 +43,11 @@ struct dynlink_type /* -- Methods -- */ +const char *dynlink_prefix(void) +{ + return dynlink_impl_prefix(); +} + const char *dynlink_extension(void) { return dynlink_impl_extension(); @@ -94,13 +99,33 @@ dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) { dynlink handle = malloc(sizeof(struct dynlink_type)); + size_t path_size, name_size, prefix_length; + const char *prefix = dynlink_prefix(); if (handle == NULL) { return NULL; } - strncpy(handle->name_impl, path, strnlen(path, PORTABILITY_PATH_SIZE) + 1); + path_size = strnlen(path, PORTABILITY_PATH_SIZE) + 1; + + strncpy(handle->name_impl, path, path_size); + + /* Get the library name without any extension */ + name_size = portability_path_get_name_canonical(path, path_size, handle->name, PORTABILITY_PATH_SIZE); + + /* Remove the library prefix */ + prefix_length = strlen(prefix); + + if (strncmp(prefix, handle->name, prefix_length) == 0) + { + size_t current, next = prefix_length, end = name_size - prefix_length; + + for (current = 0; current < end; ++current, ++next) + { + handle->name[current] = handle->name[next]; + } + } DYNLINK_FLAGS_SET(handle->flags, flags); @@ -125,10 +150,19 @@ dynlink dynlink_load_self(dynlink_flags flags) return NULL; } + /* Retrieve the executable path for the full name */ portability_executable_path(handle->name_impl, &path_length); + + /* Get the name without the extension */ portability_path_get_name(handle->name_impl, path_length + 1, handle->name, PORTABILITY_PATH_SIZE); + + /* Set the flags with the additional special flag for itself, + this will help to identify that the handle loaded is the current executable + and behave accordingly depending on the implementation + */ DYNLINK_FLAGS_SET(handle->flags, flags); DYNLINK_FLAGS_ADD(handle->flags, DYNLINK_FLAGS_BIND_SELF); + handle->impl = dynlink_impl_load(handle); if (handle->impl == NULL) diff --git a/source/dynlink/source/dynlink_impl.c b/source/dynlink/source/dynlink_impl.c index 86092ad435..bd0fd942c9 100644 --- a/source/dynlink/source/dynlink_impl.c +++ b/source/dynlink/source/dynlink_impl.c @@ -28,6 +28,13 @@ /* -- Methods -- */ +const char *dynlink_impl_prefix(void) +{ + dynlink_impl_interface_singleton_ptr singleton = dynlink_interface(); + + return singleton()->prefix(); +} + const char *dynlink_impl_extension(void) { dynlink_impl_interface_singleton_ptr singleton = dynlink_interface(); @@ -39,9 +46,13 @@ void dynlink_impl_get_name(dynlink_name name, dynlink_name_impl name_impl, size_ { if (name != NULL && name_impl != NULL && size > 1) { - dynlink_impl_interface_singleton_ptr singleton = dynlink_interface(); + strncpy(name_impl, dynlink_impl_prefix(), size); + + strncat(name_impl, name, size - 1); + + strncat(name_impl, ".", size - 1); - singleton()->get_name(name, name_impl, size); + strncat(name_impl, dynlink_impl_extension(), size - 1); } } diff --git a/source/dynlink/source/dynlink_impl_beos.c b/source/dynlink/source/dynlink_impl_beos.c index 6a5e225f11..60688b5b72 100644 --- a/source/dynlink/source/dynlink_impl_beos.c +++ b/source/dynlink/source/dynlink_impl_beos.c @@ -31,22 +31,18 @@ /* -- Methods -- */ -const char *dynlink_impl_interface_extension_beos(void) +const char *dynlink_impl_interface_prefix_beos(void) { - static const char extension_beos[] = "so"; + static const char prefix_beos[] = "lib"; - return extension_beos; + return prefix_beos; } -void dynlink_impl_interface_get_name_beos(dynlink_name name, dynlink_name_impl name_impl, size_t size) +const char *dynlink_impl_interface_extension_beos(void) { - strncpy(name_impl, "lib", size); - - strncat(name_impl, name, size - 1); - - strncat(name_impl, ".", size - 1); + static const char extension_beos[] = "so"; - strncat(name_impl, dynlink_impl_extension(), size - 1); + return extension_beos; } dynlink_impl dynlink_impl_interface_load_beos(dynlink handle) @@ -124,8 +120,8 @@ int dynlink_impl_interface_unload_beos(dynlink handle, dynlink_impl impl) dynlink_impl_interface dynlink_impl_interface_singleton(void) { static struct dynlink_impl_interface_type impl_interface_beos = { + &dynlink_impl_interface_prefix_beos, &dynlink_impl_interface_extension_beos, - &dynlink_impl_interface_get_name_beos, &dynlink_impl_interface_load_beos, &dynlink_impl_interface_symbol_beos, &dynlink_impl_interface_unload_beos, diff --git a/source/dynlink/source/dynlink_impl_macos.c b/source/dynlink/source/dynlink_impl_macos.c index b09c8e0785..c210c9bd3c 100644 --- a/source/dynlink/source/dynlink_impl_macos.c +++ b/source/dynlink/source/dynlink_impl_macos.c @@ -38,20 +38,18 @@ static void *dynlink_impl_global_handle_macos = NULL; /* -- Methods -- */ -const char *dynlink_impl_interface_extension_macos(void) +const char *dynlink_impl_interface_prefix_macos(void) { - static const char extension_macos[] = "dylib"; + static const char prefix_macos[] = "lib"; - return extension_macos; + return prefix_macos; } -void dynlink_impl_interface_get_name_macos(dynlink_name name, dynlink_name_impl name_impl, size_t size) +const char *dynlink_impl_interface_extension_macos(void) { - strncpy(name_impl, name, size); - - strncat(name_impl, ".", size - 1); + static const char extension_macos[] = "dylib"; - strncat(name_impl, dynlink_impl_extension(), size - 1); + return extension_macos; } dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) @@ -193,8 +191,8 @@ int dynlink_impl_interface_unload_macos(dynlink handle, dynlink_impl impl) dynlink_impl_interface dynlink_impl_interface_singleton(void) { static struct dynlink_impl_interface_type impl_interface_macos = { + &dynlink_impl_interface_prefix_macos, &dynlink_impl_interface_extension_macos, - &dynlink_impl_interface_get_name_macos, &dynlink_impl_interface_load_macos, &dynlink_impl_interface_symbol_macos, &dynlink_impl_interface_unload_macos, diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index df74485c1e..b6a234abe0 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -42,22 +42,18 @@ /* -- Methods -- */ -const char *dynlink_impl_interface_extension_unix(void) +const char *dynlink_impl_interface_prefix_unix(void) { - static const char extension_unix[] = "so"; + static const char prefix_unix[] = "lib"; - return extension_unix; + return prefix_unix; } -void dynlink_impl_interface_get_name_unix(dynlink_name name, dynlink_name_impl name_impl, size_t size) +const char *dynlink_impl_interface_extension_unix(void) { - strncpy(name_impl, "lib", size); - - strncat(name_impl, name, size - 1); - - strncat(name_impl, ".", size - 1); + static const char extension_unix[] = "so"; - strncat(name_impl, dynlink_impl_extension(), size - 1); + return extension_unix; } dynlink_impl dynlink_impl_interface_load_unix(dynlink handle) @@ -142,8 +138,8 @@ int dynlink_impl_interface_unload_unix(dynlink handle, dynlink_impl impl) dynlink_impl_interface dynlink_impl_interface_singleton(void) { static struct dynlink_impl_interface_type impl_interface_unix = { + &dynlink_impl_interface_prefix_unix, &dynlink_impl_interface_extension_unix, - &dynlink_impl_interface_get_name_unix, &dynlink_impl_interface_load_unix, &dynlink_impl_interface_symbol_unix, &dynlink_impl_interface_unload_unix, diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 5d0af2a0e1..9d3ec04258 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -32,26 +32,22 @@ /* -- Methods -- */ -const char *dynlink_impl_interface_extension_win32(void) -{ - static const char extension_win32[] = "dll"; - - return extension_win32; -} - -void dynlink_impl_interface_get_name_win32(dynlink_name name, dynlink_name_impl name_impl, size_t size) +const char *dynlink_impl_interface_prefix_win32(void) { #if defined(__MINGW32__) || defined(__MINGW64__) - strncpy(name_impl, "lib", size); - - strncat(name_impl, name, size - 1); + static const char prefix_win32[] = "lib"; #else - strncpy(name_impl, name, size); + static const char prefix_win32[] = ""; #endif - strncat(name_impl, ".", size - 1); + return prefix_win32; +} - strncat(name_impl, dynlink_impl_extension(), size - 1); +const char *dynlink_impl_interface_extension_win32(void) +{ + static const char extension_win32[] = "dll"; + + return extension_win32; } dynlink_impl dynlink_impl_interface_load_win32(dynlink handle) @@ -121,8 +117,8 @@ int dynlink_impl_interface_unload_win32(dynlink handle, dynlink_impl impl) dynlink_impl_interface dynlink_impl_interface_singleton(void) { static struct dynlink_impl_interface_type impl_interface_win32 = { + &dynlink_impl_interface_prefix_win32, &dynlink_impl_interface_extension_win32, - &dynlink_impl_interface_get_name_win32, &dynlink_impl_interface_load_win32, &dynlink_impl_interface_symbol_win32, &dynlink_impl_interface_unload_win32, diff --git a/source/portability/include/portability/portability_path.h b/source/portability/include/portability/portability_path.h index 36885514ad..79ff0761ba 100644 --- a/source/portability/include/portability/portability_path.h +++ b/source/portability/include/portability/portability_path.h @@ -111,6 +111,8 @@ extern "C" { PORTABILITY_API size_t portability_path_get_name(const char *path, size_t path_size, char *name, size_t name_size); +PORTABILITY_API size_t portability_path_get_name_canonical(const char *path, size_t path_size, char *name, size_t name_size); + PORTABILITY_API size_t portability_path_get_fullname(const char *path, size_t path_size, char *name, size_t name_size); PORTABILITY_API size_t portability_path_get_extension(const char *path, size_t path_size, char *extension, size_t extension_size); diff --git a/source/portability/source/portability_path.c b/source/portability/source/portability_path.c index 9e5232c277..ea96ca764d 100644 --- a/source/portability/source/portability_path.c +++ b/source/portability/source/portability_path.c @@ -73,6 +73,61 @@ size_t portability_path_get_name(const char *path, size_t path_size, char *name, return last + 1; } +size_t portability_path_get_name_canonical(const char *path, size_t path_size, char *name, size_t name_size) +{ + if (path == NULL || name == NULL) + { + return 0; + } + + size_t i, count, last; + + for (i = 0, count = 0, last = 0; path[i] != '\0' && i < path_size && count < name_size; ++i) + { + name[count++] = path[i]; + + if (PORTABILITY_PATH_SEPARATOR(path[i])) + { + count = 0; + } + else if (path[i] == '.') + { + if (i > 0 && path[i - 1] == '.') + { + last = 0; + count = 0; + } + else + { + if (count > 0) + { + last = count - 1; + } + else + { + last = 0; + } + + /* This function is the same as portability_path_get_name but + returns the name of the file without any extension, for example: + - portability_path_get_name of libnode.so.72 is libnode.so + - portability_path_get_name_canonical of libnode.so.72 is libnode + */ + break; + } + } + } + + if (last == 0 && count > 1) + { + last = count; + } + + name[last] = '\0'; + + return last + 1; +} + size_t portability_path_get_fullname(const char *path, size_t path_size, char *name, size_t name_size) { if (path == NULL || name == NULL) diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 5ddccd023b..4fb44685cc 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -89,7 +89,7 @@ install(FILES # # Check if loaders are enabled -if(NOT OPTION_BUILD_CLI OR NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_LOADERS_TS OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB OR NOT OPTION_BUILD_SCRIPTS_TS) +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_LOADERS_TS OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB OR NOT OPTION_BUILD_SCRIPTS_TS) return() endif() @@ -116,30 +116,9 @@ if(OPTION_BUILD_THREAD_SANITIZER AND OPTION_BUILD_LOADERS_CS) endif() # -# Define test +# Define environment variables # -set(node_port_test "${target}_test") - -message(STATUS "Test ${node_port_test}") - -add_test(NAME ${target} - COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${CMAKE_CURRENT_SOURCE_DIR}/test/commands/node_port.txt" -P "${CMAKE_SOURCE_DIR}/source/cli/metacallcli/test/commands/command_runner.cmake" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -# -# Define test labels -# - -set_property(TEST ${target} - PROPERTY LABELS ${node_port_test} -) - -set_tests_properties(${target} PROPERTIES - PASS_REGULAR_EXPRESSION "Tests passed without errors" -) - include(TestEnvironmentVariables) # Enable cobol test if it is built @@ -160,19 +139,7 @@ if(OPTION_BUILD_LOADERS_RS) set(TESTS_ENVIRONMENT_VARIABLES_RS "OPTION_BUILD_LOADERS_RS=1") endif() -# Add dependencies and optional dependencies -add_dependencies(${target} - node_loader - mock_loader - py_loader - rb_loader - ts_loader - ${COBOL_DEPENDENCY} - ${C_DEPENDENCY} - ${RS_DEPENDENCY} -) - -# Disable OpenSSL related tests if versions are incompatible +# Disable OpenSSL related tests if versions are incompatible (TODO: Review this bug and remove the workaround if possible) set(NodeJS_EXECUTABLE_ONLY ON) find_package(NodeJS) @@ -207,14 +174,54 @@ if(NodeJS_FOUND AND Python_Interpreter_FOUND) endif() endif() -test_environment_variables(${target} - "" - ${TESTS_ENVIRONMENT_VARIABLES} - ${TESTS_ENVIRONMENT_VARIABLES_COB} - ${TESTS_ENVIRONMENT_VARIABLES_C} - ${TESTS_ENVIRONMENT_VARIABLES_RS} - ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} -) +# +# Test importing NodeJS Port from CLI +# + +set(node_port_test "${target}_test") + +if(OPTION_BUILD_CLI) + message(STATUS "Test ${node_port_test}") + + add_test(NAME ${target} + COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${CMAKE_CURRENT_SOURCE_DIR}/test/commands/node_port.txt" -P "${CMAKE_SOURCE_DIR}/source/cli/metacallcli/test/commands/command_runner.cmake" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + + # + # Define test labels + # + + set_property(TEST ${target} + PROPERTY LABELS ${node_port_test} + ) + + set_tests_properties(${target} PROPERTIES + PASS_REGULAR_EXPRESSION "Tests passed without errors" + ) + + # Add dependencies and optional dependencies + add_dependencies(${target} + node_loader + mock_loader + py_loader + rb_loader + ts_loader + ${COBOL_DEPENDENCY} + ${C_DEPENDENCY} + ${RS_DEPENDENCY} + ) + + # Environment variables + test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + ${TESTS_ENVIRONMENT_VARIABLES_COB} + ${TESTS_ENVIRONMENT_VARIABLES_C} + ${TESTS_ENVIRONMENT_VARIABLES_RS} + ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} + ) +endif() # # Test importing NodeJS Port from node.exe diff --git a/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c b/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c index e618f935e0..16dd1d2679 100644 --- a/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c +++ b/source/serials/metacall_serial/source/metacall_serial_impl_serialize.c @@ -221,7 +221,7 @@ void metacall_serial_impl_serialize_array(value v, char *dest, size_t size, cons (void)format; - /* Calculate sum of all array values lenght */ + /* Calculate sum of all array values length */ for (iterator = 0; iterator < array_size; ++iterator) { value current_value = array_value[iterator]; diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index ae8813715b..5bf29f76c8 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -28,7 +28,7 @@ #define DYNLINK_TEST_LIBRARY_PATH "DYNLINK_TEST_LIBRARY_PATH" -typedef void (*mock_loader_print_func)(void); +typedef void (*dynlink_print_func)(void); class dynlink_test : public testing::Test { @@ -60,39 +60,41 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object extension: %s", dynlink_extension()); - /* Test library loading */ - { #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - const char library_name[] = "mock_loaderd"; + const char library_name[] = "dynlinkd"; #else - const char library_name[] = "mock_loader"; + const char library_name[] = "dynlink"; #endif - char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); + char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); - dynlink handle = dynlink_load(path, library_name, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); + ASSERT_NE((char *)path, (char *)NULL); - environment_variable_path_destroy(path); + /* Test library loading */ + { + dynlink handle = dynlink_load(path, library_name, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); ASSERT_NE(handle, (dynlink)NULL); log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name_impl(handle)); + EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + if (handle != NULL) { - dynlink_symbol_addr mock_loader_print_info_addr; + dynlink_symbol_addr dynlink_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, "mock_loader_print_info", &mock_loader_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); - if (mock_loader_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { - mock_loader_print_func print = mock_loader_print_info_addr; + dynlink_print_func print = dynlink_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)mock_loader_print_info_addr); + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); - if (mock_loader_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } @@ -122,4 +124,52 @@ TEST_F(dynlink_test, DefaultConstructor) dynlink_unload(proc); /* Should do nothing except by freeing the handle */ } + + /* Test loading symbols from absolute path */ + { + char library_name_platform[PORTABILITY_PATH_SIZE]; + char absolute_path[PORTABILITY_PATH_SIZE]; + + dynlink_platform_name(library_name, library_name_platform); + + portability_path_join(path, strlen(path) + 1, library_name_platform, strlen(library_name_platform) + 1, absolute_path, PORTABILITY_PATH_SIZE); + + dynlink handle = dynlink_load_absolute(absolute_path, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); + + ASSERT_NE(handle, (dynlink)NULL); + + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object absolute path: %s", absolute_path); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_name_impl(handle)); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name(handle)); + + EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_name_impl(handle))); + EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + + if (handle != NULL) + { + dynlink_symbol_addr dynlink_print_info_addr; + + EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); + + if (dynlink_print_info_addr != NULL) + { + dynlink_print_func print = dynlink_print_info_addr; + + log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); + + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); + + if (dynlink_print_info_addr != NULL) + { + log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); + } + + print(); + } + + dynlink_unload(handle); + } + } + + environment_variable_path_destroy(path); } From 70de2c43c63a6a4349a236881b73ba31f624672d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 9 Apr 2025 18:13:45 +0200 Subject: [PATCH 085/364] Add loading of the dependencies. --- source/loader/source/loader.c | 13 +- source/loader/source/loader_impl.c | 203 ++++++++++++++++-- source/portability/CMakeLists.txt | 2 + .../portability/portability_dependency.h | 44 ++++ .../portability/source/portability_atexit.c | 1 + .../source/portability_dependency.c | 135 ++++++++++++ 6 files changed, 373 insertions(+), 25 deletions(-) create mode 100644 source/portability/include/portability/portability_dependency.h create mode 100644 source/portability/source/portability_dependency.c diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 02ec13573c..2db2b641b3 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -265,9 +265,9 @@ plugin loader_get_impl_plugin(const loader_tag tag) } /* Dynamic link loader dependencies if it is not host */ - if (loader_impl_get_option_host(impl) == 0) + if (loader_impl_dependencies(impl) != 0) { - loader_impl_dependencies(impl); + goto plugin_manager_create_error; } /* Dynamic link the loader */ @@ -278,6 +278,15 @@ plugin loader_get_impl_plugin(const loader_tag tag) goto plugin_manager_create_error; } + /* If it is host, relink the loader symbols to the host (either the executable or a library) */ + if (loader_impl_get_option_host(impl) == 1) + { + // if (loader_impl_relink(impl) != 0) + // { + // goto plugin_manager_create_error; + // } + } + /* Store in the loader implementation the reference to the plugin which belongs to */ loader_impl_attach(impl, p); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 2ad8034d8a..24d6045a7d 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -36,6 +36,8 @@ #include +#include + #include #include @@ -90,6 +92,7 @@ struct loader_impl_type value options; /* Additional initialization options passed in the initialize phase */ set exec_path_map; /* Set of execution paths passed by the end user */ configuration config; /* Reference to the loader configuration, it contains execution_paths, dependencies and additional info */ + set dependencies_map; /* List of handles (dynlink) to the dependencies of the loader */ }; struct loader_handle_impl_type @@ -120,6 +123,14 @@ struct loader_impl_metadata_cb_iterator_type static loader_impl loader_impl_allocate(const loader_tag tag); +static void loader_impl_configuration_execution_paths(loader_impl_interface iface, loader_impl impl); + +static int loader_impl_dependencies_self_list(const char *library, void *data); + +static int loader_impl_dependencies_self_find(loader_impl impl, const char *key_str, vector dependencies_self); + +static int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value *paths_array, size_t paths_size); + static configuration loader_impl_initialize_configuration(const loader_tag tag); static int loader_impl_initialize_registered(plugin_manager manager, plugin p); @@ -208,8 +219,17 @@ loader_impl loader_impl_allocate(const loader_tag tag) goto alloc_exec_path_map_error; } + impl->dependencies_map = set_create(&hash_callback_str, &comparable_callback_str); + + if (impl->dependencies_map == NULL) + { + goto alloc_dependencies_map_error; + } + return impl; +alloc_dependencies_map_error: + set_destroy(impl->exec_path_map); alloc_exec_path_map_error: context_destroy(impl->ctx); alloc_ctx_error: @@ -289,15 +309,113 @@ void loader_impl_configuration_execution_paths(loader_impl_interface iface, load } } +int loader_impl_dependencies_self_list(const char *library, void *data) +{ + vector dependencies_self = (vector)data; + + vector_push_back_empty(dependencies_self); + + strncpy(vector_back(dependencies_self), library, strnlen(library, PORTABILITY_PATH_SIZE)); + + return 0; +} + +int loader_impl_dependencies_self_find(loader_impl impl, const char *key_str, vector dependencies_self) +{ + size_t iterator, size = vector_size(dependencies_self); + char library_self_name[PORTABILITY_PATH_SIZE]; + + for (iterator = 0; iterator < size; ++iterator) + { + const char *library_self = vector_at(dependencies_self, iterator); + + /* Get the name of the library */ + portability_path_get_fullname(library_self, strnlen(library_self, PORTABILITY_PATH_SIZE) + 1, library_self_name, PORTABILITY_PATH_SIZE); + + /* Try to find the dependency name in the library */ + if (strstr(library_self_name, key_str) != NULL) + { + dynlink handle = dynlink_load_absolute(library_self, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); + + if (handle != NULL && set_insert(impl->dependencies_map, (const set_key)key_str, (set_value)handle) == 0) + { + return 0; + } + + dynlink_unload(handle); + + return 1; + } + } + + return 1; +} + +int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value *paths_array, size_t paths_size) +{ + size_t iterator; + + for (iterator = 0; iterator < paths_size; ++iterator) + { + if (value_type_id(paths_array[iterator]) == TYPE_STRING) + { + const char *library_path = value_to_string(paths_array[iterator]); + + if (library_path != NULL) + { + dynlink handle = dynlink_load_absolute(library_path, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); + + if (handle != NULL && set_insert(impl->dependencies_map, (const set_key)key_str, (set_value)handle) == 0) + { + return 0; + } + + dynlink_unload(handle); + } + } + } + + return 1; +} + int loader_impl_dependencies(loader_impl impl) { - /* Dependencies have the following format */ - /* + const int host = loader_impl_get_option_host(impl); + + /* Dependencies have the following format: + { "dependencies": { "node": ["/usr/lib/x86_64-linux-gnu/libnode.so.72"] } } + + The algorithm works in the following way: + 1) If current loader is the host: + - Take the dependency name and try to find if it is already + loaded as a library in the current process, for example: + + "dependencies": { + "node": ["/usr/lib/x86_64-linux-gnu/libnode.so.72"] + } + + Will search for all libraries, looking for the library name + with the following substring (lib)node, so if we find: + + "/usr/lib/x86_64-linux-gnu/libnode.so.108" + + It will test against libnode.so.108 the substring (lib)node. + + - If it has not been found, then get the handle of the current process. + + 2) Otherwise, the current loader is not the host: + - Iterate the dependencies and if they are properly loaded, index + them by name in the dependency map, for example: + + [ Key ] => [ Value ] + "node" => "/usr/lib/x86_64-linux-gnu/libnode.so.72" + + The value in this case will be the library loaded, instead of the full path. */ value dependencies_value = configuration_value_type(impl->config, "dependencies", TYPE_MAP); @@ -305,49 +423,67 @@ int loader_impl_dependencies(loader_impl impl) { size_t size = value_type_count(dependencies_value); value *dependencies_map = value_to_map(dependencies_value); + vector dependencies_self = NULL; size_t iterator; + /* In case of host, get all loaded dependencies into an array */ + if (host == 1) + { + dependencies_self = vector_create(sizeof(char) * PORTABILITY_PATH_SIZE); + + if (dependencies_self == NULL) + { + return 1; + } + + if (portability_dependendency_iterate(&loader_impl_dependencies_self_list, (void *)dependencies_self) != 0) + { + vector_destroy(dependencies_self); + return 1; + } + } + + /* Iterate through the dependencies */ for (iterator = 0; iterator < size; ++iterator) { if (value_type_id(dependencies_map[iterator]) == TYPE_ARRAY) { value *library_tuple = value_to_array(dependencies_map[iterator]); - if (value_type_id(library_tuple[1]) == TYPE_ARRAY) + if (value_type_id(library_tuple[0]) == TYPE_STRING) { - value *paths_array = value_to_array(library_tuple[1]); - size_t paths_size = value_type_count(library_tuple[1]); - size_t path; - int found = 0; + const char *key_str = value_to_string(library_tuple[0]); - for (path = 0; path < paths_size; ++path) + if (host == 0) { - if (value_type_id(paths_array[iterator]) == TYPE_STRING) + /* If the loader is not the host, iterate through all dependencies and load them */ + if (value_type_id(library_tuple[1]) == TYPE_ARRAY) { - const char *library_path = value_to_string(paths_array[iterator]); + value *paths_array = value_to_array(library_tuple[1]); + size_t paths_size = value_type_count(library_tuple[1]); - if (library_path != NULL) + if (loader_impl_dependencies_load(impl, key_str, paths_array, paths_size) != 0) { - dynlink handle = dynlink_load_absolute(library_path, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); - - if (handle != NULL) - { - found = 1; - break; - } + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader configuration '%s.json'", key_str, plugin_name(impl->p)); + return 1; } } } - - if (!found) + else { - const char *dependency = value_type_id(library_tuple[0]) == TYPE_STRING ? value_to_string(library_tuple[0]) : "unknown_library"; - log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader configuration '%s.json'", dependency, plugin_name(impl->p)); - return 1; + /* Otherwise try to find if the library is already loaded, and if not, load the process */ + if (loader_impl_dependencies_self_find(impl, key_str, dependencies_self) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader '%s' as a host", key_str, plugin_name(impl->p)); + vector_destroy(dependencies_self); + return 1; + } } } } } + + vector_destroy(dependencies_self); } return 0; @@ -1580,6 +1716,22 @@ int loader_impl_destroy_exec_path_map_cb_iterate(set s, set_key key, set_value v return 0; } +int loader_impl_destroy_dependencies_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) +{ + (void)s; + (void)key; + (void)args; + + if (val != NULL) + { + dynlink dependency = val; + + dynlink_unload(dependency); + } + + return 0; +} + void loader_impl_destroy_objects(loader_impl impl) { /* This iterates through all functions, classes objects and types, @@ -1637,6 +1789,11 @@ void loader_impl_destroy_deallocate(loader_impl impl) value_type_destroy(impl->options); } + /* Unload all the dependencies when everything has been destroyed and the loader is unloaded */ + set_iterate(impl->dependencies_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); + + set_destroy(impl->dependencies_map); + free(impl); } diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index 1855258d28..b6baba4a89 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -41,6 +41,7 @@ set(headers ${include_path}/portability_working_path.h ${include_path}/portability_path.h ${include_path}/portability_atexit.h + ${include_path}/portability_dependency.h ) set(sources @@ -50,6 +51,7 @@ set(sources ${source_path}/portability_working_path.c ${source_path}/portability_path.c ${source_path}/portability_atexit.c + ${source_path}/portability_dependency.c ) # Group source files diff --git a/source/portability/include/portability/portability_dependency.h b/source/portability/include/portability/portability_dependency.h new file mode 100644 index 0000000000..2fbf4cce2d --- /dev/null +++ b/source/portability/include/portability/portability_dependency.h @@ -0,0 +1,44 @@ +/* + * Portability Library by Parra Studios + * A generic cross-platform portability utility. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PORTABILITY_DEPENDENCY_H +#define PORTABILITY_DEPENDENCY_H 1 + +/* -- Headers -- */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* -- Type Definitions -- */ + +typedef int (*portability_dependendency_iterate_cb)(const char *library, void *data); + +/* -- Methods -- */ + +int portability_dependendency_iterate(portability_dependendency_iterate_cb callback, void *data); + +#ifdef __cplusplus +} +#endif + +#endif /* PORTABILITY_DEPENDENCY_H */ diff --git a/source/portability/source/portability_atexit.c b/source/portability/source/portability_atexit.c index 5dafc48a90..ee18e77959 100644 --- a/source/portability/source/portability_atexit.c +++ b/source/portability/source/portability_atexit.c @@ -54,6 +54,7 @@ static void portability_atexit_destroy(void) } free(prev); + } while (atexit_list != NULL); atexit_list = NULL; diff --git a/source/portability/source/portability_dependency.c b/source/portability/source/portability_dependency.c new file mode 100644 index 0000000000..55e633de40 --- /dev/null +++ b/source/portability/source/portability_dependency.c @@ -0,0 +1,135 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* -- Headers -- */ + +#include + +#include + +#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) + + #ifndef _GNU_SOURCE + #define _GNU_SOURCE + #endif + #include + +#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) + + #include + +#elif defined(WIN32) || defined(_WIN32) + + #include + #include + +#else + #error "Unsupported platform for portability_dependendency_iterate" +#endif + +#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) + +/* -- Type Definitions -- */ + +typedef struct portability_dependendency_iterate_phdr_type *portability_dependendency_iterate_phdr; + +/* -- Member Data -- */ + +struct portability_dependendency_iterate_phdr_type +{ + portability_dependendency_iterate_cb callback; + void *data; +}; + +/* -- Private Methods -- */ + +static int portability_dependendency_iterate_phdr_callback(struct dl_phdr_info *info, size_t size, void *data) +{ + portability_dependendency_iterate_phdr phdr = (portability_dependendency_iterate_phdr)data; + + (void)size; + + return phdr->callback(info->dlpi_name, phdr->data); +} + +#endif + +int portability_dependendency_iterate(portability_dependendency_iterate_cb callback, void *data) +{ + if (callback == NULL) + { + return 1; + } + +#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) + { + struct portability_dependendency_iterate_phdr_type phdr = { + callback, + data + }; + + return dl_iterate_phdr(&portability_dependendency_iterate_phdr_callback, (void *)&phdr); + } +#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) + { + uint32_t iterator, size = _dyld_image_count(); + + for (iterator = 0; iterator < size; ++iterator) + { + const char *image_name = _dyld_get_image_name(iterator); + + if (callback(image_name, data) != 0) + { + return 1; + } + } + + return 0; + } +#elif defined(WIN32) || defined(_WIN32) + { + HANDLE process = GetCurrentProcess(); + HMODULE modules[1024]; + DWORD modules_size; + + if (EnumProcessModules(process, modules, sizeof(modules), &modules_size)) + { + size_t iterator, size = modules_size / sizeof(HMODULE); + char module_name[MAX_PATH]; + + for (iterator = 0; i < size; ++iterator) + { + if (GetModuleFileNameExA(process, modules[iterator], module_name, sizeof(module_name) / sizeof(char))) + { + if (callback(module_name, data) != 0) + { + return 1; + } + } + } + } + + return 0; + } +#endif +} From 7c43f635e7ee0bf93aa1f80ed1bc7c391c288f88 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 9 Apr 2025 22:29:59 +0200 Subject: [PATCH 086/364] Improve the implementation. --- .../environment/source/environment_variable.c | 2 +- source/loader/include/loader/loader_impl.h | 2 + source/loader/source/loader.c | 11 +- source/loader/source/loader_impl.c | 108 ++++++++++++++---- .../node_loader/source/node_loader_impl.cpp | 9 +- .../node_loader/source/node_loader_port.cpp | 2 +- .../metacall/include/metacall/metacall_link.h | 18 ++- source/metacall/source/metacall_link.c | 15 ++- source/plugin/include/plugin/plugin_impl.h | 2 +- source/plugin/source/plugin_impl.c | 2 +- 10 files changed, 131 insertions(+), 40 deletions(-) diff --git a/source/environment/source/environment_variable.c b/source/environment/source/environment_variable.c index 9323e0163a..a9e94eb23f 100644 --- a/source/environment/source/environment_variable.c +++ b/source/environment/source/environment_variable.c @@ -77,7 +77,7 @@ const char *environment_variable_get(const char *name, const char *default_value int environment_variable_set(const char *name, const char *value_string) { -#if defined(_WIN32) +#if defined(WIN32) || defined(_WIN32) return _putenv_s(name, value_string); #else return setenv(name, value_string, 1); diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index f7c7d56cbf..3a2655e394 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -45,6 +45,8 @@ LOADER_API loader_impl loader_impl_create_host(const loader_tag tag); LOADER_API int loader_impl_dependencies(loader_impl impl); +LOADER_API int loader_impl_link(plugin p, loader_impl impl); + LOADER_API void loader_impl_attach(loader_impl impl, plugin p); LOADER_API plugin loader_impl_plugin(loader_impl impl); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 2db2b641b3..8511f27151 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -278,13 +278,10 @@ plugin loader_get_impl_plugin(const loader_tag tag) goto plugin_manager_create_error; } - /* If it is host, relink the loader symbols to the host (either the executable or a library) */ - if (loader_impl_get_option_host(impl) == 1) + /* If it is host, link the loader symbols to the host (either the executable or a library) */ + if (loader_impl_link(p, impl) != 0) { - // if (loader_impl_relink(impl) != 0) - // { - // goto plugin_manager_create_error; - // } + goto plugin_manager_create_error; } /* Store in the loader implementation the reference to the plugin which belongs to */ @@ -793,7 +790,7 @@ void loader_unload_children(loader_impl impl) * the loader has been unloaded, and the function interface will point to an unloaded * plugin, generating a segmentation fault. All the plugins will be unloaded on plugin_manager_destroy. */ - plugin_destroy_delayed(order->p); + plugin_destructor(order->p); /* Mark loader as destroyed (prevents access to already freed memory and defines what loaders are destroyed) */ loader_manager_impl_set_destroyed(manager_impl, destroyed_impl); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 24d6045a7d..9ccb51d00b 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -92,7 +92,7 @@ struct loader_impl_type value options; /* Additional initialization options passed in the initialize phase */ set exec_path_map; /* Set of execution paths passed by the end user */ configuration config; /* Reference to the loader configuration, it contains execution_paths, dependencies and additional info */ - set dependencies_map; /* List of handles (dynlink) to the dependencies of the loader */ + set library_map; /* List of handles (dynlink) to the dependencies of the loader and the loader itself */ }; struct loader_handle_impl_type @@ -219,16 +219,16 @@ loader_impl loader_impl_allocate(const loader_tag tag) goto alloc_exec_path_map_error; } - impl->dependencies_map = set_create(&hash_callback_str, &comparable_callback_str); + impl->library_map = set_create(&hash_callback_str, &comparable_callback_str); - if (impl->dependencies_map == NULL) + if (impl->library_map == NULL) { - goto alloc_dependencies_map_error; + goto alloc_library_map_error; } return impl; -alloc_dependencies_map_error: +alloc_library_map_error: set_destroy(impl->exec_path_map); alloc_exec_path_map_error: context_destroy(impl->ctx); @@ -324,7 +324,9 @@ int loader_impl_dependencies_self_find(loader_impl impl, const char *key_str, ve { size_t iterator, size = vector_size(dependencies_self); char library_self_name[PORTABILITY_PATH_SIZE]; + dynlink handle; + /* Try to load it from the dependencies of the executable */ for (iterator = 0; iterator < size; ++iterator) { const char *library_self = vector_at(dependencies_self, iterator); @@ -335,19 +337,24 @@ int loader_impl_dependencies_self_find(loader_impl impl, const char *key_str, ve /* Try to find the dependency name in the library */ if (strstr(library_self_name, key_str) != NULL) { - dynlink handle = dynlink_load_absolute(library_self, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); + handle = dynlink_load_absolute(library_self, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); - if (handle != NULL && set_insert(impl->dependencies_map, (const set_key)key_str, (set_value)handle) == 0) - { - return 0; - } + goto dependencies_map_insert; + } + } - dynlink_unload(handle); + /* If it is not found in the dependencies, it is linked statically to the executable, load it */ + handle = dynlink_load_self(DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); - return 1; - } +dependencies_map_insert: + + if (handle != NULL && set_insert(impl->library_map, (const set_key)key_str, (set_value)handle) == 0) + { + return 0; } + dynlink_unload(handle); + return 1; } @@ -365,7 +372,7 @@ int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value * { dynlink handle = dynlink_load_absolute(library_path, DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); - if (handle != NULL && set_insert(impl->dependencies_map, (const set_key)key_str, (set_value)handle) == 0) + if (handle != NULL && set_insert(impl->library_map, (const set_key)key_str, (set_value)handle) == 0) { return 0; } @@ -380,17 +387,16 @@ int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value * int loader_impl_dependencies(loader_impl impl) { - const int host = loader_impl_get_option_host(impl); - /* Dependencies have the following format: - { "dependencies": { "node": ["/usr/lib/x86_64-linux-gnu/libnode.so.72"] } } + */ + value dependencies_value = configuration_value_type(impl->config, "dependencies", TYPE_MAP); - The algorithm works in the following way: + /* The algorithm works in the following way: 1) If current loader is the host: - Take the dependency name and try to find if it is already loaded as a library in the current process, for example: @@ -417,7 +423,6 @@ int loader_impl_dependencies(loader_impl impl) The value in this case will be the library loaded, instead of the full path. */ - value dependencies_value = configuration_value_type(impl->config, "dependencies", TYPE_MAP); if (dependencies_value != NULL) { @@ -425,6 +430,7 @@ int loader_impl_dependencies(loader_impl impl) value *dependencies_map = value_to_map(dependencies_value); vector dependencies_self = NULL; size_t iterator; + const int host = loader_impl_get_option_host(impl); /* In case of host, get all loaded dependencies into an array */ if (host == 1) @@ -489,6 +495,55 @@ int loader_impl_dependencies(loader_impl impl) return 0; } +int loader_impl_link(plugin p, loader_impl impl) +{ + plugin_descriptor desc = plugin_desc(p); + + /* On Linux and MacOS, if the symbols are exported, + the linker when loading the library automatically resolves the symbols + so there is no need for doing the link manually, in Windows meanwhile + we link the dependency with delay load linking. Before we execute anything, + we should relink all the symbols to the host. + */ +#if defined(WIN32) || defined(_WIN32) + if (loader_impl_get_option_host(impl) == 1) + { + /* TODO: Replace loader symbols by the dependency (aka the already loaded + library if the host is linked dynamically, or the executable if it is + linked statically): + + loader_handle = detour_load_handle(d, desc->handle); + + while (detour_enumerate(d, loader_handle, position, name, addr)) + { + foreach(library_handle in impl->library_map) + { + symbol = dynlink_symbol(library_handle, name); + + if (symbol != NULL) + { + if (detour_replace(d, loader_handle, name, symbol, ...) == 0) + { + break; + } + } + } + } + + detour_unload(d, loader_handle); + */ + } +#endif + + /* Store itself in the library map along with the dependencies */ + if (set_insert(impl->library_map, (set_key)desc->library_name, (set_value)desc->handle) != 0) + { + return 1; + } + + return 0; +} + configuration loader_impl_initialize_configuration(const loader_tag tag) { static const char configuration_key_suffix[] = "_loader"; @@ -1789,10 +1844,16 @@ void loader_impl_destroy_deallocate(loader_impl impl) value_type_destroy(impl->options); } + /* TODO: I am not sure this will work. + This must be done when the plugin handle (aka the loader) gets unloaded, + at this point it is not unloaded yet, because the plugin destructor is called before doing: + dynlink_unload(p->descriptor->handle); + In theory it should work because normally those handles are reference counted but "I don't trust like that". + */ /* Unload all the dependencies when everything has been destroyed and the loader is unloaded */ - set_iterate(impl->dependencies_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); + set_iterate(impl->library_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); - set_destroy(impl->dependencies_map); + set_destroy(impl->library_map); free(impl); } @@ -1822,6 +1883,11 @@ void loader_impl_destroy(plugin p, loader_impl impl) impl->init = 1; } + + /* Remove the loader library from the library list */ + plugin_descriptor desc = plugin_desc(p); + + set_remove(impl->library_map, (set_key)desc->library_name); } else { diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 2008cc1111..d05b2b4a6d 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -810,7 +810,9 @@ class loader_impl_napi_constructor public: loader_impl_napi_constructor() { - if (metacall_link_register("napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) + static const loader_tag node_loader_tag = "node"; + + if (metacall_link_register(node_loader_tag, "node", "napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Node loader failed register the link hook"); } @@ -3693,8 +3695,9 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi #if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200) { /* As the library handle is correctly resolved here, either to executable, library of the executable, - or the loader dependency we can directly obtain the handle of this dependency from a function pointer */ - if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, &napi_create_reference, &node_loader_node_dll_handle)) + or the loader dependency we can directly obtain the handle of this dependency from a function pointer, + use any function that is contained in node runtime, in this case we are using napi_create_array */ + if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, &napi_create_array, &node_loader_node_dll_handle)) { napi_throw_type_error(env, nullptr, "Failed to initialize the hooking against node extensions load mechanism"); } diff --git a/source/loaders/node_loader/source/node_loader_port.cpp b/source/loaders/node_loader/source/node_loader_port.cpp index f96f1f2956..82eaafbff9 100644 --- a/source/loaders/node_loader/source/node_loader_port.cpp +++ b/source/loaders/node_loader/source/node_loader_port.cpp @@ -1114,7 +1114,7 @@ napi_value node_loader_port_initialize(napi_env env, napi_value exports) node_loader_port_exports(env, exports); /* Unregister NAPI Hook */ - if (metacall_link_unregister("napi_register_module_v1") != 0) + if (metacall_link_unregister(node_loader_tag, "node", "napi_register_module_v1") != 0) { // TODO: Handle error } diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index b9de5afff4..598358aa98 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -50,6 +50,12 @@ METACALL_API int metacall_link_initialize(void); * Function interposition is required in order to hook into runtimes * and dynamically interpose our functions. * +* @param[in] tag +* Name of the loader which the @dependency belongs to +* +* @param[in] library +* Name of the library that is going to be hooked +* * @param[in] symbol * Name of the function to be interposed * @@ -59,19 +65,25 @@ METACALL_API int metacall_link_initialize(void); * @return * Zero if success, different from zero otherwise */ -METACALL_API int metacall_link_register(const char *symbol, void (*fn)(void)); +METACALL_API int metacall_link_register(const char *tag, const char *library, const char *symbol, void (*fn)(void)); /** * @brief * Remove the hook previously registered * +* @param[in] tag +* Name of the loader which the @dependency belongs to +* +* @param[in] library +* Name of the library that is going to be hooked +* * @param[in] symbol -* Name of the function to be removed +* Name of the function to be interposed * * @return * Zero if success, different from zero otherwise */ -METACALL_API int metacall_link_unregister(const char *symbol); +METACALL_API int metacall_link_unregister(const char *tag, const char *library, const char *symbol); /** * @brief diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 9812211b2a..838207de6b 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -97,9 +97,20 @@ typedef void *(*metacall_link_trampoline_type)(void *, const char *); static const char metacall_link_func_name[] = "dlsym"; static metacall_link_trampoline_type metacall_link_trampoline = NULL; +/* TODO: We have to implement a lazy loaded map for +detours and load it from the loaders whenever hooking +is required, on destroy we can delete all the hook handles +*/ + static detour_handle metacall_link_handle(detour d) { + /* return detour_load_address(d, (void (*)(void))(&dlsym)); + */ + /* + return detour_load_file(d, NULL); + */ + return detour_load_file(d, "/lib/x86_64-linux-gnu/libnode.so.72"); } void *metacall_link_hook(void *handle, const char *symbol) @@ -188,7 +199,7 @@ int metacall_link_initialize(void) return 0; } -int metacall_link_register(const char *symbol, void (*fn)(void)) +int metacall_link_register(const char *tag, const char *library, const char *symbol, void (*fn)(void)) { void *ptr; @@ -202,7 +213,7 @@ int metacall_link_register(const char *symbol, void (*fn)(void)) return set_insert(metacall_link_table, (set_key)symbol, ptr); } -int metacall_link_unregister(const char *symbol) +int metacall_link_unregister(const char *tag, const char *library, const char *symbol) { if (metacall_link_table == NULL) { diff --git a/source/plugin/include/plugin/plugin_impl.h b/source/plugin/include/plugin/plugin_impl.h index c747061977..bc8b51ecf0 100644 --- a/source/plugin/include/plugin/plugin_impl.h +++ b/source/plugin/include/plugin/plugin_impl.h @@ -59,7 +59,7 @@ PLUGIN_API void *plugin_iface(plugin p); PLUGIN_API void *plugin_impl(plugin p); -PLUGIN_API void plugin_destroy_delayed(plugin p); +PLUGIN_API void plugin_destructor(plugin p); PLUGIN_API void plugin_destroy(plugin p); diff --git a/source/plugin/source/plugin_impl.c b/source/plugin/source/plugin_impl.c index 1de83e55f9..5cb9e6f2cc 100644 --- a/source/plugin/source/plugin_impl.c +++ b/source/plugin/source/plugin_impl.c @@ -101,7 +101,7 @@ void *plugin_impl(plugin p) return p->impl; } -void plugin_destroy_delayed(plugin p) +void plugin_destructor(plugin p) { if (p != NULL) { From 4954d8dfbd46ecc35104504668fbea6686ef3426 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 17:22:13 +0200 Subject: [PATCH 087/364] Typo on notice. --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index e584ab4a74..f513291693 100644 --- a/NOTICE +++ b/NOTICE @@ -19,7 +19,7 @@ All external code and licenses used by **METACALL** are always wrapped into plug - [2. Serials](#2-serials) - [2.1 RapidJSON](#21-rapidjson) - [3. Detours](#3-detours) - - [3.1 PLTHook](#31-fookhook) + - [3.1 PLTHook](#31-plthook) - [4. Ports](#4-ports) - [4.1 Swig](#41-swig) From 9a31798945b707702611d37aa2f59d6738eeed62 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 17:23:40 +0200 Subject: [PATCH 088/364] First version of plthook working, improved dylink and added support for hooking the loaders. --- source/dynlink/include/dynlink/dynlink.h | 18 +-- source/dynlink/include/dynlink/dynlink_impl.h | 12 +- .../include/dynlink/dynlink_interface.h | 2 +- source/dynlink/include/dynlink/dynlink_type.h | 12 +- source/dynlink/source/dynlink.c | 44 ++++---- source/dynlink/source/dynlink_impl.c | 14 +-- source/dynlink/source/dynlink_impl_beos.c | 4 +- source/dynlink/source/dynlink_impl_macos.c | 4 +- source/dynlink/source/dynlink_impl_unix.c | 14 +-- source/dynlink/source/dynlink_impl_win32.c | 6 +- source/loader/include/loader/loader.h | 6 + source/loader/include/loader/loader_impl.h | 6 +- .../include/loader/loader_manager_impl.h | 1 + source/loader/source/loader.c | 24 +++- source/loader/source/loader_impl.c | 83 +++++++++++++- .../loaders/c_loader/source/c_loader_impl.cpp | 2 +- .../ext_loader/source/ext_loader_impl.cpp | 2 +- .../node_loader/source/node_loader_impl.cpp | 24 +--- .../metacall/include/metacall/metacall_link.h | 31 ++++- source/metacall/source/metacall.c | 13 ++- source/metacall/source/metacall_link.c | 106 ++++++++---------- source/plugin/source/plugin_manager.c | 2 +- .../sandbox_plugin/source/sandbox_plugin.cpp | 5 +- .../dynlink_test/source/dynlink_test.cpp | 6 +- .../source/metacall_dynlink_path_test.cpp | 2 +- 25 files changed, 268 insertions(+), 175 deletions(-) diff --git a/source/dynlink/include/dynlink/dynlink.h b/source/dynlink/include/dynlink/dynlink.h index 3154e93fde..1a94636f0f 100644 --- a/source/dynlink/include/dynlink/dynlink.h +++ b/source/dynlink/include/dynlink/dynlink.h @@ -70,7 +70,7 @@ DYNLINK_API const char *dynlink_extension(void); * @return * A handle to the dynamically linked shared object */ -DYNLINK_API dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags); +DYNLINK_API dynlink dynlink_load(const char *path, const char *name, dynlink_flags flags); /** * @brief @@ -85,7 +85,7 @@ DYNLINK_API dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_f * @return * A handle to the dynamically linked shared object */ -DYNLINK_API dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags); +DYNLINK_API dynlink dynlink_load_absolute(const char *path, dynlink_flags flags); /** * @brief @@ -109,19 +109,19 @@ DYNLINK_API dynlink dynlink_load_self(dynlink_flags flags); * @return * Reference to the name of the dynamically linked shared object */ -DYNLINK_API dynlink_name dynlink_get_name(dynlink handle); +DYNLINK_API const char *dynlink_get_name(dynlink handle); /** * @brief -* Retreive the file name of the dynamically linked shared object handle +* Retreive the path of the dynamically linked shared object handle * * @param[in] handle * Handle of dynamically linked shared object * * @return -* Reference to the file name of the dynamically linked shared object +* Reference to the path of the dynamically linked shared object */ -DYNLINK_API dynlink_name dynlink_get_name_impl(dynlink handle); +DYNLINK_API const char *dynlink_get_path(dynlink handle); /** * @brief @@ -163,7 +163,7 @@ DYNLINK_API dynlink_impl dynlink_get_impl(dynlink handle); * @return * Returns zero on correct dynamic linking, distinct from zero otherwise */ -DYNLINK_API int dynlink_symbol(dynlink handle, dynlink_symbol_name symbol_name, dynlink_symbol_addr *symbol_address); +DYNLINK_API int dynlink_symbol(dynlink handle, const char *symbol_name, dynlink_symbol_addr *symbol_address); /** * @brief @@ -190,7 +190,7 @@ DYNLINK_API void dynlink_unload(dynlink handle); * @return * Returns zero if it could find the path, different from zero if not found */ -DYNLINK_API int dynlink_library_path(dynlink_name name, dynlink_library_path_str path, size_t *length); +DYNLINK_API int dynlink_library_path(const char *name, dynlink_path path, size_t *length); /** * @brief @@ -202,7 +202,7 @@ DYNLINK_API int dynlink_library_path(dynlink_name name, dynlink_library_path_str * @param[out] result * The resulting library name that will be generated (i.e libexample.so in Linux, or example.dll in Windows) */ -DYNLINK_API void dynlink_platform_name(dynlink_name name, dynlink_name_impl result); +DYNLINK_API void dynlink_platform_name(const char *name, dynlink_path result); /** * @brief diff --git a/source/dynlink/include/dynlink/dynlink_impl.h b/source/dynlink/include/dynlink/dynlink_impl.h index 69696a55df..d5d8728e64 100644 --- a/source/dynlink/include/dynlink/dynlink_impl.h +++ b/source/dynlink/include/dynlink/dynlink_impl.h @@ -60,19 +60,19 @@ DYNLINK_API const char *dynlink_impl_extension(void); * @param[in] name * Name of dynamically linked shared object * -* @param[out] name_impl -* Pointer to the dynamically linked shared object handle +* @param[out] destination +* Pointer to string where final platform dependant name will be stored * * @param[in] size -* Size of string @name_impl +* Size of string @destination */ -DYNLINK_API void dynlink_impl_get_name(dynlink_name name, dynlink_name_impl name_impl, size_t size); +DYNLINK_API void dynlink_impl_get_name(const char *name, dynlink_path destination, size_t size); /** * @brief * Load a dynamically linked shared object implementation * -* @param[in] name +* @param[in] handle * Pointer to the dynamically linked shared object handle * * @return @@ -99,7 +99,7 @@ DYNLINK_API dynlink_impl dynlink_impl_load(dynlink handle); * @return * Returns zero on correct dynamic linking, distinct from zero otherwise */ -DYNLINK_API int dynlink_impl_symbol(dynlink handle, dynlink_impl impl, dynlink_symbol_name symbol_name, dynlink_symbol_addr *symbol_address); +DYNLINK_API int dynlink_impl_symbol(dynlink handle, dynlink_impl impl, const char *symbol_name, dynlink_symbol_addr *symbol_address); /** * @brief diff --git a/source/dynlink/include/dynlink/dynlink_interface.h b/source/dynlink/include/dynlink/dynlink_interface.h index f9b55e1d63..445a0cd4d4 100644 --- a/source/dynlink/include/dynlink/dynlink_interface.h +++ b/source/dynlink/include/dynlink/dynlink_interface.h @@ -57,7 +57,7 @@ typedef dynlink_symbol_addr *dynlink_symbol_addr_ptr; typedef const char *(*dynlink_impl_interface_prefix)(void); typedef const char *(*dynlink_impl_interface_extension)(void); typedef dynlink_impl (*dynlink_impl_interface_load)(dynlink); -typedef int (*dynlink_impl_interface_symbol)(dynlink, dynlink_impl, dynlink_symbol_name, dynlink_symbol_addr_ptr); +typedef int (*dynlink_impl_interface_symbol)(dynlink, dynlink_impl, const char *, dynlink_symbol_addr_ptr); typedef int (*dynlink_impl_interface_unload)(dynlink, dynlink_impl); struct dynlink_impl_interface_type diff --git a/source/dynlink/include/dynlink/dynlink_type.h b/source/dynlink/include/dynlink/dynlink_type.h index cc759e25fc..d6b737e577 100644 --- a/source/dynlink/include/dynlink/dynlink_type.h +++ b/source/dynlink/include/dynlink/dynlink_type.h @@ -37,14 +37,10 @@ struct dynlink_type; /* -- Type definitions -- */ -typedef struct dynlink_type *dynlink; /**< Dynamically linked shared object handle */ -typedef const char *dynlink_path; /**< Dynamically linked shared object path */ -typedef const char *dynlink_name; /**< Dynamically linked shared object name */ -typedef const char *dynlink_symbol_name; /**< Dynamically linked shared object symbol name */ -typedef portability_library_path_str dynlink_library_path_str; /**< Dynamically linked shared object symbol name */ -typedef void *dynlink_impl; /**< Dynamically linked shared object implementation */ -typedef char dynlink_name_impl[PORTABILITY_PATH_SIZE]; /**< Allocated copy of dynamically linked shared object name */ -typedef void (*dynlink_symbol_addr)(void); /**< Function pointer referring to a symbol address */ +typedef struct dynlink_type *dynlink; /**< Dynamically linked shared object handle */ +typedef void *dynlink_impl; /**< Dynamically linked shared object implementation */ +typedef char dynlink_path[PORTABILITY_PATH_SIZE]; /**< Allocated copy of dynamically linked shared object name */ +typedef void (*dynlink_symbol_addr)(void); /**< Function pointer referring to a symbol address */ /* -- Macros -- */ diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index ced93d585c..580cef5217 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -35,10 +35,10 @@ struct dynlink_type { - dynlink_name_impl name; /**< Dynamically linked shared object name */ - dynlink_name_impl name_impl; /**< Dynamically linked shared object file name */ - dynlink_flags flags; /**< Dynamically linked shared object flags */ - dynlink_impl impl; /**< Dynamically linked shared object loader implementation */ + dynlink_path name; /**< Dynamically linked shared object name */ + dynlink_path path; /**< Dynamically linked shared object file name */ + dynlink_flags flags; /**< Dynamically linked shared object flags */ + dynlink_impl impl; /**< Dynamically linked shared object loader implementation */ }; /* -- Methods -- */ @@ -53,7 +53,7 @@ const char *dynlink_extension(void) return dynlink_impl_extension(); } -dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) +dynlink dynlink_load(const char *path, const char *name, dynlink_flags flags) { if (name != NULL) { @@ -61,23 +61,23 @@ dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) if (handle != NULL) { - dynlink_name_impl name_impl; + dynlink_path name_impl; strncpy(handle->name, name, PORTABILITY_PATH_SIZE - 1); - dynlink_impl_get_name(dynlink_get_name(handle), name_impl, PORTABILITY_PATH_SIZE); + dynlink_impl_get_name(handle->name, name_impl, PORTABILITY_PATH_SIZE); if (path != NULL) { - dynlink_name_impl join_path; + dynlink_path join_path; size_t join_path_size = portability_path_join(path, strnlen(path, PORTABILITY_PATH_SIZE) + 1, name_impl, strnlen(name_impl, PORTABILITY_PATH_SIZE) + 1, join_path, PORTABILITY_PATH_SIZE); - (void)portability_path_canonical(join_path, join_path_size, handle->name_impl, PORTABILITY_PATH_SIZE); + (void)portability_path_canonical(join_path, join_path_size, handle->path, PORTABILITY_PATH_SIZE); } else { - strncpy(handle->name_impl, name_impl, strnlen(name_impl, PORTABILITY_PATH_SIZE) + 1); + strncpy(handle->path, name_impl, strnlen(name_impl, PORTABILITY_PATH_SIZE) + 1); } DYNLINK_FLAGS_SET(handle->flags, flags); @@ -96,7 +96,7 @@ dynlink dynlink_load(dynlink_path path, dynlink_name name, dynlink_flags flags) return NULL; } -dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) +dynlink dynlink_load_absolute(const char *path, dynlink_flags flags) { dynlink handle = malloc(sizeof(struct dynlink_type)); size_t path_size, name_size, prefix_length; @@ -109,7 +109,7 @@ dynlink dynlink_load_absolute(dynlink_path path, dynlink_flags flags) path_size = strnlen(path, PORTABILITY_PATH_SIZE) + 1; - strncpy(handle->name_impl, path, path_size); + strncpy(handle->path, path, path_size); /* Get the library name without any extension */ name_size = portability_path_get_name_canonical(path, path_size, handle->name, PORTABILITY_PATH_SIZE); @@ -151,10 +151,10 @@ dynlink dynlink_load_self(dynlink_flags flags) } /* Retrieve the executable path for the full name */ - portability_executable_path(handle->name_impl, &path_length); + portability_executable_path(handle->path, &path_length); /* Get the name without the extension */ - portability_path_get_name(handle->name_impl, path_length + 1, handle->name, PORTABILITY_PATH_SIZE); + portability_path_get_name(handle->path, path_length + 1, handle->name, PORTABILITY_PATH_SIZE); /* Set the flags with the additional special flag for itself, this will help to identify that the handle loaded is the current executable @@ -174,7 +174,7 @@ dynlink dynlink_load_self(dynlink_flags flags) return handle; } -dynlink_name dynlink_get_name(dynlink handle) +const char *dynlink_get_name(dynlink handle) { if (handle != NULL) { @@ -184,11 +184,11 @@ dynlink_name dynlink_get_name(dynlink handle) return NULL; } -dynlink_name dynlink_get_name_impl(dynlink handle) +const char *dynlink_get_path(dynlink handle) { if (handle != NULL) { - return handle->name_impl; + return handle->path; } return NULL; @@ -214,7 +214,7 @@ dynlink_impl dynlink_get_impl(dynlink handle) return NULL; } -int dynlink_symbol(dynlink handle, dynlink_symbol_name symbol_name, dynlink_symbol_addr *symbol_address) +int dynlink_symbol(dynlink handle, const char *symbol_name, dynlink_symbol_addr *symbol_address) { if (handle != NULL && handle->impl != NULL && symbol_name != NULL && symbol_address != NULL) { @@ -234,9 +234,9 @@ void dynlink_unload(dynlink handle) } } -int dynlink_library_path(dynlink_name name, dynlink_library_path_str path, size_t *length) +int dynlink_library_path(const char *name, dynlink_path path, size_t *length) { - dynlink_name_impl name_impl; + dynlink_path name_impl; dynlink_impl_get_name(name, name_impl, PORTABILITY_PATH_SIZE); @@ -251,13 +251,13 @@ int dynlink_library_path(dynlink_name name, dynlink_library_path_str path, size_ } else { - (void)portability_path_get_directory_inplace(path, strnlen(path, sizeof(dynlink_library_path_str) / sizeof(char)) + 1); + (void)portability_path_get_directory_inplace(path, strnlen(path, PORTABILITY_PATH_SIZE)); } return 0; } -void dynlink_platform_name(dynlink_name name, dynlink_name_impl result) +void dynlink_platform_name(const char *name, dynlink_path result) { dynlink_impl_get_name(name, result, PORTABILITY_PATH_SIZE); } diff --git a/source/dynlink/source/dynlink_impl.c b/source/dynlink/source/dynlink_impl.c index bd0fd942c9..f49fece5c8 100644 --- a/source/dynlink/source/dynlink_impl.c +++ b/source/dynlink/source/dynlink_impl.c @@ -42,17 +42,17 @@ const char *dynlink_impl_extension(void) return singleton()->extension(); } -void dynlink_impl_get_name(dynlink_name name, dynlink_name_impl name_impl, size_t size) +void dynlink_impl_get_name(const char *name, dynlink_path destination, size_t size) { - if (name != NULL && name_impl != NULL && size > 1) + if (name != NULL && destination != NULL && size > 1) { - strncpy(name_impl, dynlink_impl_prefix(), size); + strncpy(destination, dynlink_impl_prefix(), size); - strncat(name_impl, name, size - 1); + strncat(destination, name, size - 1); - strncat(name_impl, ".", size - 1); + strncat(destination, ".", size - 1); - strncat(name_impl, dynlink_impl_extension(), size - 1); + strncat(destination, dynlink_impl_extension(), size - 1); } } @@ -63,7 +63,7 @@ dynlink_impl dynlink_impl_load(dynlink handle) return singleton()->load(handle); } -int dynlink_impl_symbol(dynlink handle, dynlink_impl impl, dynlink_symbol_name symbol_name, dynlink_symbol_addr *symbol_address) +int dynlink_impl_symbol(dynlink handle, dynlink_impl impl, const char *symbol_name, dynlink_symbol_addr *symbol_address) { if (impl != NULL) { diff --git a/source/dynlink/source/dynlink_impl_beos.c b/source/dynlink/source/dynlink_impl_beos.c index 60688b5b72..98d5a07ccb 100644 --- a/source/dynlink/source/dynlink_impl_beos.c +++ b/source/dynlink/source/dynlink_impl_beos.c @@ -65,7 +65,7 @@ dynlink_impl dynlink_impl_interface_load_beos(dynlink handle) } else { - impl = load_add_on(dynlink_get_name_impl(handle)); + impl = load_add_on(dynlink_get_path(handle)); } if (impl < B_NO_ERROR) @@ -77,7 +77,7 @@ dynlink_impl dynlink_impl_interface_load_beos(dynlink handle) return (dynlink_impl)impl; } -int dynlink_impl_interface_symbol_beos(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) +int dynlink_impl_interface_symbol_beos(dynlink handle, dynlink_impl impl, const char *name, dynlink_symbol_addr *addr) { void *symbol = NULL; diff --git a/source/dynlink/source/dynlink_impl_macos.c b/source/dynlink/source/dynlink_impl_macos.c index c210c9bd3c..48c7a4daf1 100644 --- a/source/dynlink/source/dynlink_impl_macos.c +++ b/source/dynlink/source/dynlink_impl_macos.c @@ -61,7 +61,7 @@ dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) { unsigned long flags_impl; NSObjectFileImage image; - const char *name = dynlink_get_name_impl(handle); + const char *name = dynlink_get_path(handle); NSObjectFileImageReturnCode ret = NSCreateObjectFileImageFromFile(name, &image); if (ret != NSObjectFileImageSuccess) @@ -136,7 +136,7 @@ dynlink_impl dynlink_impl_interface_load_macos(dynlink handle) return (dynlink_impl)impl; } -int dynlink_impl_interface_symbol_macos(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) +int dynlink_impl_interface_symbol_macos(dynlink handle, dynlink_impl impl, const char *name, dynlink_symbol_addr *addr) { dynlink_flags flags = dynlink_get_flags(handle); NSSymbol symbol; diff --git a/source/dynlink/source/dynlink_impl_unix.c b/source/dynlink/source/dynlink_impl_unix.c index b6a234abe0..7a6d35711a 100644 --- a/source/dynlink/source/dynlink_impl_unix.c +++ b/source/dynlink/source/dynlink_impl_unix.c @@ -28,16 +28,6 @@ #include -/* Enable if needed for extended API */ -/* -#ifndef _GNU_SOURCE - #define _GNU_SOURCE -#endif -#ifndef __USE_GNU - #define __USE_GNU -#endif -*/ - #include /* -- Methods -- */ @@ -90,7 +80,7 @@ dynlink_impl dynlink_impl_interface_load_unix(dynlink handle) } else { - impl = dlopen(dynlink_get_name_impl(handle), flags_impl); + impl = dlopen(dynlink_get_path(handle), flags_impl); } if (impl == NULL) @@ -103,7 +93,7 @@ dynlink_impl dynlink_impl_interface_load_unix(dynlink handle) return (dynlink_impl)impl; } -int dynlink_impl_interface_symbol_unix(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) +int dynlink_impl_interface_symbol_unix(dynlink handle, dynlink_impl impl, const char *name, dynlink_symbol_addr *addr) { void *symbol = dlsym(impl, name); diff --git a/source/dynlink/source/dynlink_impl_win32.c b/source/dynlink/source/dynlink_impl_win32.c index 9d3ec04258..d1956a9654 100644 --- a/source/dynlink/source/dynlink_impl_win32.c +++ b/source/dynlink/source/dynlink_impl_win32.c @@ -61,7 +61,7 @@ dynlink_impl dynlink_impl_interface_load_win32(dynlink handle) } else { - impl = LoadLibrary(dynlink_get_name_impl(handle)); + impl = LoadLibrary(dynlink_get_path(handle)); } if (impl == NULL) @@ -72,7 +72,7 @@ dynlink_impl dynlink_impl_interface_load_win32(dynlink handle) size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_id, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&message_buffer, 0, NULL); - log_write("metacall", LOG_LEVEL_ERROR, "Failed to load: %s with error code [%d]: %.*s", dynlink_get_name_impl(handle), error_id, size - 1, (const char *)message_buffer); + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load: %s with error code [%d]: %.*s", dynlink_get_path(handle), error_id, size - 1, (const char *)message_buffer); LocalFree(message_buffer); @@ -82,7 +82,7 @@ dynlink_impl dynlink_impl_interface_load_win32(dynlink handle) return (dynlink_impl)impl; } -int dynlink_impl_interface_symbol_win32(dynlink handle, dynlink_impl impl, dynlink_symbol_name name, dynlink_symbol_addr *addr) +int dynlink_impl_interface_symbol_win32(dynlink handle, dynlink_impl impl, const char *name, dynlink_symbol_addr *addr) { FARPROC proc_addr = GetProcAddress(impl, name); diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index b4b8816a3b..8fe36fd1e4 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -59,6 +59,12 @@ LOADER_API int loader_register(const char *name, loader_register_invoke invoke, LOADER_API int loader_register_impl(void *impl, void *handle, const char *name, loader_register_invoke invoke, type_id return_type, size_t arg_size, type_id args_type_id[]); +LOADER_API void loader_detour(detour d); + +LOADER_API detour_handle loader_hook(const loader_tag tag, const char *library, int (*load_cb)(detour, detour_handle)); + +LOADER_API detour_handle loader_hook_impl(void *impl, const char *library, int (*load_cb)(detour, detour_handle)); + LOADER_API const char *loader_library_path(void); LOADER_API int loader_execution_path(const loader_tag tag, const loader_path path); diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index 3a2655e394..44b2429286 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -29,6 +29,8 @@ #include #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -43,10 +45,12 @@ LOADER_API loader_impl loader_impl_create(const loader_tag tag); LOADER_API loader_impl loader_impl_create_host(const loader_tag tag); -LOADER_API int loader_impl_dependencies(loader_impl impl); +LOADER_API int loader_impl_dependencies(loader_impl impl, detour d); LOADER_API int loader_impl_link(plugin p, loader_impl impl); +LOADER_API detour_handle loader_impl_detour(loader_impl impl, const char *library, int (*load_cb)(detour, detour_handle)); + LOADER_API void loader_impl_attach(loader_impl impl, plugin p); LOADER_API plugin loader_impl_plugin(loader_impl impl); diff --git a/source/loader/include/loader/loader_manager_impl.h b/source/loader/include/loader/loader_manager_impl.h index 124aaf55c8..3e9c4d82c0 100644 --- a/source/loader/include/loader/loader_manager_impl.h +++ b/source/loader/include/loader/loader_manager_impl.h @@ -53,6 +53,7 @@ struct loader_manager_impl_type uint64_t init_thread_id; /* Stores the thread id of the thread that initialized metacall */ vector script_paths; /* Vector of search path for the scripts */ set destroy_map; /* Tracks the list of destroyed runtimes during destruction of the manager (loader_impl -> NULL) */ + detour d; /* Stores the detour manager that is being used for hooking */ }; /* -- Type Definitions -- */ diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 8511f27151..b4b13e5df9 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -33,8 +33,6 @@ #include -#include - #include #include @@ -134,6 +132,9 @@ int loader_initialize(void) /* Insert into destruction list */ loader_initialization_register_plugin(manager_impl->host); + /* Initialize detours */ + manager_impl->d = NULL; + /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* log_write("metacall", LOG_LEVEL_DEBUG, "Loader host initialized"); */ @@ -248,6 +249,23 @@ int loader_register_impl(void *impl, void *handle, const char *name, loader_regi return loader_host_register((loader_impl)impl, loader_impl_handle_context(handle), name, invoke, NULL, return_type, arg_size, args_type_id); } +void loader_detour(detour d) +{ + loader_manager_impl manager_impl = plugin_manager_impl_type(&loader_manager, loader_manager_impl); + + manager_impl->d = d; +} + +detour_handle loader_hook(const loader_tag tag, const char *library, int (*load_cb)(detour, detour_handle)) +{ + return loader_impl_detour(loader_get_impl(tag), library, load_cb); +} + +detour_handle loader_hook_impl(void *impl, const char *library, int (*load_cb)(detour, detour_handle)) +{ + return loader_impl_detour((loader_impl)impl, library, load_cb); +} + plugin loader_get_impl_plugin(const loader_tag tag) { plugin p = plugin_manager_get(&loader_manager, tag); @@ -265,7 +283,7 @@ plugin loader_get_impl_plugin(const loader_tag tag) } /* Dynamic link loader dependencies if it is not host */ - if (loader_impl_dependencies(impl) != 0) + if (loader_impl_dependencies(impl, plugin_manager_impl_type(&loader_manager, loader_manager_impl)->d) != 0) { goto plugin_manager_create_error; } diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 9ccb51d00b..0221b4a5ea 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -93,6 +93,8 @@ struct loader_impl_type set exec_path_map; /* Set of execution paths passed by the end user */ configuration config; /* Reference to the loader configuration, it contains execution_paths, dependencies and additional info */ set library_map; /* List of handles (dynlink) to the dependencies of the loader and the loader itself */ + detour d; /* Reference to the detour which was used for hooking the loader or its dependencies */ + set detour_map; /* List of detour handles (detour_handle) to the dependencies of the loader and the loader itself */ }; struct loader_handle_impl_type @@ -226,8 +228,17 @@ loader_impl loader_impl_allocate(const loader_tag tag) goto alloc_library_map_error; } + impl->detour_map = set_create(&hash_callback_str, &comparable_callback_str); + + if (impl->detour_map == NULL) + { + goto alloc_detour_map_error; + } + return impl; +alloc_detour_map_error: + set_destroy(impl->library_map); alloc_library_map_error: set_destroy(impl->exec_path_map); alloc_exec_path_map_error: @@ -385,7 +396,7 @@ int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value * return 1; } -int loader_impl_dependencies(loader_impl impl) +int loader_impl_dependencies(loader_impl impl, detour d) { /* Dependencies have the following format: { @@ -424,6 +435,10 @@ int loader_impl_dependencies(loader_impl impl) The value in this case will be the library loaded, instead of the full path. */ + /* Initialize the loader detour */ + impl->d = d; + + /* Check if the loader has dependencies and load them */ if (dependencies_value != NULL) { size_t size = value_type_count(dependencies_value); @@ -544,6 +559,42 @@ int loader_impl_link(plugin p, loader_impl impl) return 0; } +detour_handle loader_impl_detour(loader_impl impl, const char *library, int (*load_cb)(detour, detour_handle)) +{ + detour_handle handle = set_get(impl->detour_map, (const set_key)library); + + if (handle == NULL) + { + dynlink library_handle = set_get(impl->library_map, (const set_key)library); + + if (library_handle == NULL) + { + return NULL; + } + + handle = detour_load_handle(impl->d, library_handle); + + if (handle == NULL) + { + return NULL; + } + + if (load_cb(impl->d, handle) != 0) + { + detour_unload(impl->d, handle); + return NULL; + } + + if (set_insert(impl->detour_map, (set_key)library, handle) != 0) + { + detour_unload(impl->d, handle); + return NULL; + } + } + + return handle; +} + configuration loader_impl_initialize_configuration(const loader_tag tag) { static const char configuration_key_suffix[] = "_loader"; @@ -1771,6 +1822,22 @@ int loader_impl_destroy_exec_path_map_cb_iterate(set s, set_key key, set_value v return 0; } +int loader_impl_destroy_detour_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) +{ + (void)s; + (void)key; + + if (val != NULL && args != NULL) + { + detour d = args; + detour_handle handle = val; + + detour_unload(d, handle); + } + + return 0; +} + int loader_impl_destroy_dependencies_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) { (void)s; @@ -1844,12 +1911,18 @@ void loader_impl_destroy_deallocate(loader_impl impl) value_type_destroy(impl->options); } + /* Destroy detour map */ + set_iterate(impl->detour_map, &loader_impl_destroy_detour_map_cb_iterate, impl->d); + + set_destroy(impl->detour_map); + /* TODO: I am not sure this will work. - This must be done when the plugin handle (aka the loader) gets unloaded, - at this point it is not unloaded yet, because the plugin destructor is called before doing: - dynlink_unload(p->descriptor->handle); - In theory it should work because normally those handles are reference counted but "I don't trust like that". + This must be done when the plugin handle (aka the loader) gets unloaded, + at this point it is not unloaded yet, because the plugin destructor is called before doing: + dynlink_unload(p->descriptor->handle); + In theory it should work because normally those handles are reference counted but "I don't trust like that". */ + /* Unload all the dependencies when everything has been destroyed and the loader is unloaded */ set_iterate(impl->library_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index f9530b7ab3..a4e57914c4 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -315,7 +315,7 @@ typedef struct loader_impl_c_handle_dynlink_type : loader_impl_c_handle_base_typ { /* This function will try to check if the library exists before loading it, so we avoid error messages from dynlink when guessing the file path for relative load from file */ - dynlink_name_impl platform_name; + dynlink_path platform_name; dynlink_platform_name(library_name, platform_name); diff --git a/source/loaders/ext_loader/source/ext_loader_impl.cpp b/source/loaders/ext_loader/source/ext_loader_impl.cpp index c41db8f1b4..ab4f182bd6 100644 --- a/source/loaders/ext_loader/source/ext_loader_impl.cpp +++ b/source/loaders/ext_loader/source/ext_loader_impl.cpp @@ -142,7 +142,7 @@ dynlink ext_loader_impl_load_from_file_dynlink(const char *path, const char *lib { /* This function will try to check if the library exists before loading it, so we avoid error messages from dynlink when guessing the file path for relative load from file */ - dynlink_name_impl platform_name; + dynlink_path platform_name; dynlink_platform_name(library_name, platform_name); diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index d05b2b4a6d..d622cbb0da 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -805,25 +805,6 @@ typedef struct loader_impl_napi_to_value_callback_closure_type } * loader_impl_napi_to_value_callback_closure; -class loader_impl_napi_constructor -{ -public: - loader_impl_napi_constructor() - { - static const loader_tag node_loader_tag = "node"; - - if (metacall_link_register(node_loader_tag, "node", "napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Node loader failed register the link hook"); - } - } - - ~loader_impl_napi_constructor() {} -}; - -/* Initializer of napi_register_module_v1 */ -static loader_impl_napi_constructor loader_impl_napi_ctor; - /* Type conversion */ static napi_value node_loader_impl_napi_to_value_callback(napi_env env, napi_callback_info info); @@ -4027,6 +4008,11 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con /* Result will never be defined properly */ node_impl->result = 0; + + if (metacall_link_register_impl(impl, "node", "napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Node Loader failed to hook napi_register_module_v1"); + } } /* Register initialization */ diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index 598358aa98..5012810fec 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -51,7 +51,7 @@ METACALL_API int metacall_link_initialize(void); * and dynamically interpose our functions. * * @param[in] tag -* Name of the loader which the @dependency belongs to +* Name of the loader which the @library belongs to * * @param[in] library * Name of the library that is going to be hooked @@ -67,12 +67,39 @@ METACALL_API int metacall_link_initialize(void); */ METACALL_API int metacall_link_register(const char *tag, const char *library, const char *symbol, void (*fn)(void)); +/** +* @brief +* Register a function pointer in order to allow function +* interposition when loading a library, if you register a +* function @symbol called 'foo', when you try to dlsym (or the equivalent +* on every platform), you will get the pointer to @fn, even if +* the symbol does not exist in the library, it will work. +* Function interposition is required in order to hook into runtimes +* and dynamically interpose our functions. +* +* @param[in] loader +* Pointer to the loader which the @library belongs to +* +* @param[in] library +* Name of the library that is going to be hooked +* +* @param[in] symbol +* Name of the function to be interposed +* +* @param[in] fn +* Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol +* +* @return +* Zero if success, different from zero otherwise +*/ +METACALL_API int metacall_link_register_impl(void *loader, const char *library, const char *symbol, void (*fn)(void)); + /** * @brief * Remove the hook previously registered * * @param[in] tag -* Name of the loader which the @dependency belongs to +* Name of the loader which the @library belongs to * * @param[in] library * Name of the library that is going to be hooked diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index 12f2f14dc5..c865e1ccda 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -256,12 +256,6 @@ int metacall_initialize(void) return 1; } - /* Initialize link */ - if (metacall_link_initialize() != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall link initialization"); - } - #ifdef METACALL_FORK_SAFE if (metacall_config_flags & METACALL_FLAGS_FORK_SAFE) { @@ -316,6 +310,7 @@ int metacall_initialize(void) } } + /* Initialize loader subsystem */ if (loader_initialize() != 0) { configuration_destroy(); @@ -323,6 +318,12 @@ int metacall_initialize(void) return 1; } + /* Initialize link */ + if (metacall_link_initialize() != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid MetaCall link initialization"); + } + /* Load core plugins */ if (metacall_plugin_extension_load() != 0) { diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index 838207de6b..df4b05cce2 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -33,11 +33,12 @@ #include +#include + #include /* -- Private Variables -- */ -static detour_handle detour_link_handle = NULL; static set metacall_link_table = NULL; static threading_mutex_type link_mutex = THREADING_MUTEX_INITIALIZE; @@ -52,9 +53,9 @@ typedef FARPROC (*metacall_link_trampoline_type)(HMODULE, LPCSTR); static const char metacall_link_func_name[] = "GetProcAddress"; static metacall_link_trampoline_type metacall_link_trampoline = NULL; -static detour_handle metacall_link_handle(detour d) +static metacall_link_trampoline_type metacall_link_func(void) { - return detour_load_address(d, (void (*)(void))(&GetProcAddress)); + return &GetProcAddress; } FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) @@ -87,30 +88,14 @@ FARPROC metacall_link_hook(HMODULE handle, LPCSTR symbol) #include -void (*metacall_link_func(void))(void) -{ - return (void (*)(void))(&dlsym); -} - typedef void *(*metacall_link_trampoline_type)(void *, const char *); static const char metacall_link_func_name[] = "dlsym"; static metacall_link_trampoline_type metacall_link_trampoline = NULL; -/* TODO: We have to implement a lazy loaded map for -detours and load it from the loaders whenever hooking -is required, on destroy we can delete all the hook handles -*/ - -static detour_handle metacall_link_handle(detour d) +static metacall_link_trampoline_type metacall_link_func(void) { - /* - return detour_load_address(d, (void (*)(void))(&dlsym)); - */ - /* - return detour_load_file(d, NULL); - */ - return detour_load_file(d, "/lib/x86_64-linux-gnu/libnode.so.72"); + return &dlsym; } void *metacall_link_hook(void *handle, const char *symbol) @@ -143,8 +128,6 @@ void *metacall_link_hook(void *handle, const char *symbol) int metacall_link_initialize(void) { - detour d = detour_create(metacall_detour()); - if (threading_mutex_initialize(&link_mutex) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid link mutex initialization"); @@ -152,34 +135,13 @@ int metacall_link_initialize(void) return 1; } - if (detour_link_handle == NULL) - { - /* Casting for getting the original function */ - union - { - metacall_link_trampoline_type *trampoline; - void (**ptr)(void); - } cast = { &metacall_link_trampoline }; - - detour_link_handle = metacall_link_handle(d); - - if (detour_link_handle == NULL) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour link installation"); + /* Initialize the default detour for the loaders */ + loader_detour(detour_create(metacall_detour())); - metacall_link_destroy(); - - return 1; - } - - if (detour_replace(d, detour_link_handle, metacall_link_func_name, (void (*)(void))(&metacall_link_hook), cast.ptr) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall invalid detour link replacement"); - - metacall_link_destroy(); - - return 1; - } + if (metacall_link_trampoline == NULL) + { + /* Store the original symbol link function */ + metacall_link_trampoline = metacall_link_func(); } if (metacall_link_table == NULL) @@ -199,6 +161,13 @@ int metacall_link_initialize(void) return 0; } +static int metacall_link_register_load_cb(detour d, detour_handle handle) +{ + void (*addr)(void) = NULL; + + return detour_replace(d, handle, metacall_link_func_name, (void (*)(void))(&metacall_link_hook), &addr); +} + int metacall_link_register(const char *tag, const char *library, const char *symbol, void (*fn)(void)) { void *ptr; @@ -208,6 +177,30 @@ int metacall_link_register(const char *tag, const char *library, const char *sym return 1; } + if (loader_hook(tag, library, metacall_link_register_load_cb) == NULL) + { + return 1; + } + + dynlink_symbol_uncast(fn, ptr); + + return set_insert(metacall_link_table, (set_key)symbol, ptr); +} + +int metacall_link_register_impl(void *loader, const char *library, const char *symbol, void (*fn)(void)) +{ + void *ptr; + + if (metacall_link_table == NULL) + { + return 1; + } + + if (loader_hook_impl(loader, library, metacall_link_register_load_cb) == NULL) + { + return 1; + } + dynlink_symbol_uncast(fn, ptr); return set_insert(metacall_link_table, (set_key)symbol, ptr); @@ -220,6 +213,10 @@ int metacall_link_unregister(const char *tag, const char *library, const char *s return 1; } + /* TODO: Restore the hook? We need support for this on the detour API */ + (void)tag; + (void)library; + return (set_remove(metacall_link_table, (set_key)symbol) == NULL); } @@ -227,15 +224,6 @@ void metacall_link_destroy(void) { threading_mutex_lock(&link_mutex); - if (detour_link_handle != NULL) - { - detour d = detour_create(metacall_detour()); - - detour_unload(d, detour_link_handle); - - detour_link_handle = NULL; - } - if (metacall_link_table != NULL) { set_destroy(metacall_link_table); diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index 94e6cc5d3b..d0f92a36a7 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -111,7 +111,7 @@ int plugin_manager_initialize(plugin_manager manager, const char *name, const ch #endif ; - dynlink_library_path_str path; + dynlink_path path; size_t length = 0; /* The order of precedence is: diff --git a/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp b/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp index 8843426330..48bd7a715a 100644 --- a/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp +++ b/source/plugins/sandbox_plugin/source/sandbox_plugin.cpp @@ -378,7 +378,10 @@ void *sandbox_signals(size_t argc, void *args[], void *data) SCMP_SYS(sigsuspend), SCMP_SYS(sigreturn), SCMP_SYS(rt_sigaction), - SCMP_SYS(rt_sigprocmask), + /* TODO: For some reason this makes the metacall-sandbox-plugin-test fail, + disabled it for now, we should review it + */ + /* SCMP_SYS(rt_sigprocmask), */ SCMP_SYS(rt_sigpending), SCMP_SYS(rt_sigsuspend), SCMP_SYS(rt_sigreturn), diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 5bf29f76c8..48c0372056 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -76,7 +76,7 @@ TEST_F(dynlink_test, DefaultConstructor) ASSERT_NE(handle, (dynlink)NULL); - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name_impl(handle)); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_path(handle)); EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); @@ -139,10 +139,10 @@ TEST_F(dynlink_test, DefaultConstructor) ASSERT_NE(handle, (dynlink)NULL); log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object absolute path: %s", absolute_path); - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_name_impl(handle)); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_path(handle)); log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name(handle)); - EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_name_impl(handle))); + EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_path(handle))); EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); if (handle != NULL) diff --git a/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp b/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp index ac62395012..a989448f45 100644 --- a/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp +++ b/source/tests/metacall_dynlink_path_test/source/metacall_dynlink_path_test.cpp @@ -33,7 +33,7 @@ TEST_F(metacall_dynlink_path_test, DefaultConstructor) { metacall_print_info(); - dynlink_library_path_str path; + dynlink_path path; const char name[] = "metacall" #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) From 3dd2c54e58a9619cea785a0124d91ffe777d9f3a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 17:46:05 +0200 Subject: [PATCH 089/364] Minor bug in cmake libgit2. --- cmake/FindLibGit2.cmake | 6 +- output | 4601 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 4604 insertions(+), 3 deletions(-) create mode 100644 output diff --git a/cmake/FindLibGit2.cmake b/cmake/FindLibGit2.cmake index f9f4497e3a..cb1c0cf0a1 100644 --- a/cmake/FindLibGit2.cmake +++ b/cmake/FindLibGit2.cmake @@ -44,13 +44,13 @@ endif() if(NOT LibGit2_VERSION AND LibGit2_INCLUDE_DIR) file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MAJOR REGEX "^#define LIBGIT2_VER_MAJOR +([0-9]+)") - string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MAJOR ${LibGit2_VERSION_MAJOR}) + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MAJOR "${LibGit2_VERSION_MAJOR}") file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_MINOR REGEX "^#define LIBGIT2_VER_MINOR +([0-9]+)") - string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MINOR ${LibGit2_VERSION_MINOR}) + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_MINOR "${LibGit2_VERSION_MINOR}") file(STRINGS "${LibGit2_INCLUDE_DIR}/git2/version.h" LibGit2_VERSION_REVISION REGEX "^#define LIBGIT2_VER_REVISION +([0-9]+)") - string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_REVISION ${LibGit2_VERSION_REVISION}) + string(REGEX MATCH "([0-9]+)$" LibGit2_VERSION_REVISION "${LibGit2_VERSION_REVISION}") set(LibGit2_VERSION "${LibGit2_VERSION_MAJOR}.${LibGit2_VERSION_MINOR}.${LibGit2_VERSION_REVISION}") endif() diff --git a/output b/output new file mode 100644 index 0000000000..de325f6b50 --- /dev/null +++ b/output @@ -0,0 +1,4601 @@ ++ export COMPOSE_DOCKER_CLI_BUILD=1 ++ COMPOSE_DOCKER_CLI_BUILD=1 ++ export DOCKER_BUILDKIT=1 ++ DOCKER_BUILDKIT=1 ++ export BUILDKIT_PROGRESS=plain ++ BUILDKIT_PROGRESS=plain ++ export PROGRESS_NO_TRUNC=1 ++ PROGRESS_NO_TRUNC=1 +++ command -v docker-compose ++ '[' -x /usr/local/bin/docker-compose ']' ++ DOCKER_COMPOSE=docker-compose ++ case "$1" in ++ sub_test ++ export DOCKER_BUILDKIT=0 ++ DOCKER_BUILDKIT=0 ++ export METACALL_BUILD_SANITIZER= ++ METACALL_BUILD_SANITIZER= ++ export METACALL_BUILD_COVERAGE= ++ METACALL_BUILD_COVERAGE= ++ export METACALL_BUILD_TYPE=debug ++ METACALL_BUILD_TYPE=debug ++ ln -sf tools/deps/.dockerignore .dockerignore ++ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm deps +Building deps +Sending build context to Docker daemon 41.47kB +Step 1/11 : ARG METACALL_BASE_IMAGE +Step 2/11 : FROM ${METACALL_BASE_IMAGE} AS deps + ---> 29f27ec2c121 +Step 3/11 : LABEL copyright.name="Vicente Eduardo Ferrer Garcia" copyright.address="vic798@gmail.com" maintainer.name="Vicente Eduardo Ferrer Garcia" maintainer.address="vic798@gmail.com" vendor="MetaCall Inc." version="0.1" + ---> Using cache + ---> 49a33baef77c +Step 4/11 : ARG METACALL_PATH + ---> Using cache + ---> 13cf6ef6b257 +Step 5/11 : ARG METACALL_TOOLS_PATH + ---> Using cache + ---> 74c0900e4935 +Step 6/11 : ENV DEBIAN_FRONTEND=noninteractive LTTNG_UST_REGISTER_TIMEOUT=0 NUGET_XMLDOC_MODE=skip DOTNET_CLI_TELEMETRY_OPTOUT=true + ---> Using cache + ---> 90e6f87497e7 +Step 7/11 : WORKDIR $METACALL_PATH + ---> Using cache + ---> 889e429fecde +Step 8/11 : COPY tools/metacall-environment.sh tools/nobuildtest.patch $METACALL_TOOLS_PATH/ + ---> Using cache + ---> 6039e0748a38 +Step 9/11 : ARG METACALL_BUILD_TYPE + ---> Using cache + ---> 7ef06f56da55 +Step 10/11 : ARG METACALL_INSTALL_OPTIONS + ---> Using cache + ---> 55bcc6a1ff91 +Step 11/11 : RUN chmod 500 $METACALL_TOOLS_PATH/metacall-environment.sh && $METACALL_TOOLS_PATH/metacall-environment.sh ${METACALL_BUILD_TYPE} ${METACALL_INSTALL_OPTIONS} && rm -rf $METACALL_PATH + ---> Using cache + ---> 663a36c6a1d2 +Successfully built 663a36c6a1d2 +Successfully tagged metacall/core:deps ++ ln -sf tools/dev/.dockerignore .dockerignore ++ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm dev +Building dev +Sending build context to Docker daemon 145MB +Step 1/11 : FROM metacall/core:deps AS dev + ---> 663a36c6a1d2 +Step 2/11 : LABEL copyright.name="Vicente Eduardo Ferrer Garcia" copyright.address="vic798@gmail.com" maintainer.name="Vicente Eduardo Ferrer Garcia" maintainer.address="vic798@gmail.com" vendor="MetaCall Inc." version="0.1" + ---> Using cache + ---> cad39512370c +Step 3/11 : ARG METACALL_PATH + ---> Using cache + ---> 667cbb0424d2 +Step 4/11 : ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build LOADER_SCRIPT_PATH=$METACALL_PATH/build/scripts CONFIGURATION_PATH=$METACALL_PATH/build/configurations/global.json SERIAL_LIBRARY_PATH=$METACALL_PATH/build DETOUR_LIBRARY_PATH=$METACALL_PATH/build PORT_LIBRARY_PATH=$METACALL_PATH/build DEBIAN_FRONTEND=noninteractive NODE_PATH=/usr/lib/node_modules DOTNET_CLI_TELEMETRY_OPTOUT=true + ---> Using cache + ---> 9880ade75ea2 +Step 5/11 : WORKDIR $METACALL_PATH + ---> Using cache + ---> 60b4d0ff9791 +Step 6/11 : COPY . $METACALL_PATH + ---> 61fa6f901dff +Step 7/11 : RUN chmod 500 $METACALL_PATH/tools/metacall-configure.sh && chmod 500 $METACALL_PATH/tools/metacall-build.sh && mkdir -p $METACALL_PATH/build + ---> Running in 83b240d9adc6 +Removing intermediate container 83b240d9adc6 + ---> 605f80d762f6 +Step 8/11 : ARG METACALL_BUILD_TYPE + ---> Running in f1af673b92af +Removing intermediate container f1af673b92af + ---> 84b68123c202 +Step 9/11 : ARG METACALL_BUILD_OPTIONS + ---> Running in c6ce85603c04 +Removing intermediate container c6ce85603c04 + ---> 2407b0953672 +Step 10/11 : RUN cd $METACALL_PATH/build && $METACALL_PATH/tools/metacall-configure.sh ${METACALL_BUILD_TYPE} ${METACALL_BUILD_OPTIONS} + ---> Running in 84f6a9010292 +Current option settings +errexit on +noglob off +ignoreeof off +interactive off +monitor off +noexec off +stdin off +xtrace on +verbose off +vi off +emacs off +noclobber off +allexport off +notify off +nounset on +privileged off +nolog off +pipefail off +debug off ++ pwd ++ ROOT_DIR=/usr/local/metacall/build ++ BUILD_TYPE=Release ++ BUILD_PYTHON=0 ++ BUILD_RUBY=0 ++ BUILD_NETCORE=0 ++ BUILD_NETCORE2=0 ++ BUILD_NETCORE5=0 ++ BUILD_NETCORE7=0 ++ BUILD_V8=0 ++ BUILD_NODEJS=0 ++ BUILD_TYPESCRIPT=0 ++ BUILD_FILE=0 ++ BUILD_RPC=0 ++ BUILD_WASM=0 ++ BUILD_JAVA=0 ++ BUILD_C=0 ++ BUILD_COBOL=0 ++ BUILD_GO=0 ++ BUILD_RUST=0 ++ BUILD_ZIG=0 ++ BUILD_SCRIPTS=0 ++ BUILD_EXAMPLES=0 ++ BUILD_TESTS=0 ++ BUILD_BENCHMARKS=0 ++ BUILD_PORTS=0 ++ BUILD_SANDBOX=0 ++ BUILD_COVERAGE=0 ++ BUILD_ADDRESS_SANITIZER=0 ++ BUILD_THREAD_SANITIZER=0 ++ BUILD_MEMORY_SANITIZER=0 ++ uname -s ++ OPERATIVE_SYSTEM=Linux ++ [ -f /etc/os-release ] ++ cat /etc/os-release ++ grep ^ID= ++ cut -f2- -d= ++ sed -e s/^[[:space:]]*// -e s/[[:space:]]*$// ++ tr -d " ++ LINUX_DISTRO=debian ++ + cat /etc/os-release +grep ^VERSION_ID= ++ cut -f2- -d= ++ sed -e s/^[[:space:]]*// -e s/[[:space:]]*$// ++ tr -d " ++ LINUX_VERSION_ID= ++ sub_options debug python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks ++ [ debug = debug ] ++ echo Build all scripts in debug mode ++ BUILD_TYPE=Debug ++ [ debug = release ] ++ [ debug = relwithdebinfo ] ++ [ debug = python ] ++ [ debug = ruby ] ++ [ debug = netcore ] ++ [ debug = netcore2 ] ++ [ debug = netcore5 ] ++ [ debug = netcore7 ] ++ [ debug = v8 ] ++ [ debug = nodejs ] ++ [ debug = typescript ] ++ [ debug = file ] ++ [ debug = rpc ] ++ [ debug = wasm ] ++ [ debug = java ] ++ [ debug = c ]Build all scripts in debug mode + ++ [ debug = cobol ] ++ [ debug = go ] ++ [ debug = rust ] ++ [ debug = zig ] ++ [ debug = scripts ] ++ [ debug = examples ] ++ [ debug = tests ] ++ [ debug = benchmarks ] ++ [ debug = ports ] ++ [ debug = sandbox ] ++ [ debug = coverage ] ++ [ debug = address-sanitizer ] ++ [ debug = thread-sanitizer ] ++ [ debug = memory-sanitizer ] ++ [ python = debug ] ++ [ python = release ] ++ [ python = relwithdebinfo ] ++ [ python = python ] ++ echo Build with python support ++ BUILD_PYTHON=1 ++ [ python = ruby ] ++ [ python = netcore ] ++ [ python = netcore2 ] ++ [ python = netcore5 ] ++ [ python = netcore7 ] ++ [ python = v8 ] ++ [ python = nodejs ] ++ [ python = typescript ] ++ [ python = file ] ++ [ python = rpc ] ++ [ python = wasmBuild with python support + ] ++ [ python = java ] ++ [ python = c ] ++ [ python = cobol ] ++ [ python = go ] ++ [ python = rust ] ++ [ python = zig ] ++ [ python = scripts ] ++ [ python = examples ] ++ [ python = tests ] ++ [ python = benchmarks ] ++ [ python = ports ] ++ [ python = sandbox ] ++ [ python = coverage ] ++ [ python = address-sanitizer ] ++ [ python = thread-sanitizer ] ++ [ python = memory-sanitizer ] ++ Build with ruby support +[ ruby = debug ] ++ [ ruby = release ] ++ [ ruby = relwithdebinfo ] ++ [ ruby = python ] ++ [ ruby = ruby ] ++ echo Build with ruby support ++ BUILD_RUBY=1 ++ [ ruby = netcore ] ++ [ ruby = netcore2 ] ++ [ ruby = netcore5 ] ++ [ ruby = netcore7 ] ++ [ ruby = v8 ] ++ [ ruby = nodejs ] ++ [ ruby = typescript ] ++ [ ruby = file ] ++ [ ruby = rpc ] ++ [ ruby = wasm ] ++ [ ruby = java ] ++ [ ruby = c ] ++ [ ruby = cobol ] ++ [ ruby = go ] ++ [ ruby = rust ] ++ [ ruby = zig ] ++ [ ruby = scripts ] ++ [ ruby = examples ] ++ [ ruby = tests ] ++ [ ruby = benchmarks ] ++ [ ruby = ports ] ++ [ ruby = sandbox ] ++ [ ruby = coverage ] ++ [ ruby = address-sanitizer ] ++ [ ruby = thread-sanitizer ] ++ [ ruby = memory-sanitizer ] ++ [ netcore7 = debug ] ++ [ netcore7 = release ] ++ [ netcore7 = relwithdebinfo ] ++ [ netcore7 = python ] ++ [ netcore7 = ruby ] ++ [ netcore7 = netcore ] ++ [ netcore7 = netcore2 ] ++ [ netcore7 = netcore5 ] ++ [Build with netcore 7 support + netcore7 = netcore7 ] ++ echo Build with netcore 7 support ++ BUILD_NETCORE7=1 ++ [ netcore7 = v8 ] ++ [ netcore7 = nodejs ] ++ [ netcore7 = typescript ] ++ [ netcore7 = file ] ++ [ netcore7 = rpc ] ++ [ netcore7 = wasm ] ++ [ netcore7 = java ] ++ [ netcore7 = c ] ++ [ netcore7 = cobol ] ++ [ netcore7 = go ] ++ [ netcore7 = rust ] ++ [ netcore7 = zig ] ++ [ netcore7 = scripts ] ++ [ netcore7 = examples ] ++ [ netcore7 = tests ] ++ [ netcore7 = benchmarks ] ++ [ netcore7 = ports ] ++ [ netcore7 = sandbox ] ++ [ netcore7 = coverage ] ++ [ netcore7 = address-sanitizer ] ++ [ netcore7 = thread-sanitizer ] ++ [ netcore7 = memory-sanitizer ] ++ [ nodejs = debug ] ++ [ nodejs = release ] ++ [ nodejs = relwithdebinfo ] ++ [ nodejs = python ] ++ [ nodejs = ruby ] ++ [ nodejs = netcore ] ++ [ nodejs = netcore2 ] ++ [ nodejs = netcore5 ] ++ [ nodejs = netcore7 ] ++ [ nodejs = v8 ] ++ [ nodejs = nodejs ] ++ echo Build with nodejs support ++ BUILD_NODEJS=1 ++ [ nodejs = typescript ] ++ [ nodejs = file ] ++ [ nodejs = rpc ] ++ [ nodejs = wasm ] ++ [ nodejs = java ] ++ [ nodejs = c ] ++ [ nodejs = cobol ] ++ [ nodejs = go ] ++ [ nodejs = rust ] ++ [ nodejs = zig ] ++ [ nodejs = scripts ] ++ [ nodejs = examples ] ++ [ nodejs = tests ] ++ [ nodejs = benchmarks ] ++ [ nodejs = ports ] ++ [ nodejs = sandbox ] ++ [ nodejs = coverage ] ++ [ nodejs = address-sanitizer ] ++ [ nodejs = thread-sanitizer ] ++ [ nodejs = memory-sanitizer ] ++ [ typescript = debug ] ++ [ typescript = release ] ++ [ typescript = relwithdebinfo ] ++ [ typescript = python ] ++ [ typescript = ruby ] ++ [ typescript = netcore ] ++ [ typescript = netcore2 ] ++ [ typescript = netcore5 ] ++ [ typescript = netcore7 ] ++ [ typescript = v8 ] ++ [ typescript = nodejs ] ++ [ typescript = typescript ] ++ echo Build with typescript support ++ BUILD_TYPESCRIPT=1 ++ [ typescript = file ] ++ [ typescript = rpc ] ++ [ typescript = wasm ] ++ [ typescript = java ] ++ [ typescript = c ] ++ [ typescript = cobol ] ++ [ typescript = go ] ++ [ typescript = rust ] ++ [ typescript = zig ] ++ [ typescript = scripts ] ++ [ typescript = examples ] ++ [ typescript = tests ] ++ [ typescript = benchmarks ] ++ [ typescript = ports ] ++ [ typescript = sandbox ] ++ [ typescript = coverage ] ++ [ typescript = address-sanitizer ] ++ [ typescript = thread-sanitizer ] ++ [ typescript = memory-sanitizer ] ++ [ file = debug ] ++ [ file = release ] ++ [ file = relwithdebinfo ] ++ [ file = python ] ++ [ file = ruby ] ++ [ file = netcore ] ++ [ file = netcore2 ] ++ [ file = netcore5 ] ++ [ file = netcore7 ] ++ [ file = v8 ] ++ [ file = nodejs ] ++ [ file = typescript ] ++ [ file = file ] ++ echo Build with file support ++ BUILD_FILE=1 ++ [ file = rpc ] ++ [ file = wasm ] +Build with nodejs support +Build with typescript support +Build with file support ++ [ file = java ] ++ [ file = c ] ++ [ file = cobol ] ++ [ file = go ] ++ [ file = rust ] ++ [ file = zig ] ++ [ file = scripts ] ++ [ file = examples ] ++ [ file = tests ] ++ [ file = benchmarks ] ++ [ file = ports ] ++ [ file = sandbox ] ++ [ file = coverage ] ++ [ file = address-sanitizer ] ++ [ file = thread-sanitizer ] ++ [ file = memory-sanitizer ] ++ [ rpc = debug ] ++ [ rpc = release ] ++ [ rpc = relwithdebinfo ] ++ [ rpc = python ] ++ [ rpc = ruby ] ++ [ rpc = netcore ] ++ [ rpc = netcore2 ] ++ [ rpc = netcore5 ] ++ [ rpc = netcore7 ] ++ [ rpc = v8 ] ++ [ rpc = nodejs ] ++ [ rpc = typescript ] ++ [ rpc = file ] ++ [ rpc = rpc ] ++ echo Build with rpc support ++ BUILD_RPC=1 ++ [ rpc = wasm ] ++ [ rpc = java ] ++ [ rpc = c ] ++ [ rpc = cobol ] ++ [ rpc = go ] ++ [ rpc = rust ] ++ [ rpc = zig ] ++ [ rpc = scripts ] ++ [ rpc = examples ] ++ [ rpc = tests ] ++ [ rpc = benchmarks ] ++ [ rpc = ports ] ++ [ rpc = sandbox ] ++ [ rpc = coverage ] ++ [ rpc = address-sanitizer ] ++ [ rpc = thread-sanitizer ] ++ [ rpc = memory-sanitizer ] ++ [ wasm = debug ] ++ [ wasm = release ] ++ [ wasm = relwithdebinfo ] ++ [ wasm = python ] ++ [ wasm = ruby ] ++ [ wasm = netcore ] ++ [ wasm = netcore2 ] ++ [ wasm = netcore5Build with rpc support + ] ++ [ wasm = netcore7 ] ++ [ wasm = v8 ] ++ [ wasm = nodejs ] ++ [ wasm = typescript ] ++ [ wasm = file ] ++ [ wasm = rpc ] ++ [ wasm = wasm ] ++ echo Build with wasm support ++ BUILD_WASM=1 ++ [ wasm = java ] ++ [ wasm = c ] ++ [ wasm = cobol ] ++ [ wasm = go ] ++ [ wasm = rust ] ++ [ wasm = zig ] ++ [ wasm = scripts ] ++ [ wasm = examples ] ++ [ wasmBuild with wasm support + = tests ] ++ [ wasm = benchmarks ] ++ [ wasm = ports ] ++ [ wasm = sandbox ] ++ [ wasm = coverage ] ++ [ wasm = address-sanitizer ] ++ [ wasm = thread-sanitizer ] ++ [ wasm = memory-sanitizer ] ++ [ java = debug ] ++ [ java = release ] ++ [ java = relwithdebinfo ] ++ [ java = python ] ++ [ java = ruby ] ++ [ java = netcore ] ++ [ java = netcore2 ] ++ [ java = netcore5 ] ++ [ java = netcore7 ] ++ [ java = v8 ] ++ [ java = nodejs ] ++ [ java = typescript ] ++ [ java = file ] ++ [ java = rpc ] ++ [ java = wasm ] ++ [ java = java ] ++ echo Build with java support ++ BUILD_JAVA=1 ++ [ java = c ] ++ [ java = cobol ] ++ [ java = go ] ++ [ java = rust ] ++ [ java = zig ] ++ [ java = scripts ] ++ [ java = examples ] +Build with java support ++ [ java = tests ] ++ [ java = benchmarks ] ++ [ java = ports ] ++ [ java = sandbox ] ++ [ java = coverage ] ++ [ java = address-sanitizer ] ++ [ java = thread-sanitizer ] ++ [ java = memory-sanitizer ] ++ [ c = debug ] ++ [ c = release ] ++ [ c = relwithdebinfo ] ++ [ c = python ] ++ [ c = ruby ] ++ [ c = netcore ] ++ [ c = netcore2 ] ++ [ c = netcore5 ] ++ [ c = netcore7 ] ++ [ c = v8 ] ++ [ c = nodejs ] ++ [ c = typescript ] ++ [ c = file ] ++ [ c = rpc ] ++ [ c = wasm ] ++ [ c = java ] ++ [ c = c ] ++ echo Build with c support ++ BUILD_C=1 ++ [ c = cobol ] ++ [ c = go ] ++ [ c = rust ] ++ [ c = zig ] ++ [ c = scripts ] ++ [ c = examples ] ++ [ c = tests ] ++ [ c = benchmarks ] ++ [ c = ports ] ++ [ c = sandbox ] ++ [ c = coverage ] ++ [ c = address-sanitizer ] ++ [ c = thread-sanitizer ] ++ [ c = memory-sanitizer ] ++ [ cobol = debug ] ++ [ cobol = release ] ++ [ cobol = relwithdebinfo ] ++ [ cobol = python ] ++ [ cobol = ruby ] ++ [ cobol = netcore ] ++ [ cobol = netcore2 ] ++ [ cobol = netcore5 ] ++ [ cobol = netcore7 ] ++ [ cobol = v8 ] ++ [ cobol = nodejs ] ++ [ cobol = typescript ] ++ [ cobol = file ] ++ [ cobol = rpc ] ++ [ cobol = wasm ] ++ [ cobol = java ] ++ [ cobol = c ] ++ [ cobol = cobol ] ++ echo Build with cobol support ++ BUILD_COBOL=1 ++ [ cobol = go ] ++ [ cobol = rust ] ++ [ cobol = zig ] ++ [ cobol = scripts ] ++ [ cobol = examples ] ++ [ cobol = tests ] ++ [ cobol = benchmarks ] ++ [ cobol = ports ] ++ [ cobol = sandbox ] ++ [ cobol = coverage ] ++ [ cobol = address-sanitizer ] ++ [ cobol = thread-sanitizer ] ++ [ cobol = memory-sanitizer ] ++ [ go = debug ] ++ [ go = release ] ++ [ go = relwithdebinfo ] ++ [ go = python ] ++ [ go = ruby ] ++ [ go = netcore ] ++ [ go = netcore2 ] ++ [ go = netcore5 ] ++ [ go = netcore7 ] ++ [ go = v8 ] ++ [ go = nodejs ] ++ [ go = typescript ] ++ [ go = file ] ++ [ go = rpc ] ++ [ go = wasm ] ++ [ go = java ] ++ [ go = c ] ++ [ go = cobol ] ++ [ go = go ] ++ echo Build with go support ++ BUILD_GO=1 ++ [ go = rust ] ++ [ go = zig ] ++ [ go = scripts ] ++ [ go = examples ] ++ [ go = tests ] ++ [ go = benchmarks ] ++ [ go = ports ] ++ [ go = sandbox ] ++ [ go = coverage ] ++ [ go = address-sanitizer ] ++ [ go = thread-sanitizer ] ++ [ go = memory-sanitizer ] ++ [ rust = debug ] ++ [ rust = release ] ++ [ rust = relwithdebinfo ] ++ [ rust = python ] ++ [ rust = ruby ] ++ [ rust = netcore ] ++ [ rust = netcore2 ] ++ [ rust = netcore5 ] ++ [ rust = netcore7 ] ++ [ rust = v8 ] ++ [ rust = nodejs ] ++ [ rust = typescript ] ++ [ rust = file ] ++ [ rust = rpc ] ++ [ rust = wasm ] ++ [ rust = java ] ++ [ rust = c ] ++ [ rust = cobol ] ++ [ rust = go ] ++ [ rust = rust ] ++ echo Build with rust support ++ BUILD_RUST=1 ++ [ rust = zig ] ++ [ rust = scripts ] ++ [ rust = examples ] ++ [ rust = tests ] ++ [ rust = benchmarks ] ++ [ rust = ports ] ++ [ rust = sandbox ] ++ [ rust = coverage ] ++ [ rust = address-sanitizer ] ++ [ rust = thread-sanitizer ] ++ [ rust = memory-sanitizer ] ++ [ examples = debug ] ++ [ examples = release ] ++ [ examples = relwithdebinfo ] ++ [ examples = python ] ++ [ examples = ruby ] ++ [ examples = netcore ] ++ [ examples = netcore2 ] ++ [ examples = netcore5 ] ++ [ examples = netcore7 ] ++ [ examples = v8 ] ++ [ examples = nodejs ] ++ [ examples = typescript ] ++ [ examples = file ] ++ [ examples = rpc ] ++ [ examples = wasm ] ++ [ examples = java ] ++ [ examples = c ] ++ [ examples = cobol ] ++ [ examples = go ] ++ [ examples = rust ] ++ [ examples = zig ] ++ [ examples = scripts ] ++ [ examples = examples ] ++ echo Build all examples ++ BUILD_EXAMPLES=1 ++ [ examples = tests ] ++ [ examples = benchmarks ] ++ [ examples = ports ] ++ [ examples = sandbox ] ++ [ examples = coverage ] ++ [ examples = address-sanitizer ] ++ [ examples = thread-sanitizer ] ++ [ examples = memory-sanitizer ] ++ [ tests = debug ] ++ [ tests = release ] ++ [ tests = relwithdebinfo ] ++ [ tests = python ] ++ [ tests = ruby ] ++ [ tests = netcore ] ++ [ tests = netcore2 ] ++ [ tests = netcore5 ] ++ [ tests = netcore7 ] ++ [ tests = v8 ] ++ [ tests = nodejs ] ++ [ tests = typescript ] ++ [ tests = file ] ++ [ tests = rpc ] ++ [ tests = wasm ] ++ [ tests = java ] ++ [ tests = c ] ++ [ tests = cobol ] ++ [ tests = go ] ++ [ tests = rust ] ++ [ tests = zig ] ++ [ tests = scripts ] ++ [ tests = examples ] ++ [ tests = tests ] ++ echo Build all tests ++ BUILD_TESTS=1 ++ [ tests = benchmarks ] ++ [ tests = ports ] ++ [ tests = sandbox ] ++ [ tests = coverage ] ++ [ tests = address-sanitizer ] ++ [ tests = thread-sanitizer ] ++ [ tests = memory-sanitizer ] ++ [ scripts = debug ] ++ [ scripts = release ] ++ [ scripts = relwithdebinfo ] ++ [ scripts = python ]Build with c support +Build with cobol support +Build with go support +Build with rust support +Build all examples +Build all tests + ++ [ scripts = ruby ] ++ [ scripts = netcore ] ++ [ scripts = netcore2 ] ++ [ scripts = netcore5 ] ++ [ scripts = netcore7 ] ++ [ scripts = v8 ] ++ [ scripts = nodejs ] ++ [ scripts = typescript ] ++ [ scripts = file ] ++ [ scripts = rpc ] ++ [ scripts = wasm ] ++ [ scripts = java ] ++ [ scripts = c ] ++ [ scripts = cobol ] ++ [ scripts = go ] ++ [ scripts = rust ] ++ [ scripts = zig ] ++ [ scripts = scripts ] ++ echo Build all scripts ++ BUILD_SCRIPTS=1 ++ [ scripts = examples ] ++ [ scripts = tests ] ++ [ scripts = benchmarks ] ++ [ scripts = ports ] ++ [ scripts = sandbox ] ++ [ scripts = coverage ] ++ [ scripts = address-sanitizer ] ++ [ scripts = thread-sanitizer ] ++ [ scripts = memory-sanitizer ] ++ [ ports = debug ] ++ [ ports = release ] ++ [ ports = relwithdebinfo ] +Build all scripts ++ [ ports = python ] ++ [ ports = ruby ] ++ [ ports = netcore ] ++ [ ports = netcore2 ] ++ [ ports = netcore5 ] ++ [ ports = netcore7 ] ++ [ ports = v8 ] ++ [ ports = nodejs ] ++ [ ports = typescript ] ++ [ ports = file ] ++ [ ports = rpc ] ++ [ ports = wasm ] ++ [ ports = java ] ++ [ ports = c ] ++ [ ports = cobol ] ++ [ ports = go ] ++ [ ports = rust ] ++ [ ports = zig ] ++ [ ports = scripts ] ++ [ ports = examples ] ++ [ ports = tests ] ++ [ ports = benchmarks ] ++ [ ports = ports ] ++ echo Build all ports +Build all ports ++ BUILD_PORTS=1 ++ [ ports = sandbox ] ++ [ ports = coverage ] ++ [ ports = address-sanitizer ] ++ [ ports = thread-sanitizer ] ++ [ ports = memory-sanitizer ] ++ [ install = debug ] ++ [ install = release ] ++ [ install = relwithdebinfo ] ++ [ install = python ] ++ [ install = ruby ] ++ [ install = netcore ] ++ [ install = netcore2 ] ++ [ install = netcore5 ] ++ [ install = netcore7 ] ++ [ install = v8 ] ++ [ install = nodejs ] ++ [ install = typescript ] ++ [ install = file ] ++ [ install = rpc ] ++ [ install = wasm ] ++ [ install = java ] ++ [ install = c ] ++ [ install = cobol ] ++ [ install = go ] ++ [ install = rust ] ++ [ install = zig ] ++ [ install = scripts ] ++ [ install = examples ] ++ [ install = tests ] ++ [ install = benchmarks ] ++ [ install = ports ] ++ [ install = sandbox ] ++ [ install = coverage ] ++ [ install = address-sanitizer ] ++ [ install = thread-sanitizer ] ++ [ install = memory-sanitizer ] ++ [ pack = debug ] ++ [ pack = release ] ++ [ pack = relwithdebinfo ] ++ [ pack = python ] ++ [ pack = ruby ] ++ [ pack = netcore ] ++ [ pack = netcore2 ] ++ [ pack = netcore5 ] ++ [ pack = netcore7 ] ++ [ pack = v8 ] ++ [ pack = nodejs ] ++ [ pack = typescript ] ++ [ pack = file ] ++ [ pack = rpc ] ++ [ pack = wasm ] ++ [ pack = java ] ++ [ pack = c ] ++ [ pack = cobol ] ++ [ pack = go ] ++ [ pack = rust ] ++ [ pack = zig ] ++ [ pack = scripts ] ++ [ pack = examples ] ++ [ pack = tests ] ++ [ pack = benchmarks ] ++ [ pack = ports ] ++ [ pack = sandbox ] ++ [ pack = coverage ] ++ [ pack = address-sanitizer ] ++ [ pack = thread-sanitizer ] ++ [ pack = memory-sanitizer ] ++ [ sandbox = debug ] ++ [ sandbox = release ] ++ [ sandbox = relwithdebinfo ] ++ [ sandbox = python ] ++ [ sandbox = ruby ] ++ [ sandbox = netcore ] ++ [ sandbox = netcore2 ] ++ [ sandbox = netcore5 ] ++ [ sandbox = netcore7 ] ++ [ sandbox = v8 ] ++ [ sandbox = nodejs ] ++ [ sandbox = typescript ] ++ [ sandbox = file ] ++ [ sandbox = rpc ] ++ [ sandbox = wasm ] ++ [ sandbox = java ] ++ [ sandbox = c ] ++ [ sandbox = cobol ] ++ [ sandbox = go ] ++ [ sandbox = rust ] ++ [ sandbox = zig ] ++ [ sandbox = scripts ] ++ [ sandbox = examples ] ++ [ sandbox = tests ] ++ [ sandbox = benchmarks ] ++ [ sandbox = ports ] ++ [ sandbox = sandbox ] ++ echo Build with sandboxing support ++ BUILD_SANDBOX=1 ++ [ sandbox = coverage ] ++ [ sandbox = address-sanitizer ] ++ [ sandbox = thread-sanitizer ] ++ [ sandbox = memory-sanitizer ] ++ [ benchmarks = debug ] ++ [ benchmarks = release ] ++ [ benchmarks = relwithdebinfo ] ++ [ benchmarks = python ] ++ [ benchmarks = ruby ] ++ [ benchmarks = netcore ] ++ [ benchmarks = netcore2 ] ++ [ benchmarks = netcore5 ] ++ [ benchmarks = netcore7 ] ++ [ benchmarks = v8 ] ++ [ benchmarks = nodejs ] ++ [ benchmarks = typescript ] ++ [ benchmarks = file ] ++ [ benchmarks = rpcBuild with sandboxing support +Build all benchmarks + ] ++ [ benchmarks = wasm ] ++ [ benchmarks = java ] ++ [ benchmarks = c ] ++ [ benchmarks = cobol ] ++ [ benchmarks = go ] ++ [ benchmarks = rust ] ++ [ benchmarks = zig ] ++ [ benchmarks = scripts ] ++ [ benchmarks = examples ] ++ [ benchmarks = tests ] ++ [ benchmarks = benchmarks ] ++ echo Build all benchmarks ++ BUILD_BENCHMARKS=1 ++ [ benchmarks = ports ] ++ [ benchmarks = sandbox ] ++ [ benchmarks = coverage ] ++ [ benchmarks = address-sanitizer ] ++ [ benchmarks = thread-sanitizer ] ++ [ benchmarks = memory-sanitizer ] ++ sub_configure ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On ++ [ debian = alpine ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On ++ [ Linux = Darwin ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On ++ [ 0 = 1 ] ++ [ 0 = 1 ] ++ [ 0 = 1 ] ++ [ 1 = 1 ] ++ sub_find_dotnet_runtime 7 ++ dotnet --list-runtimes ++ grep -m 1 Microsoft.NETCore.App 7 ++ NETCORE_BASE_PATH=Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] ++ echo Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] ++ awk { print $3 } ++ tail -c +2 ++ head -c -2 ++ echo Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] ++ awk { print $2 } ++ echo /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On ++ [ 0 = 1 ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On ++ [ debian = alpine ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On ++ [ 1 = 1 ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On ++ [ 0 = 1 ] ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On ++ [ 1 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On ++ [ 0 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off ++ [ 0 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off ++ [ 0 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off ++ [ 0 = 1 ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off ++ CMAKE_CONFIG_FILE=/usr/local/metacall/build/CMakeConfig.txt ++ [ -f /usr/local/metacall/build/CMakeConfig.txt ] ++ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off -DCMAKE_BUILD_TYPE=Debug ++ cmake -Wno-dev -DOPTION_GIT_HOOKS=Off -DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off -DCMAKE_BUILD_TYPE=Debug .. +-- The C compiler identification is GNU 14.2.0 +-- The CXX compiler identification is GNU 14.2.0 +-- Detecting C compiler ABI info +-- Detecting C compiler ABI info - done +-- Check for working C compiler: /usr/bin/cc - skipped +-- Detecting C compile features +-- Detecting C compile features - done +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - done +-- Check for working CXX compiler: /usr/bin/c++ - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Target Operative System: Linux +-- Target OS Family: unix +-- Linux x86_64 64bit detected +CMake Warning at CMakeLists.txt:162 (message): + Linting disabled: clang-format executable not found + + +-- Lib version +-- Performing Test PIC_C_FLAG +-- Performing Test PIC_C_FLAG - Success +-- Performing Test STACK_PROTECTOR_STRONG_C_FLAG +-- Performing Test STACK_PROTECTOR_STRONG_C_FLAG - Success +-- Performing Test FORTIFY_SOURCE_C_FLAG +-- Performing Test FORTIFY_SOURCE_C_FLAG - Success +-- Performing Test PIC_CXX_FLAG +-- Performing Test PIC_CXX_FLAG - Success +-- Performing Test STACK_PROTECTOR_STRONG_CXX_FLAG +-- Performing Test STACK_PROTECTOR_STRONG_CXX_FLAG - Success +-- Performing Test FORTIFY_SOURCE_CXX_FLAG +-- Performing Test FORTIFY_SOURCE_CXX_FLAG - Success +-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY +-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success +-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY +-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success +-- Performing Test COMPILER_HAS_DEPRECATED_ATTR +-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success +-- Lib preprocessor +-- Lib environment +-- Lib format +-- Lib log +-- Lib memory +-- Lib portability +-- Lib threading +-- Lib adt +-- Lib filesystem +-- Lib dynlink +-- Lib plugin +-- Lib detour +-- Lib reflect +-- Lib serial +-- Lib configuration +-- Lib loader +-- Lib metacall +-- Found LibFFI: /usr/lib/x86_64-linux-gnu/libffi.so +-- Could NOT find LibTCC (missing: LIBTCC_LIBRARY LIBTCC_INCLUDE_DIR) +-- Installing LibTCC 6ec4a10 +-- Found LibClang: /usr/lib/llvm-14/lib/libclang.so +-- Plugin c_loader +-- Found COBOL: /usr/bin/cobc (found version "3.2.0") +-- Plugin cob_loader +-- Plugin cs_loader_impl implementation +-- Plugin cs_loader +-- Plugin ext_loader +-- Plugin file_loader +-- Found JNI: /usr/lib/jvm/default-java/include found components: AWT JVM +-- Found Java: /usr/bin/java (found version "21.0.7") +-- Plugin java_loader_bootstrap bootstrap +-- Plugin java_loader +-- Plugin mock_loader +-- Searching NodeJS library version 115 +-- NodeJS Library Found +-- Found NodeJS: /usr/bin/node (found version "20.19.0") +-- Found NPM: /usr/bin/npm (found version "9.2.0") +-- Plugin node_loader_bootstrap bootstrap +-- Plugin node_loader +-- Found Python3: /usr/include/python3.13d (found version "3.13.2") found components: Development Development.Module Development.Embed +-- Plugin py_loader +-- Found Ruby: /usr/bin/ruby (found suitable version "3.3.7", minimum required is "1.8.0") +-- Plugin rb_loader +CMake Warning at source/loaders/rs_loader/CMakeLists.txt:8 (message): + Rust loader is out of date, needs to be updated in order to work + + +-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "8.13.0") +-- Plugin rpc_loader +-- Plugin ts_loader_bootstrap bootstrap +-- Plugin ts_loader +-- Wasmtime C API library or headers not found, downloading from archive +-- [download 0% complete] +-- [download 1% complete] +-- [download 2% complete] +-- [download 3% complete] +-- [download 4% complete] +-- [download 5% complete] +-- [download 6% complete] +-- [download 7% complete] +-- [download 8% complete] +-- [download 9% complete] +-- [download 10% complete] +-- [download 11% complete] +-- [download 12% complete] +-- [download 13% complete] +-- [download 14% complete] +-- [download 15% complete] +-- [download 16% complete] +-- [download 17% complete] +-- [download 18% complete] +-- [download 19% complete] +-- [download 20% complete] +-- [download 21% complete] +-- [download 22% complete] +-- [download 23% complete] +-- [download 24% complete] +-- [download 25% complete] +-- [download 26% complete] +-- [download 27% complete] +-- [download 28% complete] +-- [download 29% complete] +-- [download 30% complete] +-- [download 31% complete] +-- [download 32% complete] +-- [download 33% complete] +-- [download 34% complete] +-- [download 35% complete] +-- [download 36% complete] +-- [download 37% complete] +-- [download 38% complete] +-- [download 39% complete] +-- [download 40% complete] +-- [download 41% complete] +-- [download 42% complete] +-- [download 43% complete] +-- [download 44% complete] +-- [download 45% complete] +-- [download 46% complete] +-- [download 47% complete] +-- [download 48% complete] +-- [download 49% complete] +-- [download 50% complete] +-- [download 51% complete] +-- [download 52% complete] +-- [download 53% complete] +-- [download 54% complete] +-- [download 55% complete] +-- [download 56% complete] +-- [download 57% complete] +-- [download 58% complete] +-- [download 59% complete] +-- [download 60% complete] +-- [download 61% complete] +-- [download 62% complete] +-- [download 63% complete] +-- [download 64% complete] +-- [download 65% complete] +-- [download 66% complete] +-- [download 67% complete] +-- [download 68% complete] +-- [download 69% complete] +-- [download 70% complete] +-- [download 71% complete] +-- [download 72% complete] +-- [download 73% complete] +-- [download 74% complete] +-- [download 75% complete] +-- [download 76% complete] +-- [download 77% complete] +-- [download 78% complete] +-- [download 79% complete] +-- [download 80% complete] +-- [download 81% complete] +-- [download 82% complete] +-- [download 83% complete] +-- [download 84% complete] +-- [download 85% complete] +-- [download 86% complete] +-- [download 87% complete] +-- [download 88% complete] +-- [download 89% complete] +-- [download 90% complete] +-- [download 91% complete] +-- [download 92% complete] +-- [download 93% complete] +-- [download 94% complete] +-- [download 95% complete] +-- [download 96% complete] +-- [download 97% complete] +-- [download 98% complete] +-- [download 99% complete] +-- [download 100% complete] +-- Found Wasmtime: /usr/local/metacall/build/wasmtime/wasmtime-v8.0.1-x86_64-linux-c-api/lib/libwasmtime.so (found suitable version "8.0.1", minimum required is "8.0.1") +-- Plugin wasm_loader +-- Serial metacall_serial +-- Found RapidJSON header files in /usr/local/include +-- Serial rapid_json_serial +-- Detour plthook_detour +-- Extension plugin_extension +-- Found libdw: /usr/lib/x86_64-linux-gnu/libdw.so +-- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) +-- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) +-- Found Backward: /usr/local/metacall/build/_deps/backwardcpp-src +-- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) +-- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) +-- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) +-- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) +-- Found Backward: /usr/local/metacall/build/_deps/backwardcpp-src +-- Plugin backtrace_plugin +-- Found LibSecComp: /usr/lib/x86_64-linux-gnu/libseccomp.so (Required is at least version "2") +-- Plugin sandbox_plugin +-- Port node_port +-- Found Python: /usr/bin/python3 (found version "3.13.2") found components: Interpreter +-- Test node_port_test +-- Test node_port_test_executable +-- Port py_port +-- Found Python3: /usr/bin/python3 (found version "3.13.2") found components: Interpreter +-- The Golang compiler identification is go1.24.2 linux/amd64 +-- Check for working Golang compiler: /usr/bin/go +-- Port go_port +-- Found Rust: /root/.cargo/bin/cargo (found version "1.86.0") +-- Port rs_port + Updating crates.io index + Downloading crates ... + Downloaded bindgen-cli v0.71.1 + Installing bindgen-cli v0.71.1 + Updating crates.io index + Locking 59 packages to latest compatible versions + Adding env_logger v0.10.2 (available: v0.11.8) + Downloading crates ... + Downloaded anstyle-parse v0.2.6 + Downloaded bitflags v2.9.0 + Downloaded anstream v0.6.18 + Downloaded cfg-if v1.0.0 + Downloaded is-terminal v0.4.16 + Downloaded anstyle-query v1.1.2 + Downloaded is_terminal_polyfill v1.70.1 + Downloaded anstyle v1.0.10 + Downloaded strsim v0.11.1 + Downloaded clap_lex v0.7.4 + Downloaded utf8parse v0.2.2 + Downloaded termcolor v1.4.1 + Downloaded quote v1.0.40 + Downloaded libloading v0.8.6 + Downloaded unicode-ident v1.0.18 + Downloaded colorchoice v1.0.3 + Downloaded prettyplease v0.2.32 + Downloaded minimal-lexical v0.2.1 + Downloaded memchr v2.7.4 + Downloaded nom v7.1.3 + Downloaded itertools v0.13.0 + Downloaded clap_builder v4.5.35 + Downloaded aho-corasick v1.1.3 + Downloaded clap v4.5.35 + Downloaded bindgen v0.71.1 + Downloaded clang-sys v1.8.1 + Downloaded proc-macro2 v1.0.94 + Downloaded regex v1.11.1 + Downloaded unicode-width v0.2.0 + Downloaded syn v2.0.100 + Downloaded log v0.4.27 + Downloaded clap_complete v4.5.47 + Downloaded regex-syntax v0.8.5 + Downloaded clap_derive v4.5.32 + Downloaded cexpr v0.6.0 + Downloaded heck v0.5.0 + Downloaded glob v0.3.2 + Downloaded env_logger v0.10.2 + Downloaded shlex v1.3.0 + Downloaded rustc-hash v2.1.1 + Downloaded annotate-snippets v0.11.5 + Downloaded humantime v2.2.0 + Downloaded either v1.15.0 + Downloaded regex-automata v0.4.9 + Downloaded libc v0.2.171 + Compiling proc-macro2 v1.0.94 + Compiling memchr v2.7.4 + Compiling unicode-ident v1.0.18 + Compiling anstyle v1.0.10 + Compiling libc v0.2.171 + Compiling utf8parse v0.2.2 + Compiling anstyle-query v1.1.2 + Compiling is_terminal_polyfill v1.70.1 + Compiling colorchoice v1.0.3 + Compiling glob v0.3.2 + Compiling clap_lex v0.7.4 + Compiling strsim v0.11.1 + Compiling prettyplease v0.2.32 + Compiling regex-syntax v0.8.5 + Compiling heck v0.5.0 + Compiling minimal-lexical v0.2.1 + Compiling cfg-if v1.0.0 + Compiling bindgen v0.71.1 + Compiling unicode-width v0.2.0 + Compiling log v0.4.27 + Compiling either v1.15.0 + Compiling humantime v2.2.0 + Compiling libloading v0.8.6 + Compiling anstyle-parse v0.2.6 + Compiling bitflags v2.9.0 + Compiling termcolor v1.4.1 + Compiling shlex v1.3.0 + Compiling rustc-hash v2.1.1 + Compiling anstream v0.6.18 + Compiling itertools v0.13.0 + Compiling annotate-snippets v0.11.5 + Compiling clang-sys v1.8.1 + Compiling clap_builder v4.5.35 + Compiling aho-corasick v1.1.3 + Compiling nom v7.1.3 + Compiling quote v1.0.40 + Compiling syn v2.0.100 + Compiling is-terminal v0.4.16 + Compiling regex-automata v0.4.9 + Compiling cexpr v0.6.0 + Compiling clap_derive v4.5.32 + Compiling regex v1.11.1 + Compiling env_logger v0.10.2 + Compiling clap v4.5.35 + Compiling clap_complete v4.5.47 + Compiling bindgen-cli v0.71.1 + Finished `release` profile [optimized] target(s) in 31.97s + Installing /root/.cargo/bin/bindgen + Installed package `bindgen-cli v0.71.1` (executable `bindgen`) +-- Found SWIG: /usr/bin/swig (found version "4.3.0") +-- Port rb_port +-- Script compiled +-- Script ffi +-- Script cbks +-- Script loadtest +-- Script say +-- Script hello +-- Script static +-- Script function +-- Script sum_extension +-- Script static +-- Script favicon +-- Script glob +-- Script fibonnaci +-- Script jartest +-- Script test +-- Script nod +-- Script inline +-- Script export +-- Script host +-- Script server +-- Script factcallback +-- Script derpyramda +-- Script gram +-- Script duplicated +-- Script ramda +-- Script example +-- Script helloworld +-- Script initfini +-- Script callback +-- Script function +-- Script ducktype +-- Script rsasample +-- Script garbage +-- Script classname +-- Script web +-- Script landing +-- Script model +-- Script pointer +-- Script dicty +-- Script host +-- Script s1 +-- Script s2 +-- Script withoutfunctions +-- Script wasm +-- Script badimport +-- Script watzon +-- Script fnmesh +-- Script hello +-- Script second +-- Script blog +-- Script cache +-- Script ducktype +-- Script invalid +-- Script klass +-- Script failempty +-- Script remote +-- Script typedfunc +-- Script templating +-- Script loopfail +-- Script badrequire +-- Script server +-- Script tests +-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) (Required is at least version "1.11.0") +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +-- Found Threads: TRUE +-- Install Google Test v1.11.0 +-- Test preprocessor-test +-- Test environment-test +-- Test log-test +-- Test log-custom-test +-- Test adt-set-test +-- Test adt-trie-test +-- Test adt-vector-test +-- Test adt-map-test +-- Test reflect-value-cast-test +-- Test reflect-function-test +-- Test reflect-object-class-test +-- Test reflect-scope-test +-- Test reflect-metadata-test +-- Test dynlink-test +-- Test detour-test +-- Test serial-test +-- Test configuration-test +-- Test rb-loader-parser-test +-- Test portability-path-test +-- Test metacall-logs-test +-- Test metacall-load-memory-test +-- Test metacall-load-memory-empty-test +-- Test metacall-load-configuration-test +-- Test metacall-load-configuration-fail-test +-- Test metacall-load-configuration-relative-test +-- Test metacall-load-configuration-python-node-test +-- Test metacall-load-configuration-node-python-test +-- Test metacall-duplicated-handle-test +-- Test metacall-duplicated-symbols-test +-- Test metacall-handle-export-test +-- Test metacall-handle-get-test +-- Test metacall-test +-- Test metacall-node-test +-- Test metacall-node-event-loop-test +-- Test metacall-node-event-loop-signal-test +-- Test metacall-node-call-test +-- Test metacall-node-inline-test +-- Test metacall-node-async-test +-- Test metacall-node-async-multiple-test +-- Test metacall-node-reentrant-test +-- Test metacall-node-port-test +-- Test metacall-node-port-await-test +-- Found LibGit2: /usr/lib/x86_64-linux-gnu/libgit2.so (found version "1.8.4") +-- Test metacall-node-port-c-lib-test +-- Test metacall-node-python-port-mock-test +-- Test metacall-node-python-port-ruby-test +-- Searching NodeJS library version 115 +-- NodeJS Library Found +-- Test metacall-node-python-ruby-test +-- Test metacall-node-callback-test +-- Test metacall-node-fail-test +-- Test metacall-node-fail-env-var-test +-- Test metacall-node-fail-load-leak-test +-- Test metacall-node-typescript-test +-- Test metacall-node-python-async-after-destroy-test +-- Test metacall-node-python-await-test +-- Test metacall-node-python-exception-test +-- Test metacall-node-clear-mem-test +-- Test metacall-node-async-resources-test +-- Test metacall-node-await-chain-test +-- Test metacall-node-exception-test +-- Test metacall-node-python-deadlock-test +-- Test metacall-node-native-code-test +-- Test metacall-node-extension-test +-- Searching NodeJS library version 115 +-- NodeJS Library Found +-- Script node_extension_test +-- Test metacall-node-multithread-deadlock-test +-- Test metacall-distributable-test +-- Test metacall-cast-test +-- Test metacall-init-fini-test +-- Test metacall-ducktype-test +-- Test metacall-inspect-test +-- Test metacall-integration-test +-- Test metacall-depends-test +-- Test metacall-configuration-exec-path-test +-- Test metacall-configuration-default-test +-- Test metacall-clear-test +-- Test metacall-python-test +-- Test metacall-python-object-class-test +-- Test metacall-python-gc-test +-- Test metacall-python-open-test +-- Test metacall-python-dict-test +-- Test metacall-python-pointer-test +-- Test metacall-python-reentrant-test +-- Test metacall-python-varargs-test +-- Test py-loader-port-test +-- Test metacall-python-port-https-test +-- Test metacall-python-port-callback-test +-- Test metacall-python-port-pointer-test +-- Test metacall-python-port-import-test +-- Test metacall-python-callback-test +-- Test metacall-python-fail-test +-- Test metacall-python-relative-path-test +-- Test metacall-python-without-functions-test +-- Test metacall-python-builtins-test +-- Test metacall-python-async-test +-- Test metacall-python-exception-test +-- Test metacall-python-without-env-vars-test +-- Test metacall-map-test +-- Test metacall-map-await-test +-- Test metacall-initialize-test +-- Test metacall-initialize-ex-test +-- Test metacall-reinitialize-test +-- Test metacall-initialize-destroy-multiple-test +-- Test metacall-initialize-destroy-multiple-node-test +-- Test metacall-reload-functions-test +-- Test metacall-invalid-loader-test +-- Test metacall-fork-test +-- Test metacall-return-monad-test +-- Test metacall-callback-complex-test +-- Test metacall-ruby-fail-test +-- Test metacall-ruby-fail-empty-test +-- Test metacall-ruby-object-class-test +-- Test metacall-ruby-parser-integration-test +-- Test metacall-function-test +-- Test metacall-cobol-test +-- Test metacall-file-test +-- Test metacall-file-fail-test +-- Test metacall-file-glob-test +-- Test metacall-typescript-test +-- Test metacall-typescript-node-test +-- Test metacall-typescript-call-map-test +-- Test metacall-typescript-tsx-test +-- Test metacall-typescript-tsx-loop-fail-test +-- Test metacall-typescript-require-test +-- Test metacall-typescript-jsx-default-test +-- Test metacall-rpc-test +-- Test metacall-csharp-static-class-test +-- Test metacall-ruby-test +-- Test metacall-cs-test +-- Test metacall-java-test +-- Test metacall-wasm-test +-- Test metacall-wasm-python-port-test +-- Test metacall-c-test +-- Test metacall-c-lib-test +-- Test metacall-version-test +-- Test metacall-dynlink-path-test +-- Test metacall-library-path-without-env-vars-test +-- Test metacall-ext-test +-- Test metacall-plugin-extension-test +-- Test metacall-plugin-extension-local-test +-- Test metacall-backtrace-plugin-test +-- Test metacall-sandbox-plugin-test +-- Could NOT find GBench (missing: GBENCH_INCLUDE_DIR GBENCH_LIBRARY) +-- Install Google Benchmark v1.6.1 +-- Benchmark log-bench +-- Found Python3: /usr/include/python3.13d (found version "3.13.2") found components: Development Development.Module Development.Embed +-- Benchmark metacall-py-c-api-bench +-- Benchmark metacall-py-call-bench +-- Benchmark metacall-py-init-bench +-- Benchmark metacall-node-call-bench +-- Benchmark metacall-rb-call-bench +-- Benchmark metacall-cs-call-bench +-- CLI metacallcli +-- Searching NodeJS library version 115 +-- NodeJS Library Found +-- Plugin cli_repl_plugin +-- Searching NodeJS library version 115 +-- NodeJS Library Found +-- Plugin cli_core_plugin +-- Plugin cli_cmd_plugin +-- Plugin cli_sandbox_plugin +-- Example metacalllog +-- Configuring done (84.4s) +-- Generating done (1.1s) +-- Build files have been written to: /usr/local/metacall/build +Removing intermediate container 84f6a9010292 + ---> d5122ec3833c +Step 11/11 : RUN cd $METACALL_PATH/build && $METACALL_PATH/tools/metacall-build.sh ${METACALL_BUILD_TYPE} ${METACALL_BUILD_OPTIONS} + ---> Running in 8fc0ef566964 ++ BUILD_TYPE=Release ++ BUILD_TESTS=0 ++ BUILD_BENCHMARKS=0 ++ BUILD_COVERAGE=0 ++ BUILD_INSTALL=0 +Current option settings +errexit on +noglob off +ignoreeof off +interactive off +monitor off +noexec off +stdin off +xtrace on +verbose off +vi off +emacs off +noclobber off +allexport off +notify off +nounset on +privileged off +nolog off +pipefail off +debug off ++ id -u ++ [ 0 = 0 ] ++ SUDO_CMD= ++ sub_options debug python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks ++ [ debug = debug ] ++ echo Build all scripts in debug mode ++ BUILD_TYPE=Debug ++ [ debug = release ] ++ [Build all scripts in debug mode + debug = relwithdebinfo ] ++ [ debug = tests ] ++ [ debug = benchmarks ] ++ [ debug = coverage ] ++ [ debug = install ] ++ [ python = debug ] ++ [ python = release ] ++ [ python = relwithdebinfo ] ++ [ python = tests ] ++ [ python = benchmarks ] ++ [ python = coverage ] ++ [ python = install ] ++ [ ruby = debug ] ++ [ ruby = release ] ++ [ ruby = relwithdebinfo ] ++ [ ruby = tests ] ++ [ ruby = benchmarks ] ++ [ ruby = coverage ] ++ [ ruby = install ] ++ [ netcore7 = debug ] ++ [ netcore7 = release ] ++ [ netcore7 = relwithdebinfo ] ++ [ netcore7 = tests ] ++ [ netcore7 = benchmarks ] ++ [ netcore7 = coverage ] ++ [ netcore7 = install ] ++ [ nodejs = debug ] ++ [ nodejs = release ] ++ [ nodejs = relwithdebinfo ] ++ [ nodejs = tests ] ++ [ nodejs = benchmarks ] ++ [ nodejs = coverage ] ++ [ nodejs = install ] ++ [ typescript = debug ] ++ [ typescript = release ] ++ [ typescript = relwithdebinfo ] ++ [ typescript = tests ] ++ [ typescript = benchmarks ] ++ [ typescript = coverage ] ++ [ typescript = install ] ++ [ file = debug ] ++ [ file = release ] ++ [ file = relwithdebinfo ] ++ [ file = tests ] ++ [ file = benchmarks ] ++ [ file = coverage ] ++ [ file = install ] ++ [ rpc = debug ] ++ [ rpc = release ] ++ [ rpc = relwithdebinfo ] ++ [ rpc = tests ] ++ [ rpc = benchmarks ] ++ [ rpc = coverage ] ++ [ rpc = install ] ++ [ wasm = debug ] ++ [ wasm = release ] ++ [ wasm = relwithdebinfo ] ++ [ wasm = tests ] ++ [ wasm = benchmarks ] ++ [ wasm = coverage ] ++ [ wasm = install ] ++ [ java = debug ] ++ [ java = release ] ++ [ java = relwithdebinfo ] ++ [ java = tests ] ++ [ java = benchmarks ] ++ [ java = coverage ] ++ [ java = install ] ++ [ c = debug ] ++ [ c = release ] ++ [ c = relwithdebinfo ] ++ [ c = tests ] ++ [ c = benchmarks ] ++ [ c = coverage ] ++ [ c = install ] ++ [ cobol = debug ] ++ [ cobol = release ] ++ [ cobol = relwithdebinfo ] ++ [ cobol = tests ] ++ [ cobol = benchmarks ] ++ [ cobol = coverage ] ++ [ cobol = install ] ++ [ go = debug ] ++ [ go = release ] ++ [ go = relwithdebinfo ] ++ [ go = tests ] ++ [ go = benchmarks ] ++ [ go = coverage ] ++ [ go = install ] ++ [ rust = debug ] ++ [ rust = release ] ++ [ rust = relwithdebinfo ] ++ [ rust = tests ] ++ [ rust = benchmarks ] ++ [ rust = coverage ] ++ [ rust = install ] ++ [ examples = debug ] ++ [ examples = release ] ++ [ examples = relwithdebinfo ] ++ [ examples = tests ] ++ [ examples = benchmarks ] ++ [ examples = coverage ] ++ [ examples = install ] ++ [ tests = debug ] ++ [ tests = release ] ++ [ tests = relwithdebinfo ] ++ [ tests = tests ] ++ echo Build and run all tests ++ BUILD_TESTS=1 ++ [ tests = benchmarks ] ++ [ tests = coverage ] ++ [ tests = install ] ++ [ scripts = debug ] ++ [ scripts = release ] ++ [ scripts = relwithdebinfo ] ++ [ scripts = tests ] ++ [ scripts = benchmarks ] ++ [ scripts = coverage ] ++ [ scripts = install ] ++ [ ports = debug ] ++ [ ports = release ] ++ [ ports = relwithdebinfo ] ++ [ ports = tests ] ++ [ ports = benchmarks ] ++ [ ports = coverage ] ++ [ ports = install ] ++ [ install = debug ] ++ [ install = release ] ++ [ install = relwithdebinfo ] ++ [ install = tests ] ++ Build and run all tests +[ install = benchmarks ] ++ [ install = coverage ] ++ [ install = install ] ++ echo Install all libraries ++ BUILD_INSTALL=1 ++ [ pack = debug ] ++ [ pack = release ] ++ [ pack = relwithdebinfo ] ++ [ pack = tests ] ++ [ pack = benchmarks ] ++ [ pack = coverage ] ++ [ pack = install ] ++ [ sandbox = debug ] ++ [ sandbox = release ] ++ [ sandbox = relwithdebinfo ] ++ [ sandbox = tests ] ++ [ sandbox = benchmarks ] ++ [ sandbox = coverage ] ++ [ sandbox = install ] ++ [ benchmarks = debug ] ++ [ benchmarks = release ] ++ [ benchmarks = relwithdebinfo ] ++ [ benchmarks = tests ] ++ [ benchmarks = benchmarks ] ++ echo Build and run all benchmarks ++ BUILD_BENCHMARKS=1 ++ [ benchmarks = coverage ] ++ [ benchmarks = install ] ++ sub_build +Install all libraries +Build and run all benchmarks ++ getconf _NPROCESSORS_ONLN ++ make -j24 +[ 0%] Building C object source/version/CMakeFiles/version.dir/source/version.c.o +Installing node_loader_bootstrap dependencies +[ 0%] Creating directories for 'libtcc-depends' +[ 0%] Building CXX object source/scripts/c/loadtest/CMakeFiles/loadtest.dir/source/loadtest.cpp.o +[ 1%] Building CXX object _deps/backwardcpp-build/CMakeFiles/backward.dir/backward.cpp.o +[ 2%] Building C object source/metacall/CMakeFiles/metacall.dir/__/version/source/version.c.o +[ 3%] Swig compile /usr/local/metacall/source/ports/rb_port/interface/rb_port/rb_port.i for ruby +Installing ts_loader_bootstrap dependencies +[ 3%] Built target c-ffi +[ 3%] Building CXX object _deps/backwardcpp-build/CMakeFiles/backward_object.dir/backward.cpp.o +[ 3%] Built target c-cbks +[ 3%] Built target c-compiled +[ 3%] Built target file-glob +[ 3%] Built target csharp-function +[ 3%] Built target file-static +[ 3%] Built target file-favicon +[ 3%] Built target sandbox_plugin_config +[ 3%] Built target c-loadtest +[ 3%] Built target backtrace_plugin_config +[ 3%] Built target csharp-static +[ 3%] Built target csharp-hello +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/preprocessor/source/preprocessor.c.o +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment.c.o +[ 3%] Performing download step (download, verify and extract) for 'libtcc-depends' +-- Downloading... + dst='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' + timeout='none' + inactivity timeout='none' +-- Using src='https://github.com/metacall/tinycc/archive/6ec4a10.tar.gz' +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment_variable.c.o +[ 3%] Built target java-test +[ 3%] Built target java-jartest +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment_variable_path.c.o +[ 3%] Built target nodejs-nod +[ 3%] Built target java-fibonnaci +[ 3%] Linking CXX shared library ../../libversiond.so +[ 3%] Built target nodejs-inline +[ 3%] Built target nodejs-server +[ 3%] Built target nodejs-factcallback +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/format/source/format.c.o +[ 3%] Built target nodejs-host +[ 3%] Built target nodejs-export +[ 3%] Built target nodejs-derpyramda +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading.c.o +[ 3%] Built target python-example +[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading_thread_id.c.o +[ 3%] Built target nodejs-duplicated +[ 3%] Built target python-callback +[ 3%] Built target python-initfini +[ 3%] Built target python-ducktype +[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading_mutex_pthread.c.o +[ 4%] Built target version +[ 4%] Built target python-function +[ 4%] Built target python-helloworld +[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log.c.o +[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_map.c.o +[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_valid_size.c.o +[ 4%] Built target cobol-say +[ 5%] Linking CXX shared library ../../../../scripts/libloadtest.so +[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_level.c.o +[ 5%] Built target python-garbage +[ 5%] Built target python-rsasample +[ 5%] Built target python-classname +/usr/local/metacall/source/metacall/include/metacall/metacall.h:61: Warning 801: Wrong class name (corrected to `Metacall_initialize_configuration_type') +/usr/local/metacall/source/metacall/include/metacall/metacall.h:61: Warning 801: Wrong class name (corrected to `Metacall_initialize_configuration_type') +/usr/local/metacall/source/metacall/include/metacall/metacall.h:62: Warning 451: Setting a const char * variable may leak memory. +/usr/local/metacall/source/metacall/include/metacall/metacall.h:69: Warning 801: Wrong class name (corrected to `Metacall_await_callbacks') +/usr/local/metacall/source/metacall/include/metacall/metacall.h:69: Warning 801: Wrong class name (corrected to `Metacall_await_callbacks') +[ 5%] Built target python-web +/usr/local/metacall/source/metacall/include/metacall/metacall.h:76: Warning 801: Wrong class name (corrected to `Metacall_version_type') +/usr/local/metacall/source/metacall/include/metacall/metacall.h:76: Warning 801: Wrong class name (corrected to `Metacall_version_type') +[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_record.c.o +[ 5%] Built target python-model + +/usr/local/metacall/source/metacall/include/metacall/metacall.h:80: Warning 451: Setting a const char * variable may leak memory. +Welcome to .NET 7.0! +--------------------- +SDK Version: 7.0.410 + +---------------- +Installed an ASP.NET Core HTTPS development certificate. +To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). +Learn about HTTPS: https://aka.ms/dotnet-https +---------------- +Write your first app: https://aka.ms/dotnet-hello-world +Find out what's new: https://aka.ms/dotnet-whats-new +Explore documentation: https://aka.ms/dotnet-docs +Report issues and find source on GitHub: https://github.com/dotnet/core +Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli +-------------------------------------------------------------------------------------- +/usr/local/metacall/source/metacall/include/metacall/metacall.h:81: Warning 451: Setting a const char * variable may leak memory. +/usr/local/metacall/source/metacall/include/metacall/metacall.h:82: Warning 451: Setting a const char * variable may leak memory. +[ 5%] Built target python-landing +[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_handle.c.o +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy.c.o +[ 6%] Built target python-dicty +[ 6%] Built target python-pointer +[ 6%] Built target python-s1 +[ 6%] Built target python-host +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect.c.o +[ 6%] Built target python-s2 +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_singleton.c.o +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_impl.c.o +[ 6%] Built target python-withoutfunctions +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format.c.o +[ 6%] Built target python-wasm +[ 6%] Built target rb_port_swig_compilation +[ 6%] Built target python-badimport +[ 6%] Built target loadtest +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_binary.c.o +[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_custom.c.o +[ 6%] Built target python-fnmesh +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule.c.o +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_text.c.o +[ 7%] Built target ruby-hello +[ 7%] Built target python-watzon +[ 7%] Built target ruby-second +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule_async.c.o +[ 7%] Built target ruby-blog +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule_sync.c.o +[ 7%] Built target ruby-ducktype +[ 7%] Built target ruby-invalid +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage.c.o +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage_batch.c.o +[ 7%] Built target ruby-klass +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage_sequential.c.o +[ 7%] Built target ruby-failempty +[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream.c.o +[ 7%] Built target ruby-cache +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_file.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_custom.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_nginx.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_socket.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_stdio.c.o +[ 8%] Built target rpc-remote +[ 8%] Built target typescript-typedfunc +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_format.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_syslog.c.o +[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_schedule.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_storage.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_stream.c.o +[ 9%] Built target typescript-loopfail +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_std_impl.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_nginx.c.o +[ 9%] Built target typescript-badrequire +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_std.c.o +[ 9%] Built target typescript-server +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_nginx_impl.c.o +[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability.c.o +-- verifying file... + file='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' +-- Downloading... done +[ 9%] Creating directories for 'google-test-depends' +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_executable_path.c.o +[ 10%] Building C object source/tests/metacall_node_extension_test/node_extension_test/CMakeFiles/node_extension_test.dir/source/node_extension_test.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_working_path.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_atexit.c.o +[ 10%] Built target wasm-tests +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_library_path.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_path.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_dependency.c.o +[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_comparable.c.o +[ 11%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_hash.c.o +-- extracting... + src='http://github.com/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' + dst='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/libtcc-depends' +-- extracting... [tar xfz] +[ 12%] Performing download step (git clone) for 'google-test-depends' +[ 12%] Linking CXX shared module ../../../../node_extension_test.node +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_set.c.o +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_map.c.o +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_bucket.c.o +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_vector.c.o +Cloning into 'google-test-depends'... +-- extracting... [analysis] +-- extracting... [rename] +-- extracting... [clean up] +-- extracting... done +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem.c.o +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem_file_descriptor.c.o +[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_trie.c.o +[ 13%] Creating directories for 'google-bench-depends' +[ 13%] No update step for 'libtcc-depends' +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem_directory_descriptor.c.o +[ 14%] Built target metacallcli-scripts-tests +[ 14%] Performing download step (download, verify and extract) for 'google-bench-depends' +-- Downloading... + dst='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' + timeout='none' + inactivity timeout='none' +-- Using src='https://github.com/google/benchmark/archive/v1.6.1.tar.gz' +[ 14%] No patch step for 'libtcc-depends' +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink.c.o +[ 14%] Built target cli_core_plugin_config +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_impl.c.o +[ 14%] Built target cli_sandbox_plugin_config +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_interface.c.o +[ 14%] Performing configure step for 'libtcc-depends' +[ 14%] Building C object source/preprocessor/CMakeFiles/preprocessor.dir/source/preprocessor.c.o +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin.c.o +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_impl_unix.c.o +[ 14%] Building C object source/format/CMakeFiles/format.dir/source/format.c.o + +up to date, audited 5 packages in 658ms + +1 package is looking for funding + run `npm fund` for details + +found 0 vulnerabilities +[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_descriptor.c.o +[ 14%] Linking CXX shared library ../../libpreprocessord.so +[ 14%] Built target node_loader_bootstrap_depends +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_loader.c.o +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_impl.c.o +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_manager.c.o +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/detour/source/detour.c.o +Binary directory /usr/local/metacall/build/libtcc/bin +TinyCC directory /usr/local/metacall/build/libtcc/lib/tcc +Library directory /usr/local/metacall/build/libtcc/lib +Include directory /usr/local/metacall/build/libtcc/include +Manual directory /usr/local/metacall/build/libtcc/share/man +Info directory /usr/local/metacall/build/libtcc/share/info +Doc directory /usr/local/metacall/build/libtcc/share/doc +Source path /usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/libtcc-depends + +up to date, audited 3 packages in 530ms +Build OS Linux x86_64 +C compiler gcc (14.2) +Target OS Linux +CPU x86_64 +Triplet x86_64-linux-gnu +Config debug static=no selinux +Creating config.mak and config.h +[ 15%] Linking CXX shared library ../../libformatd.so + +found 0 vulnerabilities +[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading.c.o +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect.c.o +[ 15%] Built target preprocessor +Copying node_loader_bootstrap dependencies +[ 15%] Built target ts_loader_bootstrap_depends +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_type.c.o +[ 15%] Performing build step for 'libtcc-depends' +make[3]: warning: -j24 forced in submake: resetting jobserver mode. +[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading_thread_id.c.o +[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading_mutex_pthread.c.o +[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_type_id.c.o +[ 16%] Building C object source/environment/CMakeFiles/environment.dir/source/environment.c.o +[ 16%] Built target node_extension_test +[ 16%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_signature.c.o +[ 16%] Linking CXX shared library ../../libthreadingd.so +[ 16%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_function.c.o +[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_attribute.c.o +[ 17%] Built target format +node_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/node_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules +[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_constructor.c.o +[ 17%] Building C object source/environment/CMakeFiles/environment.dir/source/environment_variable.c.o +[ 17%] Built target node_loader_bootstrap_copy_depends +[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_memory_tracker.c.o +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability.c.o + +up to date, audited 2 packages in 754ms + +found 0 vulnerabilities +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_executable_path.c.o +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_library_path.c.o +-- verifying file... + file='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' +-- Downloading... done +[ 18%] Built target nodejs-ramda-depends +[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_method.c.o +[ 18%] Built target threading +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_working_path.c.o +[ 18%] Building C object source/environment/CMakeFiles/environment.dir/source/environment_variable_path.c.o +-- extracting... + src='http://github.com/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' + dst='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/google-bench-depends' +-- extracting... [tar xfz] +[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_class_visibility.c.o +[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_object.c.o +[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_class.c.o +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_path.c.o +-- extracting... [analysis] +-- extracting... [rename] +-- extracting... [clean up] +-- extracting... done +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_atexit.c.o +[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_dependency.c.o +[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_future.c.o +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_exception.c.o +[ 18%] Linking CXX shared library ../../libenvironmentd.so +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_throwable.c.o +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_context.c.o +[ 19%] No update step for 'google-bench-depends' +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_scope.c.o +[ 19%] Built target node_loader_bootstrap +Note: /usr/local/metacall/source/loaders/java_loader/bootstrap/lib/bootstrap.java uses or overrides a deprecated API. +Note: Recompile with -Xlint:deprecation for details. +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value.c.o +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type.c.o +[ 19%] Built target nodejs-ramda +[ 19%] Built target java_loader_bootstrap +[ 19%] No patch step for 'google-bench-depends' + +up to date, audited 49 packages in 1s +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_id_size.c.o + +1 moderate severity vulnerability + +To address all issues, run: + npm audit fix + +Run `npm audit` for details. +[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_promotion.c.o +[ 19%] Built target environment +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_demotion.c.o +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_cast.c.o +[ 20%] Built target nodejs-gram-depends +[ 20%] Performing configure step for 'google-bench-depends' +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/serial/source/serial.c.o +CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): + Compatibility with CMake < 3.10 will be removed from a future version of + CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration.c.o +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_singleton.c.o +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_impl.c.o +[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_object.c.o +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader.c.o +[ 21%] Linking CXX shared library ../../libportabilityd.so +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_host.c.o +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_manager_impl.c.o + Determining projects to restore... +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_impl.c.o +-- The CXX compiler identification is GNU 14.2.0 +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall.c.o +-- Detecting CXX compiler ABI info +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_log.c.o +[ 21%] Built target portability +[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_allocator.c.o +[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_value.c.o +[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_error.c.o +[ 22%] Built target backward_object +[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_link.c.o +[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_fork.c.o +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log.c.o +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_valid_size.c.o +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_map.c.o + +up to date, audited 7 packages in 1s + +found 0 vulnerabilities +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_record.c.o +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_level.c.o +[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_handle.c.o +[ 22%] Linking CXX shared library ../../libbackward.so +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy.c.o +[ 23%] Built target typescript-templating-depends +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_impl.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_singleton.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_binary.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_custom.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_text.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule.c.o +[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule_sync.c.o +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule_async.c.o +-- Detecting CXX compiler ABI info - done +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage_batch.c.o +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage.c.o +[ 24%] Built target nodejs-gram +[ 24%] Built target typescript-templating +-- Check for working CXX compiler: /usr/bin/c++ - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_custom.c.o +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream.c.o +[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage_sequential.c.o +-- Failed to find LLVM FileCheck +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_nginx.c.o +[ 25%] Built target backward +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_file.c.o +-- Found Git: /usr/bin/git (found version "2.47.2") +-- git version: v0.0.0 normalized to 0.0.0 +-- Version: 1.6.1 +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_socket.c.o +-- Looking for shm_open in rt +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_syslog.c.o +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_stdio.c.o +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_storage.c.o +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_schedule.c.o +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_format.c.o +[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_stream.c.o +[ 26%] Linking CXX shared library ../../liblogd.so + +> ts_loader_bootstrap@1.1.0 build +> tsc + +-- Looking for shm_open in rt - found +-- Performing Test HAVE_CXX_FLAG_STD_CXX11 +[ 26%] Built target log +[ 26%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_nginx.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_hash.c.o +[ 26%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_bucket.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_set.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_trie.c.o +[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_map.c.o +[ 27%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink.c.o +[ 27%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_impl.c.o +[ 27%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_comparable.c.o +[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_std.c.o +[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory.c.o +[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_nginx_impl.c.o +[ 28%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_vector.c.o +[ 28%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_std_impl.c.o +[ 28%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_impl_unix.c.o +[ 28%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_interface.c.o +-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success +-- Performing Test HAVE_CXX_FLAG_WALL + +added 15 packages in 2s + +1 package is looking for funding + run `npm fund` for details +[ 28%] Linking CXX shared library ../../libmemoryd.so +[ 28%] Linking CXX shared library ../../libdynlinkd.so +[ 28%] Built target metacall-python-open-test-depends +[ 28%] Built target memory +[ 28%] Built target dynlink +-- Performing Test HAVE_CXX_FLAG_WALL - Success +-- Performing Test HAVE_CXX_FLAG_WEXTRA +[ 28%] Linking CXX shared library ../../libmetacalld.so +[ 28%] Linking CXX shared library ../../libadtd.so +[ 28%] Built target adt +[ 28%] Built target metacall +[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem_directory_descriptor.c.o +[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem.c.o +[ 28%] Building C object source/loaders/cob_loader/CMakeFiles/cob_loader.dir/source/cob_loader.c.o +[ 28%] Building CXX object source/loaders/cob_loader/CMakeFiles/cob_loader.dir/source/cob_loader_impl.cpp.o +[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem_file_descriptor.c.o +[ 29%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin.c.o +[ 30%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial.c.o +[ 30%] Building C object source/loaders/rpc_loader/CMakeFiles/rpc_loader.dir/source/rpc_loader.c.o +[ 30%] Building C object source/loaders/mock_loader/CMakeFiles/mock_loader.dir/source/mock_loader.c.o +[ 30%] Building C object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader.c.o +[ 30%] Building C object source/loaders/java_loader/CMakeFiles/java_loader.dir/source/java_loader.c.o +[ 30%] Building C object source/loaders/ext_loader/CMakeFiles/ext_loader.dir/source/ext_loader.c.o +[ 30%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect.c.o +[ 30%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader.c.o +[ 30%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/source/plthook_detour.c.o +-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success +-- Performing Test HAVE_CXX_FLAG_WSHADOW +[ 30%] Building C object source/serials/rapid_json_serial/CMakeFiles/rapid_json_serial.dir/source/rapid_json_serial.c.o +[ 30%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader.c.o +[ 30%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader.c.o +[ 30%] Building C object source/loaders/file_loader/CMakeFiles/file_loader.dir/source/file_loader.c.o +[ 31%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_impl.cpp.o +[ 31%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_port.cpp.o +[ 31%] Building CXX object source/loaders/rpc_loader/CMakeFiles/rpc_loader.dir/source/rpc_loader_impl.cpp.o +[ 31%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl.c.o +[ 31%] Building CXX object source/loaders/java_loader/CMakeFiles/java_loader.dir/source/java_loader_impl.cpp.o +[ 31%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader_impl.c.o +[ 31%] Building C object source/loaders/file_loader/CMakeFiles/file_loader.dir/source/file_loader_impl.c.o +[ 31%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_type.c.o +[ 31%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_type_id.c.o +[ 32%] Building CXX object source/loaders/ext_loader/CMakeFiles/ext_loader.dir/source/ext_loader_impl.cpp.o +[ 32%] Building CXX object source/serials/rapid_json_serial/CMakeFiles/rapid_json_serial.dir/source/rapid_json_serial_impl.cpp.o +[ 33%] Linking CXX shared library ../../libfilesystemd.so +[ 33%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/source/plthook_detour_impl.c.o +[ 33%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader_impl_parser.c.o +[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_descriptor.c.o +[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_impl.c.o +[ 33%] Building C object source/loaders/mock_loader/CMakeFiles/mock_loader.dir/source/mock_loader_impl.c.o +-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success +-- Performing Test HAVE_CXX_FLAG_WERROR +[ 33%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl_serialize.c.o +[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_signature.c.o +[ 33%] Built target filesystem +[ 33%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/plthook/plthook_elf.c.o +[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_function.c.o +[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_impl.c.o +[ 33%] Linking CXX shared module ../../../libmock_loaderd.so +[ 33%] Building CXX object source/extensions/plugin_extension/CMakeFiles/plugin_extension.dir/source/plugin_extension.cpp.o +[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_function.c.o +[ 33%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_impl.c.o +-- Performing Test HAVE_CXX_FLAG_WERROR - Success +[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_loader.c.o +-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE +[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_handle.c.o +[ 33%] Built target mock_loader +[ 33%] Linking CXX shared module ../../../libfile_loaderd.so +[ 33%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl_deserialize.c.o +[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_attribute.c.o +[ 33%] Building C object source/ports/rb_port/CMakeFiles/rb_port.dir/__/__/__/rb_portRUBY_wrap.c.o +[ 33%] Building C object source/ports/rb_port/CMakeFiles/rb_port.dir/source/rb_port.c.o +[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_manager.c.o +[ 33%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_trampoline.cpp.o +[ 33%] Built target file_loader +HEAD is now at e2239ee6 Googletest export +[ 33%] Linking CXX shared module ../../../libplthook_detourd.so +[ 34%] Building CXX object source/scripts/extension/sum/CMakeFiles/sum_extension.dir/source/sum_extension.cpp.o +-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success +-- Performing Test HAVE_CXX_FLAG_PEDANTIC +[ 34%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_constructor.c.o +[ 35%] Building CXX object source/examples/metacalllog/CMakeFiles/metacalllog.dir/main.cpp.o +[ 35%] Linking CXX shared module ../../../libcob_loaderd.so +[ 35%] Built target plthook_detour +[ 35%] Linking CXX shared module ../../../libmetacall_seriald.so +[ 35%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_port.c.o +[ 35%] Linking CXX shared library ../../libplugind.so +[ 36%] Linking CXX shared module ../../../libwasm_loaderd.so +[ 36%] No update step for 'google-test-depends' +Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing) +[ 36%] Built target rs_port_bindings +-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success +-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS +[ 36%] Building CXX object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_threading.cpp.o +[ 36%] Linking CXX executable ../../../metacalllogd +[ 36%] No patch step for 'google-test-depends' +[ 36%] Built target metacall_serial +[ 37%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_memory_tracker.c.o +[ 37%] Built target plugin +[ 37%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_method.c.o +[ 37%] Built target cob_loader +[ 38%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_dict.c.o +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_class_visibility.c.o +[ 38%] Performing configure step for 'google-test-depends' +CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): + Compatibility with CMake < 3.10 will be removed from a future version of + CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + +[ 38%] Built target wasm_loader +[ 38%] Linking CXX shared module ../../../librb_loaderd.so +[ 38%] Building C object source/detour/CMakeFiles/detour.dir/source/detour.c.o +[ 38%] Built target metacalllog +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_class.c.o +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_object.c.o +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_future.c.o +-- The C compiler identification is GNU 14.2.0 +-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success +-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 +[ 38%] Built target rb_loader +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_exception.c.o + Downloading crates ... +[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_throwable.c.o +/usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp: In function 'char* rapidjson::internal::Prettify(char*, int, int, int)': +/usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:561:1: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] + 561 | } + | ^ +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_scope.c.o +In file included from /usr/include/python3.13d/internal/pycore_mimalloc.h:45, + from /usr/include/python3.13d/internal/pycore_interp.h:31, + from /usr/include/python3.13d/internal/pycore_runtime.h:17, + from /usr/include/python3.13d/internal/pycore_emscripten_trampoline.h:4, + from /usr/include/python3.13d/internal/pycore_object.h:13, + from /usr/include/python3.13d/internal/pycore_dict.h:13, + from /usr/local/metacall/source/loaders/py_loader/source/py_loader_dict.c:32: +/usr/include/python3.13d/internal/mimalloc/mimalloc/internal.h:90:12: warning: redundant redeclaration of '_mi_os_purge' [-Wredundant-decls] + 90 | bool _mi_os_purge(void* p, size_t size, mi_stats_t* stats); + | ^~~~~~~~~~~~ +/usr/include/python3.13d/internal/mimalloc/mimalloc/internal.h:84:12: note: previous declaration of '_mi_os_purge' with type '_Bool(void *, size_t, mi_stats_t *)' {aka '_Bool(void *, long unsigned int, struct mi_stats_s *)'} + 84 | bool _mi_os_purge(void* p, size_t size, mi_stats_t* stats); + | ^~~~~~~~~~~~ +/usr/include/python3.13d/internal/pycore_object.h: In function '_PyObject_HasDeferredRefcount': +/usr/include/python3.13d/internal/pycore_object.h:204:41: warning: unused parameter 'op' [-Wunused-parameter] + 204 | _PyObject_HasDeferredRefcount(PyObject *op) + | ~~~~~~~~~~^~ +/usr/include/python3.13d/internal/pycore_dict.h: In function '_PyDict_NotifyEvent': +/usr/include/python3.13d/internal/pycore_dict.h:273:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] + 273 | int watcher_bits = mp->ma_version_tag & DICT_WATCHER_MASK; + | ^~~ +In file included from /usr/include/python3.13d/dictobject.h:101, + from /usr/include/python3.13d/Python.h:90, + from /usr/local/metacall/source/loaders/py_loader/include/py_loader/py_loader_dict.h:26, + from /usr/local/metacall/source/loaders/py_loader/source/py_loader_dict.c:21: +/usr/include/python3.13d/cpython/dictobject.h:25:34: note: declared here + 25 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; + | ^~~~~~~~~~~~~~ +/usr/include/python3.13d/internal/pycore_dict.h:278:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] + 278 | return DICT_NEXT_VERSION(interp) | (mp->ma_version_tag & DICT_WATCHER_AND_MODIFICATION_MASK); + | ^~~~~~ +/usr/include/python3.13d/cpython/dictobject.h:25:34: note: declared here + 25 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; + | ^~~~~~~~~~~~~~ +[ 39%] Linking CXX shared library ../../libdetourd.so + Downloaded proc-macro2 v1.0.92 + Downloaded unicode-ident v1.0.14 + Downloaded quote v1.0.37 +-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed +-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value.c.o +-- The CXX compiler identification is GNU 14.2.0 +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_context.c.o +-- Detecting C compiler ABI info +[ 39%] Built target detour +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type.c.o +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_id_size.c.o + Compiling proc-macro2 v1.0.92 +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_promotion.c.o +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_demotion.c.o +[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_cast.c.o +[ 39%] Linking CXX shared module ../../../rb_portd.so + Compiling unicode-ident v1.0.14 + Compiling metacall v0.4.2 (/usr/local/metacall/source/ports/rs_port) + Restored /usr/local/metacall/source/loaders/cs_loader/netcore/source/project.csproj (in 3.59 sec). +[ 39%] Built target rb_port +-- Detecting C compiler ABI info - done +-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success +-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS +-- Check for working C compiler: /usr/bin/cc - skipped +-- Detecting C compile features +-- Detecting C compile features - done +[ 39%] Linking CXX shared module ../../../../libsum_extensiond.so +-- Detecting CXX compiler ABI info +[ 40%] Linking CXX shared module ../../../libjava_loaderd.so +[ 41%] Linking CXX shared library ../../libreflectd.so +[ 41%] Built target sum_extension +-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success +-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED +-- Detecting CXX compiler ABI info - done +[ 41%] Built target java_loader +[ 41%] Built target reflect +-- Check for working CXX compiler: /usr/bin/c++ - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +[ 41%] Building C object source/serial/CMakeFiles/serial.dir/source/serial.c.o +CMake Deprecation Warning at googlemock/CMakeLists.txt:45 (cmake_minimum_required): + Compatibility with CMake < 3.10 will be removed from a future version of + CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + +CMake Deprecation Warning at googletest/CMakeLists.txt:56 (cmake_minimum_required): + Compatibility with CMake < 3.10 will be removed from a future version of + CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + +[ 41%] Performing install step for 'libtcc-depends' +-> /usr/local/metacall/build/libtcc/bin : tcc +-> /usr/local/metacall/build/libtcc/lib/tcc : libtcc1.a runmain.o bt-exe.o bt-log.o bcheck.o +-> /usr/local/metacall/build/libtcc/lib/tcc/include : ./include/*.h ./tcclib.h +-> /usr/local/metacall/build/libtcc/lib : libtcc.so +-> /usr/local/metacall/build/libtcc/include : ./libtcc.h +-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success +-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING +-> /usr/local/metacall/build/libtcc/share/man/man1 : tcc.1 +[ 41%] Linking CXX shared library ../../libseriald.so +[ 42%] No test step for 'libtcc-depends' +[ 42%] Built target serial +[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_impl.c.o +[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration.c.o +[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_singleton.c.o +[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_object.c.o +[ 43%] Completed 'libtcc-depends' +-- Found Python: /usr/bin/python3 (found version "3.13.2") found components: Interpreter +[ 43%] Linking CXX shared module ../../../libplugin_extensiond.so +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD +-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success +-- Performing Test HAVE_CXX_FLAG_WD654 +[ 43%] Built target libtcc-depends +-- Performing Test HAVE_CXX_FLAG_WD654 - Failed +-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY +[ 43%] Building CXX object source/loaders/c_loader/CMakeFiles/c_loader.dir/source/c_loader_impl.cpp.o +[ 43%] Building C object source/loaders/c_loader/CMakeFiles/c_loader.dir/source/c_loader.c.o +[ 43%] Built target plugin_extension +[ 43%] Building CXX object source/plugins/sandbox_plugin/CMakeFiles/sandbox_plugin.dir/source/sandbox_plugin.cpp.o +[ 43%] Building CXX object source/plugins/backtrace_plugin/CMakeFiles/backtrace_plugin.dir/source/backtrace_plugin.cpp.o +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +-- Found Threads: TRUE +[ 43%] Linking CXX shared library ../../libconfigurationd.so +-- Configuring done (2.0s) +[ 43%] Built target ts_loader_bootstrap_build +-- Generating done (0.0s) +-- Build files have been written to: /usr/local/metacall/build/source/tests/src/google-test-depends-build +-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed +-- Performing Test HAVE_CXX_FLAG_COVERAGE +[ 43%] Performing build step for 'google-test-depends' +Copying ts_loader_bootstrap dependencies +In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', + inlined from 'void node_loader_impl_destroy_cb(loader_impl_node)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4349:94, + inlined from 'void node_loader_impl_destroy_prepare_cb(uv_prepare_t*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4370:29: +/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] + 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; + | ^~~~~~~~~~~~~~~~~~~~ +In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', + inlined from 'void node_loader_impl_destroy_cb(loader_impl_node)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4349:94, + inlined from 'void node_loader_impl_destroy_check_cb(uv_check_t*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4377:29: +/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] + 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; + | ^~~~~~~~~~~~~~~~~~~~ + Compiling quote v1.0.37 +[ 43%] Built target configuration +MSBuild version 17.7.6+77d58ec69 for .NET +[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_impl.c.o +[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader.c.o +[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o +[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_host.c.o +[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_manager_impl.c.o +-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success +-- Performing Test HAVE_STD_REGEX +-- Performing Test HAVE_STD_REGEX +In file included from /usr/local/include/rapidjson/writer.h:23, + from /usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:21: +In function 'char* rapidjson::internal::WriteExponent(int, char*)', + inlined from 'char* rapidjson::internal::Prettify(char*, int, int, int)' at /usr/local/include/rapidjson/internal/dtoa.h:216:29, + inlined from 'char* rapidjson::internal::dtoa(double, char*, int)' at /usr/local/include/rapidjson/internal/dtoa.h:238:24, + inlined from 'char* rapidjson::internal::dtoa(double, char*, int)' at /usr/local/include/rapidjson/internal/dtoa.h:220:14, + inlined from 'bool rapidjson::Writer::WriteDouble(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:579:31, + inlined from 'bool rapidjson::Writer::WriteDouble(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:552:13, + inlined from 'bool rapidjson::Writer::Double(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:195:83, + inlined from 'bool rapidjson::GenericValue::Accept(Handler&) const [with Handler = rapidjson::Writer > >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator]' at /usr/local/include/rapidjson/document.h:1979:58: +/usr/local/include/rapidjson/internal/dtoa.h:131:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] + 131 | if (K < 0) { + | ^~ +/usr/local/include/rapidjson/internal/dtoa.h:136:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] + 136 | if (K >= 100) { + | ^~ +ts_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/ts_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules +[ 43%] Built target ts_loader_bootstrap +[ 43%] Linking CXX shared module ../../../libpy_loaderd.so + Compiling metacall-inline v0.2.0 (/usr/local/metacall/source/ports/rs_port/inline) +[ 43%] Built target py_loader +[ 44%] Linking CXX shared module ../../../librpc_loaderd.so + Determining projects to restore... +[ 44%] Linking CXX shared library ../../libloaderd.so +[ 44%] Built target rpc_loader +[ 44%] Built target loader +[ 44%] Linking CXX shared module ../../../libext_loaderd.so +[ 44%] Built target ext_loader +In file included from /usr/local/include/rapidjson/reader.h:26, + from /usr/local/include/rapidjson/document.h:20, + from /usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:18: +In function 'double rapidjson::internal::FastPath(double, int)', + inlined from 'double rapidjson::internal::StrtodNormalPrecision(double, int)' at /usr/local/include/rapidjson/internal/strtod.h:41:21, + inlined from 'void rapidjson::GenericReader::ParseNumber(InputStream&, Handler&) [with unsigned int parseFlags = 0; InputStream = rapidjson::EncodedInputStream, rapidjson::MemoryStream>; Handler = rapidjson::GenericDocument >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]' at /usr/local/include/rapidjson/reader.h:1717:55, + inlined from 'void rapidjson::GenericReader::ParseValue(InputStream&, Handler&) [with unsigned int parseFlags = 0; InputStream = rapidjson::EncodedInputStream, rapidjson::MemoryStream>; Handler = rapidjson::GenericDocument >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]' at /usr/local/include/rapidjson/reader.h:1761:46: +/usr/local/include/rapidjson/internal/strtod.h:29:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] + 29 | if (exp < -308) + | ^~ + All projects are up-to-date for restore. +In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', + inlined from 'void node_loader_impl_destroy_safe(napi_env, loader_impl_async_destroy_safe_type*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4402:47: +/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] + 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; + | ^~~~~~~~~~~~~~~~~~~~ + Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.90s +[ 44%] Built target rs_port +[ 44%] Linking CXX shared module ../../../librapid_json_seriald.so +[ 44%] Built target rapid_json_serial +[ 44%] Linking CXX shared module ../../../plugins/sandbox_plugin/libsandbox_plugind.so +[ 44%] Built target sandbox_plugin +[ 44%] Linking CXX shared module ../../../libnode_loaderd.so +[ 44%] Built target node_loader +[ 44%] Building C object source/loaders/ts_loader/CMakeFiles/ts_loader.dir/source/ts_loader.c.o +[ 45%] Building CXX object source/cli/plugins/cli_sandbox_plugin/CMakeFiles/cli_sandbox_plugin.dir/source/cli_sandbox_plugin.cpp.o +[ 45%] Building CXX object source/loaders/ts_loader/CMakeFiles/ts_loader.dir/source/ts_loader_impl.cpp.o +[ 45%] Built target cli_cmd_plugin +[ 45%] Built target cli_repl_plugin +[ 45%] Building CXX object source/cli/plugins/cli_core_plugin/CMakeFiles/cli_core_plugin.dir/source/cli_core_plugin.cpp.o +[ 45%] Linking CXX shared module ../../../libc_loaderd.so +-- Performing Test HAVE_STD_REGEX -- success +-- Performing Test HAVE_GNU_POSIX_REGEX +-- Performing Test HAVE_GNU_POSIX_REGEX +[ 45%] Linking CXX shared module ../../../../plugins/cli/cmd/cli_sandbox_plugin/libcli_sandbox_plugind.so +[ 45%] Linking CXX shared module ../../../plugins/backtrace_plugin/libbacktrace_plugind.so +[ 45%] Built target c_loader +-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile +-- Performing Test HAVE_POSIX_REGEX +-- Performing Test HAVE_POSIX_REGEX +[ 45%] Built target cli_sandbox_plugin +[ 45%] Built target backtrace_plugin +[ 46%] Linking CXX shared module ../../../libts_loaderd.so +[ 46%] Built target ts_loader +-- Performing Test HAVE_POSIX_REGEX -- success +-- Performing Test HAVE_STEADY_CLOCK +-- Performing Test HAVE_STEADY_CLOCK +Installing node_port +-- Performing Test HAVE_STEADY_CLOCK -- success +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +-- Found Threads: TRUE +-- Configuring done (11.1s) +-- Generating done (0.0s) +-- Build files have been written to: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/google-bench-depends-build +[ 46%] Performing build step for 'google-bench-depends' +[ 9%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_name.cc.o +[ 9%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark.cc.o +[ 18%] Building CXX object src/CMakeFiles/benchmark.dir/csv_reporter.cc.o +[ 18%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o +[ 22%] Building CXX object src/CMakeFiles/benchmark.dir/commandlineflags.cc.o +[ 27%] Building CXX object src/CMakeFiles/benchmark.dir/json_reporter.cc.o +[ 31%] Building CXX object src/CMakeFiles/benchmark.dir/sleep.cc.o +[ 40%] Building CXX object src/CMakeFiles/benchmark.dir/statistics.cc.o +[ 40%] Building CXX object src/CMakeFiles/benchmark.dir/complexity.cc.o +[ 45%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_register.cc.o +[ 50%] Building CXX object src/CMakeFiles/benchmark.dir/counter.cc.o +[ 54%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o +[ 63%] Building CXX object src/CMakeFiles/benchmark.dir/colorprint.cc.o +[ 68%] Building CXX object src/CMakeFiles/benchmark.dir/console_reporter.cc.o +[ 68%] Building CXX object src/CMakeFiles/benchmark.dir/reporter.cc.o +[ 72%] Building CXX object src/CMakeFiles/benchmark.dir/timers.cc.o +[ 77%] Building CXX object src/CMakeFiles/benchmark.dir/string_util.cc.o +[ 81%] Building CXX object src/CMakeFiles/benchmark.dir/perf_counters.cc.o +[ 86%] Building CXX object src/CMakeFiles/benchmark.dir/sysinfo.cc.o +[ 25%] Linking CXX static library ../lib/libgtest.a + project -> /usr/local/metacall/source/loaders/cs_loader/netcore/source/bin/Debug/net7.0/CSLoader.dll + project -> /usr/local/metacall/build/ +[ 25%] Built target gtest +[ 37%] Building CXX object googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o +[ 50%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o +[ 46%] Built target cs_loader_impl + +up to date, audited 81 packages in 1s + +20 packages are looking for funding + run `npm fund` for details + +3 moderate severity vulnerabilities + +To address all issues (including breaking changes), run: + npm audit fix --force + +Run `npm audit` for details. +[ 46%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/netcore.cpp.o +[ 47%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/simple_netcore.cpp.o +[ 47%] Building C object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/cs_loader.c.o +[ 47%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/netcore_linux.cpp.o +[ 47%] Building C object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/cs_loader_impl.c.o +[ 47%] Built target node_port +[ 47%] Linking CXX shared module ../../../../plugins/cli/repl/cli_core_plugin/libcli_core_plugind.so +[ 47%] Built target cli_core_plugin +[ 47%] Building CXX object source/cli/metacallcli/CMakeFiles/metacallcli.dir/source/main.cpp.o +[ 47%] Building CXX object source/cli/metacallcli/CMakeFiles/metacallcli.dir/source/application.cpp.o +[ 62%] Linking CXX static library ../lib/libgtest_main.a +[ 62%] Built target gtest_main +[ 47%] Linking CXX shared module ../../../libcs_loaderd.so +[ 47%] Built target cs_loader +[ 75%] Linking CXX static library ../lib/libgmock.a +[ 75%] Built target gmock +[ 47%] Linking CXX executable ../../../metacallclid +[ 87%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o +[ 47%] Built target metacallcli +[100%] Linking CXX static library ../lib/libgmock_main.a +[100%] Built target gmock_main +[ 47%] No install step for 'google-test-depends' +[ 47%] No test step for 'google-test-depends' +[ 47%] Completed 'google-test-depends' +[ 47%] Built target google-test-depends +[ 47%] Building CXX object source/tests/log_test/CMakeFiles/log-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/reflect_scope_test/CMakeFiles/reflect-scope-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/preprocessor_test/CMakeFiles/preprocessor-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/adt_vector_test/CMakeFiles/adt-vector-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/detour_test/CMakeFiles/detour-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/log_custom_test/CMakeFiles/log-custom-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/reflect_object_class_test/CMakeFiles/reflect-object-class-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/reflect_metadata_test/CMakeFiles/reflect-metadata-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/environment_test/CMakeFiles/environment-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/metacall_logs_test/CMakeFiles/metacall-logs-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/configuration_test/CMakeFiles/configuration-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/adt_set_test/CMakeFiles/adt-set-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/metacall_load_memory_empty_test/CMakeFiles/metacall-load-memory-empty-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/adt_map_test/CMakeFiles/adt-map-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/serial_test/CMakeFiles/serial-test.dir/source/main.cpp.o +[ 47%] Building CXX object source/tests/metacall_load_memory_test/CMakeFiles/metacall-load-memory-test.dir/source/main.cpp.o +[ 48%] Building CXX object source/tests/reflect_function_test/CMakeFiles/reflect-function-test.dir/source/main.cpp.o +[ 48%] Building CXX object source/tests/portability_path_test/CMakeFiles/portability-path-test.dir/source/main.cpp.o +[ 48%] Building CXX object source/tests/dynlink_test/CMakeFiles/dynlink-test.dir/source/main.cpp.o +[ 48%] Building CXX object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/source/main.cpp.o +[ 48%] Building CXX object source/tests/metacall_load_configuration_test/CMakeFiles/metacall-load-configuration-test.dir/source/main.cpp.o +[ 49%] Building CXX object source/tests/adt_trie_test/CMakeFiles/adt-trie-test.dir/source/main.cpp.o +[ 49%] Building CXX object source/tests/metacall_load_memory_test/CMakeFiles/metacall-load-memory-test.dir/source/metacall_load_memory_test.cpp.o +[ 49%] Building CXX object source/tests/log_custom_test/CMakeFiles/log-custom-test.dir/source/log_custom_test.cpp.o +[ 49%] Building CXX object source/tests/metacall_load_memory_empty_test/CMakeFiles/metacall-load-memory-empty-test.dir/source/metacall_load_memory_empty_test.cpp.o +[ 49%] Building CXX object source/tests/reflect_metadata_test/CMakeFiles/reflect-metadata-test.dir/source/reflect_metadata_test.cpp.o +[ 49%] Building CXX object source/tests/adt_vector_test/CMakeFiles/adt-vector-test.dir/source/adt_vector_test.cpp.o +[ 49%] Building CXX object source/tests/portability_path_test/CMakeFiles/portability-path-test.dir/source/portability_path_test.cpp.o +[ 90%] Linking CXX static library libbenchmark.a +[ 49%] Building CXX object source/tests/reflect_scope_test/CMakeFiles/reflect-scope-test.dir/source/reflect_scope_test.cpp.o +[ 49%] Building CXX object source/tests/detour_test/CMakeFiles/detour-test.dir/source/detour_test.cpp.o +[ 90%] Built target benchmark +[ 49%] Building CXX object source/tests/metacall_load_configuration_test/CMakeFiles/metacall-load-configuration-test.dir/source/metacall_load_configuration_test.cpp.o +[ 49%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_bool_test.cpp.o +[ 49%] Building CXX object source/tests/log_test/CMakeFiles/log-test.dir/source/log_test.cpp.o +[ 50%] Building CXX object source/tests/reflect_object_class_test/CMakeFiles/reflect-object-class-test.dir/source/reflect_object_class_test.cpp.o +[ 50%] Building CXX object source/tests/adt_map_test/CMakeFiles/adt-map-test.dir/source/adt_map_test.cpp.o +[ 95%] Building CXX object src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o +[ 50%] Building CXX object source/tests/adt_trie_test/CMakeFiles/adt-trie-test.dir/source/adt_trie_test.cpp.o +[ 50%] Building CXX object source/tests/adt_set_test/CMakeFiles/adt-set-test.dir/source/adt_set_test.cpp.o +[ 50%] Building CXX object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/source/rb_loader_parser_test.cpp.o +[ 51%] Building CXX object source/tests/metacall_logs_test/CMakeFiles/metacall-logs-test.dir/source/metacall_logs_test.cpp.o +[ 50%] Building CXX object source/tests/preprocessor_test/CMakeFiles/preprocessor-test.dir/source/preprocessor_test.cpp.o +[ 51%] Building CXX object source/tests/reflect_function_test/CMakeFiles/reflect-function-test.dir/source/reflect_function_test.cpp.o +[ 51%] Building CXX object source/tests/environment_test/CMakeFiles/environment-test.dir/source/environment_test.cpp.o +[ 51%] Building CXX object source/tests/serial_test/CMakeFiles/serial-test.dir/source/serial_test.cpp.o +[ 51%] Building CXX object source/tests/configuration_test/CMakeFiles/configuration-test.dir/source/configuration_test.cpp.o +[ 51%] Building CXX object source/tests/dynlink_test/CMakeFiles/dynlink-test.dir/source/dynlink_test.cpp.o +[100%] Linking CXX static library libbenchmark_main.a +[100%] Built target benchmark_main +[ 51%] Performing install step for 'google-bench-depends' +[ 90%] Built target benchmark +[100%] Built target benchmark_main +Install the project... +-- Install configuration: "Release" +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/libbenchmark.a +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/libbenchmark_main.a +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/include/benchmark +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/include/benchmark/benchmark.h +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkConfig.cmake +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkConfigVersion.cmake +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/pkgconfig/benchmark.pc +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkTargets.cmake +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkTargets-release.cmake +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/platform_specific_build_instructions.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/random_interleaving.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/AssemblyTests.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/perf_counters.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/index.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/dependencies.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/releasing.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/_config.yml +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/user_guide.md +-- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/tools.md +[ 51%] No test step for 'google-bench-depends' +[ 51%] Completed 'google-bench-depends' +[ 51%] Built target google-bench-depends +[ 51%] Building CXX object source/tests/metacall_load_configuration_fail_test/CMakeFiles/metacall-load-configuration-fail-test.dir/source/main.cpp.o +[ 51%] Linking CXX executable ../../../metacall-load-memory-empty-testd +[ 51%] Linking CXX executable ../../../adt-vector-testd +[ 51%] Linking CXX executable ../../../log-custom-testd +[ 51%] Built target metacall-load-memory-empty-test +[ 51%] Building CXX object source/tests/metacall_load_configuration_relative_test/CMakeFiles/metacall-load-configuration-relative-test.dir/source/main.cpp.o +[ 51%] Linking CXX executable ../../../metacall-logs-testd +[ 51%] Linking CXX executable ../../../adt-trie-testd +[ 51%] Linking CXX executable ../../../metacall-load-memory-testd +[ 51%] Built target log-custom-test +[ 51%] Built target adt-vector-test +[ 51%] Building CXX object source/tests/metacall_load_configuration_node_python_test/CMakeFiles/metacall-load-configuration-node-python-test.dir/source/main.cpp.o +[ 52%] Building CXX object source/tests/metacall_load_configuration_python_node_test/CMakeFiles/metacall-load-configuration-python-node-test.dir/source/main.cpp.o +[ 52%] Built target metacall-logs-test +[ 52%] Building CXX object source/tests/metacall_duplicated_handle_test/CMakeFiles/metacall-duplicated-handle-test.dir/source/main.cpp.o +[ 52%] Built target adt-trie-test +[ 52%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_char_test.cpp.o +[ 52%] Built target metacall-load-memory-test +[ 53%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_short_test.cpp.o +[ 53%] Building CXX object source/tests/metacall_load_configuration_fail_test/CMakeFiles/metacall-load-configuration-fail-test.dir/source/metacall_load_configuration_fail_test.cpp.o +[ 53%] Linking CXX executable ../../../environment-testd +[ 53%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_int_test.cpp.o +[ 53%] Linking CXX executable ../../../adt-set-testd +[ 53%] Linking CXX executable ../../../detour-testd +[ 53%] Linking CXX executable ../../../adt-map-testd +[ 53%] Linking CXX executable ../../../reflect-function-testd +[ 53%] Built target environment-test +[ 53%] Linking CXX executable ../../../dynlink-testd +[ 54%] Linking CXX executable ../../../log-testd +[ 54%] Building CXX object source/tests/metacall_duplicated_symbols_test/CMakeFiles/metacall-duplicated-symbols-test.dir/source/main.cpp.o +[ 54%] Linking CXX executable ../../../preprocessor-testd +[ 54%] Linking CXX executable ../../../reflect-metadata-testd +[ 54%] Built target detour-test +[ 54%] Built target adt-map-test +[ 54%] Built target adt-set-test +[ 54%] Building CXX object source/tests/metacall_test/CMakeFiles/metacall-test.dir/source/main.cpp.o +[ 54%] Building CXX object source/tests/metacall_load_configuration_relative_test/CMakeFiles/metacall-load-configuration-relative-test.dir/source/metacall_load_configuration_relative_test.cpp.o +[ 54%] Built target reflect-function-test +[ 54%] Building CXX object source/tests/metacall_handle_export_test/CMakeFiles/metacall-handle-export-test.dir/source/main.cpp.o +[ 54%] Building CXX object source/tests/metacall_duplicated_symbols_test/CMakeFiles/metacall-duplicated-symbols-test.dir/source/metacall_duplicated_symbols_test.cpp.o +[ 55%] Building CXX object source/tests/metacall_handle_get_test/CMakeFiles/metacall-handle-get-test.dir/source/main.cpp.o +[ 55%] Built target log-test +[ 55%] Built target dynlink-test +[ 55%] Building CXX object source/tests/metacall_node_test/CMakeFiles/metacall-node-test.dir/source/main.cpp.o +[ 55%] Built target preprocessor-test +[ 55%] Building CXX object source/tests/metacall_node_event_loop_test/CMakeFiles/metacall-node-event-loop-test.dir/source/main.cpp.o +[ 55%] Built target reflect-metadata-test +[ 55%] Building CXX object source/tests/metacall_node_event_loop_test/CMakeFiles/metacall-node-event-loop-test.dir/source/metacall_node_event_loop_test.cpp.o +[ 56%] Building CXX object source/tests/metacall_node_test/CMakeFiles/metacall-node-test.dir/source/metacall_node_test.cpp.o +[ 56%] Building C object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/__/__/loaders/rb_loader/source/rb_loader_impl_parser.c.o +[ 56%] Building CXX object source/tests/metacall_duplicated_handle_test/CMakeFiles/metacall-duplicated-handle-test.dir/source/metacall_duplicated_handle_test.cpp.o +[ 56%] Building CXX object source/tests/metacall_load_configuration_node_python_test/CMakeFiles/metacall-load-configuration-node-python-test.dir/source/metacall_load_configuration_node_python_test.cpp.o +[ 56%] Building CXX object source/tests/metacall_load_configuration_python_node_test/CMakeFiles/metacall-load-configuration-python-node-test.dir/source/metacall_load_configuration_python_node_test.cpp.o +[ 57%] Linking CXX executable ../../../rb-loader-parser-testd +[ 57%] Linking CXX executable ../../../configuration-testd +[ 57%] Linking CXX executable ../../../reflect-scope-testd +[ 57%] Built target rb-loader-parser-test +[ 58%] Building CXX object source/tests/metacall_node_event_loop_signal_test/CMakeFiles/metacall-node-event-loop-signal-test.dir/source/main.cpp.o +[ 58%] Built target configuration-test +[ 58%] Building CXX object source/tests/metacall_node_call_test/CMakeFiles/metacall-node-call-test.dir/source/main.cpp.o +[ 58%] Built target reflect-scope-test +[ 58%] Building CXX object source/tests/metacall_node_inline_test/CMakeFiles/metacall-node-inline-test.dir/source/main.cpp.o +[ 58%] Building CXX object source/tests/metacall_node_async_test/CMakeFiles/metacall-node-async-test.dir/source/main.cpp.o +[ 58%] Building CXX object source/tests/metacall_handle_export_test/CMakeFiles/metacall-handle-export-test.dir/source/metacall_handle_export_test.cpp.o +[ 59%] Linking CXX executable ../../../metacall-load-configuration-testd +[ 59%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_long_test.cpp.o +[ 59%] Building CXX object source/tests/metacall_node_inline_test/CMakeFiles/metacall-node-inline-test.dir/source/metacall_node_inline_test.cpp.o +[ 60%] Building CXX object source/tests/metacall_test/CMakeFiles/metacall-test.dir/source/metacall_test.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_async_multiple_test/CMakeFiles/metacall-node-async-multiple-test.dir/source/main.cpp.o +[ 61%] Building CXX object source/tests/metacall_handle_get_test/CMakeFiles/metacall-handle-get-test.dir/source/metacall_handle_get_test.cpp.o +[ 61%] Linking CXX executable ../../../metacall-load-configuration-fail-testd +[ 61%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_float_test.cpp.o +[ 61%] Built target metacall-load-configuration-test +[ 61%] Building CXX object source/tests/metacall_node_reentrant_test/CMakeFiles/metacall-node-reentrant-test.dir/source/main.cpp.o +[ 61%] Linking CXX executable ../../../metacall-node-event-loop-testd +[ 61%] Linking CXX executable ../../../metacall-duplicated-symbols-testd +[ 61%] Built target metacall-load-configuration-fail-test +[ 61%] Building CXX object source/tests/metacall_node_reentrant_test/CMakeFiles/metacall-node-reentrant-test.dir/source/metacall_node_reentrant_test.cpp.o +[ 61%] Built target metacall-duplicated-symbols-test +[ 61%] Linking CXX executable ../../../metacall-load-configuration-relative-testd +[ 61%] Built target metacall-node-event-loop-test +[ 61%] Building CXX object source/tests/metacall_node_port_test/CMakeFiles/metacall-node-port-test.dir/source/main.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_async_test/CMakeFiles/metacall-node-async-test.dir/source/metacall_node_async_test.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_event_loop_signal_test/CMakeFiles/metacall-node-event-loop-signal-test.dir/source/metacall_node_event_loop_signal_test.cpp.o +[ 61%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_double_test.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_async_multiple_test/CMakeFiles/metacall-node-async-multiple-test.dir/source/metacall_node_async_multiple_test.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_call_test/CMakeFiles/metacall-node-call-test.dir/source/metacall_node_call_test.cpp.o +[ 61%] Linking CXX executable ../../../metacall-load-configuration-node-python-testd +[ 61%] Building CXX object source/tests/metacall_node_port_test/CMakeFiles/metacall-node-port-test.dir/source/metacall_node_port_test.cpp.o +[ 61%] Linking CXX executable ../../../metacall-load-configuration-python-node-testd +[ 61%] Built target metacall-load-configuration-relative-test +[ 61%] Building CXX object source/tests/metacall_node_port_await_test/CMakeFiles/metacall-node-port-await-test.dir/source/main.cpp.o +[ 61%] Linking CXX executable ../../../serial-testd +[ 61%] Linking CXX executable ../../../portability-path-testd +[ 61%] Built target metacall-load-configuration-node-python-test +[ 61%] Building CXX object source/tests/metacall_node_port_c_lib_test/CMakeFiles/metacall-node-port-c-lib-test.dir/source/main.cpp.o +[ 61%] Built target metacall-load-configuration-python-node-test +[ 61%] Building CXX object source/tests/metacall_node_python_port_mock_test/CMakeFiles/metacall-node-python-port-mock-test.dir/source/main.cpp.o +[ 61%] Linking CXX executable ../../../reflect-object-class-testd +[ 61%] Building CXX object source/tests/metacall_node_python_port_ruby_test/CMakeFiles/metacall-node-python-port-ruby-test.dir/source/main.cpp.o +[ 61%] Built target serial-test +[ 61%] Linking CXX executable ../../../metacall-duplicated-handle-testd +[ 61%] Building CXX object source/tests/metacall_node_python_port_mock_test/CMakeFiles/metacall-node-python-port-mock-test.dir/source/metacall_node_python_port_mock_test.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_port_c_lib_test/CMakeFiles/metacall-node-port-c-lib-test.dir/source/metacall_node_port_c_lib_test.cpp.o +[ 61%] Built target portability-path-test +[ 61%] Building CXX object source/tests/metacall_node_python_ruby_test/CMakeFiles/metacall-node-python-ruby-test.dir/source/main.cpp.o +[ 61%] Built target reflect-object-class-test +[ 61%] Building CXX object source/tests/metacall_node_callback_test/CMakeFiles/metacall-node-callback-test.dir/source/main.cpp.o +[ 61%] Built target metacall-duplicated-handle-test +[ 61%] Building CXX object source/tests/metacall_node_fail_test/CMakeFiles/metacall-node-fail-test.dir/source/main.cpp.o +[ 61%] Building CXX object source/tests/metacall_node_fail_env_var_test/CMakeFiles/metacall-node-fail-env-var-test.dir/source/main.cpp.o +[ 61%] Linking CXX executable ../../../metacall-node-testd +[ 61%] Built target metacall-node-test +[ 61%] Building CXX object source/tests/metacall_node_fail_load_leak_test/CMakeFiles/metacall-node-fail-load-leak-test.dir/source/main.cpp.o +[ 62%] Building CXX object source/tests/metacall_node_fail_load_leak_test/CMakeFiles/metacall-node-fail-load-leak-test.dir/source/metacall_node_fail_load_leak_test.cpp.o +[ 62%] Building CXX object source/tests/metacall_node_port_await_test/CMakeFiles/metacall-node-port-await-test.dir/source/metacall_node_port_await_test.cpp.o +[ 62%] Building CXX object source/tests/metacall_node_python_port_ruby_test/CMakeFiles/metacall-node-python-port-ruby-test.dir/source/metacall_node_python_port_ruby_test.cpp.o +[ 62%] Building CXX object source/tests/metacall_node_typescript_test/CMakeFiles/metacall-node-typescript-test.dir/source/main.cpp.o +[ 62%] Building CXX object source/tests/metacall_node_python_async_after_destroy_test/CMakeFiles/metacall-node-python-async-after-destroy-test.dir/source/main.cpp.o +[ 62%] Linking CXX executable ../../../metacall-handle-export-testd +[ 62%] Linking CXX executable ../../../metacall-node-event-loop-signal-testd +[ 63%] Building CXX object source/tests/metacall_node_python_async_after_destroy_test/CMakeFiles/metacall-node-python-async-after-destroy-test.dir/source/metacall_node_python_async_after_destroy_test.cpp.o +[ 63%] Linking CXX executable ../../../metacall-node-inline-testd +[ 63%] Building CXX object source/tests/metacall_node_python_ruby_test/CMakeFiles/metacall-node-python-ruby-test.dir/source/metacall_node_python_ruby_test.cpp.o +[ 64%] Linking CXX executable ../../../metacall-node-call-testd +[ 64%] Built target metacall-handle-export-test +[ 64%] Linking CXX executable ../../../metacall-node-python-port-mock-testd +[ 64%] Built target metacall-node-event-loop-signal-test +[ 64%] Building CXX object source/tests/metacall_node_python_await_test/CMakeFiles/metacall-node-python-await-test.dir/source/main.cpp.o +[ 64%] Building CXX object source/tests/metacall_node_callback_test/CMakeFiles/metacall-node-callback-test.dir/source/metacall_node_callback_test.cpp.o +[ 64%] Building CXX object source/tests/metacall_node_python_await_test/CMakeFiles/metacall-node-python-await-test.dir/source/metacall_node_python_await_test.cpp.o +[ 64%] Linking CXX executable ../../../metacall-node-port-c-lib-testd +[ 64%] Built target metacall-node-inline-test +[ 65%] Building CXX object source/tests/metacall_node_python_exception_test/CMakeFiles/metacall-node-python-exception-test.dir/source/main.cpp.o +[ 65%] Linking CXX executable ../../../reflect-value-cast-testd +[ 65%] Building CXX object source/tests/metacall_node_fail_test/CMakeFiles/metacall-node-fail-test.dir/source/metacall_node_fail_test.cpp.o +[ 65%] Linking CXX executable ../../../metacall-node-port-testd +[ 65%] Built target metacall-node-python-port-mock-test +[ 65%] Built target metacall-node-call-test +[ 65%] Building CXX object source/tests/metacall_node_clear_mem_test/CMakeFiles/metacall-node-clear-mem-test.dir/source/main.cpp.o +[ 65%] Building CXX object source/tests/metacall_node_async_resources_test/CMakeFiles/metacall-node-async-resources-test.dir/source/main.cpp.o +[ 65%] Building CXX object source/tests/metacall_node_fail_env_var_test/CMakeFiles/metacall-node-fail-env-var-test.dir/source/metacall_node_fail_env_var_test.cpp.o +[ 65%] Built target metacall-node-port-c-lib-test +[ 65%] Building CXX object source/tests/metacall_node_async_resources_test/CMakeFiles/metacall-node-async-resources-test.dir/source/metacall_node_async_resources_test.cpp.o +[ 65%] Linking CXX executable ../../../metacall-node-reentrant-testd +[ 65%] Built target metacall-node-port-test +[ 65%] Building CXX object source/tests/metacall_node_await_chain_test/CMakeFiles/metacall-node-await-chain-test.dir/source/main.cpp.o +[ 65%] Built target reflect-value-cast-test +[ 65%] Linking CXX executable ../../../metacall-handle-get-testd +[ 65%] Building CXX object source/tests/metacall_node_exception_test/CMakeFiles/metacall-node-exception-test.dir/source/main.cpp.o +[ 65%] Building CXX object source/tests/metacall_node_exception_test/CMakeFiles/metacall-node-exception-test.dir/source/metacall_node_exception_test.cpp.o +[ 65%] Built target metacall-node-reentrant-test +[ 65%] Building CXX object source/tests/metacall_node_python_deadlock_test/CMakeFiles/metacall-node-python-deadlock-test.dir/source/main.cpp.o +[ 66%] Linking CXX executable ../../../metacall-node-async-testd +[ 66%] Linking CXX executable ../../../metacall-node-async-multiple-testd +[ 66%] Building CXX object source/tests/metacall_node_typescript_test/CMakeFiles/metacall-node-typescript-test.dir/source/metacall_node_typescript_test.cpp.o +[ 66%] Building CXX object source/tests/metacall_node_python_deadlock_test/CMakeFiles/metacall-node-python-deadlock-test.dir/source/metacall_node_python_deadlock_test.cpp.o +[ 66%] Built target metacall-node-async-test +[ 66%] Built target metacall-handle-get-test +[ 66%] Building CXX object source/tests/metacall_node_extension_test/CMakeFiles/metacall-node-extension-test.dir/source/main.cpp.o +[ 66%] Building CXX object source/tests/metacall_node_native_code_test/CMakeFiles/metacall-node-native-code-test.dir/source/main.cpp.o +[ 66%] Built target metacall-node-async-multiple-test +[ 67%] Linking CXX executable ../../../metacall-node-port-await-testd +[ 68%] Building CXX object source/tests/metacall_node_multithread_deadlock_test/CMakeFiles/metacall-node-multithread-deadlock-test.dir/source/main.cpp.o +[ 69%] Linking CXX executable ../../../metacall-node-python-port-ruby-testd +[ 69%] Building CXX object source/tests/metacall_distributable_test/CMakeFiles/metacall-distributable-test.dir/source/main.cpp.o +[ 69%] Linking CXX executable ../../../metacall-node-python-async-after-destroy-testd +[ 69%] Built target metacall-node-python-port-ruby-test +[ 69%] Built target metacall-node-port-await-test +[ 69%] Building CXX object source/tests/metacall_distributable_test/CMakeFiles/metacall-distributable-test.dir/source/metacall_distributable_test.cpp.o +[ 70%] Building CXX object source/tests/metacall_cast_test/CMakeFiles/metacall-cast-test.dir/source/main.cpp.o +[ 70%] Building CXX object source/tests/metacall_node_python_exception_test/CMakeFiles/metacall-node-python-exception-test.dir/source/metacall_node_python_exception_test.cpp.o +[ 70%] Building CXX object source/tests/metacall_cast_test/CMakeFiles/metacall-cast-test.dir/source/metacall_cast_test.cpp.o +[ 70%] Linking CXX executable ../../../metacall-node-python-await-testd +[ 70%] Building CXX object source/tests/metacall_node_clear_mem_test/CMakeFiles/metacall-node-clear-mem-test.dir/source/metacall_node_clear_mem_test.cpp.o +[ 70%] Built target metacall-node-python-async-after-destroy-test +[ 70%] Building CXX object source/tests/metacall_init_fini_test/CMakeFiles/metacall-init-fini-test.dir/source/main.cpp.o +[ 70%] Building CXX object source/tests/metacall_node_native_code_test/CMakeFiles/metacall-node-native-code-test.dir/source/metacall_node_native_code_test.cpp.o +[ 70%] Built target metacall-node-python-await-test +[ 70%] Building CXX object source/tests/metacall_ducktype_test/CMakeFiles/metacall-ducktype-test.dir/source/main.cpp.o +[ 70%] Building CXX object source/tests/metacall_node_await_chain_test/CMakeFiles/metacall-node-await-chain-test.dir/source/metacall_node_await_chain_test.cpp.o +[ 70%] Linking CXX executable ../../../metacall-node-fail-load-leak-testd +[ 70%] Building CXX object source/tests/metacall_inspect_test/CMakeFiles/metacall-inspect-test.dir/source/main.cpp.o +[ 70%] Linking CXX executable ../../../metacall-node-async-resources-testd +[ 70%] Built target metacall-node-fail-load-leak-test +[ 70%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/main.cpp.o +[ 70%] Building CXX object source/tests/metacall_ducktype_test/CMakeFiles/metacall-ducktype-test.dir/source/metacall_ducktype_test.cpp.o +[ 70%] Building CXX object source/tests/metacall_node_extension_test/CMakeFiles/metacall-node-extension-test.dir/source/metacall_node_extension_test.cpp.o +[ 70%] Linking CXX executable ../../../metacall-node-callback-testd +[ 70%] Built target metacall-node-async-resources-test +[ 70%] Linking CXX executable ../../../metacall-node-python-ruby-testd +[ 71%] Building CXX object source/tests/metacall_depends_test/CMakeFiles/metacall-depends-test.dir/source/main.cpp.o +[ 72%] Linking CXX executable ../../../metacall-node-exception-testd +[ 72%] Linking CXX executable ../../../metacall-node-python-deadlock-testd +[ 72%] Building CXX object source/tests/metacall_node_multithread_deadlock_test/CMakeFiles/metacall-node-multithread-deadlock-test.dir/source/metacall_node_multithread_deadlock_test.cpp.o +[ 72%] Built target metacall-node-callback-test +[ 72%] Linking CXX executable ../../../metacall-node-fail-testd +[ 72%] Building CXX object source/tests/metacall_depends_test/CMakeFiles/metacall-depends-test.dir/source/metacall_depends_test.cpp.o +[ 72%] Linking CXX executable ../../../metacall-node-fail-env-var-testd +[ 72%] Building CXX object source/tests/metacall_init_fini_test/CMakeFiles/metacall-init-fini-test.dir/source/metacall_init_fini_test.cpp.o +[ 72%] Built target metacall-node-python-ruby-test +[ 72%] Built target metacall-node-exception-test +[ 72%] Building CXX object source/tests/metacall_configuration_default_test/CMakeFiles/metacall-configuration-default-test.dir/source/main.cpp.o +[ 72%] Building CXX object source/tests/metacall_configuration_exec_path_test/CMakeFiles/metacall-configuration-exec-path-test.dir/source/main.cpp.o +[ 72%] Building CXX object source/tests/metacall_configuration_default_test/CMakeFiles/metacall-configuration-default-test.dir/source/metacall_configuration_default_test.cpp.o +[ 72%] Built target metacall-node-python-deadlock-test +[ 72%] Building CXX object source/tests/metacall_configuration_exec_path_test/CMakeFiles/metacall-configuration-exec-path-test.dir/source/metacall_configuration_exec_path_test.cpp.o +[ 72%] Built target metacall-node-fail-test +[ 72%] Building CXX object source/tests/metacall_clear_test/CMakeFiles/metacall-clear-test.dir/source/main.cpp.o +[ 72%] Built target metacall-node-fail-env-var-test +[ 72%] Building CXX object source/tests/metacall_python_test/CMakeFiles/metacall-python-test.dir/source/main.cpp.o +[ 72%] Building CXX object source/tests/metacall_python_test/CMakeFiles/metacall-python-test.dir/source/metacall_python_test.cpp.o +[ 72%] Linking CXX executable ../../../metacall-testd +[ 72%] Building CXX object source/tests/metacall_clear_test/CMakeFiles/metacall-clear-test.dir/source/metacall_clear_test.cpp.o +[ 72%] Linking CXX executable ../../../metacall-node-python-exception-testd +[ 72%] Building CXX object source/tests/metacall_inspect_test/CMakeFiles/metacall-inspect-test.dir/source/metacall_inspect_test.cpp.o +[ 72%] Built target metacall-test +[ 72%] Building CXX object source/tests/metacall_python_object_class_test/CMakeFiles/metacall-python-object-class-test.dir/source/main.cpp.o +[ 72%] Built target metacall-node-python-exception-test +[ 72%] Building CXX object source/tests/metacall_python_gc_test/CMakeFiles/metacall-python-gc-test.dir/source/main.cpp.o +[ 72%] Linking CXX executable ../../../metacall-cast-testd +[ 72%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/environment.cpp.o +[ 72%] Linking CXX executable ../../../metacall-node-clear-mem-testd +[ 72%] Building CXX object source/tests/metacall_python_gc_test/CMakeFiles/metacall-python-gc-test.dir/source/metacall_python_gc_test.cpp.o +[ 72%] Linking CXX executable ../../../metacall-node-typescript-testd +[ 72%] Built target metacall-cast-test +[ 72%] Building CXX object source/tests/metacall_python_open_test/CMakeFiles/metacall-python-open-test.dir/source/main.cpp.o +[ 72%] Built target metacall-node-clear-mem-test +[ 72%] Linking CXX executable ../../../metacall-node-await-chain-testd +[ 72%] Building CXX object source/tests/metacall_python_dict_test/CMakeFiles/metacall-python-dict-test.dir/source/main.cpp.o +[ 72%] Built target metacall-node-typescript-test +[ 72%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/metacall_integration_test.cpp.o +[ 72%] Building CXX object source/tests/metacall_python_pointer_test/CMakeFiles/metacall-python-pointer-test.dir/source/main.cpp.o +[ 72%] Building CXX object source/tests/metacall_python_dict_test/CMakeFiles/metacall-python-dict-test.dir/source/metacall_python_dict_test.cpp.o +[ 72%] Building CXX object source/tests/metacall_python_reentrant_test/CMakeFiles/metacall-python-reentrant-test.dir/source/main.cpp.o +[ 72%] Built target metacall-node-await-chain-test +[ 73%] Building CXX object source/tests/metacall_python_object_class_test/CMakeFiles/metacall-python-object-class-test.dir/source/metacall_python_object_class_test.cpp.o +[ 73%] Building CXX object source/tests/metacall_python_varargs_test/CMakeFiles/metacall-python-varargs-test.dir/source/main.cpp.o +[ 73%] Linking CXX executable ../../../configuration-default-test/metacall-configuration-default-testd +[ 73%] Linking CXX executable ../../../metacall-node-native-code-testd +[ 73%] Linking CXX executable ../../../metacall-init-fini-testd +[ 73%] Built target metacall-configuration-default-test +[ 73%] Building CXX object source/tests/metacall_python_reentrant_test/CMakeFiles/metacall-python-reentrant-test.dir/source/metacall_python_reentrant_test.cpp.o +[ 74%] Building CXX object source/tests/metacall_python_loader_port_test/CMakeFiles/py-loader-port-test.dir/source/main.cpp.o +[ 74%] Linking CXX executable ../../../metacall-configuration-exec-path-testd +[ 74%] Built target metacall-node-native-code-test +[ 74%] Built target metacall-init-fini-test +[ 74%] Building CXX object source/tests/metacall_python_loader_port_test/CMakeFiles/py-loader-port-test.dir/source/metacall_python_loader_port_test.cpp.o +[ 74%] Building CXX object source/tests/metacall_python_port_https_test/CMakeFiles/metacall-python-port-https-test.dir/source/main.cpp.o +[ 75%] Building CXX object source/tests/metacall_python_port_callback_test/CMakeFiles/metacall-python-port-callback-test.dir/source/main.cpp.o +[ 75%] Linking CXX executable ../../../metacall-distributable-testd +[ 75%] Linking CXX executable ../../../metacall-node-extension-testd +[ 75%] Linking CXX executable ../../../metacall-clear-testd +[ 75%] Building CXX object source/tests/metacall_python_port_callback_test/CMakeFiles/metacall-python-port-callback-test.dir/source/metacall_python_port_callback_test.cpp.o +[ 75%] Linking CXX executable ../../../metacall-node-multithread-deadlock-testd +[ 75%] Built target metacall-configuration-exec-path-test +[ 75%] Building CXX object source/tests/metacall_python_port_pointer_test/CMakeFiles/metacall-python-port-pointer-test.dir/source/main.cpp.o +[ 75%] Linking CXX executable ../../../metacall-python-testd +[ 75%] Linking CXX executable ../../../metacall-depends-testd +[ 75%] Building CXX object source/tests/metacall_python_open_test/CMakeFiles/metacall-python-open-test.dir/source/metacall_python_open_test.cpp.o +[ 75%] Built target metacall-node-extension-test +[ 75%] Built target metacall-distributable-test +[ 75%] Building CXX object source/tests/metacall_python_port_pointer_test/CMakeFiles/metacall-python-port-pointer-test.dir/source/metacall_python_port_pointer_test.cpp.o +[ 75%] Built target metacall-clear-test +[ 76%] Building CXX object source/tests/metacall_python_callback_test/CMakeFiles/metacall-python-callback-test.dir/source/main.cpp.o +[ 76%] Building CXX object source/tests/metacall_python_port_import_test/CMakeFiles/metacall-python-port-import-test.dir/source/main.cpp.o +[ 76%] Building CXX object source/tests/metacall_python_fail_test/CMakeFiles/metacall-python-fail-test.dir/source/main.cpp.o +[ 77%] Linking CXX executable ../../../metacall-ducktype-testd +[ 77%] Building CXX object source/tests/metacall_python_fail_test/CMakeFiles/metacall-python-fail-test.dir/source/metacall_python_fail_test.cpp.o +[ 77%] Built target metacall-node-multithread-deadlock-test +[ 77%] Building CXX object source/tests/metacall_python_pointer_test/CMakeFiles/metacall-python-pointer-test.dir/source/metacall_python_pointer_test.cpp.o +[ 77%] Built target metacall-python-test +[ 77%] Built target metacall-depends-test +[ 77%] Building CXX object source/tests/metacall_python_without_functions_test/CMakeFiles/metacall-python-without-functions-test.dir/source/main.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_relative_path_test/CMakeFiles/metacall-python-relative-path-test.dir/source/main.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_builtins_test/CMakeFiles/metacall-python-builtins-test.dir/source/main.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_varargs_test/CMakeFiles/metacall-python-varargs-test.dir/source/metacall_python_varargs_test.cpp.o +[ 77%] Linking CXX executable ../../../metacall-python-gc-testd +[ 77%] Linking CXX executable ../../../metacall-inspect-testd +[ 77%] Built target metacall-ducktype-test +[ 77%] Building CXX object source/tests/metacall_python_port_import_test/CMakeFiles/metacall-python-port-import-test.dir/source/metacall_python_port_import_test.cpp.o +[ 77%] Built target metacall-inspect-test +[ 77%] Built target metacall-python-gc-test +[ 77%] Building CXX object source/tests/metacall_python_callback_test/CMakeFiles/metacall-python-callback-test.dir/source/metacall_python_callback_test.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_async_test/CMakeFiles/metacall-python-async-test.dir/source/main.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_without_functions_test/CMakeFiles/metacall-python-without-functions-test.dir/source/metacall_python_without_functions_test.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_async_test/CMakeFiles/metacall-python-async-test.dir/source/metacall_python_async_test.cpp.o +[ 77%] Building CXX object source/tests/metacall_python_port_https_test/CMakeFiles/metacall-python-port-https-test.dir/source/metacall_python_port_https_test.cpp.o +[ 78%] Linking CXX executable ../../../metacall-integration-testd +[ 78%] Building CXX object source/tests/metacall_python_builtins_test/CMakeFiles/metacall-python-builtins-test.dir/source/metacall_python_builtins_test.cpp.o +[ 79%] Building CXX object source/tests/metacall_python_relative_path_test/CMakeFiles/metacall-python-relative-path-test.dir/source/metacall_python_relative_path_test.cpp.o +[ 79%] Built target metacall-integration-test +[ 79%] Building CXX object source/tests/metacall_python_exception_test/CMakeFiles/metacall-python-exception-test.dir/source/main.cpp.o +[ 79%] Building CXX object source/tests/metacall_python_exception_test/CMakeFiles/metacall-python-exception-test.dir/source/metacall_python_exception_test.cpp.o +[ 79%] Linking CXX executable ../../../metacall-python-port-callback-testd +[ 80%] Building CXX object source/tests/metacall_python_without_env_vars_test/CMakeFiles/metacall-python-without-env-vars-test.dir/source/main.cpp.o +[ 80%] Building CXX object source/tests/metacall_python_without_env_vars_test/CMakeFiles/metacall-python-without-env-vars-test.dir/source/metacall_python_without_env_vars_test.cpp.o +[ 80%] Linking CXX executable ../../../metacall-python-reentrant-testd +[ 80%] Building CXX object source/tests/metacall_map_test/CMakeFiles/metacall-map-test.dir/source/main.cpp.o +[ 80%] Building CXX object source/tests/metacall_map_test/CMakeFiles/metacall-map-test.dir/source/metacall_map_test.cpp.o +[ 80%] Built target metacall-python-port-callback-test +[ 80%] Built target metacall-python-reentrant-test +[ 80%] Building CXX object source/tests/metacall_initialize_test/CMakeFiles/metacall-initialize-test.dir/source/main.cpp.o +[ 80%] Building CXX object source/tests/metacall_map_await_test/CMakeFiles/metacall-map-await-test.dir/source/main.cpp.o +[ 80%] Linking CXX executable ../../../py-loader-port-testd +[ 80%] Building CXX object source/tests/metacall_map_await_test/CMakeFiles/metacall-map-await-test.dir/source/metacall_map_await_test.cpp.o +[ 80%] Linking CXX executable ../../../metacall-python-dict-testd +[ 80%] Linking CXX executable ../../../metacall-python-port-pointer-testd +[ 80%] Built target py-loader-port-test +[ 80%] Built target metacall-python-dict-test +[ 80%] Building CXX object source/tests/metacall_initialize_ex_test/CMakeFiles/metacall-initialize-ex-test.dir/source/main.cpp.o +[ 81%] Building CXX object source/tests/metacall_reinitialize_test/CMakeFiles/metacall-reinitialize-test.dir/source/main.cpp.o +[ 81%] Linking CXX executable ../../../metacall-python-object-class-testd +[ 81%] Linking CXX executable ../../../metacall-python-fail-testd +[ 81%] Linking CXX executable ../../../metacall-python-varargs-testd +[ 81%] Built target metacall-python-port-pointer-test +[ 81%] Building CXX object source/tests/metacall_initialize_destroy_multiple_test/CMakeFiles/metacall-initialize-destroy-multiple-test.dir/source/main.cpp.o +[ 81%] Building CXX object source/tests/metacall_initialize_destroy_multiple_node_test/CMakeFiles/metacall-initialize-destroy-multiple-node-test.dir/source/main.cpp.o +[ 82%] Linking CXX executable ../../../metacall-python-port-import-testd +[ 82%] Built target metacall-python-object-class-test +[ 82%] Linking CXX executable ../../../metacall-python-port-https-testd +[ 82%] Building CXX object source/tests/metacall_reload_functions_test/CMakeFiles/metacall-reload-functions-test.dir/source/main.cpp.o +[ 82%] Linking CXX executable ../../../metacall-python-pointer-testd +[ 82%] Built target metacall-python-fail-test +[ 82%] Building CXX object source/tests/metacall_initialize_destroy_multiple_node_test/CMakeFiles/metacall-initialize-destroy-multiple-node-test.dir/source/metacall_initialize_destroy_multiple_node_test.cpp.o +[ 82%] Building CXX object source/tests/metacall_initialize_destroy_multiple_test/CMakeFiles/metacall-initialize-destroy-multiple-test.dir/source/metacall_initialize_destroy_multiple_test.cpp.o +[ 82%] Linking CXX executable ../../../metacall-python-callback-testd +[ 82%] Built target metacall-python-varargs-test +[ 82%] Building CXX object source/tests/metacall_invalid_loader_test/CMakeFiles/metacall-invalid-loader-test.dir/source/metacall_invalid_loader_test.cpp.o +[ 83%] Building CXX object source/tests/metacall_initialize_test/CMakeFiles/metacall-initialize-test.dir/source/metacall_initialize_test.cpp.o +[ 83%] Building CXX object source/tests/metacall_invalid_loader_test/CMakeFiles/metacall-invalid-loader-test.dir/source/main.cpp.o +[ 83%] Linking CXX executable ../../../metacall-python-open-testd +[ 83%] Built target metacall-python-port-https-test +[ 83%] Built target metacall-python-port-import-test +[ 84%] Linking CXX executable ../../../metacall-python-exception-testd +[ 84%] Linking CXX executable ../../../metacall-python-without-functions-testd +[ 84%] Building CXX object source/tests/metacall_return_monad_test/CMakeFiles/metacall-return-monad-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_fork_test/CMakeFiles/metacall-fork-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_fork_test/CMakeFiles/metacall-fork-test.dir/source/metacall_fork_test.cpp.o +[ 84%] Built target metacall-python-callback-test +[ 84%] Built target metacall-python-pointer-test +[ 84%] Building CXX object source/tests/metacall_return_monad_test/CMakeFiles/metacall-return-monad-test.dir/source/metacall_return_monad_test.cpp.o +[ 84%] Linking CXX executable ../../../metacall-python-without-env-vars-testd +[ 84%] Building CXX object source/tests/metacall_callback_complex_test/CMakeFiles/metacall-callback-complex-test.dir/source/main.cpp.o +[ 84%] Built target metacall-python-open-test +[ 84%] Built target metacall-python-without-functions-test +[ 84%] Building CXX object source/tests/metacall_callback_complex_test/CMakeFiles/metacall-callback-complex-test.dir/source/metacall_callback_complex_test.cpp.o +[ 84%] Building CXX object source/tests/metacall_ruby_fail_test/CMakeFiles/metacall-ruby-fail-test.dir/source/main.cpp.o +[ 84%] Built target metacall-python-exception-test +[ 84%] Building CXX object source/tests/metacall_ruby_fail_empty_test/CMakeFiles/metacall-ruby-fail-empty-test.dir/source/main.cpp.o +[ 84%] Linking CXX executable ../../../metacall-python-builtins-testd +[ 84%] Linking CXX executable ../../../metacall-python-async-testd +[ 84%] Built target metacall-python-without-env-vars-test +[ 84%] Building CXX object source/tests/metacall_ruby_object_class_test/CMakeFiles/metacall-ruby-object-class-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_initialize_ex_test/CMakeFiles/metacall-initialize-ex-test.dir/source/metacall_initialize_ex_test.cpp.o +[ 84%] Building CXX object source/tests/metacall_reinitialize_test/CMakeFiles/metacall-reinitialize-test.dir/source/metacall_reinitialize_test.cpp.o +[ 84%] Linking CXX executable ../../../metacall-python-relative-path-testd +[ 84%] Built target metacall-python-async-test +[ 84%] Building CXX object source/tests/metacall_ruby_parser_integration_test/CMakeFiles/metacall-ruby-parser-integration-test.dir/source/main.cpp.o +[ 84%] Built target metacall-python-builtins-test +[ 84%] Building CXX object source/tests/metacall_ruby_parser_integration_test/CMakeFiles/metacall-ruby-parser-integration-test.dir/source/metacall_ruby_parser_integration_test.cpp.o +[ 84%] Building CXX object source/tests/metacall_ruby_object_class_test/CMakeFiles/metacall-ruby-object-class-test.dir/source/metacall_ruby_object_class_test.cpp.o +[ 84%] Building CXX object source/tests/metacall_function_test/CMakeFiles/metacall-function-test.dir/source/main.cpp.o +[ 84%] Built target metacall-python-relative-path-test +[ 84%] Linking CXX executable ../../../metacall-map-testd +[ 84%] Building CXX object source/tests/metacall_reload_functions_test/CMakeFiles/metacall-reload-functions-test.dir/source/metacall_reload_functions_test.cpp.o +[ 84%] Building CXX object source/tests/metacall_cobol_test/CMakeFiles/metacall-cobol-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_cobol_test/CMakeFiles/metacall-cobol-test.dir/source/metacall_cobol_test.cpp.o +[ 84%] Built target metacall-map-test +[ 84%] Building CXX object source/tests/metacall_file_test/CMakeFiles/metacall-file-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_file_fail_test/CMakeFiles/metacall-file-fail-test.dir/source/main.cpp.o +[ 84%] Building CXX object source/tests/metacall_file_test/CMakeFiles/metacall-file-test.dir/source/metacall_file_test.cpp.o +[ 84%] Linking CXX executable ../../../metacall-invalid-loader-testd +[ 85%] Linking CXX executable ../../../metacall-initialize-destroy-multiple-node-testd +[ 85%] Linking CXX executable ../../../metacall-initialize-destroy-multiple-testd +[ 86%] Building CXX object source/tests/metacall_ruby_fail_test/CMakeFiles/metacall-ruby-fail-test.dir/source/metacall_ruby_fail_test.cpp.o +[ 86%] Linking CXX executable ../../../metacall-initialize-testd +[ 87%] Building CXX object source/tests/metacall_file_glob_test/CMakeFiles/metacall-file-glob-test.dir/source/main.cpp.o +[ 87%] Building CXX object source/tests/metacall_ruby_fail_empty_test/CMakeFiles/metacall-ruby-fail-empty-test.dir/source/metacall_ruby_fail_empty_test.cpp.o +[ 87%] Built target metacall-invalid-loader-test +[ 87%] Building CXX object source/tests/metacall_typescript_test/CMakeFiles/metacall-typescript-test.dir/source/main.cpp.o +[ 88%] Linking CXX executable ../../../metacall-fork-testd +[ 88%] Built target metacall-initialize-destroy-multiple-test +[ 88%] Built target metacall-initialize-destroy-multiple-node-test +[ 88%] Building CXX object source/tests/metacall_file_glob_test/CMakeFiles/metacall-file-glob-test.dir/source/metacall_file_glob_test.cpp.o +[ 88%] Building CXX object source/tests/metacall_typescript_test/CMakeFiles/metacall-typescript-test.dir/source/metacall_typescript_test.cpp.o +[ 88%] Built target metacall-initialize-test +[ 89%] Building CXX object source/tests/metacall_typescript_node_test/CMakeFiles/metacall-typescript-node-test.dir/source/main.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_call_map_test/CMakeFiles/metacall-typescript-call-map-test.dir/source/main.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_call_map_test/CMakeFiles/metacall-typescript-call-map-test.dir/source/metacall_typescript_call_map_test.cpp.o +[ 89%] Built target metacall-fork-test +[ 89%] Linking CXX executable ../../../metacall-map-await-testd +[ 89%] Building CXX object source/tests/metacall_typescript_tsx_test/CMakeFiles/metacall-typescript-tsx-test.dir/source/main.cpp.o +[ 89%] Linking CXX executable ../../../metacall-initialize-ex-testd +[ 89%] Linking CXX executable ../../../metacall-reinitialize-testd +[ 89%] Built target metacall-map-await-test +[ 89%] Building CXX object source/tests/metacall_function_test/CMakeFiles/metacall-function-test.dir/source/metacall_function_test.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_tsx_loop_fail_test/CMakeFiles/metacall-typescript-tsx-loop-fail-test.dir/source/main.cpp.o +[ 89%] Built target metacall-initialize-ex-test +[ 89%] Building CXX object source/tests/metacall_typescript_require_test/CMakeFiles/metacall-typescript-require-test.dir/source/main.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_jsx_default_test/CMakeFiles/metacall-typescript-jsx-default-test.dir/source/main.cpp.o +[ 89%] Built target metacall-reinitialize-test +[ 89%] Building CXX object source/tests/metacall_typescript_jsx_default_test/CMakeFiles/metacall-typescript-jsx-default-test.dir/source/metacall_typescript_jsx_default_test.cpp.o +[ 89%] Building CXX object source/tests/metacall_file_fail_test/CMakeFiles/metacall-file-fail-test.dir/source/metacall_file_fail_test.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_require_test/CMakeFiles/metacall-typescript-require-test.dir/source/metacall_typescript_require_test.cpp.o +[ 89%] Building CXX object source/tests/metacall_typescript_node_test/CMakeFiles/metacall-typescript-node-test.dir/source/metacall_typescript_node_test.cpp.o +[ 89%] Linking CXX executable ../../../metacall-ruby-parser-integration-testd +[ 89%] Linking CXX executable ../../../metacall-ruby-fail-testd +[ 90%] Linking CXX executable ../../../metacall-return-monad-testd +[ 90%] Building CXX object source/tests/metacall_typescript_tsx_test/CMakeFiles/metacall-typescript-tsx-test.dir/source/metacall_typescript_tsx_test.cpp.o +[ 90%] Building CXX object source/tests/metacall_typescript_tsx_loop_fail_test/CMakeFiles/metacall-typescript-tsx-loop-fail-test.dir/source/metacall_typescript_tsx_loop_fail_test.cpp.o +[ 90%] Built target metacall-ruby-parser-integration-test +[ 90%] Building CXX object source/tests/metacall_csharp_static_class_test/CMakeFiles/metacall-csharp-static-class-test.dir/source/main.cpp.o +[ 90%] Building CXX object source/tests/metacall_rpc_test/CMakeFiles/metacall-rpc-test.dir/source/main.cpp.o +[ 90%] Built target metacall-ruby-fail-test +[ 90%] Building CXX object source/tests/metacall_csharp_static_class_test/CMakeFiles/metacall-csharp-static-class-test.dir/source/metacall_csharp_static_class_test.cpp.o +[ 91%] Building CXX object source/tests/metacall_ruby_test/CMakeFiles/metacall-ruby-test.dir/source/main.cpp.o +[ 91%] Built target metacall-return-monad-test +[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/main.cpp.o +[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/environment.cpp.o +[ 91%] Linking CXX executable ../../../metacall-callback-complex-testd +[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/metacall_cs_test.cpp.o +[ 91%] Building CXX object source/tests/metacall_rpc_test/CMakeFiles/metacall-rpc-test.dir/source/metacall_rpc_test.cpp.o +[ 92%] Linking CXX executable ../../../metacall-cobol-testd +[ 92%] Linking CXX executable ../../../metacall-ruby-fail-empty-testd +[ 92%] Linking CXX executable ../../../metacall-reload-functions-testd +[ 92%] Linking CXX executable ../../../metacall-ruby-object-class-testd +[ 92%] Linking CXX executable ../../../metacall-file-testd +[ 92%] Built target metacall-callback-complex-test +[ 92%] Linking CXX executable ../../../metacall-typescript-jsx-default-testd +[ 92%] Building CXX object source/tests/metacall_java_test/CMakeFiles/metacall-java-test.dir/source/main.cpp.o +[ 92%] Built target metacall-cobol-test +[ 92%] Building CXX object source/tests/metacall_wasm_test/CMakeFiles/metacall-wasm-test.dir/source/main.cpp.o +[ 92%] Built target metacall-ruby-object-class-test +[ 92%] Built target metacall-reload-functions-test +[ 92%] Built target metacall-ruby-fail-empty-test +[ 92%] Building CXX object source/tests/metacall_wasm_python_port_test/CMakeFiles/metacall-wasm-python-port-test.dir/source/main.cpp.o +[ 92%] Building CXX object source/tests/metacall_c_lib_test/CMakeFiles/metacall-c-lib-test.dir/source/main.cpp.o +[ 92%] Building CXX object source/tests/metacall_c_test/CMakeFiles/metacall-c-test.dir/source/main.cpp.o +[ 92%] Built target metacall-file-test +[ 92%] Built target metacall-typescript-jsx-default-test +[ 92%] Building CXX object source/tests/metacall_version_test/CMakeFiles/metacall-version-test.dir/source/main.cpp.o +[ 92%] Building CXX object source/tests/metacall_dynlink_path_test/CMakeFiles/metacall-dynlink-path-test.dir/source/main.cpp.o +[ 93%] Linking CXX executable ../../../metacall-typescript-testd +[ 94%] Building CXX object source/tests/metacall_dynlink_path_test/CMakeFiles/metacall-dynlink-path-test.dir/source/metacall_dynlink_path_test.cpp.o +[ 94%] Linking CXX executable ../../../metacall-file-glob-testd +[ 94%] Linking CXX executable ../../../metacall-typescript-call-map-testd +[ 94%] Building CXX object source/tests/metacall_ruby_test/CMakeFiles/metacall-ruby-test.dir/source/metacall_ruby_test.cpp.o +[ 95%] Building CXX object source/tests/metacall_version_test/CMakeFiles/metacall-version-test.dir/source/metacall_version_test.cpp.o +[ 95%] Built target metacall-typescript-test +[ 95%] Building CXX object source/tests/metacall_library_path_without_env_vars_test/CMakeFiles/metacall-library-path-without-env-vars-test.dir/source/main.cpp.o +[ 95%] Built target metacall-file-glob-test +[ 95%] Building CXX object source/tests/metacall_ext_test/CMakeFiles/metacall-ext-test.dir/source/main.cpp.o +[ 95%] Building CXX object source/tests/metacall_ext_test/CMakeFiles/metacall-ext-test.dir/source/metacall_ext_test.cpp.o +[ 95%] Built target metacall-typescript-call-map-test +[ 96%] Building CXX object source/tests/metacall_plugin_extension_test/CMakeFiles/metacall-plugin-extension-test.dir/source/main.cpp.o +[ 96%] Linking CXX executable ../../../metacall-typescript-require-testd +[ 96%] Building CXX object source/tests/metacall_wasm_test/CMakeFiles/metacall-wasm-test.dir/source/metacall_wasm_test.cpp.o +[ 96%] Linking CXX executable ../../../metacall-file-fail-testd +[ 96%] Building CXX object source/tests/metacall_java_test/CMakeFiles/metacall-java-test.dir/source/metacall_java_test.cpp.o +[ 96%] Built target metacall-typescript-require-test +[ 96%] Building CXX object source/tests/metacall_wasm_python_port_test/CMakeFiles/metacall-wasm-python-port-test.dir/source/metacall_wasm_python_port_test.cpp.o +[ 96%] Linking CXX executable ../../../metacall-function-testd +[ 96%] Built target metacall-file-fail-test +[ 96%] Linking CXX executable ../../../metacall-typescript-tsx-loop-fail-testd +[ 97%] Building CXX object source/tests/metacall_library_path_without_env_vars_test/CMakeFiles/metacall-library-path-without-env-vars-test.dir/source/metacall_library_path_without_env_vars_test.cpp.o +[ 98%] Building CXX object source/tests/metacall_c_lib_test/CMakeFiles/metacall-c-lib-test.dir/source/metacall_c_lib_test.cpp.o +[ 98%] Linking CXX executable ../../../metacall-typescript-node-testd +[ 98%] Building CXX object source/tests/metacall_c_test/CMakeFiles/metacall-c-test.dir/source/metacall_c_test.cpp.o +[ 98%] Building CXX object source/tests/metacall_plugin_extension_test/CMakeFiles/metacall-plugin-extension-test.dir/source/metacall_plugin_extension_test.cpp.o +[ 98%] Building CXX object source/tests/metacall_plugin_extension_local_test/CMakeFiles/metacall-plugin-extension-local-test.dir/source/main.cpp.o +[ 98%] Building CXX object source/tests/metacall_plugin_extension_local_test/CMakeFiles/metacall-plugin-extension-local-test.dir/source/metacall_plugin_extension_local_test.cpp.o +[ 98%] Built target metacall-function-test +[ 98%] Building CXX object source/tests/metacall_backtrace_plugin_test/CMakeFiles/metacall-backtrace-plugin-test.dir/source/main.cpp.o +[ 98%] Built target metacall-typescript-tsx-loop-fail-test +[ 98%] Linking CXX executable ../../../metacall-cs-testd +[ 98%] Linking CXX executable ../../../metacall-typescript-tsx-testd +[ 98%] Building CXX object source/tests/metacall_sandbox_plugin_test/CMakeFiles/metacall-sandbox-plugin-test.dir/source/main.cpp.o +[ 98%] Built target metacall-typescript-node-test +[ 98%] Building CXX object source/benchmarks/log_bench/CMakeFiles/log-bench.dir/source/log_bench.cpp.o +[ 98%] Linking CXX executable ../../../metacall-csharp-static-class-testd +[ 98%] Building CXX object source/benchmarks/metacall_py_c_api_bench/CMakeFiles/metacall-py-c-api-bench.dir/source/metacall_py_c_api_bench.cpp.o +[ 98%] Building CXX object source/tests/metacall_sandbox_plugin_test/CMakeFiles/metacall-sandbox-plugin-test.dir/source/metacall_sandbox_plugin_test.cpp.o +[ 98%] Built target metacall-cs-test +[ 98%] Built target metacall-typescript-tsx-test +[ 98%] Building CXX object source/benchmarks/metacall_py_call_bench/CMakeFiles/metacall-py-call-bench.dir/source/metacall_py_call_bench.cpp.o +[ 98%] Building CXX object source/tests/metacall_backtrace_plugin_test/CMakeFiles/metacall-backtrace-plugin-test.dir/source/metacall_backtrace_plugin_test.cpp.o +[ 98%] Building CXX object source/benchmarks/metacall_py_init_bench/CMakeFiles/metacall-py-init-bench.dir/source/metacall_py_init_bench.cpp.o +[ 98%] Linking CXX executable ../../../metacall-dynlink-path-testd +[ 98%] Linking CXX executable ../../../metacall-ruby-testd +[ 98%] Linking CXX executable ../../../metacall-version-testd +[ 98%] Built target metacall-csharp-static-class-test +[ 98%] Building CXX object source/benchmarks/metacall_node_call_bench/CMakeFiles/metacall-node-call-bench.dir/source/metacall_node_call_bench.cpp.o +[ 98%] Building CXX object source/benchmarks/metacall_rb_call_bench/CMakeFiles/metacall-rb-call-bench.dir/source/metacall_rb_call_bench.cpp.o +[ 98%] Built target metacall-dynlink-path-test +[ 98%] Built target metacall-ruby-test +[ 98%] Building CXX object source/benchmarks/metacall_cs_call_bench/CMakeFiles/metacall-cs-call-bench.dir/source/metacall_cs_call_bench.cpp.o +[ 98%] Linking CXX executable ../../../metacall-rpc-testd +[ 98%] Built target metacall-version-test +[ 98%] Built target metacall-rpc-test +[ 98%] Linking CXX executable ../../../metacall-wasm-python-port-testd +[ 98%] Linking CXX executable ../../../log-benchd +[ 99%] Linking CXX executable ../../../metacall-py-init-benchd +[ 99%] Built target metacall-wasm-python-port-test +[ 99%] Linking CXX executable ../../../metacall-py-c-api-benchd +[ 99%] Built target log-bench +[ 99%] Linking CXX executable ../../../metacall-library-path-without-env-vars-testd +[ 99%] Built target metacall-py-init-bench +[ 99%] Built target metacall-py-c-api-bench +[ 99%] Linking CXX executable ../../../metacall-py-call-benchd +[ 99%] Built target metacall-library-path-without-env-vars-test +[ 99%] Linking CXX executable ../../../metacall-rb-call-benchd +[ 99%] Linking CXX executable ../../../metacall-ext-testd +[ 99%] Built target metacall-py-call-bench +[100%] Linking CXX executable ../../../metacall-cs-call-benchd +[100%] Linking CXX executable ../../../metacall-node-call-benchd +[100%] Built target metacall-rb-call-bench +[100%] Built target metacall-cs-call-bench +[100%] Built target metacall-ext-test +[100%] Linking CXX executable ../../../metacall-c-lib-testd +[100%] Built target metacall-node-call-bench +[100%] Built target metacall-c-lib-test +[100%] Linking CXX executable ../../../metacall-backtrace-plugin-testd +[100%] Built target metacall-backtrace-plugin-test +[100%] Linking CXX executable ../../../metacall-c-testd +[100%] Linking CXX executable ../../../metacall-plugin-extension-local-testd +[100%] Linking CXX executable ../../../metacall-plugin-extension-testd +[100%] Built target metacall-plugin-extension-local-test +[100%] Built target metacall-c-test +[100%] Built target metacall-plugin-extension-test +[100%] Linking CXX executable ../../../metacall-wasm-testd +[100%] Linking CXX executable ../../../metacall-java-testd +[100%] Built target metacall-wasm-test +[100%] Built target metacall-java-test +[100%] Linking CXX executable ../../../metacall-sandbox-plugin-testd +[100%] Built target metacall-sandbox-plugin-test ++ [ 1 = 1 ] ++ getconf _NPROCESSORS_ONLN ++ ctest -j24 --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C Debug +Test project /usr/local/metacall/build + Start 1: ts_loader_bootstrap + Start 2: node_port + Start 3: node_port_test_executable + Start 4: py_port + Start 5: go_port + Start 6: rs_port + Start 7: rb_port + Start 8: preprocessor-test + Start 9: environment-test + Start 10: log-test + Start 11: log-custom-test + Start 12: adt-set-test + Start 13: adt-trie-test + Start 14: adt-vector-test + Start 15: adt-map-test + Start 16: reflect-value-cast-test + Start 17: reflect-function-test + Start 18: reflect-object-class-test + Start 19: reflect-scope-test + Start 20: reflect-metadata-test + Start 21: dynlink-test + Start 22: detour-test + Start 23: serial-test + Start 24: configuration-test + 1/175 Test #8: preprocessor-test ................................ Passed 0.04 sec + 2/175 Test #9: environment-test ................................. Passed 0.03 sec + 3/175 Test #10: log-test ......................................... Passed 0.03 sec + 4/175 Test #11: log-custom-test .................................. Passed 0.03 sec + 5/175 Test #12: adt-set-test ..................................... Passed 0.03 sec + 6/175 Test #13: adt-trie-test .................................... Passed 0.03 sec + 7/175 Test #14: adt-vector-test .................................. Passed 0.03 sec + 8/175 Test #15: adt-map-test ..................................... Passed 0.03 sec + 9/175 Test #16: reflect-value-cast-test .......................... Passed 0.02 sec + 10/175 Test #17: reflect-function-test ............................ Passed 0.02 sec + 11/175 Test #18: reflect-object-class-test ........................ Passed 0.02 sec + 12/175 Test #19: reflect-scope-test ............................... Passed 0.02 sec + 13/175 Test #20: reflect-metadata-test ............................ Passed 0.02 sec + 14/175 Test #21: dynlink-test ..................................... Passed 0.02 sec + Start 25: rb-loader-parser-test + Start 26: portability-path-test + Start 27: metacall-logs-test + Start 28: metacall-load-memory-test + Start 29: metacall-load-memory-empty-test + Start 30: metacall-load-configuration-test + Start 31: metacall-load-configuration-fail-test + Start 32: metacall-load-configuration-relative-test + Start 33: metacall-load-configuration-python-node-test + Start 34: metacall-load-configuration-node-python-test + Start 35: metacall-duplicated-handle-test + Start 36: metacall-duplicated-symbols-test + Start 37: metacall-handle-export-test + Start 38: metacall-handle-get-test + 15/175 Test #22: detour-test ...................................... Passed 0.08 sec + 16/175 Test #23: serial-test ...................................... Passed 0.07 sec + 17/175 Test #24: configuration-test ............................... Passed 0.07 sec + 18/175 Test #25: rb-loader-parser-test ............................ Passed 0.06 sec + 19/175 Test #26: portability-path-test ............................ Passed 0.06 sec + Start 39: metacall-test + Start 40: metacall-node-test + Start 41: metacall-node-event-loop-test + Start 42: metacall-node-event-loop-signal-test + Start 43: metacall-node-call-test + 20/175 Test #27: metacall-logs-test ............................... Passed 0.33 sec + Start 44: metacall-node-inline-test + 21/175 Test #32: metacall-load-configuration-relative-test ........ Passed 0.46 sec + Start 45: metacall-node-async-test + 22/175 Test #31: metacall-load-configuration-fail-test ............ Passed 0.66 sec + Start 46: metacall-node-async-multiple-test + 23/175 Test #42: metacall-node-event-loop-signal-test ............. Passed 0.62 sec + Start 47: metacall-node-reentrant-test + 24/175 Test #28: metacall-load-memory-test ........................ Passed 0.72 sec + Start 48: metacall-node-port-test + 25/175 Test #40: metacall-node-test ............................... Passed 0.77 sec + Start 49: metacall-node-port-await-test + 26/175 Test #7: rb_port .......................................... Passed 0.90 sec + Start 50: metacall-node-port-c-lib-test + 27/175 Test #36: metacall-duplicated-symbols-test ................. Passed 1.06 sec + Start 51: metacall-node-python-port-mock-test + 28/175 Test #45: metacall-node-async-test ......................... Passed 0.69 sec + Start 52: metacall-node-python-port-ruby-test + 29/175 Test #44: metacall-node-inline-test ........................ Passed 0.87 sec + Start 53: metacall-node-python-ruby-test + 30/175 Test #47: metacall-node-reentrant-test ..................... Passed 0.66 sec + Start 54: metacall-node-callback-test + 31/175 Test #33: metacall-load-configuration-python-node-test ..... Passed 1.37 sec + Start 55: metacall-node-fail-test + 32/175 Test #43: metacall-node-call-test .......................... Passed 1.36 sec + Start 56: metacall-node-fail-env-var-test + 33/175 Test #37: metacall-handle-export-test ...................... Passed 1.40 sec + Start 57: metacall-node-fail-load-leak-test + 34/175 Test #30: metacall-load-configuration-test ................. Passed 1.51 sec + Start 58: metacall-node-typescript-test + 35/175 Test #34: metacall-load-configuration-node-python-test ..... Passed 1.52 sec + Start 59: metacall-node-python-async-after-destroy-test + 36/175 Test #38: metacall-handle-get-test ......................... Passed 1.52 sec + Start 60: metacall-node-python-await-test + 37/175 Test #35: metacall-duplicated-handle-test .................. Passed 1.56 sec + Start 61: metacall-node-python-exception-test + 38/175 Test #4: py_port .......................................... Passed 1.72 sec + Start 62: metacall-node-clear-mem-test + 39/175 Test #49: metacall-node-port-await-test .................... Passed 0.86 sec + Start 63: metacall-node-async-resources-test + 40/175 Test #50: metacall-node-port-c-lib-test .................... Passed 0.85 sec + Start 64: metacall-node-await-chain-test + 41/175 Test #56: metacall-node-fail-env-var-test .................. Passed 0.35 sec + Start 65: metacall-node-exception-test + 42/175 Test #55: metacall-node-fail-test .......................... Passed 0.60 sec + Start 66: metacall-node-python-deadlock-test + 43/175 Test #57: metacall-node-fail-load-leak-test ................ Passed 0.55 sec + Start 67: metacall-node-native-code-test + 44/175 Test #62: metacall-node-clear-mem-test ..................... Passed 0.42 sec + Start 68: metacall-node-extension-test + 45/175 Test #52: metacall-node-python-port-ruby-test .............. Passed 1.04 sec + Start 69: metacall-node-multithread-deadlock-test + 46/175 Test #64: metacall-node-await-chain-test ................... Passed 0.51 sec + Start 70: metacall-distributable-test + 47/175 Test #51: metacall-node-python-port-mock-test .............. Passed 1.13 sec + Start 71: metacall-cast-test + 48/175 Test #54: metacall-node-callback-test ...................... Passed 0.89 sec + Start 72: metacall-init-fini-test + 49/175 Test #65: metacall-node-exception-test ..................... Passed 0.51 sec + Start 73: metacall-ducktype-test + 50/175 Test #68: metacall-node-extension-test ..................... Passed 0.40 sec + Start 74: metacall-inspect-test + 51/175 Test #60: metacall-node-python-await-test .................. Passed 0.92 sec + Start 75: metacall-integration-test + 52/175 Test #67: metacall-node-native-code-test ................... Passed 0.52 sec + Start 76: metacall-depends-test + 53/175 Test #61: metacall-node-python-exception-test .............. Passed 0.97 sec + Start 77: metacall-configuration-exec-path-test + 54/175 Test #29: metacall-load-memory-empty-test .................. Passed 2.70 sec + Start 78: metacall-configuration-default-test + 55/175 Test #78: metacall-configuration-default-test .............. Passed 0.02 sec + Start 79: metacall-clear-test + 56/175 Test #71: metacall-cast-test ............................... Passed 0.58 sec + Start 80: metacall-python-test + 57/175 Test #73: metacall-ducktype-test ........................... Passed 0.54 sec + Start 81: metacall-python-object-class-test + 58/175 Test #72: metacall-init-fini-test .......................... Passed 0.74 sec + Start 82: metacall-python-gc-test + 59/175 Test #77: metacall-configuration-exec-path-test ............ Passed 0.56 sec + Start 83: metacall-python-open-test + 60/175 Test #76: metacall-depends-test ............................ Passed 0.65 sec + Start 84: metacall-python-dict-test + 61/175 Test #53: metacall-node-python-ruby-test ................... Passed 2.00 sec + Start 85: metacall-python-pointer-test + 62/175 Test #66: metacall-node-python-deadlock-test ............... Passed 1.25 sec + Start 86: metacall-python-reentrant-test + 63/175 Test #81: metacall-python-object-class-test ................ Passed 0.65 sec + Start 87: metacall-python-varargs-test + 64/175 Test #79: metacall-clear-test .............................. Passed 0.98 sec + Start 88: py-loader-port-test + 65/175 Test #82: metacall-python-gc-test .......................... Passed 0.76 sec + Start 89: metacall-python-port-https-test + 66/175 Test #85: metacall-python-pointer-test ..................... Passed 0.57 sec + Start 90: metacall-python-port-callback-test + 67/175 Test #80: metacall-python-test ............................. Passed 1.01 sec + Start 91: metacall-python-port-pointer-test + 68/175 Test #84: metacall-python-dict-test ........................ Passed 0.68 sec + Start 92: metacall-python-port-import-test + 69/175 Test #86: metacall-python-reentrant-test ................... Passed 1.09 sec + Start 93: metacall-python-callback-test + 70/175 Test #87: metacall-python-varargs-test ..................... Passed 0.86 sec + Start 94: metacall-python-fail-test + 71/175 Test #90: metacall-python-port-callback-test ............... Passed 0.80 sec + Start 95: metacall-python-relative-path-test + 72/175 Test #88: py-loader-port-test .............................. Passed 0.91 sec + Start 96: metacall-python-without-functions-test + 73/175 Test #91: metacall-python-port-pointer-test ................ Passed 0.97 sec + Start 97: metacall-python-builtins-test + 74/175 Test #46: metacall-node-async-multiple-test ................ Passed 4.26 sec + Start 98: metacall-python-async-test + 75/175 Test #94: metacall-python-fail-test ........................ Passed 0.67 sec + Start 99: metacall-python-exception-test + 76/175 Test #89: metacall-python-port-https-test .................. Passed 1.28 sec + Start 100: metacall-python-without-env-vars-test + 77/175 Test #95: metacall-python-relative-path-test ............... Passed 0.64 sec + Start 101: metacall-map-test + 78/175 Test #96: metacall-python-without-functions-test ........... Passed 0.65 sec + Start 102: metacall-map-await-test + 79/175 Test #2: node_port ........................................ Passed 5.42 sec + Start 103: metacall-initialize-test + 80/175 Test #103: metacall-initialize-test ......................... Passed 0.05 sec + Start 104: metacall-initialize-ex-test + 81/175 Test #104: metacall-initialize-ex-test ...................... Passed 0.01 sec + Start 105: metacall-reinitialize-test + 82/175 Test #3: node_port_test_executable ........................ Passed 5.50 sec + Start 106: metacall-initialize-destroy-multiple-test + 83/175 Test #106: metacall-initialize-destroy-multiple-test ........ Passed 0.02 sec + Start 107: metacall-initialize-destroy-multiple-node-test + 84/175 Test #97: metacall-python-builtins-test .................... Passed 0.74 sec + Start 108: metacall-reload-functions-test + 85/175 Test #93: metacall-python-callback-test .................... Passed 1.21 sec + Start 109: metacall-invalid-loader-test + 86/175 Test #109: metacall-invalid-loader-test ..................... Passed 0.02 sec + Start 110: metacall-fork-test + 87/175 Test #98: metacall-python-async-test ....................... Passed 0.63 sec + 88/175 Test #105: metacall-reinitialize-test ....................... Passed 0.14 sec + Start 111: metacall-return-monad-test + Start 112: metacall-callback-complex-test + 89/175 Test #58: metacall-node-typescript-test .................... Passed 4.07 sec + Start 113: metacall-ruby-fail-test + 90/175 Test #110: metacall-fork-test ............................... Passed 0.06 sec + Start 114: metacall-ruby-fail-empty-test + 91/175 Test #99: metacall-python-exception-test ................... Passed 0.62 sec + Start 115: metacall-ruby-object-class-test + 92/175 Test #113: metacall-ruby-fail-test .......................... Passed 0.06 sec + Start 116: metacall-ruby-parser-integration-test + 93/175 Test #115: metacall-ruby-object-class-test .................. Passed 0.04 sec + Start 117: metacall-function-test + 94/175 Test #116: metacall-ruby-parser-integration-test ............ Passed 0.04 sec + Start 118: metacall-cobol-test + 95/175 Test #114: metacall-ruby-fail-empty-test .................... Passed 0.08 sec + Start 119: metacall-file-test + 96/175 Test #119: metacall-file-test ............................... Passed 0.02 sec + Start 120: metacall-file-fail-test + 97/175 Test #118: metacall-cobol-test .............................. Passed 0.04 sec + Start 121: metacall-file-glob-test + 98/175 Test #120: metacall-file-fail-test .......................... Passed 0.01 sec + Start 122: metacall-typescript-test + 99/175 Test #100: metacall-python-without-env-vars-test ............ Passed 0.70 sec + Start 123: metacall-typescript-node-test +100/175 Test #121: metacall-file-glob-test .......................... Passed 0.03 sec + Start 124: metacall-typescript-call-map-test +101/175 Test #102: metacall-map-await-test .......................... Passed 0.55 sec + Start 125: metacall-typescript-tsx-test +102/175 Test #107: metacall-initialize-destroy-multiple-node-test ... Passed 0.41 sec + Start 126: metacall-typescript-tsx-loop-fail-test +103/175 Test #41: metacall-node-event-loop-test .................... Passed 5.86 sec + Start 127: metacall-typescript-require-test +104/175 Test #111: metacall-return-monad-test ....................... Passed 0.49 sec + Start 128: metacall-typescript-jsx-default-test +105/175 Test #92: metacall-python-port-import-test ................. Passed 2.49 sec + Start 129: metacall-rpc-test +106/175 Test #101: metacall-map-test ................................ Passed 1.51 sec + Start 130: metacall-csharp-static-class-test +107/175 Test #117: metacall-function-test ........................... Passed 1.21 sec + Start 131: metacall-ruby-test +108/175 Test #131: metacall-ruby-test ............................... Passed 0.12 sec + Start 132: metacall-cs-test +109/175 Test #108: metacall-reload-functions-test ................... Passed 1.82 sec + Start 133: metacall-java-test +110/175 Test #39: metacall-test .................................... Passed 7.34 sec + Start 134: metacall-wasm-test +111/175 Test #129: metacall-rpc-test ................................ Passed 1.13 sec + Start 135: metacall-wasm-python-port-test +112/175 Test #134: metacall-wasm-test ............................... Passed 0.10 sec + Start 136: metacall-c-test +113/175 Test #136: metacall-c-test .................................. Passed 0.15 sec + Start 137: metacall-c-lib-test +114/175 Test #112: metacall-callback-complex-test ................... Passed 2.28 sec + Start 138: metacall-version-test +115/175 Test #137: metacall-c-lib-test .............................. Passed 0.19 sec + Start 139: metacall-dynlink-path-test +116/175 Test #138: metacall-version-test ............................ Passed 0.01 sec + Start 140: metacall-library-path-without-env-vars-test +117/175 Test #139: metacall-dynlink-path-test ....................... Passed 0.01 sec + Start 141: metacall-ext-test +118/175 Test #140: metacall-library-path-without-env-vars-test ...... Passed 0.02 sec + Start 142: metacall-plugin-extension-test +119/175 Test #141: metacall-ext-test ................................ Passed 0.02 sec + Start 143: metacall-plugin-extension-local-test +120/175 Test #70: metacall-distributable-test ...................... Passed 6.31 sec + Start 144: metacall-backtrace-plugin-test +121/175 Test #135: metacall-wasm-python-port-test ................... Passed 1.07 sec + Start 145: metacall-sandbox-plugin-test +122/175 Test #59: metacall-node-python-async-after-destroy-test .... Passed 7.03 sec + Start 146: log-bench +123/175 Test #75: metacall-integration-test ........................ Passed 6.16 sec + Start 147: metacall-py-c-api-bench +124/175 Test #6: rs_port .......................................... Passed 9.00 sec + Start 148: metacall-py-call-bench +125/175 Test #144: metacall-backtrace-plugin-test ................... Passed 0.45 sec + Start 149: metacall-py-init-bench +126/175 Test #74: metacall-inspect-test ............................ Passed 6.67 sec + Start 150: metacall-node-call-bench +127/175 Test #143: metacall-plugin-extension-local-test ............. Passed 1.52 sec + Start 151: metacall-rb-call-bench +128/175 Test #126: metacall-typescript-tsx-loop-fail-test ........... Passed 3.83 sec + Start 152: metacall-cs-call-bench +129/175 Test #149: metacall-py-init-bench ........................... Passed 0.77 sec + Start 153: metacallcli +130/175 Test #83: metacall-python-open-test ........................ Passed 6.71 sec + Start 154: metacallcli-inspect-leak +131/175 Test #142: metacall-plugin-extension-test ................... Passed 1.99 sec + Start 155: metacallcli-node +132/175 Test #123: metacall-typescript-node-test .................... Passed 4.72 sec + Start 156: metacallcli-node-port-py +133/175 Test #145: metacall-sandbox-plugin-test ..................... Passed 2.02 sec + Start 157: metacallcli-node-port-py-rb +134/175 Test #48: metacall-node-port-test .......................... Passed 9.87 sec + Start 158: metacallcli-node-null +135/175 Test #154: metacallcli-inspect-leak ......................... Passed 0.89 sec + Start 159: metacallcli-node-null-empty +136/175 Test #153: metacallcli ...................................... Passed 1.16 sec + Start 160: metacallcli-node-null-undefined +137/175 Test #133: metacall-java-test ............................... Passed 3.56 sec + Start 161: metacallcli-py-port +138/175 Test #155: metacallcli-node ................................. Passed 1.07 sec + Start 162: metacallcli-py-port-rb +139/175 Test #122: metacall-typescript-test ......................... Passed 5.36 sec + Start 163: metacallcli-file +140/175 Test #159: metacallcli-node-null-empty ...................... Passed 0.69 sec + Start 164: metacallcli-file-fail +141/175 Test #124: metacall-typescript-call-map-test ................ Passed 5.78 sec + Start 165: metacallcli-py-naming +142/175 Test #160: metacallcli-node-null-undefined .................. Passed 0.72 sec + Start 166: metacallcli-py-argv +143/175 Test #130: metacall-csharp-static-class-test ................ Passed 5.12 sec + Start 167: metacallcli-py-main +144/175 Test #128: metacall-typescript-jsx-default-test ............. Passed 5.90 sec + Start 168: metacallcli-py-exception +145/175 Test #163: metacallcli-file ................................. Passed 0.92 sec + Start 169: metacallcli-ts +146/175 Test #158: metacallcli-node-null ............................ Passed 1.45 sec + Start 170: metacallcli-tsx-templating +147/175 Test #157: metacallcli-node-port-py-rb ...................... Passed 1.58 sec + Start 171: metacallcli-tsx-loop-fail +148/175 Test #156: metacallcli-node-port-py ......................... Passed 1.70 sec + Start 172: metacallcli-py-tsx +149/175 Test #164: metacallcli-file-fail ............................ Passed 0.84 sec + Start 173: cli_repl_plugin +150/175 Test #162: metacallcli-py-port-rb ........................... Passed 1.43 sec + Start 174: cli_cmd_plugin +151/175 Test #161: metacallcli-py-port .............................. Passed 1.59 sec + Start 175: metacalllog +152/175 Test #175: metacalllog ...................................... Passed 0.03 sec +153/175 Test #173: cli_repl_plugin .................................. Passed 0.69 sec +154/175 Test #174: cli_cmd_plugin ................................... Passed 0.66 sec +155/175 Test #165: metacallcli-py-naming ............................ Passed 1.70 sec +156/175 Test #166: metacallcli-py-argv .............................. Passed 1.79 sec +157/175 Test #132: metacall-cs-test ................................. Passed 6.45 sec +158/175 Test #168: metacallcli-py-exception ......................... Passed 1.97 sec +159/175 Test #167: metacallcli-py-main .............................. Passed 2.32 sec +160/175 Test #127: metacall-typescript-require-test ................. Passed 8.48 sec +161/175 Test #125: metacall-typescript-tsx-test ..................... Passed 8.86 sec +162/175 Test #1: ts_loader_bootstrap .............................. Passed 15.33 sec +163/175 Test #171: metacallcli-tsx-loop-fail ........................ Passed 4.17 sec +164/175 Test #169: metacallcli-ts ................................... Passed 4.44 sec +165/175 Test #146: log-bench ........................................ Passed 8.61 sec +166/175 Test #172: metacallcli-py-tsx ............................... Passed 6.45 sec +167/175 Test #170: metacallcli-tsx-templating ....................... Passed 6.94 sec +168/175 Test #5: go_port .......................................... Passed 20.72 sec +169/175 Test #147: metacall-py-c-api-bench .......................... Passed 14.79 sec +170/175 Test #69: metacall-node-multithread-deadlock-test .......... Passed 22.96 sec +171/175 Test #152: metacall-cs-call-bench ........................... Passed 25.50 sec +172/175 Test #151: metacall-rb-call-bench ........................... Passed 33.41 sec +173/175 Test #148: metacall-py-call-bench ........................... Passed 34.83 sec +174/175 Test #63: metacall-node-async-resources-test ............... Passed 63.56 sec +175/175 Test #150: metacall-node-call-bench ......................... Passed 90.04 sec + +100% tests passed, 0 tests failed out of 175 + +Label Time Summary: +/usr/local/metacall/build/scripts/typedfunc = 28.42 sec*proc (5 tests) +MEMCHECK_IGNORE = 35.41 sec*proc (7 tests) +WORKING_DIRECTORY = 28.42 sec*proc (5 tests) +adt-map-test = 0.03 sec*proc (1 test) +adt-set-test = 0.03 sec*proc (1 test) +adt-trie-test = 0.03 sec*proc (1 test) +adt-vector-test = 0.03 sec*proc (1 test) +configuration-test = 0.07 sec*proc (1 test) +detour-test = 0.08 sec*proc (1 test) +dynlink-test = 0.02 sec*proc (1 test) +environment-test = 0.03 sec*proc (1 test) +go_port = 20.72 sec*proc (1 test) +log-bench = 8.61 sec*proc (1 test) +log-custom-test = 0.03 sec*proc (1 test) +log-test = 0.03 sec*proc (1 test) +metacall-backtrace-plugin-test = 0.45 sec*proc (1 test) +metacall-c-lib-test = 0.19 sec*proc (1 test) +metacall-c-test = 0.15 sec*proc (1 test) +metacall-callback-complex-test = 2.28 sec*proc (1 test) +metacall-cast-test = 0.58 sec*proc (1 test) +metacall-clear-test = 0.98 sec*proc (1 test) +metacall-cobol-test = 0.04 sec*proc (1 test) +metacall-configuration-default-test = 0.02 sec*proc (1 test) +metacall-configuration-exec-path-test = 0.56 sec*proc (1 test) +metacall-cs-call-bench = 25.50 sec*proc (1 test) +metacall-cs-test = 6.45 sec*proc (1 test) +metacall-csharp-static-class-test = 5.12 sec*proc (1 test) +metacall-depends-test = 0.65 sec*proc (1 test) +metacall-distributable-test = 6.31 sec*proc (1 test) +metacall-ducktype-test = 0.54 sec*proc (1 test) +metacall-duplicated-handle-test = 1.56 sec*proc (1 test) +metacall-duplicated-symbols-test = 1.06 sec*proc (1 test) +metacall-dynlink-path-test = 0.01 sec*proc (1 test) +metacall-ext-test = 0.02 sec*proc (1 test) +metacall-file-fail-test = 0.01 sec*proc (1 test) +metacall-file-glob-test = 0.03 sec*proc (1 test) +metacall-file-test = 0.02 sec*proc (1 test) +metacall-fork-test = 0.06 sec*proc (1 test) +metacall-function-test = 1.21 sec*proc (1 test) +metacall-handle-export-test = 1.40 sec*proc (1 test) +metacall-handle-get-test = 1.52 sec*proc (1 test) +metacall-init-fini-test = 0.74 sec*proc (1 test) +metacall-initialize-destroy-multiple-node-test = 0.41 sec*proc (1 test) +metacall-initialize-destroy-multiple-test = 0.02 sec*proc (1 test) +metacall-initialize-ex-test = 0.01 sec*proc (1 test) +metacall-initialize-test = 0.05 sec*proc (1 test) +metacall-inspect-test = 6.67 sec*proc (1 test) +metacall-integration-test = 6.16 sec*proc (1 test) +metacall-invalid-loader-test = 0.02 sec*proc (1 test) +metacall-java-test = 3.56 sec*proc (1 test) +metacall-library-path-without-env-vars-test = 0.02 sec*proc (1 test) +metacall-load-configuration-fail-test = 0.66 sec*proc (1 test) +metacall-load-configuration-node-python-test = 1.52 sec*proc (1 test) +metacall-load-configuration-python-node-test = 1.37 sec*proc (1 test) +metacall-load-configuration-relative-test = 0.46 sec*proc (1 test) +metacall-load-configuration-test = 1.51 sec*proc (1 test) +metacall-load-memory-empty-test = 2.70 sec*proc (1 test) +metacall-load-memory-test = 0.72 sec*proc (1 test) +metacall-logs-test = 0.33 sec*proc (1 test) +metacall-map-await-test = 0.55 sec*proc (1 test) +metacall-map-test = 1.51 sec*proc (1 test) +metacall-node-async-multiple-test = 4.26 sec*proc (1 test) +metacall-node-async-resources-test = 63.56 sec*proc (1 test) +metacall-node-async-test = 0.69 sec*proc (1 test) +metacall-node-await-chain-test = 0.51 sec*proc (1 test) +metacall-node-call-bench = 90.04 sec*proc (1 test) +metacall-node-call-test = 1.36 sec*proc (1 test) +metacall-node-callback-test = 0.89 sec*proc (1 test) +metacall-node-clear-mem-test = 0.42 sec*proc (1 test) +metacall-node-event-loop-signal-test = 0.62 sec*proc (1 test) +metacall-node-event-loop-test = 5.86 sec*proc (1 test) +metacall-node-exception-test = 0.51 sec*proc (1 test) +metacall-node-extension-test = 0.40 sec*proc (1 test) +metacall-node-fail-env-var-test = 0.35 sec*proc (1 test) +metacall-node-fail-load-leak-test = 0.55 sec*proc (1 test) +metacall-node-fail-test = 0.60 sec*proc (1 test) +metacall-node-inline-test = 0.87 sec*proc (1 test) +metacall-node-multithread-deadlock-test = 22.96 sec*proc (1 test) +metacall-node-native-code-test = 0.52 sec*proc (1 test) +metacall-node-port-await-test = 0.86 sec*proc (1 test) +metacall-node-port-c-lib-test = 0.85 sec*proc (1 test) +metacall-node-port-test = 9.87 sec*proc (1 test) +metacall-node-python-async-after-destroy-test = 7.03 sec*proc (1 test) +metacall-node-python-await-test = 0.92 sec*proc (1 test) +metacall-node-python-deadlock-test = 1.25 sec*proc (1 test) +metacall-node-python-exception-test = 0.97 sec*proc (1 test) +metacall-node-python-port-mock-test = 1.13 sec*proc (1 test) +metacall-node-python-port-ruby-test = 1.04 sec*proc (1 test) +metacall-node-python-ruby-test = 2.00 sec*proc (1 test) +metacall-node-reentrant-test = 0.66 sec*proc (1 test) +metacall-node-test = 0.77 sec*proc (1 test) +metacall-node-typescript-test = 4.07 sec*proc (1 test) +metacall-plugin-extension-local-test = 1.52 sec*proc (1 test) +metacall-plugin-extension-test = 1.99 sec*proc (1 test) +metacall-py-c-api-bench = 14.79 sec*proc (1 test) +metacall-py-call-bench = 34.83 sec*proc (1 test) +metacall-py-init-bench = 0.77 sec*proc (1 test) +metacall-python-builtins-test = 0.74 sec*proc (1 test) +metacall-python-callback-test = 1.21 sec*proc (1 test) +metacall-python-dict-test = 0.68 sec*proc (1 test) +metacall-python-exception-test = 0.62 sec*proc (1 test) +metacall-python-fail-test = 0.67 sec*proc (1 test) +metacall-python-gc-test = 0.76 sec*proc (1 test) +metacall-python-object-class-test = 0.65 sec*proc (1 test) +metacall-python-open-test = 6.71 sec*proc (1 test) +metacall-python-pointer-test = 0.57 sec*proc (1 test) +metacall-python-port-callback-test = 0.80 sec*proc (1 test) +metacall-python-port-https-test = 1.28 sec*proc (1 test) +metacall-python-port-import-test = 2.49 sec*proc (1 test) +metacall-python-port-pointer-test = 0.97 sec*proc (1 test) +metacall-python-reentrant-test = 1.09 sec*proc (1 test) +metacall-python-relative-path-test = 0.64 sec*proc (1 test) +metacall-python-test = 1.01 sec*proc (1 test) +metacall-python-varargs-test = 0.86 sec*proc (1 test) +metacall-python-without-env-vars-test = 0.70 sec*proc (1 test) +metacall-python-without-functions-test = 0.65 sec*proc (1 test) +metacall-rb-call-bench = 33.41 sec*proc (1 test) +metacall-reinitialize-test = 0.14 sec*proc (1 test) +metacall-reload-functions-test = 1.82 sec*proc (1 test) +metacall-return-monad-test = 0.49 sec*proc (1 test) +metacall-rpc-test = 1.13 sec*proc (1 test) +metacall-ruby-fail-empty-test = 0.08 sec*proc (1 test) +metacall-ruby-fail-test = 0.06 sec*proc (1 test) +metacall-ruby-object-class-test = 0.04 sec*proc (1 test) +metacall-ruby-parser-integration-test = 0.04 sec*proc (1 test) +metacall-ruby-test = 0.12 sec*proc (1 test) +metacall-sandbox-plugin-test = 2.02 sec*proc (1 test) +metacall-test = 7.34 sec*proc (1 test) +metacall-typescript-call-map-test = 5.78 sec*proc (1 test) +metacall-typescript-jsx-default-test = 5.90 sec*proc (1 test) +metacall-typescript-node-test = 4.72 sec*proc (1 test) +metacall-typescript-require-test = 8.48 sec*proc (1 test) +metacall-typescript-test = 5.36 sec*proc (1 test) +metacall-typescript-tsx-loop-fail-test = 3.83 sec*proc (1 test) +metacall-typescript-tsx-test = 8.86 sec*proc (1 test) +metacall-version-test = 0.01 sec*proc (1 test) +metacall-wasm-python-port-test = 1.07 sec*proc (1 test) +metacall-wasm-test = 0.10 sec*proc (1 test) +metacallcli = 1.16 sec*proc (1 test) +metacallcli-file = 0.92 sec*proc (1 test) +metacallcli-file-fail = 0.84 sec*proc (1 test) +metacallcli-inspect-leak = 0.89 sec*proc (1 test) +metacallcli-node = 1.07 sec*proc (1 test) +metacallcli-node-null = 1.45 sec*proc (1 test) +metacallcli-node-null-empty = 0.69 sec*proc (1 test) +metacallcli-node-null-undefined = 0.72 sec*proc (1 test) +metacallcli-node-port-py = 1.70 sec*proc (1 test) +metacallcli-node-port-py-rb = 1.58 sec*proc (1 test) +metacallcli-py-argv = 1.79 sec*proc (1 test) +metacallcli-py-exception = 1.97 sec*proc (1 test) +metacallcli-py-main = 2.32 sec*proc (1 test) +metacallcli-py-naming = 1.70 sec*proc (1 test) +metacallcli-py-port = 1.59 sec*proc (1 test) +metacallcli-py-port-rb = 1.43 sec*proc (1 test) +metacallcli-py-tsx = 6.45 sec*proc (1 test) +metacallcli-ts = 4.44 sec*proc (1 test) +metacallcli-tsx-loop-fail = 4.17 sec*proc (1 test) +metacallcli-tsx-templating = 6.94 sec*proc (1 test) +metacalllog = 0.03 sec*proc (1 test) +node_port_test = 5.42 sec*proc (1 test) +node_port_test_executable = 5.50 sec*proc (1 test) +portability-path-test = 0.06 sec*proc (1 test) +preprocessor-test = 0.04 sec*proc (1 test) +py-loader-port-test = 0.91 sec*proc (1 test) +py_port_test = 1.72 sec*proc (1 test) +rb-loader-parser-test = 0.06 sec*proc (1 test) +rb_port_test = 0.90 sec*proc (1 test) +reflect-function-test = 0.02 sec*proc (1 test) +reflect-metadata-test = 0.02 sec*proc (1 test) +reflect-object-class-test = 0.02 sec*proc (1 test) +reflect-scope-test = 0.02 sec*proc (1 test) +reflect-value-cast-test = 0.02 sec*proc (1 test) +rs_port = 9.00 sec*proc (1 test) +serial-test = 0.07 sec*proc (1 test) +ts_loader_bootstrap = 15.33 sec*proc (1 test) + +Total Test time (real) = 99.30 sec ++ [ 0 = 1 ] ++ [ 1 = 1 ] ++ [ = ] ++ make install +[ 0%] Built target version +[ 0%] Built target preprocessor +[ 1%] Built target environment +[ 1%] Built target format +[ 1%] Built target threading +[ 2%] Built target portability +[ 6%] Built target log +[ 6%] Built target memory +[ 7%] Built target adt +[ 8%] Built target filesystem +[ 9%] Built target dynlink +[ 10%] Built target plugin +[ 10%] Built target detour +[ 13%] Built target reflect +[ 13%] Built target serial +[ 14%] Built target configuration +[ 14%] Built target loader +[ 29%] Built target metacall +[ 30%] Built target libtcc-depends +[ 30%] Built target c_loader +[ 30%] Built target cob_loader + Determining projects to restore... + All projects are up-to-date for restore. +MSBuild version 17.7.6+77d58ec69 for .NET + Determining projects to restore... + All projects are up-to-date for restore. + project -> /usr/local/metacall/source/loaders/cs_loader/netcore/source/bin/Debug/net7.0/CSLoader.dll + project -> /usr/local/metacall/build/ +[ 30%] Built target cs_loader_impl +[ 31%] Built target cs_loader +[ 32%] Built target ext_loader +[ 32%] Built target file_loader +Note: /usr/local/metacall/source/loaders/java_loader/bootstrap/lib/bootstrap.java uses or overrides a deprecated API. +Note: Recompile with -Xlint:deprecation for details. +[ 32%] Built target java_loader_bootstrap +[ 33%] Built target java_loader +[ 33%] Built target mock_loader +Installing node_loader_bootstrap dependencies + +up to date, audited 5 packages in 437ms + +1 package is looking for funding + run `npm fund` for details + +found 0 vulnerabilities +[ 33%] Built target node_loader_bootstrap_depends +Copying node_loader_bootstrap dependencies +node_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/node_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules +[ 33%] Built target node_loader_bootstrap_copy_depends +[ 33%] Built target node_loader_bootstrap +[ 34%] Built target node_loader +[ 35%] Built target py_loader +[ 35%] Built target rb_loader +[ 36%] Built target rpc_loader +Installing ts_loader_bootstrap dependencies + +up to date, audited 3 packages in 1s + +found 0 vulnerabilities +[ 36%] Built target ts_loader_bootstrap_depends + +> ts_loader_bootstrap@1.1.0 build +> tsc + +[ 36%] Built target ts_loader_bootstrap_build +Copying ts_loader_bootstrap dependencies +ts_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/ts_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules +[ 36%] Built target ts_loader_bootstrap +[ 37%] Built target ts_loader +[ 38%] Built target wasm_loader +[ 39%] Built target metacall_serial +[ 39%] Built target rapid_json_serial +[ 39%] Built target plthook_detour +[ 39%] Built target plugin_extension +[ 39%] Built target backtrace_plugin_config +[ 39%] Built target backtrace_plugin +[ 39%] Built target backward_object +[ 40%] Built target backward +[ 40%] Built target sandbox_plugin_config +[ 40%] Built target sandbox_plugin +Installing node_port + +up to date, audited 81 packages in 722ms + +20 packages are looking for funding + run `npm fund` for details + +3 moderate severity vulnerabilities + +To address all issues (including breaking changes), run: + npm audit fix --force + +Run `npm audit` for details. +[ 40%] Built target node_port +Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing) +[ 40%] Built target rs_port_bindings + Compiling metacall v0.4.2 (/usr/local/metacall/source/ports/rs_port) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.31s +[ 40%] Built target rs_port +[ 41%] Built target rb_port_swig_compilation +[ 41%] Built target rb_port +[ 41%] Built target c-compiled +[ 41%] Built target c-ffi +[ 41%] Built target c-cbks +[ 41%] Built target c-loadtest +[ 42%] Built target loadtest +[ 42%] Built target cobol-say +[ 42%] Built target csharp-hello +[ 42%] Built target csharp-static +[ 42%] Built target csharp-function +[ 43%] Built target sum_extension +[ 43%] Built target file-static +[ 43%] Built target file-favicon +[ 43%] Built target file-glob +[ 43%] Built target java-fibonnaci +[ 43%] Built target java-jartest +[ 43%] Built target java-test +[ 43%] Built target nodejs-nod +[ 43%] Built target nodejs-inline +[ 43%] Built target nodejs-export +[ 43%] Built target nodejs-host +[ 43%] Built target nodejs-server +[ 43%] Built target nodejs-factcallback +[ 43%] Built target nodejs-derpyramda + +up to date, audited 49 packages in 608ms + +1 moderate severity vulnerability + +To address all issues, run: + npm audit fix + +Run `npm audit` for details. +[ 43%] Built target nodejs-gram-depends +[ 43%] Built target nodejs-gram +[ 43%] Built target nodejs-duplicated + +up to date, audited 2 packages in 434ms + +found 0 vulnerabilities +[ 43%] Built target nodejs-ramda-depends +[ 43%] Built target nodejs-ramda +[ 43%] Built target python-example +[ 43%] Built target python-helloworld +[ 43%] Built target python-initfini +[ 43%] Built target python-callback +[ 43%] Built target python-function +[ 43%] Built target python-ducktype +[ 43%] Built target python-rsasample +[ 43%] Built target python-garbage +[ 43%] Built target python-classname +[ 43%] Built target python-web +[ 43%] Built target python-landing +[ 43%] Built target python-model +[ 43%] Built target python-pointer +[ 43%] Built target python-dicty +[ 43%] Built target python-host +[ 43%] Built target python-s1 +[ 43%] Built target python-s2 +[ 43%] Built target python-withoutfunctions +[ 43%] Built target python-wasm +[ 43%] Built target python-badimport +[ 43%] Built target python-watzon +[ 43%] Built target python-fnmesh +[ 43%] Built target ruby-hello +[ 43%] Built target ruby-second +[ 43%] Built target ruby-blog +[ 43%] Built target ruby-cache +[ 43%] Built target ruby-ducktype +[ 43%] Built target ruby-invalid +[ 43%] Built target ruby-klass +[ 43%] Built target ruby-failempty +[ 43%] Built target rpc-remote +[ 43%] Built target typescript-typedfunc + +up to date, audited 7 packages in 477ms + +found 0 vulnerabilities +[ 43%] Built target typescript-templating-depends +[ 43%] Built target typescript-templating +[ 43%] Built target typescript-loopfail +[ 43%] Built target typescript-badrequire +[ 43%] Built target typescript-server +[ 43%] Built target wasm-tests +[ 44%] Built target google-test-depends +[ 44%] Built target preprocessor-test +[ 44%] Built target environment-test +[ 45%] Built target log-test +[ 45%] Built target log-custom-test +[ 45%] Built target adt-set-test +[ 46%] Built target adt-trie-test +[ 46%] Built target adt-vector-test +[ 46%] Built target adt-map-test +[ 47%] Built target reflect-value-cast-test +[ 47%] Built target reflect-function-test +[ 48%] Built target reflect-object-class-test +[ 48%] Built target reflect-scope-test +[ 48%] Built target reflect-metadata-test +[ 48%] Built target dynlink-test +[ 48%] Built target detour-test +[ 48%] Built target serial-test +[ 48%] Built target configuration-test +[ 49%] Built target rb-loader-parser-test +[ 50%] Built target portability-path-test +[ 51%] Built target metacall-logs-test +[ 51%] Built target metacall-load-memory-test +[ 51%] Built target metacall-load-memory-empty-test +[ 52%] Built target metacall-load-configuration-test +[ 52%] Built target metacall-load-configuration-fail-test +[ 52%] Built target metacall-load-configuration-relative-test +[ 53%] Built target metacall-load-configuration-python-node-test +[ 53%] Built target metacall-load-configuration-node-python-test +[ 53%] Built target metacall-duplicated-handle-test +[ 53%] Built target metacall-duplicated-symbols-test +[ 53%] Built target metacall-handle-export-test +[ 54%] Built target metacall-handle-get-test +[ 55%] Built target metacall-test +[ 56%] Built target metacall-node-test +[ 56%] Built target metacall-node-event-loop-test +[ 57%] Built target metacall-node-event-loop-signal-test +[ 58%] Built target metacall-node-call-test +[ 58%] Built target metacall-node-inline-test +[ 59%] Built target metacall-node-async-test +[ 60%] Built target metacall-node-async-multiple-test +[ 60%] Built target metacall-node-reentrant-test +[ 60%] Built target metacall-node-port-test +[ 61%] Built target metacall-node-port-await-test +[ 61%] Built target metacall-node-port-c-lib-test +[ 61%] Built target metacall-node-python-port-mock-test +[ 62%] Built target metacall-node-python-port-ruby-test +[ 62%] Built target metacall-node-python-ruby-test +[ 62%] Built target metacall-node-callback-test +[ 62%] Built target metacall-node-fail-test +[ 62%] Built target metacall-node-fail-env-var-test +[ 63%] Built target metacall-node-fail-load-leak-test +[ 63%] Built target metacall-node-typescript-test +[ 64%] Built target metacall-node-python-async-after-destroy-test +[ 64%] Built target metacall-node-python-await-test +[ 65%] Built target metacall-node-python-exception-test +[ 65%] Built target metacall-node-clear-mem-test +[ 65%] Built target metacall-node-async-resources-test +[ 65%] Built target metacall-node-await-chain-test +[ 66%] Built target metacall-node-exception-test +[ 66%] Built target metacall-node-python-deadlock-test +[ 66%] Built target metacall-node-native-code-test +[ 66%] Built target node_extension_test +[ 66%] Built target metacall-node-extension-test +[ 67%] Built target metacall-node-multithread-deadlock-test +[ 67%] Built target metacall-distributable-test +[ 68%] Built target metacall-cast-test +[ 68%] Built target metacall-init-fini-test +[ 69%] Built target metacall-ducktype-test +[ 69%] Built target metacall-inspect-test +[ 70%] Built target metacall-integration-test +[ 71%] Built target metacall-depends-test +[ 71%] Built target metacall-configuration-exec-path-test +[ 71%] Built target metacall-configuration-default-test +[ 71%] Built target metacall-clear-test +[ 71%] Built target metacall-python-test +[ 72%] Built target metacall-python-object-class-test +[ 72%] Built target metacall-python-gc-test + +up to date, audited 16 packages in 514ms + +1 package is looking for funding + run `npm fund` for details + +found 0 vulnerabilities +[ 72%] Built target metacall-python-open-test-depends +[ 72%] Built target metacall-python-open-test +[ 72%] Built target metacall-python-dict-test +[ 72%] Built target metacall-python-pointer-test +[ 72%] Built target metacall-python-reentrant-test +[ 72%] Built target metacall-python-varargs-test +[ 73%] Built target py-loader-port-test +[ 73%] Built target metacall-python-port-https-test +[ 74%] Built target metacall-python-port-callback-test +[ 74%] Built target metacall-python-port-pointer-test +[ 75%] Built target metacall-python-port-import-test +[ 76%] Built target metacall-python-callback-test +[ 76%] Built target metacall-python-fail-test +[ 77%] Built target metacall-python-relative-path-test +[ 77%] Built target metacall-python-without-functions-test +[ 77%] Built target metacall-python-builtins-test +[ 77%] Built target metacall-python-async-test +[ 78%] Built target metacall-python-exception-test +[ 79%] Built target metacall-python-without-env-vars-test +[ 79%] Built target metacall-map-test +[ 79%] Built target metacall-map-await-test +[ 80%] Built target metacall-initialize-test +[ 80%] Built target metacall-initialize-ex-test +[ 81%] Built target metacall-reinitialize-test +[ 81%] Built target metacall-initialize-destroy-multiple-test +[ 82%] Built target metacall-initialize-destroy-multiple-node-test +[ 82%] Built target metacall-reload-functions-test +[ 82%] Built target metacall-invalid-loader-test +[ 83%] Built target metacall-fork-test +[ 84%] Built target metacall-return-monad-test +[ 84%] Built target metacall-callback-complex-test +[ 85%] Built target metacall-ruby-fail-test +[ 85%] Built target metacall-ruby-fail-empty-test +[ 85%] Built target metacall-ruby-object-class-test +[ 85%] Built target metacall-ruby-parser-integration-test +[ 85%] Built target metacall-function-test +[ 86%] Built target metacall-cobol-test +[ 86%] Built target metacall-file-test +[ 86%] Built target metacall-file-fail-test +[ 87%] Built target metacall-file-glob-test +[ 88%] Built target metacall-typescript-test +[ 89%] Built target metacall-typescript-node-test +[ 89%] Built target metacall-typescript-call-map-test +[ 89%] Built target metacall-typescript-tsx-test +[ 89%] Built target metacall-typescript-tsx-loop-fail-test +[ 89%] Built target metacall-typescript-require-test +[ 89%] Built target metacall-typescript-jsx-default-test +[ 89%] Built target metacall-rpc-test +[ 89%] Built target metacall-csharp-static-class-test +[ 90%] Built target metacall-ruby-test +[ 90%] Built target metacall-cs-test +[ 90%] Built target metacall-java-test +[ 90%] Built target metacall-wasm-test +[ 90%] Built target metacall-wasm-python-port-test +[ 90%] Built target metacall-c-test +[ 91%] Built target metacall-c-lib-test +[ 92%] Built target metacall-version-test +[ 93%] Built target metacall-dynlink-path-test +[ 94%] Built target metacall-library-path-without-env-vars-test +[ 94%] Built target metacall-ext-test +[ 95%] Built target metacall-plugin-extension-test +[ 95%] Built target metacall-plugin-extension-local-test +[ 95%] Built target metacall-backtrace-plugin-test +[ 95%] Built target metacall-sandbox-plugin-test +[ 96%] Built target google-bench-depends +[ 96%] Built target log-bench +[ 96%] Built target metacall-py-c-api-bench +[ 96%] Built target metacall-py-call-bench +[ 97%] Built target metacall-py-init-bench +[ 97%] Built target metacall-node-call-bench +[ 97%] Built target metacall-rb-call-bench +[ 98%] Built target metacall-cs-call-bench +[ 98%] Built target cli_repl_plugin +[ 98%] Built target cli_core_plugin +[ 98%] Built target metacallcli-scripts-tests +[ 98%] Built target metacallcli +[ 98%] Built target cli_core_plugin_config +[ 98%] Built target cli_cmd_plugin +[ 99%] Built target cli_sandbox_plugin +[ 99%] Built target cli_sandbox_plugin_config +[100%] Built target metacalllog +Install the project... +-- Install configuration: "Debug" +-- Installing: /usr/local/share/metacall/configurations +-- Installing: /usr/local/share/metacall/configurations/cs_loader.json +-- Installing: /usr/local/share/metacall/configurations/node_loader.json +-- Installing: /usr/local/share/metacall/configurations/global.json +-- Installing: /usr/local/include/metacall +-- Installing: /usr/local/include/metacall/metacall_link.h +-- Installing: /usr/local/include/metacall/metacall_allocator.h +-- Installing: /usr/local/include/metacall/metacall.h +-- Installing: /usr/local/include/metacall/metacall_value.h +-- Installing: /usr/local/include/metacall/metacall_fork.h +-- Installing: /usr/local/include/metacall/metacall_log.h +-- Installing: /usr/local/include/metacall/metacall_error.h +-- Up-to-date: /usr/local/include/metacall +-- Installing: /usr/local/include/metacall/metacall_def.h +-- Installing: /usr/local/include/metacall/metacall_api.h +-- Installing: /usr/local/lib/libmetacalld.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libmetacalld.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libtcc.so +-- Up-to-date: /usr/local/lib +-- Installing: /usr/local/lib/libtcc1.a +-- Installing: /usr/local/lib/runmain.o +-- Installing: /usr/local/lib/bcheck.o +-- Installing: /usr/local/lib/bt-log.o +-- Installing: /usr/local/lib/bt-exe.o +-- Up-to-date: /usr/local/include +-- Installing: /usr/local/include/stdatomic.h +-- Installing: /usr/local/include/tccdefs.h +-- Installing: /usr/local/include/stddef.h +-- Installing: /usr/local/include/varargs.h +-- Installing: /usr/local/include/tcclib.h +-- Installing: /usr/local/include/stdnoreturn.h +-- Installing: /usr/local/include/stdarg.h +-- Installing: /usr/local/include/stdbool.h +-- Installing: /usr/local/include/stdalign.h +-- Installing: /usr/local/include/tgmath.h +-- Installing: /usr/local/include/float.h +-- Installing: /usr/local/lib/libc_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libc_loaderd.so" to "/usr/local/lib:/usr/lib/llvm-14/lib" +-- Installing: /usr/local/lib/libcob_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libcob_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/CSLoader.dll +-- Installing: /usr/local/lib/Microsoft.CodeAnalysis.dll +-- Installing: /usr/local/lib/Microsoft.CodeAnalysis.CSharp.dll +-- Installing: /usr/local/lib/libcs_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libcs_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libext_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libext_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libfile_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libfile_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/bootstrap.class +-- Installing: /usr/local/lib/libjava_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libjava_loaderd.so" to "/usr/local/lib:/usr/lib/jvm/default-java/lib:/usr/lib/jvm/default-java/lib/server" +-- Installing: /usr/local/lib/libmock_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libmock_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/node_modules/espree +-- Installing: /usr/local/lib/node_modules/espree/dist +-- Installing: /usr/local/lib/node_modules/espree/dist/espree.cjs +-- Installing: /usr/local/lib/node_modules/espree/espree.js +-- Installing: /usr/local/lib/node_modules/espree/package.json +-- Installing: /usr/local/lib/node_modules/espree/LICENSE +-- Installing: /usr/local/lib/node_modules/espree/lib +-- Installing: /usr/local/lib/node_modules/espree/lib/espree.js +-- Installing: /usr/local/lib/node_modules/espree/lib/options.js +-- Installing: /usr/local/lib/node_modules/espree/lib/version.js +-- Installing: /usr/local/lib/node_modules/espree/lib/token-translator.js +-- Installing: /usr/local/lib/node_modules/espree/lib/features.js +-- Installing: /usr/local/lib/node_modules/espree/README.md +-- Installing: /usr/local/lib/node_modules/acorn +-- Installing: /usr/local/lib/node_modules/acorn/dist +-- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.mjs.d.ts +-- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.d.ts +-- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.mjs +-- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.js +-- Installing: /usr/local/lib/node_modules/acorn/dist/bin.js +-- Installing: /usr/local/lib/node_modules/acorn/bin +-- Installing: /usr/local/lib/node_modules/acorn/bin/acorn +-- Installing: /usr/local/lib/node_modules/acorn/CHANGELOG.md +-- Installing: /usr/local/lib/node_modules/acorn/package.json +-- Installing: /usr/local/lib/node_modules/acorn/LICENSE +-- Installing: /usr/local/lib/node_modules/acorn/README.md +-- Installing: /usr/local/lib/node_modules/acorn-jsx +-- Installing: /usr/local/lib/node_modules/acorn-jsx/xhtml.js +-- Installing: /usr/local/lib/node_modules/acorn-jsx/index.js +-- Installing: /usr/local/lib/node_modules/acorn-jsx/package.json +-- Installing: /usr/local/lib/node_modules/acorn-jsx/index.d.ts +-- Installing: /usr/local/lib/node_modules/acorn-jsx/LICENSE +-- Installing: /usr/local/lib/node_modules/acorn-jsx/README.md +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/index.d.ts +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/package.json +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/LICENSE +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib/visitor-keys.js +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib/index.js +-- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/README.md +-- Installing: /usr/local/lib/bootstrap.js +-- Installing: /usr/local/lib/libnode_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libnode_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libpy_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libpy_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/librb_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/librb_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/librpc_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/librpc_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/node_modules/typescript +-- Installing: /usr/local/lib/node_modules/typescript/CODE_OF_CONDUCT.md +-- Installing: /usr/local/lib/node_modules/typescript/LICENSE.txt +-- Installing: /usr/local/lib/node_modules/typescript/bin +-- Installing: /usr/local/lib/node_modules/typescript/bin/tsserver +-- Installing: /usr/local/lib/node_modules/typescript/bin/tsc +-- Installing: /usr/local/lib/node_modules/typescript/CopyrightNotice.txt +-- Installing: /usr/local/lib/node_modules/typescript/loc +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptLanguageService +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptCompile.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/ProjectItemsSchema.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptProjectProperties.xaml.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptTasks +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptTasks/TypeScript.Tasks.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptDebugEngine +-- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl +-- Installing: /usr/local/lib/node_modules/typescript/AUTHORS.md +-- Installing: /usr/local/lib/node_modules/typescript/ThirdPartyNoticeText.txt +-- Installing: /usr/local/lib/node_modules/typescript/package.json +-- Installing: /usr/local/lib/node_modules/typescript/lib +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.intl.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typescriptServices.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/tsserverlibrary.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/cs +-- Installing: /usr/local/lib/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typesMap.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/tr +-- Installing: /usr/local/lib/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/ko +-- Installing: /usr/local/lib/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/es +-- Installing: /usr/local/lib/node_modules/typescript/lib/es/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.string.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.weakref.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typescript.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/protocol.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.string.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/pl +-- Installing: /usr/local/lib/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/fr +-- Installing: /usr/local/lib/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typescript.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/cancellationToken.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/tsserverlibrary.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.iterable.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/ja +-- Installing: /usr/local/lib/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/pt-br +-- Installing: /usr/local/lib/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/zh-tw +-- Installing: /usr/local/lib/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.object.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/tsserver.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/de +-- Installing: /usr/local/lib/node_modules/typescript/lib/de/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typescriptServices.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.string.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/watchGuard.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/zh-cn +-- Installing: /usr/local/lib/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/ru +-- Installing: /usr/local/lib/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/typingsInstaller.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.promise.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.promise.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/README.md +-- Installing: /usr/local/lib/node_modules/typescript/lib/it +-- Installing: /usr/local/lib/node_modules/typescript/lib/it/diagnosticMessages.generated.json +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.array.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.full.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/tsc.js +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es6.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.d.ts +-- Installing: /usr/local/lib/node_modules/typescript/README.md +-- Installing: /usr/local/lib/bootstrap.ts +-- Installing: /usr/local/lib/libts_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libts_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libwasm_loaderd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libwasm_loaderd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libwasmtime.so +-- Installing: /usr/local/lib/libmetacall_seriald.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libmetacall_seriald.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/librapid_json_seriald.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/librapid_json_seriald.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libplthook_detourd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libplthook_detourd.so" to "/usr/local/lib" +-- Installing: /usr/local/lib/libplugin_extensiond.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/libplugin_extensiond.so" to "/usr/local/lib" +-- Installing: /usr/local/include/backward.hpp +-- Installing: /usr/local/lib/backward/BackwardConfig.cmake +-- Installing: /usr/local/lib/plugins +-- Installing: /usr/local/lib/plugins/backtrace_plugin +-- Installing: /usr/local/lib/plugins/backtrace_plugin/libbacktrace_plugind.so +-- Installing: /usr/local/lib/plugins/backtrace_plugin/metacall.json +-- Installing: /usr/local/lib/plugins/cli +-- Installing: /usr/local/lib/plugins/cli/cmd +-- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin +-- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin/libcli_sandbox_plugind.so +-- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin/metacall.json +-- Installing: /usr/local/lib/plugins/cli/internal +-- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin +-- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/cli_repl_plugin.js +-- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/parser.js +-- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/metacall.json +-- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin +-- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin/cli_cmd_plugin.js +-- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin/metacall.json +-- Installing: /usr/local/lib/plugins/cli/repl +-- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin +-- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/libcli_core_plugind.so +-- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/cli_core_plugin_repl.js +-- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/metacall.json +-- Installing: /usr/local/lib/plugins/sandbox_plugin +-- Installing: /usr/local/lib/plugins/sandbox_plugin/libsandbox_plugind.so +-- Installing: /usr/local/lib/plugins/sandbox_plugin/metacall.json +-- Installing: /usr/local/lib/node_modules/metacall/index.js +-- Installing: /usr/local/lib/node_modules/metacall/index.d.ts +-- Installing: /usr/local/lib/node_modules/metacall/package.json +-- Installing: /usr/local/lib/node_modules/metacall/package-lock.json +-- Installing: /usr/local/lib/node_modules/metacall/LICENSE +Processing /usr/local/metacall/source/ports/py_port + Preparing metadata (setup.py): started + Preparing metadata (setup.py): finished with status 'done' +Building wheels for collected packages: metacall + Building wheel for metacall (setup.py): started + Building wheel for metacall (setup.py): finished with status 'done' + Created wheel for metacall: filename=metacall-0.5.1-py2.py3-none-any.whl size=14061 sha256=015f92f2fa3cc2bc911cd45a282a12c381d25ca1c498f99098a4a30018c24e84 + Stored in directory: /tmp/pip-ephem-wheel-cache-a3n0sbsf/wheels/67/d1/05/9442633228a4c6adb005b8d5d97a193b9876b444ce637c7bbe +Successfully built metacall +Installing collected packages: metacall +Successfully installed metacall-0.5.1 +WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. +-- Installing: /usr/local/lib/rb_portd.so +-- Set non-toolchain portion of runtime path of "/usr/local/lib/rb_portd.so" to "/usr/local/lib" +-- Installing: /usr/local/bin/metacallclid +-- Set non-toolchain portion of runtime path of "/usr/local/bin/metacallclid" to "/usr/local/lib" +-- Up-to-date: /usr/local/include/metacall +-- Installing: /usr/local/include/metacall/metacall_loaders.h +-- Installing: /usr/local/include/metacall/metacall_version.h +MetaCall configuration paths (overwritables) +LOADER_SCRIPT_PATH: + Description: Directory where scripts are located + Install Location: N/A + Default Location: scripts +CONFIGURATION_PATH: + Description: Path to the main global MetaCall configuration + Install Location: /usr/local/share/metacall/configurations/global.json + Default Location: configurations/global.json +LOADER_LIBRARY_PATH: + Description: Directory where MetaCall loader plugins are located + Install Location: /usr/local/lib + Default Location: . +SERIAL_LIBRARY_PATH: + Description: Directory where MetaCall serial plugins are located + Install Location: /usr/local/lib + Default Location: serials +DETOUR_LIBRARY_PATH: + Description: Directory where MetaCall detour plugins are located + Install Location: /usr/local/lib + Default Location: detours +-- Installing: /usr/local/share/metacall/VERSION +-- Installing: /usr/local/share/metacall/metacall-config.cmake +-- Installing: /usr/local/share/metacall/metacall-config-version.cmake +-- Installing: /usr/local/share/metacall/AUTHORS +-- Installing: /usr/local/share/metacall/LICENSE +-- Installing: /usr/local/share/metacall/README.md +Removing intermediate container 8fc0ef566964 + ---> a154882bd14f +Successfully built a154882bd14f +Successfully tagged metacall/core:dev From 73c12f508cadfea7df67e6fb72873b8daffbe100 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 17:48:20 +0200 Subject: [PATCH 090/364] Avoid to optimize function in release. --- source/tests/dynlink_test/source/dynlink_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 48c0372056..f832ec21cf 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -122,6 +122,8 @@ TEST_F(dynlink_test, DefaultConstructor) EXPECT_EQ((int)48, fn_ptr()); + EXPECT_EQ((int (*)(void))&function_from_current_executable, (int (*)(void))fn_ptr); + dynlink_unload(proc); /* Should do nothing except by freeing the handle */ } From 369de4afc2ee9f099294189ecb7521a3792ea89e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 18:11:08 +0200 Subject: [PATCH 091/364] Trying to solve dynlink error. --- source/tests/dynlink_test/source/dynlink_test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index f832ec21cf..1ba674206d 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -38,7 +38,7 @@ class dynlink_test : public testing::Test #ifdef _WIN32 #define EXPORT_SYMBOL __declspec(dllexport) #else - #define EXPORT_SYMBOL __attribute__((visibility("default"))) + #define EXPORT_SYMBOL __attribute__((used)) __attribute__((visibility("default"))) #endif extern "C" EXPORT_SYMBOL int function_from_current_executable(void) @@ -114,15 +114,17 @@ TEST_F(dynlink_test, DefaultConstructor) dynlink_symbol_addr addr; + EXPECT_EQ((int)48, (int)function_from_current_executable()); + EXPECT_EQ((int)0, dynlink_symbol(proc, "function_from_current_executable", &addr)); - ASSERT_NE((dynlink)proc, (dynlink)(NULL)); + ASSERT_NE((dynlink_symbol_addr)addr, (dynlink_symbol_addr)NULL); int (*fn_ptr)(void) = (int (*)(void))addr; EXPECT_EQ((int)48, fn_ptr()); - EXPECT_EQ((int (*)(void))&function_from_current_executable, (int (*)(void))fn_ptr); + EXPECT_EQ((int (*)(void))(&function_from_current_executable), (int (*)(void))fn_ptr); dynlink_unload(proc); /* Should do nothing except by freeing the handle */ } From dd78067f045fc98d1208bcf26b6d12ce0f1d283c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 18:18:07 +0200 Subject: [PATCH 092/364] Solve more issues. --- output | 4601 ----------------- .../plugins/backtrace_plugin/CMakeLists.txt | 2 + 2 files changed, 2 insertions(+), 4601 deletions(-) delete mode 100644 output diff --git a/output b/output deleted file mode 100644 index de325f6b50..0000000000 --- a/output +++ /dev/null @@ -1,4601 +0,0 @@ -+ export COMPOSE_DOCKER_CLI_BUILD=1 -+ COMPOSE_DOCKER_CLI_BUILD=1 -+ export DOCKER_BUILDKIT=1 -+ DOCKER_BUILDKIT=1 -+ export BUILDKIT_PROGRESS=plain -+ BUILDKIT_PROGRESS=plain -+ export PROGRESS_NO_TRUNC=1 -+ PROGRESS_NO_TRUNC=1 -++ command -v docker-compose -+ '[' -x /usr/local/bin/docker-compose ']' -+ DOCKER_COMPOSE=docker-compose -+ case "$1" in -+ sub_test -+ export DOCKER_BUILDKIT=0 -+ DOCKER_BUILDKIT=0 -+ export METACALL_BUILD_SANITIZER= -+ METACALL_BUILD_SANITIZER= -+ export METACALL_BUILD_COVERAGE= -+ METACALL_BUILD_COVERAGE= -+ export METACALL_BUILD_TYPE=debug -+ METACALL_BUILD_TYPE=debug -+ ln -sf tools/deps/.dockerignore .dockerignore -+ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm deps -Building deps -Sending build context to Docker daemon 41.47kB -Step 1/11 : ARG METACALL_BASE_IMAGE -Step 2/11 : FROM ${METACALL_BASE_IMAGE} AS deps - ---> 29f27ec2c121 -Step 3/11 : LABEL copyright.name="Vicente Eduardo Ferrer Garcia" copyright.address="vic798@gmail.com" maintainer.name="Vicente Eduardo Ferrer Garcia" maintainer.address="vic798@gmail.com" vendor="MetaCall Inc." version="0.1" - ---> Using cache - ---> 49a33baef77c -Step 4/11 : ARG METACALL_PATH - ---> Using cache - ---> 13cf6ef6b257 -Step 5/11 : ARG METACALL_TOOLS_PATH - ---> Using cache - ---> 74c0900e4935 -Step 6/11 : ENV DEBIAN_FRONTEND=noninteractive LTTNG_UST_REGISTER_TIMEOUT=0 NUGET_XMLDOC_MODE=skip DOTNET_CLI_TELEMETRY_OPTOUT=true - ---> Using cache - ---> 90e6f87497e7 -Step 7/11 : WORKDIR $METACALL_PATH - ---> Using cache - ---> 889e429fecde -Step 8/11 : COPY tools/metacall-environment.sh tools/nobuildtest.patch $METACALL_TOOLS_PATH/ - ---> Using cache - ---> 6039e0748a38 -Step 9/11 : ARG METACALL_BUILD_TYPE - ---> Using cache - ---> 7ef06f56da55 -Step 10/11 : ARG METACALL_INSTALL_OPTIONS - ---> Using cache - ---> 55bcc6a1ff91 -Step 11/11 : RUN chmod 500 $METACALL_TOOLS_PATH/metacall-environment.sh && $METACALL_TOOLS_PATH/metacall-environment.sh ${METACALL_BUILD_TYPE} ${METACALL_INSTALL_OPTIONS} && rm -rf $METACALL_PATH - ---> Using cache - ---> 663a36c6a1d2 -Successfully built 663a36c6a1d2 -Successfully tagged metacall/core:deps -+ ln -sf tools/dev/.dockerignore .dockerignore -+ docker-compose -f docker-compose.yml -f docker-compose.test.yml build --force-rm dev -Building dev -Sending build context to Docker daemon 145MB -Step 1/11 : FROM metacall/core:deps AS dev - ---> 663a36c6a1d2 -Step 2/11 : LABEL copyright.name="Vicente Eduardo Ferrer Garcia" copyright.address="vic798@gmail.com" maintainer.name="Vicente Eduardo Ferrer Garcia" maintainer.address="vic798@gmail.com" vendor="MetaCall Inc." version="0.1" - ---> Using cache - ---> cad39512370c -Step 3/11 : ARG METACALL_PATH - ---> Using cache - ---> 667cbb0424d2 -Step 4/11 : ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build LOADER_SCRIPT_PATH=$METACALL_PATH/build/scripts CONFIGURATION_PATH=$METACALL_PATH/build/configurations/global.json SERIAL_LIBRARY_PATH=$METACALL_PATH/build DETOUR_LIBRARY_PATH=$METACALL_PATH/build PORT_LIBRARY_PATH=$METACALL_PATH/build DEBIAN_FRONTEND=noninteractive NODE_PATH=/usr/lib/node_modules DOTNET_CLI_TELEMETRY_OPTOUT=true - ---> Using cache - ---> 9880ade75ea2 -Step 5/11 : WORKDIR $METACALL_PATH - ---> Using cache - ---> 60b4d0ff9791 -Step 6/11 : COPY . $METACALL_PATH - ---> 61fa6f901dff -Step 7/11 : RUN chmod 500 $METACALL_PATH/tools/metacall-configure.sh && chmod 500 $METACALL_PATH/tools/metacall-build.sh && mkdir -p $METACALL_PATH/build - ---> Running in 83b240d9adc6 -Removing intermediate container 83b240d9adc6 - ---> 605f80d762f6 -Step 8/11 : ARG METACALL_BUILD_TYPE - ---> Running in f1af673b92af -Removing intermediate container f1af673b92af - ---> 84b68123c202 -Step 9/11 : ARG METACALL_BUILD_OPTIONS - ---> Running in c6ce85603c04 -Removing intermediate container c6ce85603c04 - ---> 2407b0953672 -Step 10/11 : RUN cd $METACALL_PATH/build && $METACALL_PATH/tools/metacall-configure.sh ${METACALL_BUILD_TYPE} ${METACALL_BUILD_OPTIONS} - ---> Running in 84f6a9010292 -Current option settings -errexit on -noglob off -ignoreeof off -interactive off -monitor off -noexec off -stdin off -xtrace on -verbose off -vi off -emacs off -noclobber off -allexport off -notify off -nounset on -privileged off -nolog off -pipefail off -debug off -+ pwd -+ ROOT_DIR=/usr/local/metacall/build -+ BUILD_TYPE=Release -+ BUILD_PYTHON=0 -+ BUILD_RUBY=0 -+ BUILD_NETCORE=0 -+ BUILD_NETCORE2=0 -+ BUILD_NETCORE5=0 -+ BUILD_NETCORE7=0 -+ BUILD_V8=0 -+ BUILD_NODEJS=0 -+ BUILD_TYPESCRIPT=0 -+ BUILD_FILE=0 -+ BUILD_RPC=0 -+ BUILD_WASM=0 -+ BUILD_JAVA=0 -+ BUILD_C=0 -+ BUILD_COBOL=0 -+ BUILD_GO=0 -+ BUILD_RUST=0 -+ BUILD_ZIG=0 -+ BUILD_SCRIPTS=0 -+ BUILD_EXAMPLES=0 -+ BUILD_TESTS=0 -+ BUILD_BENCHMARKS=0 -+ BUILD_PORTS=0 -+ BUILD_SANDBOX=0 -+ BUILD_COVERAGE=0 -+ BUILD_ADDRESS_SANITIZER=0 -+ BUILD_THREAD_SANITIZER=0 -+ BUILD_MEMORY_SANITIZER=0 -+ uname -s -+ OPERATIVE_SYSTEM=Linux -+ [ -f /etc/os-release ] -+ cat /etc/os-release -+ grep ^ID= -+ cut -f2- -d= -+ sed -e s/^[[:space:]]*// -e s/[[:space:]]*$// -+ tr -d " -+ LINUX_DISTRO=debian -+ + cat /etc/os-release -grep ^VERSION_ID= -+ cut -f2- -d= -+ sed -e s/^[[:space:]]*// -e s/[[:space:]]*$// -+ tr -d " -+ LINUX_VERSION_ID= -+ sub_options debug python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks -+ [ debug = debug ] -+ echo Build all scripts in debug mode -+ BUILD_TYPE=Debug -+ [ debug = release ] -+ [ debug = relwithdebinfo ] -+ [ debug = python ] -+ [ debug = ruby ] -+ [ debug = netcore ] -+ [ debug = netcore2 ] -+ [ debug = netcore5 ] -+ [ debug = netcore7 ] -+ [ debug = v8 ] -+ [ debug = nodejs ] -+ [ debug = typescript ] -+ [ debug = file ] -+ [ debug = rpc ] -+ [ debug = wasm ] -+ [ debug = java ] -+ [ debug = c ]Build all scripts in debug mode - -+ [ debug = cobol ] -+ [ debug = go ] -+ [ debug = rust ] -+ [ debug = zig ] -+ [ debug = scripts ] -+ [ debug = examples ] -+ [ debug = tests ] -+ [ debug = benchmarks ] -+ [ debug = ports ] -+ [ debug = sandbox ] -+ [ debug = coverage ] -+ [ debug = address-sanitizer ] -+ [ debug = thread-sanitizer ] -+ [ debug = memory-sanitizer ] -+ [ python = debug ] -+ [ python = release ] -+ [ python = relwithdebinfo ] -+ [ python = python ] -+ echo Build with python support -+ BUILD_PYTHON=1 -+ [ python = ruby ] -+ [ python = netcore ] -+ [ python = netcore2 ] -+ [ python = netcore5 ] -+ [ python = netcore7 ] -+ [ python = v8 ] -+ [ python = nodejs ] -+ [ python = typescript ] -+ [ python = file ] -+ [ python = rpc ] -+ [ python = wasmBuild with python support - ] -+ [ python = java ] -+ [ python = c ] -+ [ python = cobol ] -+ [ python = go ] -+ [ python = rust ] -+ [ python = zig ] -+ [ python = scripts ] -+ [ python = examples ] -+ [ python = tests ] -+ [ python = benchmarks ] -+ [ python = ports ] -+ [ python = sandbox ] -+ [ python = coverage ] -+ [ python = address-sanitizer ] -+ [ python = thread-sanitizer ] -+ [ python = memory-sanitizer ] -+ Build with ruby support -[ ruby = debug ] -+ [ ruby = release ] -+ [ ruby = relwithdebinfo ] -+ [ ruby = python ] -+ [ ruby = ruby ] -+ echo Build with ruby support -+ BUILD_RUBY=1 -+ [ ruby = netcore ] -+ [ ruby = netcore2 ] -+ [ ruby = netcore5 ] -+ [ ruby = netcore7 ] -+ [ ruby = v8 ] -+ [ ruby = nodejs ] -+ [ ruby = typescript ] -+ [ ruby = file ] -+ [ ruby = rpc ] -+ [ ruby = wasm ] -+ [ ruby = java ] -+ [ ruby = c ] -+ [ ruby = cobol ] -+ [ ruby = go ] -+ [ ruby = rust ] -+ [ ruby = zig ] -+ [ ruby = scripts ] -+ [ ruby = examples ] -+ [ ruby = tests ] -+ [ ruby = benchmarks ] -+ [ ruby = ports ] -+ [ ruby = sandbox ] -+ [ ruby = coverage ] -+ [ ruby = address-sanitizer ] -+ [ ruby = thread-sanitizer ] -+ [ ruby = memory-sanitizer ] -+ [ netcore7 = debug ] -+ [ netcore7 = release ] -+ [ netcore7 = relwithdebinfo ] -+ [ netcore7 = python ] -+ [ netcore7 = ruby ] -+ [ netcore7 = netcore ] -+ [ netcore7 = netcore2 ] -+ [ netcore7 = netcore5 ] -+ [Build with netcore 7 support - netcore7 = netcore7 ] -+ echo Build with netcore 7 support -+ BUILD_NETCORE7=1 -+ [ netcore7 = v8 ] -+ [ netcore7 = nodejs ] -+ [ netcore7 = typescript ] -+ [ netcore7 = file ] -+ [ netcore7 = rpc ] -+ [ netcore7 = wasm ] -+ [ netcore7 = java ] -+ [ netcore7 = c ] -+ [ netcore7 = cobol ] -+ [ netcore7 = go ] -+ [ netcore7 = rust ] -+ [ netcore7 = zig ] -+ [ netcore7 = scripts ] -+ [ netcore7 = examples ] -+ [ netcore7 = tests ] -+ [ netcore7 = benchmarks ] -+ [ netcore7 = ports ] -+ [ netcore7 = sandbox ] -+ [ netcore7 = coverage ] -+ [ netcore7 = address-sanitizer ] -+ [ netcore7 = thread-sanitizer ] -+ [ netcore7 = memory-sanitizer ] -+ [ nodejs = debug ] -+ [ nodejs = release ] -+ [ nodejs = relwithdebinfo ] -+ [ nodejs = python ] -+ [ nodejs = ruby ] -+ [ nodejs = netcore ] -+ [ nodejs = netcore2 ] -+ [ nodejs = netcore5 ] -+ [ nodejs = netcore7 ] -+ [ nodejs = v8 ] -+ [ nodejs = nodejs ] -+ echo Build with nodejs support -+ BUILD_NODEJS=1 -+ [ nodejs = typescript ] -+ [ nodejs = file ] -+ [ nodejs = rpc ] -+ [ nodejs = wasm ] -+ [ nodejs = java ] -+ [ nodejs = c ] -+ [ nodejs = cobol ] -+ [ nodejs = go ] -+ [ nodejs = rust ] -+ [ nodejs = zig ] -+ [ nodejs = scripts ] -+ [ nodejs = examples ] -+ [ nodejs = tests ] -+ [ nodejs = benchmarks ] -+ [ nodejs = ports ] -+ [ nodejs = sandbox ] -+ [ nodejs = coverage ] -+ [ nodejs = address-sanitizer ] -+ [ nodejs = thread-sanitizer ] -+ [ nodejs = memory-sanitizer ] -+ [ typescript = debug ] -+ [ typescript = release ] -+ [ typescript = relwithdebinfo ] -+ [ typescript = python ] -+ [ typescript = ruby ] -+ [ typescript = netcore ] -+ [ typescript = netcore2 ] -+ [ typescript = netcore5 ] -+ [ typescript = netcore7 ] -+ [ typescript = v8 ] -+ [ typescript = nodejs ] -+ [ typescript = typescript ] -+ echo Build with typescript support -+ BUILD_TYPESCRIPT=1 -+ [ typescript = file ] -+ [ typescript = rpc ] -+ [ typescript = wasm ] -+ [ typescript = java ] -+ [ typescript = c ] -+ [ typescript = cobol ] -+ [ typescript = go ] -+ [ typescript = rust ] -+ [ typescript = zig ] -+ [ typescript = scripts ] -+ [ typescript = examples ] -+ [ typescript = tests ] -+ [ typescript = benchmarks ] -+ [ typescript = ports ] -+ [ typescript = sandbox ] -+ [ typescript = coverage ] -+ [ typescript = address-sanitizer ] -+ [ typescript = thread-sanitizer ] -+ [ typescript = memory-sanitizer ] -+ [ file = debug ] -+ [ file = release ] -+ [ file = relwithdebinfo ] -+ [ file = python ] -+ [ file = ruby ] -+ [ file = netcore ] -+ [ file = netcore2 ] -+ [ file = netcore5 ] -+ [ file = netcore7 ] -+ [ file = v8 ] -+ [ file = nodejs ] -+ [ file = typescript ] -+ [ file = file ] -+ echo Build with file support -+ BUILD_FILE=1 -+ [ file = rpc ] -+ [ file = wasm ] -Build with nodejs support -Build with typescript support -Build with file support -+ [ file = java ] -+ [ file = c ] -+ [ file = cobol ] -+ [ file = go ] -+ [ file = rust ] -+ [ file = zig ] -+ [ file = scripts ] -+ [ file = examples ] -+ [ file = tests ] -+ [ file = benchmarks ] -+ [ file = ports ] -+ [ file = sandbox ] -+ [ file = coverage ] -+ [ file = address-sanitizer ] -+ [ file = thread-sanitizer ] -+ [ file = memory-sanitizer ] -+ [ rpc = debug ] -+ [ rpc = release ] -+ [ rpc = relwithdebinfo ] -+ [ rpc = python ] -+ [ rpc = ruby ] -+ [ rpc = netcore ] -+ [ rpc = netcore2 ] -+ [ rpc = netcore5 ] -+ [ rpc = netcore7 ] -+ [ rpc = v8 ] -+ [ rpc = nodejs ] -+ [ rpc = typescript ] -+ [ rpc = file ] -+ [ rpc = rpc ] -+ echo Build with rpc support -+ BUILD_RPC=1 -+ [ rpc = wasm ] -+ [ rpc = java ] -+ [ rpc = c ] -+ [ rpc = cobol ] -+ [ rpc = go ] -+ [ rpc = rust ] -+ [ rpc = zig ] -+ [ rpc = scripts ] -+ [ rpc = examples ] -+ [ rpc = tests ] -+ [ rpc = benchmarks ] -+ [ rpc = ports ] -+ [ rpc = sandbox ] -+ [ rpc = coverage ] -+ [ rpc = address-sanitizer ] -+ [ rpc = thread-sanitizer ] -+ [ rpc = memory-sanitizer ] -+ [ wasm = debug ] -+ [ wasm = release ] -+ [ wasm = relwithdebinfo ] -+ [ wasm = python ] -+ [ wasm = ruby ] -+ [ wasm = netcore ] -+ [ wasm = netcore2 ] -+ [ wasm = netcore5Build with rpc support - ] -+ [ wasm = netcore7 ] -+ [ wasm = v8 ] -+ [ wasm = nodejs ] -+ [ wasm = typescript ] -+ [ wasm = file ] -+ [ wasm = rpc ] -+ [ wasm = wasm ] -+ echo Build with wasm support -+ BUILD_WASM=1 -+ [ wasm = java ] -+ [ wasm = c ] -+ [ wasm = cobol ] -+ [ wasm = go ] -+ [ wasm = rust ] -+ [ wasm = zig ] -+ [ wasm = scripts ] -+ [ wasm = examples ] -+ [ wasmBuild with wasm support - = tests ] -+ [ wasm = benchmarks ] -+ [ wasm = ports ] -+ [ wasm = sandbox ] -+ [ wasm = coverage ] -+ [ wasm = address-sanitizer ] -+ [ wasm = thread-sanitizer ] -+ [ wasm = memory-sanitizer ] -+ [ java = debug ] -+ [ java = release ] -+ [ java = relwithdebinfo ] -+ [ java = python ] -+ [ java = ruby ] -+ [ java = netcore ] -+ [ java = netcore2 ] -+ [ java = netcore5 ] -+ [ java = netcore7 ] -+ [ java = v8 ] -+ [ java = nodejs ] -+ [ java = typescript ] -+ [ java = file ] -+ [ java = rpc ] -+ [ java = wasm ] -+ [ java = java ] -+ echo Build with java support -+ BUILD_JAVA=1 -+ [ java = c ] -+ [ java = cobol ] -+ [ java = go ] -+ [ java = rust ] -+ [ java = zig ] -+ [ java = scripts ] -+ [ java = examples ] -Build with java support -+ [ java = tests ] -+ [ java = benchmarks ] -+ [ java = ports ] -+ [ java = sandbox ] -+ [ java = coverage ] -+ [ java = address-sanitizer ] -+ [ java = thread-sanitizer ] -+ [ java = memory-sanitizer ] -+ [ c = debug ] -+ [ c = release ] -+ [ c = relwithdebinfo ] -+ [ c = python ] -+ [ c = ruby ] -+ [ c = netcore ] -+ [ c = netcore2 ] -+ [ c = netcore5 ] -+ [ c = netcore7 ] -+ [ c = v8 ] -+ [ c = nodejs ] -+ [ c = typescript ] -+ [ c = file ] -+ [ c = rpc ] -+ [ c = wasm ] -+ [ c = java ] -+ [ c = c ] -+ echo Build with c support -+ BUILD_C=1 -+ [ c = cobol ] -+ [ c = go ] -+ [ c = rust ] -+ [ c = zig ] -+ [ c = scripts ] -+ [ c = examples ] -+ [ c = tests ] -+ [ c = benchmarks ] -+ [ c = ports ] -+ [ c = sandbox ] -+ [ c = coverage ] -+ [ c = address-sanitizer ] -+ [ c = thread-sanitizer ] -+ [ c = memory-sanitizer ] -+ [ cobol = debug ] -+ [ cobol = release ] -+ [ cobol = relwithdebinfo ] -+ [ cobol = python ] -+ [ cobol = ruby ] -+ [ cobol = netcore ] -+ [ cobol = netcore2 ] -+ [ cobol = netcore5 ] -+ [ cobol = netcore7 ] -+ [ cobol = v8 ] -+ [ cobol = nodejs ] -+ [ cobol = typescript ] -+ [ cobol = file ] -+ [ cobol = rpc ] -+ [ cobol = wasm ] -+ [ cobol = java ] -+ [ cobol = c ] -+ [ cobol = cobol ] -+ echo Build with cobol support -+ BUILD_COBOL=1 -+ [ cobol = go ] -+ [ cobol = rust ] -+ [ cobol = zig ] -+ [ cobol = scripts ] -+ [ cobol = examples ] -+ [ cobol = tests ] -+ [ cobol = benchmarks ] -+ [ cobol = ports ] -+ [ cobol = sandbox ] -+ [ cobol = coverage ] -+ [ cobol = address-sanitizer ] -+ [ cobol = thread-sanitizer ] -+ [ cobol = memory-sanitizer ] -+ [ go = debug ] -+ [ go = release ] -+ [ go = relwithdebinfo ] -+ [ go = python ] -+ [ go = ruby ] -+ [ go = netcore ] -+ [ go = netcore2 ] -+ [ go = netcore5 ] -+ [ go = netcore7 ] -+ [ go = v8 ] -+ [ go = nodejs ] -+ [ go = typescript ] -+ [ go = file ] -+ [ go = rpc ] -+ [ go = wasm ] -+ [ go = java ] -+ [ go = c ] -+ [ go = cobol ] -+ [ go = go ] -+ echo Build with go support -+ BUILD_GO=1 -+ [ go = rust ] -+ [ go = zig ] -+ [ go = scripts ] -+ [ go = examples ] -+ [ go = tests ] -+ [ go = benchmarks ] -+ [ go = ports ] -+ [ go = sandbox ] -+ [ go = coverage ] -+ [ go = address-sanitizer ] -+ [ go = thread-sanitizer ] -+ [ go = memory-sanitizer ] -+ [ rust = debug ] -+ [ rust = release ] -+ [ rust = relwithdebinfo ] -+ [ rust = python ] -+ [ rust = ruby ] -+ [ rust = netcore ] -+ [ rust = netcore2 ] -+ [ rust = netcore5 ] -+ [ rust = netcore7 ] -+ [ rust = v8 ] -+ [ rust = nodejs ] -+ [ rust = typescript ] -+ [ rust = file ] -+ [ rust = rpc ] -+ [ rust = wasm ] -+ [ rust = java ] -+ [ rust = c ] -+ [ rust = cobol ] -+ [ rust = go ] -+ [ rust = rust ] -+ echo Build with rust support -+ BUILD_RUST=1 -+ [ rust = zig ] -+ [ rust = scripts ] -+ [ rust = examples ] -+ [ rust = tests ] -+ [ rust = benchmarks ] -+ [ rust = ports ] -+ [ rust = sandbox ] -+ [ rust = coverage ] -+ [ rust = address-sanitizer ] -+ [ rust = thread-sanitizer ] -+ [ rust = memory-sanitizer ] -+ [ examples = debug ] -+ [ examples = release ] -+ [ examples = relwithdebinfo ] -+ [ examples = python ] -+ [ examples = ruby ] -+ [ examples = netcore ] -+ [ examples = netcore2 ] -+ [ examples = netcore5 ] -+ [ examples = netcore7 ] -+ [ examples = v8 ] -+ [ examples = nodejs ] -+ [ examples = typescript ] -+ [ examples = file ] -+ [ examples = rpc ] -+ [ examples = wasm ] -+ [ examples = java ] -+ [ examples = c ] -+ [ examples = cobol ] -+ [ examples = go ] -+ [ examples = rust ] -+ [ examples = zig ] -+ [ examples = scripts ] -+ [ examples = examples ] -+ echo Build all examples -+ BUILD_EXAMPLES=1 -+ [ examples = tests ] -+ [ examples = benchmarks ] -+ [ examples = ports ] -+ [ examples = sandbox ] -+ [ examples = coverage ] -+ [ examples = address-sanitizer ] -+ [ examples = thread-sanitizer ] -+ [ examples = memory-sanitizer ] -+ [ tests = debug ] -+ [ tests = release ] -+ [ tests = relwithdebinfo ] -+ [ tests = python ] -+ [ tests = ruby ] -+ [ tests = netcore ] -+ [ tests = netcore2 ] -+ [ tests = netcore5 ] -+ [ tests = netcore7 ] -+ [ tests = v8 ] -+ [ tests = nodejs ] -+ [ tests = typescript ] -+ [ tests = file ] -+ [ tests = rpc ] -+ [ tests = wasm ] -+ [ tests = java ] -+ [ tests = c ] -+ [ tests = cobol ] -+ [ tests = go ] -+ [ tests = rust ] -+ [ tests = zig ] -+ [ tests = scripts ] -+ [ tests = examples ] -+ [ tests = tests ] -+ echo Build all tests -+ BUILD_TESTS=1 -+ [ tests = benchmarks ] -+ [ tests = ports ] -+ [ tests = sandbox ] -+ [ tests = coverage ] -+ [ tests = address-sanitizer ] -+ [ tests = thread-sanitizer ] -+ [ tests = memory-sanitizer ] -+ [ scripts = debug ] -+ [ scripts = release ] -+ [ scripts = relwithdebinfo ] -+ [ scripts = python ]Build with c support -Build with cobol support -Build with go support -Build with rust support -Build all examples -Build all tests - -+ [ scripts = ruby ] -+ [ scripts = netcore ] -+ [ scripts = netcore2 ] -+ [ scripts = netcore5 ] -+ [ scripts = netcore7 ] -+ [ scripts = v8 ] -+ [ scripts = nodejs ] -+ [ scripts = typescript ] -+ [ scripts = file ] -+ [ scripts = rpc ] -+ [ scripts = wasm ] -+ [ scripts = java ] -+ [ scripts = c ] -+ [ scripts = cobol ] -+ [ scripts = go ] -+ [ scripts = rust ] -+ [ scripts = zig ] -+ [ scripts = scripts ] -+ echo Build all scripts -+ BUILD_SCRIPTS=1 -+ [ scripts = examples ] -+ [ scripts = tests ] -+ [ scripts = benchmarks ] -+ [ scripts = ports ] -+ [ scripts = sandbox ] -+ [ scripts = coverage ] -+ [ scripts = address-sanitizer ] -+ [ scripts = thread-sanitizer ] -+ [ scripts = memory-sanitizer ] -+ [ ports = debug ] -+ [ ports = release ] -+ [ ports = relwithdebinfo ] -Build all scripts -+ [ ports = python ] -+ [ ports = ruby ] -+ [ ports = netcore ] -+ [ ports = netcore2 ] -+ [ ports = netcore5 ] -+ [ ports = netcore7 ] -+ [ ports = v8 ] -+ [ ports = nodejs ] -+ [ ports = typescript ] -+ [ ports = file ] -+ [ ports = rpc ] -+ [ ports = wasm ] -+ [ ports = java ] -+ [ ports = c ] -+ [ ports = cobol ] -+ [ ports = go ] -+ [ ports = rust ] -+ [ ports = zig ] -+ [ ports = scripts ] -+ [ ports = examples ] -+ [ ports = tests ] -+ [ ports = benchmarks ] -+ [ ports = ports ] -+ echo Build all ports -Build all ports -+ BUILD_PORTS=1 -+ [ ports = sandbox ] -+ [ ports = coverage ] -+ [ ports = address-sanitizer ] -+ [ ports = thread-sanitizer ] -+ [ ports = memory-sanitizer ] -+ [ install = debug ] -+ [ install = release ] -+ [ install = relwithdebinfo ] -+ [ install = python ] -+ [ install = ruby ] -+ [ install = netcore ] -+ [ install = netcore2 ] -+ [ install = netcore5 ] -+ [ install = netcore7 ] -+ [ install = v8 ] -+ [ install = nodejs ] -+ [ install = typescript ] -+ [ install = file ] -+ [ install = rpc ] -+ [ install = wasm ] -+ [ install = java ] -+ [ install = c ] -+ [ install = cobol ] -+ [ install = go ] -+ [ install = rust ] -+ [ install = zig ] -+ [ install = scripts ] -+ [ install = examples ] -+ [ install = tests ] -+ [ install = benchmarks ] -+ [ install = ports ] -+ [ install = sandbox ] -+ [ install = coverage ] -+ [ install = address-sanitizer ] -+ [ install = thread-sanitizer ] -+ [ install = memory-sanitizer ] -+ [ pack = debug ] -+ [ pack = release ] -+ [ pack = relwithdebinfo ] -+ [ pack = python ] -+ [ pack = ruby ] -+ [ pack = netcore ] -+ [ pack = netcore2 ] -+ [ pack = netcore5 ] -+ [ pack = netcore7 ] -+ [ pack = v8 ] -+ [ pack = nodejs ] -+ [ pack = typescript ] -+ [ pack = file ] -+ [ pack = rpc ] -+ [ pack = wasm ] -+ [ pack = java ] -+ [ pack = c ] -+ [ pack = cobol ] -+ [ pack = go ] -+ [ pack = rust ] -+ [ pack = zig ] -+ [ pack = scripts ] -+ [ pack = examples ] -+ [ pack = tests ] -+ [ pack = benchmarks ] -+ [ pack = ports ] -+ [ pack = sandbox ] -+ [ pack = coverage ] -+ [ pack = address-sanitizer ] -+ [ pack = thread-sanitizer ] -+ [ pack = memory-sanitizer ] -+ [ sandbox = debug ] -+ [ sandbox = release ] -+ [ sandbox = relwithdebinfo ] -+ [ sandbox = python ] -+ [ sandbox = ruby ] -+ [ sandbox = netcore ] -+ [ sandbox = netcore2 ] -+ [ sandbox = netcore5 ] -+ [ sandbox = netcore7 ] -+ [ sandbox = v8 ] -+ [ sandbox = nodejs ] -+ [ sandbox = typescript ] -+ [ sandbox = file ] -+ [ sandbox = rpc ] -+ [ sandbox = wasm ] -+ [ sandbox = java ] -+ [ sandbox = c ] -+ [ sandbox = cobol ] -+ [ sandbox = go ] -+ [ sandbox = rust ] -+ [ sandbox = zig ] -+ [ sandbox = scripts ] -+ [ sandbox = examples ] -+ [ sandbox = tests ] -+ [ sandbox = benchmarks ] -+ [ sandbox = ports ] -+ [ sandbox = sandbox ] -+ echo Build with sandboxing support -+ BUILD_SANDBOX=1 -+ [ sandbox = coverage ] -+ [ sandbox = address-sanitizer ] -+ [ sandbox = thread-sanitizer ] -+ [ sandbox = memory-sanitizer ] -+ [ benchmarks = debug ] -+ [ benchmarks = release ] -+ [ benchmarks = relwithdebinfo ] -+ [ benchmarks = python ] -+ [ benchmarks = ruby ] -+ [ benchmarks = netcore ] -+ [ benchmarks = netcore2 ] -+ [ benchmarks = netcore5 ] -+ [ benchmarks = netcore7 ] -+ [ benchmarks = v8 ] -+ [ benchmarks = nodejs ] -+ [ benchmarks = typescript ] -+ [ benchmarks = file ] -+ [ benchmarks = rpcBuild with sandboxing support -Build all benchmarks - ] -+ [ benchmarks = wasm ] -+ [ benchmarks = java ] -+ [ benchmarks = c ] -+ [ benchmarks = cobol ] -+ [ benchmarks = go ] -+ [ benchmarks = rust ] -+ [ benchmarks = zig ] -+ [ benchmarks = scripts ] -+ [ benchmarks = examples ] -+ [ benchmarks = tests ] -+ [ benchmarks = benchmarks ] -+ echo Build all benchmarks -+ BUILD_BENCHMARKS=1 -+ [ benchmarks = ports ] -+ [ benchmarks = sandbox ] -+ [ benchmarks = coverage ] -+ [ benchmarks = address-sanitizer ] -+ [ benchmarks = thread-sanitizer ] -+ [ benchmarks = memory-sanitizer ] -+ sub_configure -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -+ [ debian = alpine ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -+ [ Linux = Darwin ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -+ [ 0 = 1 ] -+ [ 0 = 1 ] -+ [ 0 = 1 ] -+ [ 1 = 1 ] -+ sub_find_dotnet_runtime 7 -+ dotnet --list-runtimes -+ grep -m 1 Microsoft.NETCore.App 7 -+ NETCORE_BASE_PATH=Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] -+ echo Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] -+ awk { print $3 } -+ tail -c +2 -+ head -c -2 -+ echo Microsoft.NETCore.App 7.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App] -+ awk { print $2 } -+ echo /usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -+ [ 0 = 1 ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -+ [ debian = alpine ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -+ [ 1 = 1 ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -+ [ 0 = 1 ] -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -+ [ 1 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -+ [ 0 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -+ [ 0 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -+ [ 0 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -+ [ 0 = 1 ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off -+ CMAKE_CONFIG_FILE=/usr/local/metacall/build/CMakeConfig.txt -+ [ -f /usr/local/metacall/build/CMakeConfig.txt ] -+ BUILD_STRING=-DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off -DCMAKE_BUILD_TYPE=Debug -+ cmake -Wno-dev -DOPTION_GIT_HOOKS=Off -DOPTION_BUILD_LOG_PRETTY=Off -DOPTION_BUILD_LOADERS=On -DOPTION_BUILD_LOADERS_MOCK=On -DOPTION_BUILD_SCRIPTS=On -DOPTION_BUILD_LOADERS_PY=On -DOPTION_BUILD_SCRIPTS_PY=On -DOPTION_BUILD_PORTS_PY=On -DOPTION_BUILD_LOADERS_RB=On -DOPTION_BUILD_SCRIPTS_RB=On -DOPTION_BUILD_PORTS_RB=On -DOPTION_BUILD_LOADERS_CS=On -DDOTNET_CORE_PATH=/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.20/ -DOPTION_BUILD_SCRIPTS_CS=On -DOPTION_BUILD_PORTS_CS=On -DOPTION_BUILD_LOADERS_NODE=On -DOPTION_BUILD_SCRIPTS_NODE=On -DOPTION_BUILD_PORTS_NODE=On -DOPTION_BUILD_LOADERS_TS=On -DOPTION_BUILD_SCRIPTS_TS=On -DOPTION_BUILD_PORTS_TS=On -DOPTION_BUILD_LOADERS_FILE=On -DOPTION_BUILD_SCRIPTS_FILE=On -DOPTION_BUILD_LOADERS_RPC=On -DOPTION_BUILD_SCRIPTS_RPC=On -DOPTION_BUILD_LOADERS_WASM=On -DOPTION_BUILD_SCRIPTS_WASM=On -DOPTION_BUILD_LOADERS_JAVA=On -DOPTION_BUILD_SCRIPTS_JAVA=On -DOPTION_BUILD_LOADERS_C=On -DOPTION_BUILD_SCRIPTS_C=On -DOPTION_BUILD_LOADERS_COB=On -DOPTION_BUILD_SCRIPTS_COB=On -DOPTION_BUILD_PORTS_GO=On -DOPTION_BUILD_LOADERS_RS=On -DOPTION_BUILD_SCRIPTS_RS=On -DOPTION_BUILD_PORTS_RS=On -DOPTION_BUILD_EXAMPLES=On -DOPTION_BUILD_TESTS=On -DOPTION_BUILD_BENCHMARKS=On -DOPTION_BUILD_PORTS=On -DOPTION_BUILD_PLUGINS_SANDBOX=On -DOPTION_COVERAGE=Off -DOPTION_BUILD_ADDRESS_SANITIZER=Off -DOPTION_BUILD_THREAD_SANITIZER=Off -DOPTION_BUILD_MEMORY_SANITIZER=Off -DCMAKE_BUILD_TYPE=Debug .. --- The C compiler identification is GNU 14.2.0 --- The CXX compiler identification is GNU 14.2.0 --- Detecting C compiler ABI info --- Detecting C compiler ABI info - done --- Check for working C compiler: /usr/bin/cc - skipped --- Detecting C compile features --- Detecting C compile features - done --- Detecting CXX compiler ABI info --- Detecting CXX compiler ABI info - done --- Check for working CXX compiler: /usr/bin/c++ - skipped --- Detecting CXX compile features --- Detecting CXX compile features - done --- Target Operative System: Linux --- Target OS Family: unix --- Linux x86_64 64bit detected -CMake Warning at CMakeLists.txt:162 (message): - Linting disabled: clang-format executable not found - - --- Lib version --- Performing Test PIC_C_FLAG --- Performing Test PIC_C_FLAG - Success --- Performing Test STACK_PROTECTOR_STRONG_C_FLAG --- Performing Test STACK_PROTECTOR_STRONG_C_FLAG - Success --- Performing Test FORTIFY_SOURCE_C_FLAG --- Performing Test FORTIFY_SOURCE_C_FLAG - Success --- Performing Test PIC_CXX_FLAG --- Performing Test PIC_CXX_FLAG - Success --- Performing Test STACK_PROTECTOR_STRONG_CXX_FLAG --- Performing Test STACK_PROTECTOR_STRONG_CXX_FLAG - Success --- Performing Test FORTIFY_SOURCE_CXX_FLAG --- Performing Test FORTIFY_SOURCE_CXX_FLAG - Success --- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY --- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success --- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY --- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success --- Performing Test COMPILER_HAS_DEPRECATED_ATTR --- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success --- Lib preprocessor --- Lib environment --- Lib format --- Lib log --- Lib memory --- Lib portability --- Lib threading --- Lib adt --- Lib filesystem --- Lib dynlink --- Lib plugin --- Lib detour --- Lib reflect --- Lib serial --- Lib configuration --- Lib loader --- Lib metacall --- Found LibFFI: /usr/lib/x86_64-linux-gnu/libffi.so --- Could NOT find LibTCC (missing: LIBTCC_LIBRARY LIBTCC_INCLUDE_DIR) --- Installing LibTCC 6ec4a10 --- Found LibClang: /usr/lib/llvm-14/lib/libclang.so --- Plugin c_loader --- Found COBOL: /usr/bin/cobc (found version "3.2.0") --- Plugin cob_loader --- Plugin cs_loader_impl implementation --- Plugin cs_loader --- Plugin ext_loader --- Plugin file_loader --- Found JNI: /usr/lib/jvm/default-java/include found components: AWT JVM --- Found Java: /usr/bin/java (found version "21.0.7") --- Plugin java_loader_bootstrap bootstrap --- Plugin java_loader --- Plugin mock_loader --- Searching NodeJS library version 115 --- NodeJS Library Found --- Found NodeJS: /usr/bin/node (found version "20.19.0") --- Found NPM: /usr/bin/npm (found version "9.2.0") --- Plugin node_loader_bootstrap bootstrap --- Plugin node_loader --- Found Python3: /usr/include/python3.13d (found version "3.13.2") found components: Development Development.Module Development.Embed --- Plugin py_loader --- Found Ruby: /usr/bin/ruby (found suitable version "3.3.7", minimum required is "1.8.0") --- Plugin rb_loader -CMake Warning at source/loaders/rs_loader/CMakeLists.txt:8 (message): - Rust loader is out of date, needs to be updated in order to work - - --- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "8.13.0") --- Plugin rpc_loader --- Plugin ts_loader_bootstrap bootstrap --- Plugin ts_loader --- Wasmtime C API library or headers not found, downloading from archive --- [download 0% complete] --- [download 1% complete] --- [download 2% complete] --- [download 3% complete] --- [download 4% complete] --- [download 5% complete] --- [download 6% complete] --- [download 7% complete] --- [download 8% complete] --- [download 9% complete] --- [download 10% complete] --- [download 11% complete] --- [download 12% complete] --- [download 13% complete] --- [download 14% complete] --- [download 15% complete] --- [download 16% complete] --- [download 17% complete] --- [download 18% complete] --- [download 19% complete] --- [download 20% complete] --- [download 21% complete] --- [download 22% complete] --- [download 23% complete] --- [download 24% complete] --- [download 25% complete] --- [download 26% complete] --- [download 27% complete] --- [download 28% complete] --- [download 29% complete] --- [download 30% complete] --- [download 31% complete] --- [download 32% complete] --- [download 33% complete] --- [download 34% complete] --- [download 35% complete] --- [download 36% complete] --- [download 37% complete] --- [download 38% complete] --- [download 39% complete] --- [download 40% complete] --- [download 41% complete] --- [download 42% complete] --- [download 43% complete] --- [download 44% complete] --- [download 45% complete] --- [download 46% complete] --- [download 47% complete] --- [download 48% complete] --- [download 49% complete] --- [download 50% complete] --- [download 51% complete] --- [download 52% complete] --- [download 53% complete] --- [download 54% complete] --- [download 55% complete] --- [download 56% complete] --- [download 57% complete] --- [download 58% complete] --- [download 59% complete] --- [download 60% complete] --- [download 61% complete] --- [download 62% complete] --- [download 63% complete] --- [download 64% complete] --- [download 65% complete] --- [download 66% complete] --- [download 67% complete] --- [download 68% complete] --- [download 69% complete] --- [download 70% complete] --- [download 71% complete] --- [download 72% complete] --- [download 73% complete] --- [download 74% complete] --- [download 75% complete] --- [download 76% complete] --- [download 77% complete] --- [download 78% complete] --- [download 79% complete] --- [download 80% complete] --- [download 81% complete] --- [download 82% complete] --- [download 83% complete] --- [download 84% complete] --- [download 85% complete] --- [download 86% complete] --- [download 87% complete] --- [download 88% complete] --- [download 89% complete] --- [download 90% complete] --- [download 91% complete] --- [download 92% complete] --- [download 93% complete] --- [download 94% complete] --- [download 95% complete] --- [download 96% complete] --- [download 97% complete] --- [download 98% complete] --- [download 99% complete] --- [download 100% complete] --- Found Wasmtime: /usr/local/metacall/build/wasmtime/wasmtime-v8.0.1-x86_64-linux-c-api/lib/libwasmtime.so (found suitable version "8.0.1", minimum required is "8.0.1") --- Plugin wasm_loader --- Serial metacall_serial --- Found RapidJSON header files in /usr/local/include --- Serial rapid_json_serial --- Detour plthook_detour --- Extension plugin_extension --- Found libdw: /usr/lib/x86_64-linux-gnu/libdw.so --- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) --- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) --- Found Backward: /usr/local/metacall/build/_deps/backwardcpp-src --- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) --- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) --- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) --- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR) --- Found Backward: /usr/local/metacall/build/_deps/backwardcpp-src --- Plugin backtrace_plugin --- Found LibSecComp: /usr/lib/x86_64-linux-gnu/libseccomp.so (Required is at least version "2") --- Plugin sandbox_plugin --- Port node_port --- Found Python: /usr/bin/python3 (found version "3.13.2") found components: Interpreter --- Test node_port_test --- Test node_port_test_executable --- Port py_port --- Found Python3: /usr/bin/python3 (found version "3.13.2") found components: Interpreter --- The Golang compiler identification is go1.24.2 linux/amd64 --- Check for working Golang compiler: /usr/bin/go --- Port go_port --- Found Rust: /root/.cargo/bin/cargo (found version "1.86.0") --- Port rs_port - Updating crates.io index - Downloading crates ... - Downloaded bindgen-cli v0.71.1 - Installing bindgen-cli v0.71.1 - Updating crates.io index - Locking 59 packages to latest compatible versions - Adding env_logger v0.10.2 (available: v0.11.8) - Downloading crates ... - Downloaded anstyle-parse v0.2.6 - Downloaded bitflags v2.9.0 - Downloaded anstream v0.6.18 - Downloaded cfg-if v1.0.0 - Downloaded is-terminal v0.4.16 - Downloaded anstyle-query v1.1.2 - Downloaded is_terminal_polyfill v1.70.1 - Downloaded anstyle v1.0.10 - Downloaded strsim v0.11.1 - Downloaded clap_lex v0.7.4 - Downloaded utf8parse v0.2.2 - Downloaded termcolor v1.4.1 - Downloaded quote v1.0.40 - Downloaded libloading v0.8.6 - Downloaded unicode-ident v1.0.18 - Downloaded colorchoice v1.0.3 - Downloaded prettyplease v0.2.32 - Downloaded minimal-lexical v0.2.1 - Downloaded memchr v2.7.4 - Downloaded nom v7.1.3 - Downloaded itertools v0.13.0 - Downloaded clap_builder v4.5.35 - Downloaded aho-corasick v1.1.3 - Downloaded clap v4.5.35 - Downloaded bindgen v0.71.1 - Downloaded clang-sys v1.8.1 - Downloaded proc-macro2 v1.0.94 - Downloaded regex v1.11.1 - Downloaded unicode-width v0.2.0 - Downloaded syn v2.0.100 - Downloaded log v0.4.27 - Downloaded clap_complete v4.5.47 - Downloaded regex-syntax v0.8.5 - Downloaded clap_derive v4.5.32 - Downloaded cexpr v0.6.0 - Downloaded heck v0.5.0 - Downloaded glob v0.3.2 - Downloaded env_logger v0.10.2 - Downloaded shlex v1.3.0 - Downloaded rustc-hash v2.1.1 - Downloaded annotate-snippets v0.11.5 - Downloaded humantime v2.2.0 - Downloaded either v1.15.0 - Downloaded regex-automata v0.4.9 - Downloaded libc v0.2.171 - Compiling proc-macro2 v1.0.94 - Compiling memchr v2.7.4 - Compiling unicode-ident v1.0.18 - Compiling anstyle v1.0.10 - Compiling libc v0.2.171 - Compiling utf8parse v0.2.2 - Compiling anstyle-query v1.1.2 - Compiling is_terminal_polyfill v1.70.1 - Compiling colorchoice v1.0.3 - Compiling glob v0.3.2 - Compiling clap_lex v0.7.4 - Compiling strsim v0.11.1 - Compiling prettyplease v0.2.32 - Compiling regex-syntax v0.8.5 - Compiling heck v0.5.0 - Compiling minimal-lexical v0.2.1 - Compiling cfg-if v1.0.0 - Compiling bindgen v0.71.1 - Compiling unicode-width v0.2.0 - Compiling log v0.4.27 - Compiling either v1.15.0 - Compiling humantime v2.2.0 - Compiling libloading v0.8.6 - Compiling anstyle-parse v0.2.6 - Compiling bitflags v2.9.0 - Compiling termcolor v1.4.1 - Compiling shlex v1.3.0 - Compiling rustc-hash v2.1.1 - Compiling anstream v0.6.18 - Compiling itertools v0.13.0 - Compiling annotate-snippets v0.11.5 - Compiling clang-sys v1.8.1 - Compiling clap_builder v4.5.35 - Compiling aho-corasick v1.1.3 - Compiling nom v7.1.3 - Compiling quote v1.0.40 - Compiling syn v2.0.100 - Compiling is-terminal v0.4.16 - Compiling regex-automata v0.4.9 - Compiling cexpr v0.6.0 - Compiling clap_derive v4.5.32 - Compiling regex v1.11.1 - Compiling env_logger v0.10.2 - Compiling clap v4.5.35 - Compiling clap_complete v4.5.47 - Compiling bindgen-cli v0.71.1 - Finished `release` profile [optimized] target(s) in 31.97s - Installing /root/.cargo/bin/bindgen - Installed package `bindgen-cli v0.71.1` (executable `bindgen`) --- Found SWIG: /usr/bin/swig (found version "4.3.0") --- Port rb_port --- Script compiled --- Script ffi --- Script cbks --- Script loadtest --- Script say --- Script hello --- Script static --- Script function --- Script sum_extension --- Script static --- Script favicon --- Script glob --- Script fibonnaci --- Script jartest --- Script test --- Script nod --- Script inline --- Script export --- Script host --- Script server --- Script factcallback --- Script derpyramda --- Script gram --- Script duplicated --- Script ramda --- Script example --- Script helloworld --- Script initfini --- Script callback --- Script function --- Script ducktype --- Script rsasample --- Script garbage --- Script classname --- Script web --- Script landing --- Script model --- Script pointer --- Script dicty --- Script host --- Script s1 --- Script s2 --- Script withoutfunctions --- Script wasm --- Script badimport --- Script watzon --- Script fnmesh --- Script hello --- Script second --- Script blog --- Script cache --- Script ducktype --- Script invalid --- Script klass --- Script failempty --- Script remote --- Script typedfunc --- Script templating --- Script loopfail --- Script badrequire --- Script server --- Script tests --- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) (Required is at least version "1.11.0") --- Performing Test CMAKE_HAVE_LIBC_PTHREAD --- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success --- Found Threads: TRUE --- Install Google Test v1.11.0 --- Test preprocessor-test --- Test environment-test --- Test log-test --- Test log-custom-test --- Test adt-set-test --- Test adt-trie-test --- Test adt-vector-test --- Test adt-map-test --- Test reflect-value-cast-test --- Test reflect-function-test --- Test reflect-object-class-test --- Test reflect-scope-test --- Test reflect-metadata-test --- Test dynlink-test --- Test detour-test --- Test serial-test --- Test configuration-test --- Test rb-loader-parser-test --- Test portability-path-test --- Test metacall-logs-test --- Test metacall-load-memory-test --- Test metacall-load-memory-empty-test --- Test metacall-load-configuration-test --- Test metacall-load-configuration-fail-test --- Test metacall-load-configuration-relative-test --- Test metacall-load-configuration-python-node-test --- Test metacall-load-configuration-node-python-test --- Test metacall-duplicated-handle-test --- Test metacall-duplicated-symbols-test --- Test metacall-handle-export-test --- Test metacall-handle-get-test --- Test metacall-test --- Test metacall-node-test --- Test metacall-node-event-loop-test --- Test metacall-node-event-loop-signal-test --- Test metacall-node-call-test --- Test metacall-node-inline-test --- Test metacall-node-async-test --- Test metacall-node-async-multiple-test --- Test metacall-node-reentrant-test --- Test metacall-node-port-test --- Test metacall-node-port-await-test --- Found LibGit2: /usr/lib/x86_64-linux-gnu/libgit2.so (found version "1.8.4") --- Test metacall-node-port-c-lib-test --- Test metacall-node-python-port-mock-test --- Test metacall-node-python-port-ruby-test --- Searching NodeJS library version 115 --- NodeJS Library Found --- Test metacall-node-python-ruby-test --- Test metacall-node-callback-test --- Test metacall-node-fail-test --- Test metacall-node-fail-env-var-test --- Test metacall-node-fail-load-leak-test --- Test metacall-node-typescript-test --- Test metacall-node-python-async-after-destroy-test --- Test metacall-node-python-await-test --- Test metacall-node-python-exception-test --- Test metacall-node-clear-mem-test --- Test metacall-node-async-resources-test --- Test metacall-node-await-chain-test --- Test metacall-node-exception-test --- Test metacall-node-python-deadlock-test --- Test metacall-node-native-code-test --- Test metacall-node-extension-test --- Searching NodeJS library version 115 --- NodeJS Library Found --- Script node_extension_test --- Test metacall-node-multithread-deadlock-test --- Test metacall-distributable-test --- Test metacall-cast-test --- Test metacall-init-fini-test --- Test metacall-ducktype-test --- Test metacall-inspect-test --- Test metacall-integration-test --- Test metacall-depends-test --- Test metacall-configuration-exec-path-test --- Test metacall-configuration-default-test --- Test metacall-clear-test --- Test metacall-python-test --- Test metacall-python-object-class-test --- Test metacall-python-gc-test --- Test metacall-python-open-test --- Test metacall-python-dict-test --- Test metacall-python-pointer-test --- Test metacall-python-reentrant-test --- Test metacall-python-varargs-test --- Test py-loader-port-test --- Test metacall-python-port-https-test --- Test metacall-python-port-callback-test --- Test metacall-python-port-pointer-test --- Test metacall-python-port-import-test --- Test metacall-python-callback-test --- Test metacall-python-fail-test --- Test metacall-python-relative-path-test --- Test metacall-python-without-functions-test --- Test metacall-python-builtins-test --- Test metacall-python-async-test --- Test metacall-python-exception-test --- Test metacall-python-without-env-vars-test --- Test metacall-map-test --- Test metacall-map-await-test --- Test metacall-initialize-test --- Test metacall-initialize-ex-test --- Test metacall-reinitialize-test --- Test metacall-initialize-destroy-multiple-test --- Test metacall-initialize-destroy-multiple-node-test --- Test metacall-reload-functions-test --- Test metacall-invalid-loader-test --- Test metacall-fork-test --- Test metacall-return-monad-test --- Test metacall-callback-complex-test --- Test metacall-ruby-fail-test --- Test metacall-ruby-fail-empty-test --- Test metacall-ruby-object-class-test --- Test metacall-ruby-parser-integration-test --- Test metacall-function-test --- Test metacall-cobol-test --- Test metacall-file-test --- Test metacall-file-fail-test --- Test metacall-file-glob-test --- Test metacall-typescript-test --- Test metacall-typescript-node-test --- Test metacall-typescript-call-map-test --- Test metacall-typescript-tsx-test --- Test metacall-typescript-tsx-loop-fail-test --- Test metacall-typescript-require-test --- Test metacall-typescript-jsx-default-test --- Test metacall-rpc-test --- Test metacall-csharp-static-class-test --- Test metacall-ruby-test --- Test metacall-cs-test --- Test metacall-java-test --- Test metacall-wasm-test --- Test metacall-wasm-python-port-test --- Test metacall-c-test --- Test metacall-c-lib-test --- Test metacall-version-test --- Test metacall-dynlink-path-test --- Test metacall-library-path-without-env-vars-test --- Test metacall-ext-test --- Test metacall-plugin-extension-test --- Test metacall-plugin-extension-local-test --- Test metacall-backtrace-plugin-test --- Test metacall-sandbox-plugin-test --- Could NOT find GBench (missing: GBENCH_INCLUDE_DIR GBENCH_LIBRARY) --- Install Google Benchmark v1.6.1 --- Benchmark log-bench --- Found Python3: /usr/include/python3.13d (found version "3.13.2") found components: Development Development.Module Development.Embed --- Benchmark metacall-py-c-api-bench --- Benchmark metacall-py-call-bench --- Benchmark metacall-py-init-bench --- Benchmark metacall-node-call-bench --- Benchmark metacall-rb-call-bench --- Benchmark metacall-cs-call-bench --- CLI metacallcli --- Searching NodeJS library version 115 --- NodeJS Library Found --- Plugin cli_repl_plugin --- Searching NodeJS library version 115 --- NodeJS Library Found --- Plugin cli_core_plugin --- Plugin cli_cmd_plugin --- Plugin cli_sandbox_plugin --- Example metacalllog --- Configuring done (84.4s) --- Generating done (1.1s) --- Build files have been written to: /usr/local/metacall/build -Removing intermediate container 84f6a9010292 - ---> d5122ec3833c -Step 11/11 : RUN cd $METACALL_PATH/build && $METACALL_PATH/tools/metacall-build.sh ${METACALL_BUILD_TYPE} ${METACALL_BUILD_OPTIONS} - ---> Running in 8fc0ef566964 -+ BUILD_TYPE=Release -+ BUILD_TESTS=0 -+ BUILD_BENCHMARKS=0 -+ BUILD_COVERAGE=0 -+ BUILD_INSTALL=0 -Current option settings -errexit on -noglob off -ignoreeof off -interactive off -monitor off -noexec off -stdin off -xtrace on -verbose off -vi off -emacs off -noclobber off -allexport off -notify off -nounset on -privileged off -nolog off -pipefail off -debug off -+ id -u -+ [ 0 = 0 ] -+ SUDO_CMD= -+ sub_options debug python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks -+ [ debug = debug ] -+ echo Build all scripts in debug mode -+ BUILD_TYPE=Debug -+ [ debug = release ] -+ [Build all scripts in debug mode - debug = relwithdebinfo ] -+ [ debug = tests ] -+ [ debug = benchmarks ] -+ [ debug = coverage ] -+ [ debug = install ] -+ [ python = debug ] -+ [ python = release ] -+ [ python = relwithdebinfo ] -+ [ python = tests ] -+ [ python = benchmarks ] -+ [ python = coverage ] -+ [ python = install ] -+ [ ruby = debug ] -+ [ ruby = release ] -+ [ ruby = relwithdebinfo ] -+ [ ruby = tests ] -+ [ ruby = benchmarks ] -+ [ ruby = coverage ] -+ [ ruby = install ] -+ [ netcore7 = debug ] -+ [ netcore7 = release ] -+ [ netcore7 = relwithdebinfo ] -+ [ netcore7 = tests ] -+ [ netcore7 = benchmarks ] -+ [ netcore7 = coverage ] -+ [ netcore7 = install ] -+ [ nodejs = debug ] -+ [ nodejs = release ] -+ [ nodejs = relwithdebinfo ] -+ [ nodejs = tests ] -+ [ nodejs = benchmarks ] -+ [ nodejs = coverage ] -+ [ nodejs = install ] -+ [ typescript = debug ] -+ [ typescript = release ] -+ [ typescript = relwithdebinfo ] -+ [ typescript = tests ] -+ [ typescript = benchmarks ] -+ [ typescript = coverage ] -+ [ typescript = install ] -+ [ file = debug ] -+ [ file = release ] -+ [ file = relwithdebinfo ] -+ [ file = tests ] -+ [ file = benchmarks ] -+ [ file = coverage ] -+ [ file = install ] -+ [ rpc = debug ] -+ [ rpc = release ] -+ [ rpc = relwithdebinfo ] -+ [ rpc = tests ] -+ [ rpc = benchmarks ] -+ [ rpc = coverage ] -+ [ rpc = install ] -+ [ wasm = debug ] -+ [ wasm = release ] -+ [ wasm = relwithdebinfo ] -+ [ wasm = tests ] -+ [ wasm = benchmarks ] -+ [ wasm = coverage ] -+ [ wasm = install ] -+ [ java = debug ] -+ [ java = release ] -+ [ java = relwithdebinfo ] -+ [ java = tests ] -+ [ java = benchmarks ] -+ [ java = coverage ] -+ [ java = install ] -+ [ c = debug ] -+ [ c = release ] -+ [ c = relwithdebinfo ] -+ [ c = tests ] -+ [ c = benchmarks ] -+ [ c = coverage ] -+ [ c = install ] -+ [ cobol = debug ] -+ [ cobol = release ] -+ [ cobol = relwithdebinfo ] -+ [ cobol = tests ] -+ [ cobol = benchmarks ] -+ [ cobol = coverage ] -+ [ cobol = install ] -+ [ go = debug ] -+ [ go = release ] -+ [ go = relwithdebinfo ] -+ [ go = tests ] -+ [ go = benchmarks ] -+ [ go = coverage ] -+ [ go = install ] -+ [ rust = debug ] -+ [ rust = release ] -+ [ rust = relwithdebinfo ] -+ [ rust = tests ] -+ [ rust = benchmarks ] -+ [ rust = coverage ] -+ [ rust = install ] -+ [ examples = debug ] -+ [ examples = release ] -+ [ examples = relwithdebinfo ] -+ [ examples = tests ] -+ [ examples = benchmarks ] -+ [ examples = coverage ] -+ [ examples = install ] -+ [ tests = debug ] -+ [ tests = release ] -+ [ tests = relwithdebinfo ] -+ [ tests = tests ] -+ echo Build and run all tests -+ BUILD_TESTS=1 -+ [ tests = benchmarks ] -+ [ tests = coverage ] -+ [ tests = install ] -+ [ scripts = debug ] -+ [ scripts = release ] -+ [ scripts = relwithdebinfo ] -+ [ scripts = tests ] -+ [ scripts = benchmarks ] -+ [ scripts = coverage ] -+ [ scripts = install ] -+ [ ports = debug ] -+ [ ports = release ] -+ [ ports = relwithdebinfo ] -+ [ ports = tests ] -+ [ ports = benchmarks ] -+ [ ports = coverage ] -+ [ ports = install ] -+ [ install = debug ] -+ [ install = release ] -+ [ install = relwithdebinfo ] -+ [ install = tests ] -+ Build and run all tests -[ install = benchmarks ] -+ [ install = coverage ] -+ [ install = install ] -+ echo Install all libraries -+ BUILD_INSTALL=1 -+ [ pack = debug ] -+ [ pack = release ] -+ [ pack = relwithdebinfo ] -+ [ pack = tests ] -+ [ pack = benchmarks ] -+ [ pack = coverage ] -+ [ pack = install ] -+ [ sandbox = debug ] -+ [ sandbox = release ] -+ [ sandbox = relwithdebinfo ] -+ [ sandbox = tests ] -+ [ sandbox = benchmarks ] -+ [ sandbox = coverage ] -+ [ sandbox = install ] -+ [ benchmarks = debug ] -+ [ benchmarks = release ] -+ [ benchmarks = relwithdebinfo ] -+ [ benchmarks = tests ] -+ [ benchmarks = benchmarks ] -+ echo Build and run all benchmarks -+ BUILD_BENCHMARKS=1 -+ [ benchmarks = coverage ] -+ [ benchmarks = install ] -+ sub_build -Install all libraries -Build and run all benchmarks -+ getconf _NPROCESSORS_ONLN -+ make -j24 -[ 0%] Building C object source/version/CMakeFiles/version.dir/source/version.c.o -Installing node_loader_bootstrap dependencies -[ 0%] Creating directories for 'libtcc-depends' -[ 0%] Building CXX object source/scripts/c/loadtest/CMakeFiles/loadtest.dir/source/loadtest.cpp.o -[ 1%] Building CXX object _deps/backwardcpp-build/CMakeFiles/backward.dir/backward.cpp.o -[ 2%] Building C object source/metacall/CMakeFiles/metacall.dir/__/version/source/version.c.o -[ 3%] Swig compile /usr/local/metacall/source/ports/rb_port/interface/rb_port/rb_port.i for ruby -Installing ts_loader_bootstrap dependencies -[ 3%] Built target c-ffi -[ 3%] Building CXX object _deps/backwardcpp-build/CMakeFiles/backward_object.dir/backward.cpp.o -[ 3%] Built target c-cbks -[ 3%] Built target c-compiled -[ 3%] Built target file-glob -[ 3%] Built target csharp-function -[ 3%] Built target file-static -[ 3%] Built target file-favicon -[ 3%] Built target sandbox_plugin_config -[ 3%] Built target c-loadtest -[ 3%] Built target backtrace_plugin_config -[ 3%] Built target csharp-static -[ 3%] Built target csharp-hello -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/preprocessor/source/preprocessor.c.o -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment.c.o -[ 3%] Performing download step (download, verify and extract) for 'libtcc-depends' --- Downloading... - dst='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' - timeout='none' - inactivity timeout='none' --- Using src='https://github.com/metacall/tinycc/archive/6ec4a10.tar.gz' -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment_variable.c.o -[ 3%] Built target java-test -[ 3%] Built target java-jartest -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/environment/source/environment_variable_path.c.o -[ 3%] Built target nodejs-nod -[ 3%] Built target java-fibonnaci -[ 3%] Linking CXX shared library ../../libversiond.so -[ 3%] Built target nodejs-inline -[ 3%] Built target nodejs-server -[ 3%] Built target nodejs-factcallback -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/format/source/format.c.o -[ 3%] Built target nodejs-host -[ 3%] Built target nodejs-export -[ 3%] Built target nodejs-derpyramda -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading.c.o -[ 3%] Built target python-example -[ 3%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading_thread_id.c.o -[ 3%] Built target nodejs-duplicated -[ 3%] Built target python-callback -[ 3%] Built target python-initfini -[ 3%] Built target python-ducktype -[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/threading/source/threading_mutex_pthread.c.o -[ 4%] Built target version -[ 4%] Built target python-function -[ 4%] Built target python-helloworld -[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log.c.o -[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_map.c.o -[ 4%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_valid_size.c.o -[ 4%] Built target cobol-say -[ 5%] Linking CXX shared library ../../../../scripts/libloadtest.so -[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_level.c.o -[ 5%] Built target python-garbage -[ 5%] Built target python-rsasample -[ 5%] Built target python-classname -/usr/local/metacall/source/metacall/include/metacall/metacall.h:61: Warning 801: Wrong class name (corrected to `Metacall_initialize_configuration_type') -/usr/local/metacall/source/metacall/include/metacall/metacall.h:61: Warning 801: Wrong class name (corrected to `Metacall_initialize_configuration_type') -/usr/local/metacall/source/metacall/include/metacall/metacall.h:62: Warning 451: Setting a const char * variable may leak memory. -/usr/local/metacall/source/metacall/include/metacall/metacall.h:69: Warning 801: Wrong class name (corrected to `Metacall_await_callbacks') -/usr/local/metacall/source/metacall/include/metacall/metacall.h:69: Warning 801: Wrong class name (corrected to `Metacall_await_callbacks') -[ 5%] Built target python-web -/usr/local/metacall/source/metacall/include/metacall/metacall.h:76: Warning 801: Wrong class name (corrected to `Metacall_version_type') -/usr/local/metacall/source/metacall/include/metacall/metacall.h:76: Warning 801: Wrong class name (corrected to `Metacall_version_type') -[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_record.c.o -[ 5%] Built target python-model - -/usr/local/metacall/source/metacall/include/metacall/metacall.h:80: Warning 451: Setting a const char * variable may leak memory. -Welcome to .NET 7.0! ---------------------- -SDK Version: 7.0.410 - ----------------- -Installed an ASP.NET Core HTTPS development certificate. -To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). -Learn about HTTPS: https://aka.ms/dotnet-https ----------------- -Write your first app: https://aka.ms/dotnet-hello-world -Find out what's new: https://aka.ms/dotnet-whats-new -Explore documentation: https://aka.ms/dotnet-docs -Report issues and find source on GitHub: https://github.com/dotnet/core -Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli --------------------------------------------------------------------------------------- -/usr/local/metacall/source/metacall/include/metacall/metacall.h:81: Warning 451: Setting a const char * variable may leak memory. -/usr/local/metacall/source/metacall/include/metacall/metacall.h:82: Warning 451: Setting a const char * variable may leak memory. -[ 5%] Built target python-landing -[ 5%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_handle.c.o -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy.c.o -[ 6%] Built target python-dicty -[ 6%] Built target python-pointer -[ 6%] Built target python-s1 -[ 6%] Built target python-host -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect.c.o -[ 6%] Built target python-s2 -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_singleton.c.o -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_impl.c.o -[ 6%] Built target python-withoutfunctions -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format.c.o -[ 6%] Built target python-wasm -[ 6%] Built target rb_port_swig_compilation -[ 6%] Built target python-badimport -[ 6%] Built target loadtest -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_binary.c.o -[ 6%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_custom.c.o -[ 6%] Built target python-fnmesh -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule.c.o -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_format_text.c.o -[ 7%] Built target ruby-hello -[ 7%] Built target python-watzon -[ 7%] Built target ruby-second -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule_async.c.o -[ 7%] Built target ruby-blog -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_schedule_sync.c.o -[ 7%] Built target ruby-ducktype -[ 7%] Built target ruby-invalid -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage.c.o -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage_batch.c.o -[ 7%] Built target ruby-klass -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_storage_sequential.c.o -[ 7%] Built target ruby-failempty -[ 7%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream.c.o -[ 7%] Built target ruby-cache -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_file.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_custom.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_nginx.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_socket.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_stdio.c.o -[ 8%] Built target rpc-remote -[ 8%] Built target typescript-typedfunc -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_format.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_policy_stream_syslog.c.o -[ 8%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_schedule.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_storage.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/log/source/log_aspect_stream.c.o -[ 9%] Built target typescript-loopfail -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_std_impl.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_nginx.c.o -[ 9%] Built target typescript-badrequire -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_std.c.o -[ 9%] Built target typescript-server -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/memory/source/memory_allocator_nginx_impl.c.o -[ 9%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability.c.o --- verifying file... - file='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' --- Downloading... done -[ 9%] Creating directories for 'google-test-depends' -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_executable_path.c.o -[ 10%] Building C object source/tests/metacall_node_extension_test/node_extension_test/CMakeFiles/node_extension_test.dir/source/node_extension_test.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_working_path.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_atexit.c.o -[ 10%] Built target wasm-tests -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_library_path.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_path.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/portability/source/portability_dependency.c.o -[ 10%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_comparable.c.o -[ 11%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_hash.c.o --- extracting... - src='http://github.com/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/tinycc.tar.gz' - dst='/usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/libtcc-depends' --- extracting... [tar xfz] -[ 12%] Performing download step (git clone) for 'google-test-depends' -[ 12%] Linking CXX shared module ../../../../node_extension_test.node -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_set.c.o -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_map.c.o -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_bucket.c.o -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_vector.c.o -Cloning into 'google-test-depends'... --- extracting... [analysis] --- extracting... [rename] --- extracting... [clean up] --- extracting... done -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem.c.o -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem_file_descriptor.c.o -[ 12%] Building C object source/metacall/CMakeFiles/metacall.dir/__/adt/source/adt_trie.c.o -[ 13%] Creating directories for 'google-bench-depends' -[ 13%] No update step for 'libtcc-depends' -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/filesystem/source/filesystem_directory_descriptor.c.o -[ 14%] Built target metacallcli-scripts-tests -[ 14%] Performing download step (download, verify and extract) for 'google-bench-depends' --- Downloading... - dst='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' - timeout='none' - inactivity timeout='none' --- Using src='https://github.com/google/benchmark/archive/v1.6.1.tar.gz' -[ 14%] No patch step for 'libtcc-depends' -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink.c.o -[ 14%] Built target cli_core_plugin_config -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_impl.c.o -[ 14%] Built target cli_sandbox_plugin_config -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_interface.c.o -[ 14%] Performing configure step for 'libtcc-depends' -[ 14%] Building C object source/preprocessor/CMakeFiles/preprocessor.dir/source/preprocessor.c.o -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin.c.o -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/dynlink/source/dynlink_impl_unix.c.o -[ 14%] Building C object source/format/CMakeFiles/format.dir/source/format.c.o - -up to date, audited 5 packages in 658ms - -1 package is looking for funding - run `npm fund` for details - -found 0 vulnerabilities -[ 14%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_descriptor.c.o -[ 14%] Linking CXX shared library ../../libpreprocessord.so -[ 14%] Built target node_loader_bootstrap_depends -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_loader.c.o -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_impl.c.o -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/plugin/source/plugin_manager.c.o -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/detour/source/detour.c.o -Binary directory /usr/local/metacall/build/libtcc/bin -TinyCC directory /usr/local/metacall/build/libtcc/lib/tcc -Library directory /usr/local/metacall/build/libtcc/lib -Include directory /usr/local/metacall/build/libtcc/include -Manual directory /usr/local/metacall/build/libtcc/share/man -Info directory /usr/local/metacall/build/libtcc/share/info -Doc directory /usr/local/metacall/build/libtcc/share/doc -Source path /usr/local/metacall/build/source/loaders/c_loader/libtcc-depends-prefix/src/libtcc-depends - -up to date, audited 3 packages in 530ms -Build OS Linux x86_64 -C compiler gcc (14.2) -Target OS Linux -CPU x86_64 -Triplet x86_64-linux-gnu -Config debug static=no selinux -Creating config.mak and config.h -[ 15%] Linking CXX shared library ../../libformatd.so - -found 0 vulnerabilities -[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading.c.o -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect.c.o -[ 15%] Built target preprocessor -Copying node_loader_bootstrap dependencies -[ 15%] Built target ts_loader_bootstrap_depends -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_type.c.o -[ 15%] Performing build step for 'libtcc-depends' -make[3]: warning: -j24 forced in submake: resetting jobserver mode. -[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading_thread_id.c.o -[ 15%] Building C object source/threading/CMakeFiles/threading.dir/source/threading_mutex_pthread.c.o -[ 15%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_type_id.c.o -[ 16%] Building C object source/environment/CMakeFiles/environment.dir/source/environment.c.o -[ 16%] Built target node_extension_test -[ 16%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_signature.c.o -[ 16%] Linking CXX shared library ../../libthreadingd.so -[ 16%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_function.c.o -[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_attribute.c.o -[ 17%] Built target format -node_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/node_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules -[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_constructor.c.o -[ 17%] Building C object source/environment/CMakeFiles/environment.dir/source/environment_variable.c.o -[ 17%] Built target node_loader_bootstrap_copy_depends -[ 17%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_memory_tracker.c.o -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability.c.o - -up to date, audited 2 packages in 754ms - -found 0 vulnerabilities -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_executable_path.c.o -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_library_path.c.o --- verifying file... - file='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' --- Downloading... done -[ 18%] Built target nodejs-ramda-depends -[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_method.c.o -[ 18%] Built target threading -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_working_path.c.o -[ 18%] Building C object source/environment/CMakeFiles/environment.dir/source/environment_variable_path.c.o --- extracting... - src='http://github.com/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/GBench-1.6.1.tar.gz' - dst='/usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/google-bench-depends' --- extracting... [tar xfz] -[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_class_visibility.c.o -[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_object.c.o -[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_class.c.o -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_path.c.o --- extracting... [analysis] --- extracting... [rename] --- extracting... [clean up] --- extracting... done -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_atexit.c.o -[ 18%] Building C object source/portability/CMakeFiles/portability.dir/source/portability_dependency.c.o -[ 18%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_future.c.o -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_exception.c.o -[ 18%] Linking CXX shared library ../../libenvironmentd.so -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_throwable.c.o -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_context.c.o -[ 19%] No update step for 'google-bench-depends' -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_scope.c.o -[ 19%] Built target node_loader_bootstrap -Note: /usr/local/metacall/source/loaders/java_loader/bootstrap/lib/bootstrap.java uses or overrides a deprecated API. -Note: Recompile with -Xlint:deprecation for details. -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value.c.o -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type.c.o -[ 19%] Built target nodejs-ramda -[ 19%] Built target java_loader_bootstrap -[ 19%] No patch step for 'google-bench-depends' - -up to date, audited 49 packages in 1s -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_id_size.c.o - -1 moderate severity vulnerability - -To address all issues, run: - npm audit fix - -Run `npm audit` for details. -[ 19%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_promotion.c.o -[ 19%] Built target environment -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_demotion.c.o -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/reflect/source/reflect_value_type_cast.c.o -[ 20%] Built target nodejs-gram-depends -[ 20%] Performing configure step for 'google-bench-depends' -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/serial/source/serial.c.o -CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): - Compatibility with CMake < 3.10 will be removed from a future version of - CMake. - - Update the VERSION argument value. Or, use the ... syntax - to tell CMake that the project requires at least but has been updated - to work with policies introduced by or earlier. - - -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration.c.o -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_singleton.c.o -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_impl.c.o -[ 20%] Building C object source/metacall/CMakeFiles/metacall.dir/__/configuration/source/configuration_object.c.o -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader.c.o -[ 21%] Linking CXX shared library ../../libportabilityd.so -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_host.c.o -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_manager_impl.c.o - Determining projects to restore... -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/__/loader/source/loader_impl.c.o --- The CXX compiler identification is GNU 14.2.0 -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall.c.o --- Detecting CXX compiler ABI info -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_log.c.o -[ 21%] Built target portability -[ 21%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_allocator.c.o -[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_value.c.o -[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_error.c.o -[ 22%] Built target backward_object -[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_link.c.o -[ 22%] Building C object source/metacall/CMakeFiles/metacall.dir/source/metacall_fork.c.o -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log.c.o -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_valid_size.c.o -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_map.c.o - -up to date, audited 7 packages in 1s - -found 0 vulnerabilities -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_record.c.o -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_level.c.o -[ 22%] Building C object source/log/CMakeFiles/log.dir/source/log_handle.c.o -[ 22%] Linking CXX shared library ../../libbackward.so -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy.c.o -[ 23%] Built target typescript-templating-depends -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_impl.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_singleton.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_binary.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_custom.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_format_text.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule.c.o -[ 23%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule_sync.c.o -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_schedule_async.c.o --- Detecting CXX compiler ABI info - done -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage_batch.c.o -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage.c.o -[ 24%] Built target nodejs-gram -[ 24%] Built target typescript-templating --- Check for working CXX compiler: /usr/bin/c++ - skipped --- Detecting CXX compile features --- Detecting CXX compile features - done -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_custom.c.o -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream.c.o -[ 24%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_storage_sequential.c.o --- Failed to find LLVM FileCheck -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_nginx.c.o -[ 25%] Built target backward -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_file.c.o --- Found Git: /usr/bin/git (found version "2.47.2") --- git version: v0.0.0 normalized to 0.0.0 --- Version: 1.6.1 -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_socket.c.o --- Looking for shm_open in rt -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_syslog.c.o -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_policy_stream_stdio.c.o -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_storage.c.o -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_schedule.c.o -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_format.c.o -[ 25%] Building C object source/log/CMakeFiles/log.dir/source/log_aspect_stream.c.o -[ 26%] Linking CXX shared library ../../liblogd.so - -> ts_loader_bootstrap@1.1.0 build -> tsc - --- Looking for shm_open in rt - found --- Performing Test HAVE_CXX_FLAG_STD_CXX11 -[ 26%] Built target log -[ 26%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_nginx.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_hash.c.o -[ 26%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_bucket.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_set.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_trie.c.o -[ 26%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_map.c.o -[ 27%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink.c.o -[ 27%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_impl.c.o -[ 27%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_comparable.c.o -[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_std.c.o -[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory.c.o -[ 27%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_nginx_impl.c.o -[ 28%] Building C object source/adt/CMakeFiles/adt.dir/source/adt_vector.c.o -[ 28%] Building C object source/memory/CMakeFiles/memory.dir/source/memory_allocator_std_impl.c.o -[ 28%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_impl_unix.c.o -[ 28%] Building C object source/dynlink/CMakeFiles/dynlink.dir/source/dynlink_interface.c.o --- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success --- Performing Test HAVE_CXX_FLAG_WALL - -added 15 packages in 2s - -1 package is looking for funding - run `npm fund` for details -[ 28%] Linking CXX shared library ../../libmemoryd.so -[ 28%] Linking CXX shared library ../../libdynlinkd.so -[ 28%] Built target metacall-python-open-test-depends -[ 28%] Built target memory -[ 28%] Built target dynlink --- Performing Test HAVE_CXX_FLAG_WALL - Success --- Performing Test HAVE_CXX_FLAG_WEXTRA -[ 28%] Linking CXX shared library ../../libmetacalld.so -[ 28%] Linking CXX shared library ../../libadtd.so -[ 28%] Built target adt -[ 28%] Built target metacall -[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem_directory_descriptor.c.o -[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem.c.o -[ 28%] Building C object source/loaders/cob_loader/CMakeFiles/cob_loader.dir/source/cob_loader.c.o -[ 28%] Building CXX object source/loaders/cob_loader/CMakeFiles/cob_loader.dir/source/cob_loader_impl.cpp.o -[ 28%] Building C object source/filesystem/CMakeFiles/filesystem.dir/source/filesystem_file_descriptor.c.o -[ 29%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin.c.o -[ 30%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial.c.o -[ 30%] Building C object source/loaders/rpc_loader/CMakeFiles/rpc_loader.dir/source/rpc_loader.c.o -[ 30%] Building C object source/loaders/mock_loader/CMakeFiles/mock_loader.dir/source/mock_loader.c.o -[ 30%] Building C object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader.c.o -[ 30%] Building C object source/loaders/java_loader/CMakeFiles/java_loader.dir/source/java_loader.c.o -[ 30%] Building C object source/loaders/ext_loader/CMakeFiles/ext_loader.dir/source/ext_loader.c.o -[ 30%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect.c.o -[ 30%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader.c.o -[ 30%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/source/plthook_detour.c.o --- Performing Test HAVE_CXX_FLAG_WEXTRA - Success --- Performing Test HAVE_CXX_FLAG_WSHADOW -[ 30%] Building C object source/serials/rapid_json_serial/CMakeFiles/rapid_json_serial.dir/source/rapid_json_serial.c.o -[ 30%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader.c.o -[ 30%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader.c.o -[ 30%] Building C object source/loaders/file_loader/CMakeFiles/file_loader.dir/source/file_loader.c.o -[ 31%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_impl.cpp.o -[ 31%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_port.cpp.o -[ 31%] Building CXX object source/loaders/rpc_loader/CMakeFiles/rpc_loader.dir/source/rpc_loader_impl.cpp.o -[ 31%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl.c.o -[ 31%] Building CXX object source/loaders/java_loader/CMakeFiles/java_loader.dir/source/java_loader_impl.cpp.o -[ 31%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader_impl.c.o -[ 31%] Building C object source/loaders/file_loader/CMakeFiles/file_loader.dir/source/file_loader_impl.c.o -[ 31%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_type.c.o -[ 31%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_type_id.c.o -[ 32%] Building CXX object source/loaders/ext_loader/CMakeFiles/ext_loader.dir/source/ext_loader_impl.cpp.o -[ 32%] Building CXX object source/serials/rapid_json_serial/CMakeFiles/rapid_json_serial.dir/source/rapid_json_serial_impl.cpp.o -[ 33%] Linking CXX shared library ../../libfilesystemd.so -[ 33%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/source/plthook_detour_impl.c.o -[ 33%] Building C object source/loaders/rb_loader/CMakeFiles/rb_loader.dir/source/rb_loader_impl_parser.c.o -[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_descriptor.c.o -[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_impl.c.o -[ 33%] Building C object source/loaders/mock_loader/CMakeFiles/mock_loader.dir/source/mock_loader_impl.c.o --- Performing Test HAVE_CXX_FLAG_WSHADOW - Success --- Performing Test HAVE_CXX_FLAG_WERROR -[ 33%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl_serialize.c.o -[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_signature.c.o -[ 33%] Built target filesystem -[ 33%] Building C object source/detours/plthook_detour/CMakeFiles/plthook_detour.dir/plthook/plthook_elf.c.o -[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_function.c.o -[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_impl.c.o -[ 33%] Linking CXX shared module ../../../libmock_loaderd.so -[ 33%] Building CXX object source/extensions/plugin_extension/CMakeFiles/plugin_extension.dir/source/plugin_extension.cpp.o -[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_function.c.o -[ 33%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_impl.c.o --- Performing Test HAVE_CXX_FLAG_WERROR - Success -[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_loader.c.o --- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE -[ 33%] Building C object source/loaders/wasm_loader/CMakeFiles/wasm_loader.dir/source/wasm_loader_handle.c.o -[ 33%] Built target mock_loader -[ 33%] Linking CXX shared module ../../../libfile_loaderd.so -[ 33%] Building C object source/serials/metacall_serial/CMakeFiles/metacall_serial.dir/source/metacall_serial_impl_deserialize.c.o -[ 33%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_attribute.c.o -[ 33%] Building C object source/ports/rb_port/CMakeFiles/rb_port.dir/__/__/__/rb_portRUBY_wrap.c.o -[ 33%] Building C object source/ports/rb_port/CMakeFiles/rb_port.dir/source/rb_port.c.o -[ 33%] Building C object source/plugin/CMakeFiles/plugin.dir/source/plugin_manager.c.o -[ 33%] Building CXX object source/loaders/node_loader/CMakeFiles/node_loader.dir/source/node_loader_trampoline.cpp.o -[ 33%] Built target file_loader -HEAD is now at e2239ee6 Googletest export -[ 33%] Linking CXX shared module ../../../libplthook_detourd.so -[ 34%] Building CXX object source/scripts/extension/sum/CMakeFiles/sum_extension.dir/source/sum_extension.cpp.o --- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success --- Performing Test HAVE_CXX_FLAG_PEDANTIC -[ 34%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_constructor.c.o -[ 35%] Building CXX object source/examples/metacalllog/CMakeFiles/metacalllog.dir/main.cpp.o -[ 35%] Linking CXX shared module ../../../libcob_loaderd.so -[ 35%] Built target plthook_detour -[ 35%] Linking CXX shared module ../../../libmetacall_seriald.so -[ 35%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_port.c.o -[ 35%] Linking CXX shared library ../../libplugind.so -[ 36%] Linking CXX shared module ../../../libwasm_loaderd.so -[ 36%] No update step for 'google-test-depends' -Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing) -[ 36%] Built target rs_port_bindings --- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success --- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS -[ 36%] Building CXX object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_threading.cpp.o -[ 36%] Linking CXX executable ../../../metacalllogd -[ 36%] No patch step for 'google-test-depends' -[ 36%] Built target metacall_serial -[ 37%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_memory_tracker.c.o -[ 37%] Built target plugin -[ 37%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_method.c.o -[ 37%] Built target cob_loader -[ 38%] Building C object source/loaders/py_loader/CMakeFiles/py_loader.dir/source/py_loader_dict.c.o -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_class_visibility.c.o -[ 38%] Performing configure step for 'google-test-depends' -CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required): - Compatibility with CMake < 3.10 will be removed from a future version of - CMake. - - Update the VERSION argument value. Or, use the ... syntax - to tell CMake that the project requires at least but has been updated - to work with policies introduced by or earlier. - - -[ 38%] Built target wasm_loader -[ 38%] Linking CXX shared module ../../../librb_loaderd.so -[ 38%] Building C object source/detour/CMakeFiles/detour.dir/source/detour.c.o -[ 38%] Built target metacalllog -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_class.c.o -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_object.c.o -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_future.c.o --- The C compiler identification is GNU 14.2.0 --- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success --- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 -[ 38%] Built target rb_loader -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_exception.c.o - Downloading crates ... -[ 38%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_throwable.c.o -/usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp: In function 'char* rapidjson::internal::Prettify(char*, int, int, int)': -/usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:561:1: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] - 561 | } - | ^ -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_scope.c.o -In file included from /usr/include/python3.13d/internal/pycore_mimalloc.h:45, - from /usr/include/python3.13d/internal/pycore_interp.h:31, - from /usr/include/python3.13d/internal/pycore_runtime.h:17, - from /usr/include/python3.13d/internal/pycore_emscripten_trampoline.h:4, - from /usr/include/python3.13d/internal/pycore_object.h:13, - from /usr/include/python3.13d/internal/pycore_dict.h:13, - from /usr/local/metacall/source/loaders/py_loader/source/py_loader_dict.c:32: -/usr/include/python3.13d/internal/mimalloc/mimalloc/internal.h:90:12: warning: redundant redeclaration of '_mi_os_purge' [-Wredundant-decls] - 90 | bool _mi_os_purge(void* p, size_t size, mi_stats_t* stats); - | ^~~~~~~~~~~~ -/usr/include/python3.13d/internal/mimalloc/mimalloc/internal.h:84:12: note: previous declaration of '_mi_os_purge' with type '_Bool(void *, size_t, mi_stats_t *)' {aka '_Bool(void *, long unsigned int, struct mi_stats_s *)'} - 84 | bool _mi_os_purge(void* p, size_t size, mi_stats_t* stats); - | ^~~~~~~~~~~~ -/usr/include/python3.13d/internal/pycore_object.h: In function '_PyObject_HasDeferredRefcount': -/usr/include/python3.13d/internal/pycore_object.h:204:41: warning: unused parameter 'op' [-Wunused-parameter] - 204 | _PyObject_HasDeferredRefcount(PyObject *op) - | ~~~~~~~~~~^~ -/usr/include/python3.13d/internal/pycore_dict.h: In function '_PyDict_NotifyEvent': -/usr/include/python3.13d/internal/pycore_dict.h:273:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] - 273 | int watcher_bits = mp->ma_version_tag & DICT_WATCHER_MASK; - | ^~~ -In file included from /usr/include/python3.13d/dictobject.h:101, - from /usr/include/python3.13d/Python.h:90, - from /usr/local/metacall/source/loaders/py_loader/include/py_loader/py_loader_dict.h:26, - from /usr/local/metacall/source/loaders/py_loader/source/py_loader_dict.c:21: -/usr/include/python3.13d/cpython/dictobject.h:25:34: note: declared here - 25 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; - | ^~~~~~~~~~~~~~ -/usr/include/python3.13d/internal/pycore_dict.h:278:5: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations] - 278 | return DICT_NEXT_VERSION(interp) | (mp->ma_version_tag & DICT_WATCHER_AND_MODIFICATION_MASK); - | ^~~~~~ -/usr/include/python3.13d/cpython/dictobject.h:25:34: note: declared here - 25 | Py_DEPRECATED(3.12) uint64_t ma_version_tag; - | ^~~~~~~~~~~~~~ -[ 39%] Linking CXX shared library ../../libdetourd.so - Downloaded proc-macro2 v1.0.92 - Downloaded unicode-ident v1.0.14 - Downloaded quote v1.0.37 --- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed --- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value.c.o --- The CXX compiler identification is GNU 14.2.0 -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_context.c.o --- Detecting C compiler ABI info -[ 39%] Built target detour -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type.c.o -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_id_size.c.o - Compiling proc-macro2 v1.0.92 -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_promotion.c.o -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_demotion.c.o -[ 39%] Building C object source/reflect/CMakeFiles/reflect.dir/source/reflect_value_type_cast.c.o -[ 39%] Linking CXX shared module ../../../rb_portd.so - Compiling unicode-ident v1.0.14 - Compiling metacall v0.4.2 (/usr/local/metacall/source/ports/rs_port) - Restored /usr/local/metacall/source/loaders/cs_loader/netcore/source/project.csproj (in 3.59 sec). -[ 39%] Built target rb_port --- Detecting C compiler ABI info - done --- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success --- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS --- Check for working C compiler: /usr/bin/cc - skipped --- Detecting C compile features --- Detecting C compile features - done -[ 39%] Linking CXX shared module ../../../../libsum_extensiond.so --- Detecting CXX compiler ABI info -[ 40%] Linking CXX shared module ../../../libjava_loaderd.so -[ 41%] Linking CXX shared library ../../libreflectd.so -[ 41%] Built target sum_extension --- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success --- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED --- Detecting CXX compiler ABI info - done -[ 41%] Built target java_loader -[ 41%] Built target reflect --- Check for working CXX compiler: /usr/bin/c++ - skipped --- Detecting CXX compile features --- Detecting CXX compile features - done -[ 41%] Building C object source/serial/CMakeFiles/serial.dir/source/serial.c.o -CMake Deprecation Warning at googlemock/CMakeLists.txt:45 (cmake_minimum_required): - Compatibility with CMake < 3.10 will be removed from a future version of - CMake. - - Update the VERSION argument value. Or, use the ... syntax - to tell CMake that the project requires at least but has been updated - to work with policies introduced by or earlier. - - -CMake Deprecation Warning at googletest/CMakeLists.txt:56 (cmake_minimum_required): - Compatibility with CMake < 3.10 will be removed from a future version of - CMake. - - Update the VERSION argument value. Or, use the ... syntax - to tell CMake that the project requires at least but has been updated - to work with policies introduced by or earlier. - - -[ 41%] Performing install step for 'libtcc-depends' --> /usr/local/metacall/build/libtcc/bin : tcc --> /usr/local/metacall/build/libtcc/lib/tcc : libtcc1.a runmain.o bt-exe.o bt-log.o bcheck.o --> /usr/local/metacall/build/libtcc/lib/tcc/include : ./include/*.h ./tcclib.h --> /usr/local/metacall/build/libtcc/lib : libtcc.so --> /usr/local/metacall/build/libtcc/include : ./libtcc.h --- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success --- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING --> /usr/local/metacall/build/libtcc/share/man/man1 : tcc.1 -[ 41%] Linking CXX shared library ../../libseriald.so -[ 42%] No test step for 'libtcc-depends' -[ 42%] Built target serial -[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_impl.c.o -[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration.c.o -[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_singleton.c.o -[ 43%] Building C object source/configuration/CMakeFiles/configuration.dir/source/configuration_object.c.o -[ 43%] Completed 'libtcc-depends' --- Found Python: /usr/bin/python3 (found version "3.13.2") found components: Interpreter -[ 43%] Linking CXX shared module ../../../libplugin_extensiond.so --- Performing Test CMAKE_HAVE_LIBC_PTHREAD --- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success --- Performing Test HAVE_CXX_FLAG_WD654 -[ 43%] Built target libtcc-depends --- Performing Test HAVE_CXX_FLAG_WD654 - Failed --- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY -[ 43%] Building CXX object source/loaders/c_loader/CMakeFiles/c_loader.dir/source/c_loader_impl.cpp.o -[ 43%] Building C object source/loaders/c_loader/CMakeFiles/c_loader.dir/source/c_loader.c.o -[ 43%] Built target plugin_extension -[ 43%] Building CXX object source/plugins/sandbox_plugin/CMakeFiles/sandbox_plugin.dir/source/sandbox_plugin.cpp.o -[ 43%] Building CXX object source/plugins/backtrace_plugin/CMakeFiles/backtrace_plugin.dir/source/backtrace_plugin.cpp.o --- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success --- Found Threads: TRUE -[ 43%] Linking CXX shared library ../../libconfigurationd.so --- Configuring done (2.0s) -[ 43%] Built target ts_loader_bootstrap_build --- Generating done (0.0s) --- Build files have been written to: /usr/local/metacall/build/source/tests/src/google-test-depends-build --- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed --- Performing Test HAVE_CXX_FLAG_COVERAGE -[ 43%] Performing build step for 'google-test-depends' -Copying ts_loader_bootstrap dependencies -In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', - inlined from 'void node_loader_impl_destroy_cb(loader_impl_node)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4349:94, - inlined from 'void node_loader_impl_destroy_prepare_cb(uv_prepare_t*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4370:29: -/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] - 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; - | ^~~~~~~~~~~~~~~~~~~~ -In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', - inlined from 'void node_loader_impl_destroy_cb(loader_impl_node)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4349:94, - inlined from 'void node_loader_impl_destroy_check_cb(uv_check_t*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4377:29: -/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] - 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; - | ^~~~~~~~~~~~~~~~~~~~ - Compiling quote v1.0.37 -[ 43%] Built target configuration -MSBuild version 17.7.6+77d58ec69 for .NET -[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_impl.c.o -[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader.c.o -[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_host.c.o -[ 43%] Building C object source/loader/CMakeFiles/loader.dir/source/loader_manager_impl.c.o --- Performing Test HAVE_CXX_FLAG_COVERAGE - Success --- Performing Test HAVE_STD_REGEX --- Performing Test HAVE_STD_REGEX -In file included from /usr/local/include/rapidjson/writer.h:23, - from /usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:21: -In function 'char* rapidjson::internal::WriteExponent(int, char*)', - inlined from 'char* rapidjson::internal::Prettify(char*, int, int, int)' at /usr/local/include/rapidjson/internal/dtoa.h:216:29, - inlined from 'char* rapidjson::internal::dtoa(double, char*, int)' at /usr/local/include/rapidjson/internal/dtoa.h:238:24, - inlined from 'char* rapidjson::internal::dtoa(double, char*, int)' at /usr/local/include/rapidjson/internal/dtoa.h:220:14, - inlined from 'bool rapidjson::Writer::WriteDouble(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:579:31, - inlined from 'bool rapidjson::Writer::WriteDouble(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:552:13, - inlined from 'bool rapidjson::Writer::Double(double) [with OutputStream = rapidjson::GenericStringBuffer >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator; unsigned int writeFlags = 0]' at /usr/local/include/rapidjson/writer.h:195:83, - inlined from 'bool rapidjson::GenericValue::Accept(Handler&) const [with Handler = rapidjson::Writer > >; Encoding = rapidjson::UTF8<>; Allocator = rapidjson::MemoryPoolAllocator]' at /usr/local/include/rapidjson/document.h:1979:58: -/usr/local/include/rapidjson/internal/dtoa.h:131:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] - 131 | if (K < 0) { - | ^~ -/usr/local/include/rapidjson/internal/dtoa.h:136:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] - 136 | if (K >= 100) { - | ^~ -ts_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/ts_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules -[ 43%] Built target ts_loader_bootstrap -[ 43%] Linking CXX shared module ../../../libpy_loaderd.so - Compiling metacall-inline v0.2.0 (/usr/local/metacall/source/ports/rs_port/inline) -[ 43%] Built target py_loader -[ 44%] Linking CXX shared module ../../../librpc_loaderd.so - Determining projects to restore... -[ 44%] Linking CXX shared library ../../libloaderd.so -[ 44%] Built target rpc_loader -[ 44%] Built target loader -[ 44%] Linking CXX shared module ../../../libext_loaderd.so -[ 44%] Built target ext_loader -In file included from /usr/local/include/rapidjson/reader.h:26, - from /usr/local/include/rapidjson/document.h:20, - from /usr/local/metacall/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp:18: -In function 'double rapidjson::internal::FastPath(double, int)', - inlined from 'double rapidjson::internal::StrtodNormalPrecision(double, int)' at /usr/local/include/rapidjson/internal/strtod.h:41:21, - inlined from 'void rapidjson::GenericReader::ParseNumber(InputStream&, Handler&) [with unsigned int parseFlags = 0; InputStream = rapidjson::EncodedInputStream, rapidjson::MemoryStream>; Handler = rapidjson::GenericDocument >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]' at /usr/local/include/rapidjson/reader.h:1717:55, - inlined from 'void rapidjson::GenericReader::ParseValue(InputStream&, Handler&) [with unsigned int parseFlags = 0; InputStream = rapidjson::EncodedInputStream, rapidjson::MemoryStream>; Handler = rapidjson::GenericDocument >; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]' at /usr/local/include/rapidjson/reader.h:1761:46: -/usr/local/include/rapidjson/internal/strtod.h:29:5: warning: assuming signed overflow does not occur when changing X +- C1 cmp C2 to X cmp C2 -+ C1 [-Wstrict-overflow] - 29 | if (exp < -308) - | ^~ - All projects are up-to-date for restore. -In function 'int64_t node_loader_impl_user_async_handles_count(loader_impl_node)', - inlined from 'void node_loader_impl_destroy_safe(napi_env, loader_impl_async_destroy_safe_type*)' at /usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4402:47: -/usr/local/metacall/source/loaders/node_loader/source/node_loader_impl.cpp:4506:66: warning: assuming signed overflow does not occur when simplifying 'X - Y <= 0' to 'X <= Y' [-Wstrict-overflow] - 4506 | return active_handles - node_impl->base_active_handles - extra_active_handles; - | ^~~~~~~~~~~~~~~~~~~~ - Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.90s -[ 44%] Built target rs_port -[ 44%] Linking CXX shared module ../../../librapid_json_seriald.so -[ 44%] Built target rapid_json_serial -[ 44%] Linking CXX shared module ../../../plugins/sandbox_plugin/libsandbox_plugind.so -[ 44%] Built target sandbox_plugin -[ 44%] Linking CXX shared module ../../../libnode_loaderd.so -[ 44%] Built target node_loader -[ 44%] Building C object source/loaders/ts_loader/CMakeFiles/ts_loader.dir/source/ts_loader.c.o -[ 45%] Building CXX object source/cli/plugins/cli_sandbox_plugin/CMakeFiles/cli_sandbox_plugin.dir/source/cli_sandbox_plugin.cpp.o -[ 45%] Building CXX object source/loaders/ts_loader/CMakeFiles/ts_loader.dir/source/ts_loader_impl.cpp.o -[ 45%] Built target cli_cmd_plugin -[ 45%] Built target cli_repl_plugin -[ 45%] Building CXX object source/cli/plugins/cli_core_plugin/CMakeFiles/cli_core_plugin.dir/source/cli_core_plugin.cpp.o -[ 45%] Linking CXX shared module ../../../libc_loaderd.so --- Performing Test HAVE_STD_REGEX -- success --- Performing Test HAVE_GNU_POSIX_REGEX --- Performing Test HAVE_GNU_POSIX_REGEX -[ 45%] Linking CXX shared module ../../../../plugins/cli/cmd/cli_sandbox_plugin/libcli_sandbox_plugind.so -[ 45%] Linking CXX shared module ../../../plugins/backtrace_plugin/libbacktrace_plugind.so -[ 45%] Built target c_loader --- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile --- Performing Test HAVE_POSIX_REGEX --- Performing Test HAVE_POSIX_REGEX -[ 45%] Built target cli_sandbox_plugin -[ 45%] Built target backtrace_plugin -[ 46%] Linking CXX shared module ../../../libts_loaderd.so -[ 46%] Built target ts_loader --- Performing Test HAVE_POSIX_REGEX -- success --- Performing Test HAVE_STEADY_CLOCK --- Performing Test HAVE_STEADY_CLOCK -Installing node_port --- Performing Test HAVE_STEADY_CLOCK -- success --- Performing Test CMAKE_HAVE_LIBC_PTHREAD --- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success --- Found Threads: TRUE --- Configuring done (11.1s) --- Generating done (0.0s) --- Build files have been written to: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/src/google-bench-depends-build -[ 46%] Performing build step for 'google-bench-depends' -[ 9%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_name.cc.o -[ 9%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark.cc.o -[ 18%] Building CXX object src/CMakeFiles/benchmark.dir/csv_reporter.cc.o -[ 18%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o -[ 22%] Building CXX object src/CMakeFiles/benchmark.dir/commandlineflags.cc.o -[ 27%] Building CXX object src/CMakeFiles/benchmark.dir/json_reporter.cc.o -[ 31%] Building CXX object src/CMakeFiles/benchmark.dir/sleep.cc.o -[ 40%] Building CXX object src/CMakeFiles/benchmark.dir/statistics.cc.o -[ 40%] Building CXX object src/CMakeFiles/benchmark.dir/complexity.cc.o -[ 45%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_register.cc.o -[ 50%] Building CXX object src/CMakeFiles/benchmark.dir/counter.cc.o -[ 54%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o -[ 63%] Building CXX object src/CMakeFiles/benchmark.dir/colorprint.cc.o -[ 68%] Building CXX object src/CMakeFiles/benchmark.dir/console_reporter.cc.o -[ 68%] Building CXX object src/CMakeFiles/benchmark.dir/reporter.cc.o -[ 72%] Building CXX object src/CMakeFiles/benchmark.dir/timers.cc.o -[ 77%] Building CXX object src/CMakeFiles/benchmark.dir/string_util.cc.o -[ 81%] Building CXX object src/CMakeFiles/benchmark.dir/perf_counters.cc.o -[ 86%] Building CXX object src/CMakeFiles/benchmark.dir/sysinfo.cc.o -[ 25%] Linking CXX static library ../lib/libgtest.a - project -> /usr/local/metacall/source/loaders/cs_loader/netcore/source/bin/Debug/net7.0/CSLoader.dll - project -> /usr/local/metacall/build/ -[ 25%] Built target gtest -[ 37%] Building CXX object googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -[ 50%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o -[ 46%] Built target cs_loader_impl - -up to date, audited 81 packages in 1s - -20 packages are looking for funding - run `npm fund` for details - -3 moderate severity vulnerabilities - -To address all issues (including breaking changes), run: - npm audit fix --force - -Run `npm audit` for details. -[ 46%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/netcore.cpp.o -[ 47%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/simple_netcore.cpp.o -[ 47%] Building C object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/cs_loader.c.o -[ 47%] Building CXX object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/netcore_linux.cpp.o -[ 47%] Building C object source/loaders/cs_loader/CMakeFiles/cs_loader.dir/source/cs_loader_impl.c.o -[ 47%] Built target node_port -[ 47%] Linking CXX shared module ../../../../plugins/cli/repl/cli_core_plugin/libcli_core_plugind.so -[ 47%] Built target cli_core_plugin -[ 47%] Building CXX object source/cli/metacallcli/CMakeFiles/metacallcli.dir/source/main.cpp.o -[ 47%] Building CXX object source/cli/metacallcli/CMakeFiles/metacallcli.dir/source/application.cpp.o -[ 62%] Linking CXX static library ../lib/libgtest_main.a -[ 62%] Built target gtest_main -[ 47%] Linking CXX shared module ../../../libcs_loaderd.so -[ 47%] Built target cs_loader -[ 75%] Linking CXX static library ../lib/libgmock.a -[ 75%] Built target gmock -[ 47%] Linking CXX executable ../../../metacallclid -[ 87%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o -[ 47%] Built target metacallcli -[100%] Linking CXX static library ../lib/libgmock_main.a -[100%] Built target gmock_main -[ 47%] No install step for 'google-test-depends' -[ 47%] No test step for 'google-test-depends' -[ 47%] Completed 'google-test-depends' -[ 47%] Built target google-test-depends -[ 47%] Building CXX object source/tests/log_test/CMakeFiles/log-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/reflect_scope_test/CMakeFiles/reflect-scope-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/preprocessor_test/CMakeFiles/preprocessor-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/adt_vector_test/CMakeFiles/adt-vector-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/detour_test/CMakeFiles/detour-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/log_custom_test/CMakeFiles/log-custom-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/reflect_object_class_test/CMakeFiles/reflect-object-class-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/reflect_metadata_test/CMakeFiles/reflect-metadata-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/environment_test/CMakeFiles/environment-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/metacall_logs_test/CMakeFiles/metacall-logs-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/configuration_test/CMakeFiles/configuration-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/adt_set_test/CMakeFiles/adt-set-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/metacall_load_memory_empty_test/CMakeFiles/metacall-load-memory-empty-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/adt_map_test/CMakeFiles/adt-map-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/serial_test/CMakeFiles/serial-test.dir/source/main.cpp.o -[ 47%] Building CXX object source/tests/metacall_load_memory_test/CMakeFiles/metacall-load-memory-test.dir/source/main.cpp.o -[ 48%] Building CXX object source/tests/reflect_function_test/CMakeFiles/reflect-function-test.dir/source/main.cpp.o -[ 48%] Building CXX object source/tests/portability_path_test/CMakeFiles/portability-path-test.dir/source/main.cpp.o -[ 48%] Building CXX object source/tests/dynlink_test/CMakeFiles/dynlink-test.dir/source/main.cpp.o -[ 48%] Building CXX object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/source/main.cpp.o -[ 48%] Building CXX object source/tests/metacall_load_configuration_test/CMakeFiles/metacall-load-configuration-test.dir/source/main.cpp.o -[ 49%] Building CXX object source/tests/adt_trie_test/CMakeFiles/adt-trie-test.dir/source/main.cpp.o -[ 49%] Building CXX object source/tests/metacall_load_memory_test/CMakeFiles/metacall-load-memory-test.dir/source/metacall_load_memory_test.cpp.o -[ 49%] Building CXX object source/tests/log_custom_test/CMakeFiles/log-custom-test.dir/source/log_custom_test.cpp.o -[ 49%] Building CXX object source/tests/metacall_load_memory_empty_test/CMakeFiles/metacall-load-memory-empty-test.dir/source/metacall_load_memory_empty_test.cpp.o -[ 49%] Building CXX object source/tests/reflect_metadata_test/CMakeFiles/reflect-metadata-test.dir/source/reflect_metadata_test.cpp.o -[ 49%] Building CXX object source/tests/adt_vector_test/CMakeFiles/adt-vector-test.dir/source/adt_vector_test.cpp.o -[ 49%] Building CXX object source/tests/portability_path_test/CMakeFiles/portability-path-test.dir/source/portability_path_test.cpp.o -[ 90%] Linking CXX static library libbenchmark.a -[ 49%] Building CXX object source/tests/reflect_scope_test/CMakeFiles/reflect-scope-test.dir/source/reflect_scope_test.cpp.o -[ 49%] Building CXX object source/tests/detour_test/CMakeFiles/detour-test.dir/source/detour_test.cpp.o -[ 90%] Built target benchmark -[ 49%] Building CXX object source/tests/metacall_load_configuration_test/CMakeFiles/metacall-load-configuration-test.dir/source/metacall_load_configuration_test.cpp.o -[ 49%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_bool_test.cpp.o -[ 49%] Building CXX object source/tests/log_test/CMakeFiles/log-test.dir/source/log_test.cpp.o -[ 50%] Building CXX object source/tests/reflect_object_class_test/CMakeFiles/reflect-object-class-test.dir/source/reflect_object_class_test.cpp.o -[ 50%] Building CXX object source/tests/adt_map_test/CMakeFiles/adt-map-test.dir/source/adt_map_test.cpp.o -[ 95%] Building CXX object src/CMakeFiles/benchmark_main.dir/benchmark_main.cc.o -[ 50%] Building CXX object source/tests/adt_trie_test/CMakeFiles/adt-trie-test.dir/source/adt_trie_test.cpp.o -[ 50%] Building CXX object source/tests/adt_set_test/CMakeFiles/adt-set-test.dir/source/adt_set_test.cpp.o -[ 50%] Building CXX object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/source/rb_loader_parser_test.cpp.o -[ 51%] Building CXX object source/tests/metacall_logs_test/CMakeFiles/metacall-logs-test.dir/source/metacall_logs_test.cpp.o -[ 50%] Building CXX object source/tests/preprocessor_test/CMakeFiles/preprocessor-test.dir/source/preprocessor_test.cpp.o -[ 51%] Building CXX object source/tests/reflect_function_test/CMakeFiles/reflect-function-test.dir/source/reflect_function_test.cpp.o -[ 51%] Building CXX object source/tests/environment_test/CMakeFiles/environment-test.dir/source/environment_test.cpp.o -[ 51%] Building CXX object source/tests/serial_test/CMakeFiles/serial-test.dir/source/serial_test.cpp.o -[ 51%] Building CXX object source/tests/configuration_test/CMakeFiles/configuration-test.dir/source/configuration_test.cpp.o -[ 51%] Building CXX object source/tests/dynlink_test/CMakeFiles/dynlink-test.dir/source/dynlink_test.cpp.o -[100%] Linking CXX static library libbenchmark_main.a -[100%] Built target benchmark_main -[ 51%] Performing install step for 'google-bench-depends' -[ 90%] Built target benchmark -[100%] Built target benchmark_main -Install the project... --- Install configuration: "Release" --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/libbenchmark.a --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/libbenchmark_main.a --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/include/benchmark --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/include/benchmark/benchmark.h --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkConfig.cmake --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkConfigVersion.cmake --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/pkgconfig/benchmark.pc --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkTargets.cmake --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/lib/cmake/benchmark/benchmarkTargets-release.cmake --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/platform_specific_build_instructions.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/random_interleaving.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/AssemblyTests.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/perf_counters.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/index.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/dependencies.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/releasing.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/_config.yml --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/user_guide.md --- Installing: /usr/local/metacall/build/source/benchmarks/google-bench-depends-prefix/share/doc/benchmark/tools.md -[ 51%] No test step for 'google-bench-depends' -[ 51%] Completed 'google-bench-depends' -[ 51%] Built target google-bench-depends -[ 51%] Building CXX object source/tests/metacall_load_configuration_fail_test/CMakeFiles/metacall-load-configuration-fail-test.dir/source/main.cpp.o -[ 51%] Linking CXX executable ../../../metacall-load-memory-empty-testd -[ 51%] Linking CXX executable ../../../adt-vector-testd -[ 51%] Linking CXX executable ../../../log-custom-testd -[ 51%] Built target metacall-load-memory-empty-test -[ 51%] Building CXX object source/tests/metacall_load_configuration_relative_test/CMakeFiles/metacall-load-configuration-relative-test.dir/source/main.cpp.o -[ 51%] Linking CXX executable ../../../metacall-logs-testd -[ 51%] Linking CXX executable ../../../adt-trie-testd -[ 51%] Linking CXX executable ../../../metacall-load-memory-testd -[ 51%] Built target log-custom-test -[ 51%] Built target adt-vector-test -[ 51%] Building CXX object source/tests/metacall_load_configuration_node_python_test/CMakeFiles/metacall-load-configuration-node-python-test.dir/source/main.cpp.o -[ 52%] Building CXX object source/tests/metacall_load_configuration_python_node_test/CMakeFiles/metacall-load-configuration-python-node-test.dir/source/main.cpp.o -[ 52%] Built target metacall-logs-test -[ 52%] Building CXX object source/tests/metacall_duplicated_handle_test/CMakeFiles/metacall-duplicated-handle-test.dir/source/main.cpp.o -[ 52%] Built target adt-trie-test -[ 52%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_char_test.cpp.o -[ 52%] Built target metacall-load-memory-test -[ 53%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_short_test.cpp.o -[ 53%] Building CXX object source/tests/metacall_load_configuration_fail_test/CMakeFiles/metacall-load-configuration-fail-test.dir/source/metacall_load_configuration_fail_test.cpp.o -[ 53%] Linking CXX executable ../../../environment-testd -[ 53%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_int_test.cpp.o -[ 53%] Linking CXX executable ../../../adt-set-testd -[ 53%] Linking CXX executable ../../../detour-testd -[ 53%] Linking CXX executable ../../../adt-map-testd -[ 53%] Linking CXX executable ../../../reflect-function-testd -[ 53%] Built target environment-test -[ 53%] Linking CXX executable ../../../dynlink-testd -[ 54%] Linking CXX executable ../../../log-testd -[ 54%] Building CXX object source/tests/metacall_duplicated_symbols_test/CMakeFiles/metacall-duplicated-symbols-test.dir/source/main.cpp.o -[ 54%] Linking CXX executable ../../../preprocessor-testd -[ 54%] Linking CXX executable ../../../reflect-metadata-testd -[ 54%] Built target detour-test -[ 54%] Built target adt-map-test -[ 54%] Built target adt-set-test -[ 54%] Building CXX object source/tests/metacall_test/CMakeFiles/metacall-test.dir/source/main.cpp.o -[ 54%] Building CXX object source/tests/metacall_load_configuration_relative_test/CMakeFiles/metacall-load-configuration-relative-test.dir/source/metacall_load_configuration_relative_test.cpp.o -[ 54%] Built target reflect-function-test -[ 54%] Building CXX object source/tests/metacall_handle_export_test/CMakeFiles/metacall-handle-export-test.dir/source/main.cpp.o -[ 54%] Building CXX object source/tests/metacall_duplicated_symbols_test/CMakeFiles/metacall-duplicated-symbols-test.dir/source/metacall_duplicated_symbols_test.cpp.o -[ 55%] Building CXX object source/tests/metacall_handle_get_test/CMakeFiles/metacall-handle-get-test.dir/source/main.cpp.o -[ 55%] Built target log-test -[ 55%] Built target dynlink-test -[ 55%] Building CXX object source/tests/metacall_node_test/CMakeFiles/metacall-node-test.dir/source/main.cpp.o -[ 55%] Built target preprocessor-test -[ 55%] Building CXX object source/tests/metacall_node_event_loop_test/CMakeFiles/metacall-node-event-loop-test.dir/source/main.cpp.o -[ 55%] Built target reflect-metadata-test -[ 55%] Building CXX object source/tests/metacall_node_event_loop_test/CMakeFiles/metacall-node-event-loop-test.dir/source/metacall_node_event_loop_test.cpp.o -[ 56%] Building CXX object source/tests/metacall_node_test/CMakeFiles/metacall-node-test.dir/source/metacall_node_test.cpp.o -[ 56%] Building C object source/tests/rb_loader_parser_test/CMakeFiles/rb-loader-parser-test.dir/__/__/loaders/rb_loader/source/rb_loader_impl_parser.c.o -[ 56%] Building CXX object source/tests/metacall_duplicated_handle_test/CMakeFiles/metacall-duplicated-handle-test.dir/source/metacall_duplicated_handle_test.cpp.o -[ 56%] Building CXX object source/tests/metacall_load_configuration_node_python_test/CMakeFiles/metacall-load-configuration-node-python-test.dir/source/metacall_load_configuration_node_python_test.cpp.o -[ 56%] Building CXX object source/tests/metacall_load_configuration_python_node_test/CMakeFiles/metacall-load-configuration-python-node-test.dir/source/metacall_load_configuration_python_node_test.cpp.o -[ 57%] Linking CXX executable ../../../rb-loader-parser-testd -[ 57%] Linking CXX executable ../../../configuration-testd -[ 57%] Linking CXX executable ../../../reflect-scope-testd -[ 57%] Built target rb-loader-parser-test -[ 58%] Building CXX object source/tests/metacall_node_event_loop_signal_test/CMakeFiles/metacall-node-event-loop-signal-test.dir/source/main.cpp.o -[ 58%] Built target configuration-test -[ 58%] Building CXX object source/tests/metacall_node_call_test/CMakeFiles/metacall-node-call-test.dir/source/main.cpp.o -[ 58%] Built target reflect-scope-test -[ 58%] Building CXX object source/tests/metacall_node_inline_test/CMakeFiles/metacall-node-inline-test.dir/source/main.cpp.o -[ 58%] Building CXX object source/tests/metacall_node_async_test/CMakeFiles/metacall-node-async-test.dir/source/main.cpp.o -[ 58%] Building CXX object source/tests/metacall_handle_export_test/CMakeFiles/metacall-handle-export-test.dir/source/metacall_handle_export_test.cpp.o -[ 59%] Linking CXX executable ../../../metacall-load-configuration-testd -[ 59%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_long_test.cpp.o -[ 59%] Building CXX object source/tests/metacall_node_inline_test/CMakeFiles/metacall-node-inline-test.dir/source/metacall_node_inline_test.cpp.o -[ 60%] Building CXX object source/tests/metacall_test/CMakeFiles/metacall-test.dir/source/metacall_test.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_async_multiple_test/CMakeFiles/metacall-node-async-multiple-test.dir/source/main.cpp.o -[ 61%] Building CXX object source/tests/metacall_handle_get_test/CMakeFiles/metacall-handle-get-test.dir/source/metacall_handle_get_test.cpp.o -[ 61%] Linking CXX executable ../../../metacall-load-configuration-fail-testd -[ 61%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_float_test.cpp.o -[ 61%] Built target metacall-load-configuration-test -[ 61%] Building CXX object source/tests/metacall_node_reentrant_test/CMakeFiles/metacall-node-reentrant-test.dir/source/main.cpp.o -[ 61%] Linking CXX executable ../../../metacall-node-event-loop-testd -[ 61%] Linking CXX executable ../../../metacall-duplicated-symbols-testd -[ 61%] Built target metacall-load-configuration-fail-test -[ 61%] Building CXX object source/tests/metacall_node_reentrant_test/CMakeFiles/metacall-node-reentrant-test.dir/source/metacall_node_reentrant_test.cpp.o -[ 61%] Built target metacall-duplicated-symbols-test -[ 61%] Linking CXX executable ../../../metacall-load-configuration-relative-testd -[ 61%] Built target metacall-node-event-loop-test -[ 61%] Building CXX object source/tests/metacall_node_port_test/CMakeFiles/metacall-node-port-test.dir/source/main.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_async_test/CMakeFiles/metacall-node-async-test.dir/source/metacall_node_async_test.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_event_loop_signal_test/CMakeFiles/metacall-node-event-loop-signal-test.dir/source/metacall_node_event_loop_signal_test.cpp.o -[ 61%] Building CXX object source/tests/reflect_value_cast_test/CMakeFiles/reflect-value-cast-test.dir/source/reflect_value_cast_double_test.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_async_multiple_test/CMakeFiles/metacall-node-async-multiple-test.dir/source/metacall_node_async_multiple_test.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_call_test/CMakeFiles/metacall-node-call-test.dir/source/metacall_node_call_test.cpp.o -[ 61%] Linking CXX executable ../../../metacall-load-configuration-node-python-testd -[ 61%] Building CXX object source/tests/metacall_node_port_test/CMakeFiles/metacall-node-port-test.dir/source/metacall_node_port_test.cpp.o -[ 61%] Linking CXX executable ../../../metacall-load-configuration-python-node-testd -[ 61%] Built target metacall-load-configuration-relative-test -[ 61%] Building CXX object source/tests/metacall_node_port_await_test/CMakeFiles/metacall-node-port-await-test.dir/source/main.cpp.o -[ 61%] Linking CXX executable ../../../serial-testd -[ 61%] Linking CXX executable ../../../portability-path-testd -[ 61%] Built target metacall-load-configuration-node-python-test -[ 61%] Building CXX object source/tests/metacall_node_port_c_lib_test/CMakeFiles/metacall-node-port-c-lib-test.dir/source/main.cpp.o -[ 61%] Built target metacall-load-configuration-python-node-test -[ 61%] Building CXX object source/tests/metacall_node_python_port_mock_test/CMakeFiles/metacall-node-python-port-mock-test.dir/source/main.cpp.o -[ 61%] Linking CXX executable ../../../reflect-object-class-testd -[ 61%] Building CXX object source/tests/metacall_node_python_port_ruby_test/CMakeFiles/metacall-node-python-port-ruby-test.dir/source/main.cpp.o -[ 61%] Built target serial-test -[ 61%] Linking CXX executable ../../../metacall-duplicated-handle-testd -[ 61%] Building CXX object source/tests/metacall_node_python_port_mock_test/CMakeFiles/metacall-node-python-port-mock-test.dir/source/metacall_node_python_port_mock_test.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_port_c_lib_test/CMakeFiles/metacall-node-port-c-lib-test.dir/source/metacall_node_port_c_lib_test.cpp.o -[ 61%] Built target portability-path-test -[ 61%] Building CXX object source/tests/metacall_node_python_ruby_test/CMakeFiles/metacall-node-python-ruby-test.dir/source/main.cpp.o -[ 61%] Built target reflect-object-class-test -[ 61%] Building CXX object source/tests/metacall_node_callback_test/CMakeFiles/metacall-node-callback-test.dir/source/main.cpp.o -[ 61%] Built target metacall-duplicated-handle-test -[ 61%] Building CXX object source/tests/metacall_node_fail_test/CMakeFiles/metacall-node-fail-test.dir/source/main.cpp.o -[ 61%] Building CXX object source/tests/metacall_node_fail_env_var_test/CMakeFiles/metacall-node-fail-env-var-test.dir/source/main.cpp.o -[ 61%] Linking CXX executable ../../../metacall-node-testd -[ 61%] Built target metacall-node-test -[ 61%] Building CXX object source/tests/metacall_node_fail_load_leak_test/CMakeFiles/metacall-node-fail-load-leak-test.dir/source/main.cpp.o -[ 62%] Building CXX object source/tests/metacall_node_fail_load_leak_test/CMakeFiles/metacall-node-fail-load-leak-test.dir/source/metacall_node_fail_load_leak_test.cpp.o -[ 62%] Building CXX object source/tests/metacall_node_port_await_test/CMakeFiles/metacall-node-port-await-test.dir/source/metacall_node_port_await_test.cpp.o -[ 62%] Building CXX object source/tests/metacall_node_python_port_ruby_test/CMakeFiles/metacall-node-python-port-ruby-test.dir/source/metacall_node_python_port_ruby_test.cpp.o -[ 62%] Building CXX object source/tests/metacall_node_typescript_test/CMakeFiles/metacall-node-typescript-test.dir/source/main.cpp.o -[ 62%] Building CXX object source/tests/metacall_node_python_async_after_destroy_test/CMakeFiles/metacall-node-python-async-after-destroy-test.dir/source/main.cpp.o -[ 62%] Linking CXX executable ../../../metacall-handle-export-testd -[ 62%] Linking CXX executable ../../../metacall-node-event-loop-signal-testd -[ 63%] Building CXX object source/tests/metacall_node_python_async_after_destroy_test/CMakeFiles/metacall-node-python-async-after-destroy-test.dir/source/metacall_node_python_async_after_destroy_test.cpp.o -[ 63%] Linking CXX executable ../../../metacall-node-inline-testd -[ 63%] Building CXX object source/tests/metacall_node_python_ruby_test/CMakeFiles/metacall-node-python-ruby-test.dir/source/metacall_node_python_ruby_test.cpp.o -[ 64%] Linking CXX executable ../../../metacall-node-call-testd -[ 64%] Built target metacall-handle-export-test -[ 64%] Linking CXX executable ../../../metacall-node-python-port-mock-testd -[ 64%] Built target metacall-node-event-loop-signal-test -[ 64%] Building CXX object source/tests/metacall_node_python_await_test/CMakeFiles/metacall-node-python-await-test.dir/source/main.cpp.o -[ 64%] Building CXX object source/tests/metacall_node_callback_test/CMakeFiles/metacall-node-callback-test.dir/source/metacall_node_callback_test.cpp.o -[ 64%] Building CXX object source/tests/metacall_node_python_await_test/CMakeFiles/metacall-node-python-await-test.dir/source/metacall_node_python_await_test.cpp.o -[ 64%] Linking CXX executable ../../../metacall-node-port-c-lib-testd -[ 64%] Built target metacall-node-inline-test -[ 65%] Building CXX object source/tests/metacall_node_python_exception_test/CMakeFiles/metacall-node-python-exception-test.dir/source/main.cpp.o -[ 65%] Linking CXX executable ../../../reflect-value-cast-testd -[ 65%] Building CXX object source/tests/metacall_node_fail_test/CMakeFiles/metacall-node-fail-test.dir/source/metacall_node_fail_test.cpp.o -[ 65%] Linking CXX executable ../../../metacall-node-port-testd -[ 65%] Built target metacall-node-python-port-mock-test -[ 65%] Built target metacall-node-call-test -[ 65%] Building CXX object source/tests/metacall_node_clear_mem_test/CMakeFiles/metacall-node-clear-mem-test.dir/source/main.cpp.o -[ 65%] Building CXX object source/tests/metacall_node_async_resources_test/CMakeFiles/metacall-node-async-resources-test.dir/source/main.cpp.o -[ 65%] Building CXX object source/tests/metacall_node_fail_env_var_test/CMakeFiles/metacall-node-fail-env-var-test.dir/source/metacall_node_fail_env_var_test.cpp.o -[ 65%] Built target metacall-node-port-c-lib-test -[ 65%] Building CXX object source/tests/metacall_node_async_resources_test/CMakeFiles/metacall-node-async-resources-test.dir/source/metacall_node_async_resources_test.cpp.o -[ 65%] Linking CXX executable ../../../metacall-node-reentrant-testd -[ 65%] Built target metacall-node-port-test -[ 65%] Building CXX object source/tests/metacall_node_await_chain_test/CMakeFiles/metacall-node-await-chain-test.dir/source/main.cpp.o -[ 65%] Built target reflect-value-cast-test -[ 65%] Linking CXX executable ../../../metacall-handle-get-testd -[ 65%] Building CXX object source/tests/metacall_node_exception_test/CMakeFiles/metacall-node-exception-test.dir/source/main.cpp.o -[ 65%] Building CXX object source/tests/metacall_node_exception_test/CMakeFiles/metacall-node-exception-test.dir/source/metacall_node_exception_test.cpp.o -[ 65%] Built target metacall-node-reentrant-test -[ 65%] Building CXX object source/tests/metacall_node_python_deadlock_test/CMakeFiles/metacall-node-python-deadlock-test.dir/source/main.cpp.o -[ 66%] Linking CXX executable ../../../metacall-node-async-testd -[ 66%] Linking CXX executable ../../../metacall-node-async-multiple-testd -[ 66%] Building CXX object source/tests/metacall_node_typescript_test/CMakeFiles/metacall-node-typescript-test.dir/source/metacall_node_typescript_test.cpp.o -[ 66%] Building CXX object source/tests/metacall_node_python_deadlock_test/CMakeFiles/metacall-node-python-deadlock-test.dir/source/metacall_node_python_deadlock_test.cpp.o -[ 66%] Built target metacall-node-async-test -[ 66%] Built target metacall-handle-get-test -[ 66%] Building CXX object source/tests/metacall_node_extension_test/CMakeFiles/metacall-node-extension-test.dir/source/main.cpp.o -[ 66%] Building CXX object source/tests/metacall_node_native_code_test/CMakeFiles/metacall-node-native-code-test.dir/source/main.cpp.o -[ 66%] Built target metacall-node-async-multiple-test -[ 67%] Linking CXX executable ../../../metacall-node-port-await-testd -[ 68%] Building CXX object source/tests/metacall_node_multithread_deadlock_test/CMakeFiles/metacall-node-multithread-deadlock-test.dir/source/main.cpp.o -[ 69%] Linking CXX executable ../../../metacall-node-python-port-ruby-testd -[ 69%] Building CXX object source/tests/metacall_distributable_test/CMakeFiles/metacall-distributable-test.dir/source/main.cpp.o -[ 69%] Linking CXX executable ../../../metacall-node-python-async-after-destroy-testd -[ 69%] Built target metacall-node-python-port-ruby-test -[ 69%] Built target metacall-node-port-await-test -[ 69%] Building CXX object source/tests/metacall_distributable_test/CMakeFiles/metacall-distributable-test.dir/source/metacall_distributable_test.cpp.o -[ 70%] Building CXX object source/tests/metacall_cast_test/CMakeFiles/metacall-cast-test.dir/source/main.cpp.o -[ 70%] Building CXX object source/tests/metacall_node_python_exception_test/CMakeFiles/metacall-node-python-exception-test.dir/source/metacall_node_python_exception_test.cpp.o -[ 70%] Building CXX object source/tests/metacall_cast_test/CMakeFiles/metacall-cast-test.dir/source/metacall_cast_test.cpp.o -[ 70%] Linking CXX executable ../../../metacall-node-python-await-testd -[ 70%] Building CXX object source/tests/metacall_node_clear_mem_test/CMakeFiles/metacall-node-clear-mem-test.dir/source/metacall_node_clear_mem_test.cpp.o -[ 70%] Built target metacall-node-python-async-after-destroy-test -[ 70%] Building CXX object source/tests/metacall_init_fini_test/CMakeFiles/metacall-init-fini-test.dir/source/main.cpp.o -[ 70%] Building CXX object source/tests/metacall_node_native_code_test/CMakeFiles/metacall-node-native-code-test.dir/source/metacall_node_native_code_test.cpp.o -[ 70%] Built target metacall-node-python-await-test -[ 70%] Building CXX object source/tests/metacall_ducktype_test/CMakeFiles/metacall-ducktype-test.dir/source/main.cpp.o -[ 70%] Building CXX object source/tests/metacall_node_await_chain_test/CMakeFiles/metacall-node-await-chain-test.dir/source/metacall_node_await_chain_test.cpp.o -[ 70%] Linking CXX executable ../../../metacall-node-fail-load-leak-testd -[ 70%] Building CXX object source/tests/metacall_inspect_test/CMakeFiles/metacall-inspect-test.dir/source/main.cpp.o -[ 70%] Linking CXX executable ../../../metacall-node-async-resources-testd -[ 70%] Built target metacall-node-fail-load-leak-test -[ 70%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/main.cpp.o -[ 70%] Building CXX object source/tests/metacall_ducktype_test/CMakeFiles/metacall-ducktype-test.dir/source/metacall_ducktype_test.cpp.o -[ 70%] Building CXX object source/tests/metacall_node_extension_test/CMakeFiles/metacall-node-extension-test.dir/source/metacall_node_extension_test.cpp.o -[ 70%] Linking CXX executable ../../../metacall-node-callback-testd -[ 70%] Built target metacall-node-async-resources-test -[ 70%] Linking CXX executable ../../../metacall-node-python-ruby-testd -[ 71%] Building CXX object source/tests/metacall_depends_test/CMakeFiles/metacall-depends-test.dir/source/main.cpp.o -[ 72%] Linking CXX executable ../../../metacall-node-exception-testd -[ 72%] Linking CXX executable ../../../metacall-node-python-deadlock-testd -[ 72%] Building CXX object source/tests/metacall_node_multithread_deadlock_test/CMakeFiles/metacall-node-multithread-deadlock-test.dir/source/metacall_node_multithread_deadlock_test.cpp.o -[ 72%] Built target metacall-node-callback-test -[ 72%] Linking CXX executable ../../../metacall-node-fail-testd -[ 72%] Building CXX object source/tests/metacall_depends_test/CMakeFiles/metacall-depends-test.dir/source/metacall_depends_test.cpp.o -[ 72%] Linking CXX executable ../../../metacall-node-fail-env-var-testd -[ 72%] Building CXX object source/tests/metacall_init_fini_test/CMakeFiles/metacall-init-fini-test.dir/source/metacall_init_fini_test.cpp.o -[ 72%] Built target metacall-node-python-ruby-test -[ 72%] Built target metacall-node-exception-test -[ 72%] Building CXX object source/tests/metacall_configuration_default_test/CMakeFiles/metacall-configuration-default-test.dir/source/main.cpp.o -[ 72%] Building CXX object source/tests/metacall_configuration_exec_path_test/CMakeFiles/metacall-configuration-exec-path-test.dir/source/main.cpp.o -[ 72%] Building CXX object source/tests/metacall_configuration_default_test/CMakeFiles/metacall-configuration-default-test.dir/source/metacall_configuration_default_test.cpp.o -[ 72%] Built target metacall-node-python-deadlock-test -[ 72%] Building CXX object source/tests/metacall_configuration_exec_path_test/CMakeFiles/metacall-configuration-exec-path-test.dir/source/metacall_configuration_exec_path_test.cpp.o -[ 72%] Built target metacall-node-fail-test -[ 72%] Building CXX object source/tests/metacall_clear_test/CMakeFiles/metacall-clear-test.dir/source/main.cpp.o -[ 72%] Built target metacall-node-fail-env-var-test -[ 72%] Building CXX object source/tests/metacall_python_test/CMakeFiles/metacall-python-test.dir/source/main.cpp.o -[ 72%] Building CXX object source/tests/metacall_python_test/CMakeFiles/metacall-python-test.dir/source/metacall_python_test.cpp.o -[ 72%] Linking CXX executable ../../../metacall-testd -[ 72%] Building CXX object source/tests/metacall_clear_test/CMakeFiles/metacall-clear-test.dir/source/metacall_clear_test.cpp.o -[ 72%] Linking CXX executable ../../../metacall-node-python-exception-testd -[ 72%] Building CXX object source/tests/metacall_inspect_test/CMakeFiles/metacall-inspect-test.dir/source/metacall_inspect_test.cpp.o -[ 72%] Built target metacall-test -[ 72%] Building CXX object source/tests/metacall_python_object_class_test/CMakeFiles/metacall-python-object-class-test.dir/source/main.cpp.o -[ 72%] Built target metacall-node-python-exception-test -[ 72%] Building CXX object source/tests/metacall_python_gc_test/CMakeFiles/metacall-python-gc-test.dir/source/main.cpp.o -[ 72%] Linking CXX executable ../../../metacall-cast-testd -[ 72%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/environment.cpp.o -[ 72%] Linking CXX executable ../../../metacall-node-clear-mem-testd -[ 72%] Building CXX object source/tests/metacall_python_gc_test/CMakeFiles/metacall-python-gc-test.dir/source/metacall_python_gc_test.cpp.o -[ 72%] Linking CXX executable ../../../metacall-node-typescript-testd -[ 72%] Built target metacall-cast-test -[ 72%] Building CXX object source/tests/metacall_python_open_test/CMakeFiles/metacall-python-open-test.dir/source/main.cpp.o -[ 72%] Built target metacall-node-clear-mem-test -[ 72%] Linking CXX executable ../../../metacall-node-await-chain-testd -[ 72%] Building CXX object source/tests/metacall_python_dict_test/CMakeFiles/metacall-python-dict-test.dir/source/main.cpp.o -[ 72%] Built target metacall-node-typescript-test -[ 72%] Building CXX object source/tests/metacall_integration_test/CMakeFiles/metacall-integration-test.dir/source/metacall_integration_test.cpp.o -[ 72%] Building CXX object source/tests/metacall_python_pointer_test/CMakeFiles/metacall-python-pointer-test.dir/source/main.cpp.o -[ 72%] Building CXX object source/tests/metacall_python_dict_test/CMakeFiles/metacall-python-dict-test.dir/source/metacall_python_dict_test.cpp.o -[ 72%] Building CXX object source/tests/metacall_python_reentrant_test/CMakeFiles/metacall-python-reentrant-test.dir/source/main.cpp.o -[ 72%] Built target metacall-node-await-chain-test -[ 73%] Building CXX object source/tests/metacall_python_object_class_test/CMakeFiles/metacall-python-object-class-test.dir/source/metacall_python_object_class_test.cpp.o -[ 73%] Building CXX object source/tests/metacall_python_varargs_test/CMakeFiles/metacall-python-varargs-test.dir/source/main.cpp.o -[ 73%] Linking CXX executable ../../../configuration-default-test/metacall-configuration-default-testd -[ 73%] Linking CXX executable ../../../metacall-node-native-code-testd -[ 73%] Linking CXX executable ../../../metacall-init-fini-testd -[ 73%] Built target metacall-configuration-default-test -[ 73%] Building CXX object source/tests/metacall_python_reentrant_test/CMakeFiles/metacall-python-reentrant-test.dir/source/metacall_python_reentrant_test.cpp.o -[ 74%] Building CXX object source/tests/metacall_python_loader_port_test/CMakeFiles/py-loader-port-test.dir/source/main.cpp.o -[ 74%] Linking CXX executable ../../../metacall-configuration-exec-path-testd -[ 74%] Built target metacall-node-native-code-test -[ 74%] Built target metacall-init-fini-test -[ 74%] Building CXX object source/tests/metacall_python_loader_port_test/CMakeFiles/py-loader-port-test.dir/source/metacall_python_loader_port_test.cpp.o -[ 74%] Building CXX object source/tests/metacall_python_port_https_test/CMakeFiles/metacall-python-port-https-test.dir/source/main.cpp.o -[ 75%] Building CXX object source/tests/metacall_python_port_callback_test/CMakeFiles/metacall-python-port-callback-test.dir/source/main.cpp.o -[ 75%] Linking CXX executable ../../../metacall-distributable-testd -[ 75%] Linking CXX executable ../../../metacall-node-extension-testd -[ 75%] Linking CXX executable ../../../metacall-clear-testd -[ 75%] Building CXX object source/tests/metacall_python_port_callback_test/CMakeFiles/metacall-python-port-callback-test.dir/source/metacall_python_port_callback_test.cpp.o -[ 75%] Linking CXX executable ../../../metacall-node-multithread-deadlock-testd -[ 75%] Built target metacall-configuration-exec-path-test -[ 75%] Building CXX object source/tests/metacall_python_port_pointer_test/CMakeFiles/metacall-python-port-pointer-test.dir/source/main.cpp.o -[ 75%] Linking CXX executable ../../../metacall-python-testd -[ 75%] Linking CXX executable ../../../metacall-depends-testd -[ 75%] Building CXX object source/tests/metacall_python_open_test/CMakeFiles/metacall-python-open-test.dir/source/metacall_python_open_test.cpp.o -[ 75%] Built target metacall-node-extension-test -[ 75%] Built target metacall-distributable-test -[ 75%] Building CXX object source/tests/metacall_python_port_pointer_test/CMakeFiles/metacall-python-port-pointer-test.dir/source/metacall_python_port_pointer_test.cpp.o -[ 75%] Built target metacall-clear-test -[ 76%] Building CXX object source/tests/metacall_python_callback_test/CMakeFiles/metacall-python-callback-test.dir/source/main.cpp.o -[ 76%] Building CXX object source/tests/metacall_python_port_import_test/CMakeFiles/metacall-python-port-import-test.dir/source/main.cpp.o -[ 76%] Building CXX object source/tests/metacall_python_fail_test/CMakeFiles/metacall-python-fail-test.dir/source/main.cpp.o -[ 77%] Linking CXX executable ../../../metacall-ducktype-testd -[ 77%] Building CXX object source/tests/metacall_python_fail_test/CMakeFiles/metacall-python-fail-test.dir/source/metacall_python_fail_test.cpp.o -[ 77%] Built target metacall-node-multithread-deadlock-test -[ 77%] Building CXX object source/tests/metacall_python_pointer_test/CMakeFiles/metacall-python-pointer-test.dir/source/metacall_python_pointer_test.cpp.o -[ 77%] Built target metacall-python-test -[ 77%] Built target metacall-depends-test -[ 77%] Building CXX object source/tests/metacall_python_without_functions_test/CMakeFiles/metacall-python-without-functions-test.dir/source/main.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_relative_path_test/CMakeFiles/metacall-python-relative-path-test.dir/source/main.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_builtins_test/CMakeFiles/metacall-python-builtins-test.dir/source/main.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_varargs_test/CMakeFiles/metacall-python-varargs-test.dir/source/metacall_python_varargs_test.cpp.o -[ 77%] Linking CXX executable ../../../metacall-python-gc-testd -[ 77%] Linking CXX executable ../../../metacall-inspect-testd -[ 77%] Built target metacall-ducktype-test -[ 77%] Building CXX object source/tests/metacall_python_port_import_test/CMakeFiles/metacall-python-port-import-test.dir/source/metacall_python_port_import_test.cpp.o -[ 77%] Built target metacall-inspect-test -[ 77%] Built target metacall-python-gc-test -[ 77%] Building CXX object source/tests/metacall_python_callback_test/CMakeFiles/metacall-python-callback-test.dir/source/metacall_python_callback_test.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_async_test/CMakeFiles/metacall-python-async-test.dir/source/main.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_without_functions_test/CMakeFiles/metacall-python-without-functions-test.dir/source/metacall_python_without_functions_test.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_async_test/CMakeFiles/metacall-python-async-test.dir/source/metacall_python_async_test.cpp.o -[ 77%] Building CXX object source/tests/metacall_python_port_https_test/CMakeFiles/metacall-python-port-https-test.dir/source/metacall_python_port_https_test.cpp.o -[ 78%] Linking CXX executable ../../../metacall-integration-testd -[ 78%] Building CXX object source/tests/metacall_python_builtins_test/CMakeFiles/metacall-python-builtins-test.dir/source/metacall_python_builtins_test.cpp.o -[ 79%] Building CXX object source/tests/metacall_python_relative_path_test/CMakeFiles/metacall-python-relative-path-test.dir/source/metacall_python_relative_path_test.cpp.o -[ 79%] Built target metacall-integration-test -[ 79%] Building CXX object source/tests/metacall_python_exception_test/CMakeFiles/metacall-python-exception-test.dir/source/main.cpp.o -[ 79%] Building CXX object source/tests/metacall_python_exception_test/CMakeFiles/metacall-python-exception-test.dir/source/metacall_python_exception_test.cpp.o -[ 79%] Linking CXX executable ../../../metacall-python-port-callback-testd -[ 80%] Building CXX object source/tests/metacall_python_without_env_vars_test/CMakeFiles/metacall-python-without-env-vars-test.dir/source/main.cpp.o -[ 80%] Building CXX object source/tests/metacall_python_without_env_vars_test/CMakeFiles/metacall-python-without-env-vars-test.dir/source/metacall_python_without_env_vars_test.cpp.o -[ 80%] Linking CXX executable ../../../metacall-python-reentrant-testd -[ 80%] Building CXX object source/tests/metacall_map_test/CMakeFiles/metacall-map-test.dir/source/main.cpp.o -[ 80%] Building CXX object source/tests/metacall_map_test/CMakeFiles/metacall-map-test.dir/source/metacall_map_test.cpp.o -[ 80%] Built target metacall-python-port-callback-test -[ 80%] Built target metacall-python-reentrant-test -[ 80%] Building CXX object source/tests/metacall_initialize_test/CMakeFiles/metacall-initialize-test.dir/source/main.cpp.o -[ 80%] Building CXX object source/tests/metacall_map_await_test/CMakeFiles/metacall-map-await-test.dir/source/main.cpp.o -[ 80%] Linking CXX executable ../../../py-loader-port-testd -[ 80%] Building CXX object source/tests/metacall_map_await_test/CMakeFiles/metacall-map-await-test.dir/source/metacall_map_await_test.cpp.o -[ 80%] Linking CXX executable ../../../metacall-python-dict-testd -[ 80%] Linking CXX executable ../../../metacall-python-port-pointer-testd -[ 80%] Built target py-loader-port-test -[ 80%] Built target metacall-python-dict-test -[ 80%] Building CXX object source/tests/metacall_initialize_ex_test/CMakeFiles/metacall-initialize-ex-test.dir/source/main.cpp.o -[ 81%] Building CXX object source/tests/metacall_reinitialize_test/CMakeFiles/metacall-reinitialize-test.dir/source/main.cpp.o -[ 81%] Linking CXX executable ../../../metacall-python-object-class-testd -[ 81%] Linking CXX executable ../../../metacall-python-fail-testd -[ 81%] Linking CXX executable ../../../metacall-python-varargs-testd -[ 81%] Built target metacall-python-port-pointer-test -[ 81%] Building CXX object source/tests/metacall_initialize_destroy_multiple_test/CMakeFiles/metacall-initialize-destroy-multiple-test.dir/source/main.cpp.o -[ 81%] Building CXX object source/tests/metacall_initialize_destroy_multiple_node_test/CMakeFiles/metacall-initialize-destroy-multiple-node-test.dir/source/main.cpp.o -[ 82%] Linking CXX executable ../../../metacall-python-port-import-testd -[ 82%] Built target metacall-python-object-class-test -[ 82%] Linking CXX executable ../../../metacall-python-port-https-testd -[ 82%] Building CXX object source/tests/metacall_reload_functions_test/CMakeFiles/metacall-reload-functions-test.dir/source/main.cpp.o -[ 82%] Linking CXX executable ../../../metacall-python-pointer-testd -[ 82%] Built target metacall-python-fail-test -[ 82%] Building CXX object source/tests/metacall_initialize_destroy_multiple_node_test/CMakeFiles/metacall-initialize-destroy-multiple-node-test.dir/source/metacall_initialize_destroy_multiple_node_test.cpp.o -[ 82%] Building CXX object source/tests/metacall_initialize_destroy_multiple_test/CMakeFiles/metacall-initialize-destroy-multiple-test.dir/source/metacall_initialize_destroy_multiple_test.cpp.o -[ 82%] Linking CXX executable ../../../metacall-python-callback-testd -[ 82%] Built target metacall-python-varargs-test -[ 82%] Building CXX object source/tests/metacall_invalid_loader_test/CMakeFiles/metacall-invalid-loader-test.dir/source/metacall_invalid_loader_test.cpp.o -[ 83%] Building CXX object source/tests/metacall_initialize_test/CMakeFiles/metacall-initialize-test.dir/source/metacall_initialize_test.cpp.o -[ 83%] Building CXX object source/tests/metacall_invalid_loader_test/CMakeFiles/metacall-invalid-loader-test.dir/source/main.cpp.o -[ 83%] Linking CXX executable ../../../metacall-python-open-testd -[ 83%] Built target metacall-python-port-https-test -[ 83%] Built target metacall-python-port-import-test -[ 84%] Linking CXX executable ../../../metacall-python-exception-testd -[ 84%] Linking CXX executable ../../../metacall-python-without-functions-testd -[ 84%] Building CXX object source/tests/metacall_return_monad_test/CMakeFiles/metacall-return-monad-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_fork_test/CMakeFiles/metacall-fork-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_fork_test/CMakeFiles/metacall-fork-test.dir/source/metacall_fork_test.cpp.o -[ 84%] Built target metacall-python-callback-test -[ 84%] Built target metacall-python-pointer-test -[ 84%] Building CXX object source/tests/metacall_return_monad_test/CMakeFiles/metacall-return-monad-test.dir/source/metacall_return_monad_test.cpp.o -[ 84%] Linking CXX executable ../../../metacall-python-without-env-vars-testd -[ 84%] Building CXX object source/tests/metacall_callback_complex_test/CMakeFiles/metacall-callback-complex-test.dir/source/main.cpp.o -[ 84%] Built target metacall-python-open-test -[ 84%] Built target metacall-python-without-functions-test -[ 84%] Building CXX object source/tests/metacall_callback_complex_test/CMakeFiles/metacall-callback-complex-test.dir/source/metacall_callback_complex_test.cpp.o -[ 84%] Building CXX object source/tests/metacall_ruby_fail_test/CMakeFiles/metacall-ruby-fail-test.dir/source/main.cpp.o -[ 84%] Built target metacall-python-exception-test -[ 84%] Building CXX object source/tests/metacall_ruby_fail_empty_test/CMakeFiles/metacall-ruby-fail-empty-test.dir/source/main.cpp.o -[ 84%] Linking CXX executable ../../../metacall-python-builtins-testd -[ 84%] Linking CXX executable ../../../metacall-python-async-testd -[ 84%] Built target metacall-python-without-env-vars-test -[ 84%] Building CXX object source/tests/metacall_ruby_object_class_test/CMakeFiles/metacall-ruby-object-class-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_initialize_ex_test/CMakeFiles/metacall-initialize-ex-test.dir/source/metacall_initialize_ex_test.cpp.o -[ 84%] Building CXX object source/tests/metacall_reinitialize_test/CMakeFiles/metacall-reinitialize-test.dir/source/metacall_reinitialize_test.cpp.o -[ 84%] Linking CXX executable ../../../metacall-python-relative-path-testd -[ 84%] Built target metacall-python-async-test -[ 84%] Building CXX object source/tests/metacall_ruby_parser_integration_test/CMakeFiles/metacall-ruby-parser-integration-test.dir/source/main.cpp.o -[ 84%] Built target metacall-python-builtins-test -[ 84%] Building CXX object source/tests/metacall_ruby_parser_integration_test/CMakeFiles/metacall-ruby-parser-integration-test.dir/source/metacall_ruby_parser_integration_test.cpp.o -[ 84%] Building CXX object source/tests/metacall_ruby_object_class_test/CMakeFiles/metacall-ruby-object-class-test.dir/source/metacall_ruby_object_class_test.cpp.o -[ 84%] Building CXX object source/tests/metacall_function_test/CMakeFiles/metacall-function-test.dir/source/main.cpp.o -[ 84%] Built target metacall-python-relative-path-test -[ 84%] Linking CXX executable ../../../metacall-map-testd -[ 84%] Building CXX object source/tests/metacall_reload_functions_test/CMakeFiles/metacall-reload-functions-test.dir/source/metacall_reload_functions_test.cpp.o -[ 84%] Building CXX object source/tests/metacall_cobol_test/CMakeFiles/metacall-cobol-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_cobol_test/CMakeFiles/metacall-cobol-test.dir/source/metacall_cobol_test.cpp.o -[ 84%] Built target metacall-map-test -[ 84%] Building CXX object source/tests/metacall_file_test/CMakeFiles/metacall-file-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_file_fail_test/CMakeFiles/metacall-file-fail-test.dir/source/main.cpp.o -[ 84%] Building CXX object source/tests/metacall_file_test/CMakeFiles/metacall-file-test.dir/source/metacall_file_test.cpp.o -[ 84%] Linking CXX executable ../../../metacall-invalid-loader-testd -[ 85%] Linking CXX executable ../../../metacall-initialize-destroy-multiple-node-testd -[ 85%] Linking CXX executable ../../../metacall-initialize-destroy-multiple-testd -[ 86%] Building CXX object source/tests/metacall_ruby_fail_test/CMakeFiles/metacall-ruby-fail-test.dir/source/metacall_ruby_fail_test.cpp.o -[ 86%] Linking CXX executable ../../../metacall-initialize-testd -[ 87%] Building CXX object source/tests/metacall_file_glob_test/CMakeFiles/metacall-file-glob-test.dir/source/main.cpp.o -[ 87%] Building CXX object source/tests/metacall_ruby_fail_empty_test/CMakeFiles/metacall-ruby-fail-empty-test.dir/source/metacall_ruby_fail_empty_test.cpp.o -[ 87%] Built target metacall-invalid-loader-test -[ 87%] Building CXX object source/tests/metacall_typescript_test/CMakeFiles/metacall-typescript-test.dir/source/main.cpp.o -[ 88%] Linking CXX executable ../../../metacall-fork-testd -[ 88%] Built target metacall-initialize-destroy-multiple-test -[ 88%] Built target metacall-initialize-destroy-multiple-node-test -[ 88%] Building CXX object source/tests/metacall_file_glob_test/CMakeFiles/metacall-file-glob-test.dir/source/metacall_file_glob_test.cpp.o -[ 88%] Building CXX object source/tests/metacall_typescript_test/CMakeFiles/metacall-typescript-test.dir/source/metacall_typescript_test.cpp.o -[ 88%] Built target metacall-initialize-test -[ 89%] Building CXX object source/tests/metacall_typescript_node_test/CMakeFiles/metacall-typescript-node-test.dir/source/main.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_call_map_test/CMakeFiles/metacall-typescript-call-map-test.dir/source/main.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_call_map_test/CMakeFiles/metacall-typescript-call-map-test.dir/source/metacall_typescript_call_map_test.cpp.o -[ 89%] Built target metacall-fork-test -[ 89%] Linking CXX executable ../../../metacall-map-await-testd -[ 89%] Building CXX object source/tests/metacall_typescript_tsx_test/CMakeFiles/metacall-typescript-tsx-test.dir/source/main.cpp.o -[ 89%] Linking CXX executable ../../../metacall-initialize-ex-testd -[ 89%] Linking CXX executable ../../../metacall-reinitialize-testd -[ 89%] Built target metacall-map-await-test -[ 89%] Building CXX object source/tests/metacall_function_test/CMakeFiles/metacall-function-test.dir/source/metacall_function_test.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_tsx_loop_fail_test/CMakeFiles/metacall-typescript-tsx-loop-fail-test.dir/source/main.cpp.o -[ 89%] Built target metacall-initialize-ex-test -[ 89%] Building CXX object source/tests/metacall_typescript_require_test/CMakeFiles/metacall-typescript-require-test.dir/source/main.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_jsx_default_test/CMakeFiles/metacall-typescript-jsx-default-test.dir/source/main.cpp.o -[ 89%] Built target metacall-reinitialize-test -[ 89%] Building CXX object source/tests/metacall_typescript_jsx_default_test/CMakeFiles/metacall-typescript-jsx-default-test.dir/source/metacall_typescript_jsx_default_test.cpp.o -[ 89%] Building CXX object source/tests/metacall_file_fail_test/CMakeFiles/metacall-file-fail-test.dir/source/metacall_file_fail_test.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_require_test/CMakeFiles/metacall-typescript-require-test.dir/source/metacall_typescript_require_test.cpp.o -[ 89%] Building CXX object source/tests/metacall_typescript_node_test/CMakeFiles/metacall-typescript-node-test.dir/source/metacall_typescript_node_test.cpp.o -[ 89%] Linking CXX executable ../../../metacall-ruby-parser-integration-testd -[ 89%] Linking CXX executable ../../../metacall-ruby-fail-testd -[ 90%] Linking CXX executable ../../../metacall-return-monad-testd -[ 90%] Building CXX object source/tests/metacall_typescript_tsx_test/CMakeFiles/metacall-typescript-tsx-test.dir/source/metacall_typescript_tsx_test.cpp.o -[ 90%] Building CXX object source/tests/metacall_typescript_tsx_loop_fail_test/CMakeFiles/metacall-typescript-tsx-loop-fail-test.dir/source/metacall_typescript_tsx_loop_fail_test.cpp.o -[ 90%] Built target metacall-ruby-parser-integration-test -[ 90%] Building CXX object source/tests/metacall_csharp_static_class_test/CMakeFiles/metacall-csharp-static-class-test.dir/source/main.cpp.o -[ 90%] Building CXX object source/tests/metacall_rpc_test/CMakeFiles/metacall-rpc-test.dir/source/main.cpp.o -[ 90%] Built target metacall-ruby-fail-test -[ 90%] Building CXX object source/tests/metacall_csharp_static_class_test/CMakeFiles/metacall-csharp-static-class-test.dir/source/metacall_csharp_static_class_test.cpp.o -[ 91%] Building CXX object source/tests/metacall_ruby_test/CMakeFiles/metacall-ruby-test.dir/source/main.cpp.o -[ 91%] Built target metacall-return-monad-test -[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/main.cpp.o -[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/environment.cpp.o -[ 91%] Linking CXX executable ../../../metacall-callback-complex-testd -[ 91%] Building CXX object source/tests/metacall_cs_test/CMakeFiles/metacall-cs-test.dir/source/metacall_cs_test.cpp.o -[ 91%] Building CXX object source/tests/metacall_rpc_test/CMakeFiles/metacall-rpc-test.dir/source/metacall_rpc_test.cpp.o -[ 92%] Linking CXX executable ../../../metacall-cobol-testd -[ 92%] Linking CXX executable ../../../metacall-ruby-fail-empty-testd -[ 92%] Linking CXX executable ../../../metacall-reload-functions-testd -[ 92%] Linking CXX executable ../../../metacall-ruby-object-class-testd -[ 92%] Linking CXX executable ../../../metacall-file-testd -[ 92%] Built target metacall-callback-complex-test -[ 92%] Linking CXX executable ../../../metacall-typescript-jsx-default-testd -[ 92%] Building CXX object source/tests/metacall_java_test/CMakeFiles/metacall-java-test.dir/source/main.cpp.o -[ 92%] Built target metacall-cobol-test -[ 92%] Building CXX object source/tests/metacall_wasm_test/CMakeFiles/metacall-wasm-test.dir/source/main.cpp.o -[ 92%] Built target metacall-ruby-object-class-test -[ 92%] Built target metacall-reload-functions-test -[ 92%] Built target metacall-ruby-fail-empty-test -[ 92%] Building CXX object source/tests/metacall_wasm_python_port_test/CMakeFiles/metacall-wasm-python-port-test.dir/source/main.cpp.o -[ 92%] Building CXX object source/tests/metacall_c_lib_test/CMakeFiles/metacall-c-lib-test.dir/source/main.cpp.o -[ 92%] Building CXX object source/tests/metacall_c_test/CMakeFiles/metacall-c-test.dir/source/main.cpp.o -[ 92%] Built target metacall-file-test -[ 92%] Built target metacall-typescript-jsx-default-test -[ 92%] Building CXX object source/tests/metacall_version_test/CMakeFiles/metacall-version-test.dir/source/main.cpp.o -[ 92%] Building CXX object source/tests/metacall_dynlink_path_test/CMakeFiles/metacall-dynlink-path-test.dir/source/main.cpp.o -[ 93%] Linking CXX executable ../../../metacall-typescript-testd -[ 94%] Building CXX object source/tests/metacall_dynlink_path_test/CMakeFiles/metacall-dynlink-path-test.dir/source/metacall_dynlink_path_test.cpp.o -[ 94%] Linking CXX executable ../../../metacall-file-glob-testd -[ 94%] Linking CXX executable ../../../metacall-typescript-call-map-testd -[ 94%] Building CXX object source/tests/metacall_ruby_test/CMakeFiles/metacall-ruby-test.dir/source/metacall_ruby_test.cpp.o -[ 95%] Building CXX object source/tests/metacall_version_test/CMakeFiles/metacall-version-test.dir/source/metacall_version_test.cpp.o -[ 95%] Built target metacall-typescript-test -[ 95%] Building CXX object source/tests/metacall_library_path_without_env_vars_test/CMakeFiles/metacall-library-path-without-env-vars-test.dir/source/main.cpp.o -[ 95%] Built target metacall-file-glob-test -[ 95%] Building CXX object source/tests/metacall_ext_test/CMakeFiles/metacall-ext-test.dir/source/main.cpp.o -[ 95%] Building CXX object source/tests/metacall_ext_test/CMakeFiles/metacall-ext-test.dir/source/metacall_ext_test.cpp.o -[ 95%] Built target metacall-typescript-call-map-test -[ 96%] Building CXX object source/tests/metacall_plugin_extension_test/CMakeFiles/metacall-plugin-extension-test.dir/source/main.cpp.o -[ 96%] Linking CXX executable ../../../metacall-typescript-require-testd -[ 96%] Building CXX object source/tests/metacall_wasm_test/CMakeFiles/metacall-wasm-test.dir/source/metacall_wasm_test.cpp.o -[ 96%] Linking CXX executable ../../../metacall-file-fail-testd -[ 96%] Building CXX object source/tests/metacall_java_test/CMakeFiles/metacall-java-test.dir/source/metacall_java_test.cpp.o -[ 96%] Built target metacall-typescript-require-test -[ 96%] Building CXX object source/tests/metacall_wasm_python_port_test/CMakeFiles/metacall-wasm-python-port-test.dir/source/metacall_wasm_python_port_test.cpp.o -[ 96%] Linking CXX executable ../../../metacall-function-testd -[ 96%] Built target metacall-file-fail-test -[ 96%] Linking CXX executable ../../../metacall-typescript-tsx-loop-fail-testd -[ 97%] Building CXX object source/tests/metacall_library_path_without_env_vars_test/CMakeFiles/metacall-library-path-without-env-vars-test.dir/source/metacall_library_path_without_env_vars_test.cpp.o -[ 98%] Building CXX object source/tests/metacall_c_lib_test/CMakeFiles/metacall-c-lib-test.dir/source/metacall_c_lib_test.cpp.o -[ 98%] Linking CXX executable ../../../metacall-typescript-node-testd -[ 98%] Building CXX object source/tests/metacall_c_test/CMakeFiles/metacall-c-test.dir/source/metacall_c_test.cpp.o -[ 98%] Building CXX object source/tests/metacall_plugin_extension_test/CMakeFiles/metacall-plugin-extension-test.dir/source/metacall_plugin_extension_test.cpp.o -[ 98%] Building CXX object source/tests/metacall_plugin_extension_local_test/CMakeFiles/metacall-plugin-extension-local-test.dir/source/main.cpp.o -[ 98%] Building CXX object source/tests/metacall_plugin_extension_local_test/CMakeFiles/metacall-plugin-extension-local-test.dir/source/metacall_plugin_extension_local_test.cpp.o -[ 98%] Built target metacall-function-test -[ 98%] Building CXX object source/tests/metacall_backtrace_plugin_test/CMakeFiles/metacall-backtrace-plugin-test.dir/source/main.cpp.o -[ 98%] Built target metacall-typescript-tsx-loop-fail-test -[ 98%] Linking CXX executable ../../../metacall-cs-testd -[ 98%] Linking CXX executable ../../../metacall-typescript-tsx-testd -[ 98%] Building CXX object source/tests/metacall_sandbox_plugin_test/CMakeFiles/metacall-sandbox-plugin-test.dir/source/main.cpp.o -[ 98%] Built target metacall-typescript-node-test -[ 98%] Building CXX object source/benchmarks/log_bench/CMakeFiles/log-bench.dir/source/log_bench.cpp.o -[ 98%] Linking CXX executable ../../../metacall-csharp-static-class-testd -[ 98%] Building CXX object source/benchmarks/metacall_py_c_api_bench/CMakeFiles/metacall-py-c-api-bench.dir/source/metacall_py_c_api_bench.cpp.o -[ 98%] Building CXX object source/tests/metacall_sandbox_plugin_test/CMakeFiles/metacall-sandbox-plugin-test.dir/source/metacall_sandbox_plugin_test.cpp.o -[ 98%] Built target metacall-cs-test -[ 98%] Built target metacall-typescript-tsx-test -[ 98%] Building CXX object source/benchmarks/metacall_py_call_bench/CMakeFiles/metacall-py-call-bench.dir/source/metacall_py_call_bench.cpp.o -[ 98%] Building CXX object source/tests/metacall_backtrace_plugin_test/CMakeFiles/metacall-backtrace-plugin-test.dir/source/metacall_backtrace_plugin_test.cpp.o -[ 98%] Building CXX object source/benchmarks/metacall_py_init_bench/CMakeFiles/metacall-py-init-bench.dir/source/metacall_py_init_bench.cpp.o -[ 98%] Linking CXX executable ../../../metacall-dynlink-path-testd -[ 98%] Linking CXX executable ../../../metacall-ruby-testd -[ 98%] Linking CXX executable ../../../metacall-version-testd -[ 98%] Built target metacall-csharp-static-class-test -[ 98%] Building CXX object source/benchmarks/metacall_node_call_bench/CMakeFiles/metacall-node-call-bench.dir/source/metacall_node_call_bench.cpp.o -[ 98%] Building CXX object source/benchmarks/metacall_rb_call_bench/CMakeFiles/metacall-rb-call-bench.dir/source/metacall_rb_call_bench.cpp.o -[ 98%] Built target metacall-dynlink-path-test -[ 98%] Built target metacall-ruby-test -[ 98%] Building CXX object source/benchmarks/metacall_cs_call_bench/CMakeFiles/metacall-cs-call-bench.dir/source/metacall_cs_call_bench.cpp.o -[ 98%] Linking CXX executable ../../../metacall-rpc-testd -[ 98%] Built target metacall-version-test -[ 98%] Built target metacall-rpc-test -[ 98%] Linking CXX executable ../../../metacall-wasm-python-port-testd -[ 98%] Linking CXX executable ../../../log-benchd -[ 99%] Linking CXX executable ../../../metacall-py-init-benchd -[ 99%] Built target metacall-wasm-python-port-test -[ 99%] Linking CXX executable ../../../metacall-py-c-api-benchd -[ 99%] Built target log-bench -[ 99%] Linking CXX executable ../../../metacall-library-path-without-env-vars-testd -[ 99%] Built target metacall-py-init-bench -[ 99%] Built target metacall-py-c-api-bench -[ 99%] Linking CXX executable ../../../metacall-py-call-benchd -[ 99%] Built target metacall-library-path-without-env-vars-test -[ 99%] Linking CXX executable ../../../metacall-rb-call-benchd -[ 99%] Linking CXX executable ../../../metacall-ext-testd -[ 99%] Built target metacall-py-call-bench -[100%] Linking CXX executable ../../../metacall-cs-call-benchd -[100%] Linking CXX executable ../../../metacall-node-call-benchd -[100%] Built target metacall-rb-call-bench -[100%] Built target metacall-cs-call-bench -[100%] Built target metacall-ext-test -[100%] Linking CXX executable ../../../metacall-c-lib-testd -[100%] Built target metacall-node-call-bench -[100%] Built target metacall-c-lib-test -[100%] Linking CXX executable ../../../metacall-backtrace-plugin-testd -[100%] Built target metacall-backtrace-plugin-test -[100%] Linking CXX executable ../../../metacall-c-testd -[100%] Linking CXX executable ../../../metacall-plugin-extension-local-testd -[100%] Linking CXX executable ../../../metacall-plugin-extension-testd -[100%] Built target metacall-plugin-extension-local-test -[100%] Built target metacall-c-test -[100%] Built target metacall-plugin-extension-test -[100%] Linking CXX executable ../../../metacall-wasm-testd -[100%] Linking CXX executable ../../../metacall-java-testd -[100%] Built target metacall-wasm-test -[100%] Built target metacall-java-test -[100%] Linking CXX executable ../../../metacall-sandbox-plugin-testd -[100%] Built target metacall-sandbox-plugin-test -+ [ 1 = 1 ] -+ getconf _NPROCESSORS_ONLN -+ ctest -j24 --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C Debug -Test project /usr/local/metacall/build - Start 1: ts_loader_bootstrap - Start 2: node_port - Start 3: node_port_test_executable - Start 4: py_port - Start 5: go_port - Start 6: rs_port - Start 7: rb_port - Start 8: preprocessor-test - Start 9: environment-test - Start 10: log-test - Start 11: log-custom-test - Start 12: adt-set-test - Start 13: adt-trie-test - Start 14: adt-vector-test - Start 15: adt-map-test - Start 16: reflect-value-cast-test - Start 17: reflect-function-test - Start 18: reflect-object-class-test - Start 19: reflect-scope-test - Start 20: reflect-metadata-test - Start 21: dynlink-test - Start 22: detour-test - Start 23: serial-test - Start 24: configuration-test - 1/175 Test #8: preprocessor-test ................................ Passed 0.04 sec - 2/175 Test #9: environment-test ................................. Passed 0.03 sec - 3/175 Test #10: log-test ......................................... Passed 0.03 sec - 4/175 Test #11: log-custom-test .................................. Passed 0.03 sec - 5/175 Test #12: adt-set-test ..................................... Passed 0.03 sec - 6/175 Test #13: adt-trie-test .................................... Passed 0.03 sec - 7/175 Test #14: adt-vector-test .................................. Passed 0.03 sec - 8/175 Test #15: adt-map-test ..................................... Passed 0.03 sec - 9/175 Test #16: reflect-value-cast-test .......................... Passed 0.02 sec - 10/175 Test #17: reflect-function-test ............................ Passed 0.02 sec - 11/175 Test #18: reflect-object-class-test ........................ Passed 0.02 sec - 12/175 Test #19: reflect-scope-test ............................... Passed 0.02 sec - 13/175 Test #20: reflect-metadata-test ............................ Passed 0.02 sec - 14/175 Test #21: dynlink-test ..................................... Passed 0.02 sec - Start 25: rb-loader-parser-test - Start 26: portability-path-test - Start 27: metacall-logs-test - Start 28: metacall-load-memory-test - Start 29: metacall-load-memory-empty-test - Start 30: metacall-load-configuration-test - Start 31: metacall-load-configuration-fail-test - Start 32: metacall-load-configuration-relative-test - Start 33: metacall-load-configuration-python-node-test - Start 34: metacall-load-configuration-node-python-test - Start 35: metacall-duplicated-handle-test - Start 36: metacall-duplicated-symbols-test - Start 37: metacall-handle-export-test - Start 38: metacall-handle-get-test - 15/175 Test #22: detour-test ...................................... Passed 0.08 sec - 16/175 Test #23: serial-test ...................................... Passed 0.07 sec - 17/175 Test #24: configuration-test ............................... Passed 0.07 sec - 18/175 Test #25: rb-loader-parser-test ............................ Passed 0.06 sec - 19/175 Test #26: portability-path-test ............................ Passed 0.06 sec - Start 39: metacall-test - Start 40: metacall-node-test - Start 41: metacall-node-event-loop-test - Start 42: metacall-node-event-loop-signal-test - Start 43: metacall-node-call-test - 20/175 Test #27: metacall-logs-test ............................... Passed 0.33 sec - Start 44: metacall-node-inline-test - 21/175 Test #32: metacall-load-configuration-relative-test ........ Passed 0.46 sec - Start 45: metacall-node-async-test - 22/175 Test #31: metacall-load-configuration-fail-test ............ Passed 0.66 sec - Start 46: metacall-node-async-multiple-test - 23/175 Test #42: metacall-node-event-loop-signal-test ............. Passed 0.62 sec - Start 47: metacall-node-reentrant-test - 24/175 Test #28: metacall-load-memory-test ........................ Passed 0.72 sec - Start 48: metacall-node-port-test - 25/175 Test #40: metacall-node-test ............................... Passed 0.77 sec - Start 49: metacall-node-port-await-test - 26/175 Test #7: rb_port .......................................... Passed 0.90 sec - Start 50: metacall-node-port-c-lib-test - 27/175 Test #36: metacall-duplicated-symbols-test ................. Passed 1.06 sec - Start 51: metacall-node-python-port-mock-test - 28/175 Test #45: metacall-node-async-test ......................... Passed 0.69 sec - Start 52: metacall-node-python-port-ruby-test - 29/175 Test #44: metacall-node-inline-test ........................ Passed 0.87 sec - Start 53: metacall-node-python-ruby-test - 30/175 Test #47: metacall-node-reentrant-test ..................... Passed 0.66 sec - Start 54: metacall-node-callback-test - 31/175 Test #33: metacall-load-configuration-python-node-test ..... Passed 1.37 sec - Start 55: metacall-node-fail-test - 32/175 Test #43: metacall-node-call-test .......................... Passed 1.36 sec - Start 56: metacall-node-fail-env-var-test - 33/175 Test #37: metacall-handle-export-test ...................... Passed 1.40 sec - Start 57: metacall-node-fail-load-leak-test - 34/175 Test #30: metacall-load-configuration-test ................. Passed 1.51 sec - Start 58: metacall-node-typescript-test - 35/175 Test #34: metacall-load-configuration-node-python-test ..... Passed 1.52 sec - Start 59: metacall-node-python-async-after-destroy-test - 36/175 Test #38: metacall-handle-get-test ......................... Passed 1.52 sec - Start 60: metacall-node-python-await-test - 37/175 Test #35: metacall-duplicated-handle-test .................. Passed 1.56 sec - Start 61: metacall-node-python-exception-test - 38/175 Test #4: py_port .......................................... Passed 1.72 sec - Start 62: metacall-node-clear-mem-test - 39/175 Test #49: metacall-node-port-await-test .................... Passed 0.86 sec - Start 63: metacall-node-async-resources-test - 40/175 Test #50: metacall-node-port-c-lib-test .................... Passed 0.85 sec - Start 64: metacall-node-await-chain-test - 41/175 Test #56: metacall-node-fail-env-var-test .................. Passed 0.35 sec - Start 65: metacall-node-exception-test - 42/175 Test #55: metacall-node-fail-test .......................... Passed 0.60 sec - Start 66: metacall-node-python-deadlock-test - 43/175 Test #57: metacall-node-fail-load-leak-test ................ Passed 0.55 sec - Start 67: metacall-node-native-code-test - 44/175 Test #62: metacall-node-clear-mem-test ..................... Passed 0.42 sec - Start 68: metacall-node-extension-test - 45/175 Test #52: metacall-node-python-port-ruby-test .............. Passed 1.04 sec - Start 69: metacall-node-multithread-deadlock-test - 46/175 Test #64: metacall-node-await-chain-test ................... Passed 0.51 sec - Start 70: metacall-distributable-test - 47/175 Test #51: metacall-node-python-port-mock-test .............. Passed 1.13 sec - Start 71: metacall-cast-test - 48/175 Test #54: metacall-node-callback-test ...................... Passed 0.89 sec - Start 72: metacall-init-fini-test - 49/175 Test #65: metacall-node-exception-test ..................... Passed 0.51 sec - Start 73: metacall-ducktype-test - 50/175 Test #68: metacall-node-extension-test ..................... Passed 0.40 sec - Start 74: metacall-inspect-test - 51/175 Test #60: metacall-node-python-await-test .................. Passed 0.92 sec - Start 75: metacall-integration-test - 52/175 Test #67: metacall-node-native-code-test ................... Passed 0.52 sec - Start 76: metacall-depends-test - 53/175 Test #61: metacall-node-python-exception-test .............. Passed 0.97 sec - Start 77: metacall-configuration-exec-path-test - 54/175 Test #29: metacall-load-memory-empty-test .................. Passed 2.70 sec - Start 78: metacall-configuration-default-test - 55/175 Test #78: metacall-configuration-default-test .............. Passed 0.02 sec - Start 79: metacall-clear-test - 56/175 Test #71: metacall-cast-test ............................... Passed 0.58 sec - Start 80: metacall-python-test - 57/175 Test #73: metacall-ducktype-test ........................... Passed 0.54 sec - Start 81: metacall-python-object-class-test - 58/175 Test #72: metacall-init-fini-test .......................... Passed 0.74 sec - Start 82: metacall-python-gc-test - 59/175 Test #77: metacall-configuration-exec-path-test ............ Passed 0.56 sec - Start 83: metacall-python-open-test - 60/175 Test #76: metacall-depends-test ............................ Passed 0.65 sec - Start 84: metacall-python-dict-test - 61/175 Test #53: metacall-node-python-ruby-test ................... Passed 2.00 sec - Start 85: metacall-python-pointer-test - 62/175 Test #66: metacall-node-python-deadlock-test ............... Passed 1.25 sec - Start 86: metacall-python-reentrant-test - 63/175 Test #81: metacall-python-object-class-test ................ Passed 0.65 sec - Start 87: metacall-python-varargs-test - 64/175 Test #79: metacall-clear-test .............................. Passed 0.98 sec - Start 88: py-loader-port-test - 65/175 Test #82: metacall-python-gc-test .......................... Passed 0.76 sec - Start 89: metacall-python-port-https-test - 66/175 Test #85: metacall-python-pointer-test ..................... Passed 0.57 sec - Start 90: metacall-python-port-callback-test - 67/175 Test #80: metacall-python-test ............................. Passed 1.01 sec - Start 91: metacall-python-port-pointer-test - 68/175 Test #84: metacall-python-dict-test ........................ Passed 0.68 sec - Start 92: metacall-python-port-import-test - 69/175 Test #86: metacall-python-reentrant-test ................... Passed 1.09 sec - Start 93: metacall-python-callback-test - 70/175 Test #87: metacall-python-varargs-test ..................... Passed 0.86 sec - Start 94: metacall-python-fail-test - 71/175 Test #90: metacall-python-port-callback-test ............... Passed 0.80 sec - Start 95: metacall-python-relative-path-test - 72/175 Test #88: py-loader-port-test .............................. Passed 0.91 sec - Start 96: metacall-python-without-functions-test - 73/175 Test #91: metacall-python-port-pointer-test ................ Passed 0.97 sec - Start 97: metacall-python-builtins-test - 74/175 Test #46: metacall-node-async-multiple-test ................ Passed 4.26 sec - Start 98: metacall-python-async-test - 75/175 Test #94: metacall-python-fail-test ........................ Passed 0.67 sec - Start 99: metacall-python-exception-test - 76/175 Test #89: metacall-python-port-https-test .................. Passed 1.28 sec - Start 100: metacall-python-without-env-vars-test - 77/175 Test #95: metacall-python-relative-path-test ............... Passed 0.64 sec - Start 101: metacall-map-test - 78/175 Test #96: metacall-python-without-functions-test ........... Passed 0.65 sec - Start 102: metacall-map-await-test - 79/175 Test #2: node_port ........................................ Passed 5.42 sec - Start 103: metacall-initialize-test - 80/175 Test #103: metacall-initialize-test ......................... Passed 0.05 sec - Start 104: metacall-initialize-ex-test - 81/175 Test #104: metacall-initialize-ex-test ...................... Passed 0.01 sec - Start 105: metacall-reinitialize-test - 82/175 Test #3: node_port_test_executable ........................ Passed 5.50 sec - Start 106: metacall-initialize-destroy-multiple-test - 83/175 Test #106: metacall-initialize-destroy-multiple-test ........ Passed 0.02 sec - Start 107: metacall-initialize-destroy-multiple-node-test - 84/175 Test #97: metacall-python-builtins-test .................... Passed 0.74 sec - Start 108: metacall-reload-functions-test - 85/175 Test #93: metacall-python-callback-test .................... Passed 1.21 sec - Start 109: metacall-invalid-loader-test - 86/175 Test #109: metacall-invalid-loader-test ..................... Passed 0.02 sec - Start 110: metacall-fork-test - 87/175 Test #98: metacall-python-async-test ....................... Passed 0.63 sec - 88/175 Test #105: metacall-reinitialize-test ....................... Passed 0.14 sec - Start 111: metacall-return-monad-test - Start 112: metacall-callback-complex-test - 89/175 Test #58: metacall-node-typescript-test .................... Passed 4.07 sec - Start 113: metacall-ruby-fail-test - 90/175 Test #110: metacall-fork-test ............................... Passed 0.06 sec - Start 114: metacall-ruby-fail-empty-test - 91/175 Test #99: metacall-python-exception-test ................... Passed 0.62 sec - Start 115: metacall-ruby-object-class-test - 92/175 Test #113: metacall-ruby-fail-test .......................... Passed 0.06 sec - Start 116: metacall-ruby-parser-integration-test - 93/175 Test #115: metacall-ruby-object-class-test .................. Passed 0.04 sec - Start 117: metacall-function-test - 94/175 Test #116: metacall-ruby-parser-integration-test ............ Passed 0.04 sec - Start 118: metacall-cobol-test - 95/175 Test #114: metacall-ruby-fail-empty-test .................... Passed 0.08 sec - Start 119: metacall-file-test - 96/175 Test #119: metacall-file-test ............................... Passed 0.02 sec - Start 120: metacall-file-fail-test - 97/175 Test #118: metacall-cobol-test .............................. Passed 0.04 sec - Start 121: metacall-file-glob-test - 98/175 Test #120: metacall-file-fail-test .......................... Passed 0.01 sec - Start 122: metacall-typescript-test - 99/175 Test #100: metacall-python-without-env-vars-test ............ Passed 0.70 sec - Start 123: metacall-typescript-node-test -100/175 Test #121: metacall-file-glob-test .......................... Passed 0.03 sec - Start 124: metacall-typescript-call-map-test -101/175 Test #102: metacall-map-await-test .......................... Passed 0.55 sec - Start 125: metacall-typescript-tsx-test -102/175 Test #107: metacall-initialize-destroy-multiple-node-test ... Passed 0.41 sec - Start 126: metacall-typescript-tsx-loop-fail-test -103/175 Test #41: metacall-node-event-loop-test .................... Passed 5.86 sec - Start 127: metacall-typescript-require-test -104/175 Test #111: metacall-return-monad-test ....................... Passed 0.49 sec - Start 128: metacall-typescript-jsx-default-test -105/175 Test #92: metacall-python-port-import-test ................. Passed 2.49 sec - Start 129: metacall-rpc-test -106/175 Test #101: metacall-map-test ................................ Passed 1.51 sec - Start 130: metacall-csharp-static-class-test -107/175 Test #117: metacall-function-test ........................... Passed 1.21 sec - Start 131: metacall-ruby-test -108/175 Test #131: metacall-ruby-test ............................... Passed 0.12 sec - Start 132: metacall-cs-test -109/175 Test #108: metacall-reload-functions-test ................... Passed 1.82 sec - Start 133: metacall-java-test -110/175 Test #39: metacall-test .................................... Passed 7.34 sec - Start 134: metacall-wasm-test -111/175 Test #129: metacall-rpc-test ................................ Passed 1.13 sec - Start 135: metacall-wasm-python-port-test -112/175 Test #134: metacall-wasm-test ............................... Passed 0.10 sec - Start 136: metacall-c-test -113/175 Test #136: metacall-c-test .................................. Passed 0.15 sec - Start 137: metacall-c-lib-test -114/175 Test #112: metacall-callback-complex-test ................... Passed 2.28 sec - Start 138: metacall-version-test -115/175 Test #137: metacall-c-lib-test .............................. Passed 0.19 sec - Start 139: metacall-dynlink-path-test -116/175 Test #138: metacall-version-test ............................ Passed 0.01 sec - Start 140: metacall-library-path-without-env-vars-test -117/175 Test #139: metacall-dynlink-path-test ....................... Passed 0.01 sec - Start 141: metacall-ext-test -118/175 Test #140: metacall-library-path-without-env-vars-test ...... Passed 0.02 sec - Start 142: metacall-plugin-extension-test -119/175 Test #141: metacall-ext-test ................................ Passed 0.02 sec - Start 143: metacall-plugin-extension-local-test -120/175 Test #70: metacall-distributable-test ...................... Passed 6.31 sec - Start 144: metacall-backtrace-plugin-test -121/175 Test #135: metacall-wasm-python-port-test ................... Passed 1.07 sec - Start 145: metacall-sandbox-plugin-test -122/175 Test #59: metacall-node-python-async-after-destroy-test .... Passed 7.03 sec - Start 146: log-bench -123/175 Test #75: metacall-integration-test ........................ Passed 6.16 sec - Start 147: metacall-py-c-api-bench -124/175 Test #6: rs_port .......................................... Passed 9.00 sec - Start 148: metacall-py-call-bench -125/175 Test #144: metacall-backtrace-plugin-test ................... Passed 0.45 sec - Start 149: metacall-py-init-bench -126/175 Test #74: metacall-inspect-test ............................ Passed 6.67 sec - Start 150: metacall-node-call-bench -127/175 Test #143: metacall-plugin-extension-local-test ............. Passed 1.52 sec - Start 151: metacall-rb-call-bench -128/175 Test #126: metacall-typescript-tsx-loop-fail-test ........... Passed 3.83 sec - Start 152: metacall-cs-call-bench -129/175 Test #149: metacall-py-init-bench ........................... Passed 0.77 sec - Start 153: metacallcli -130/175 Test #83: metacall-python-open-test ........................ Passed 6.71 sec - Start 154: metacallcli-inspect-leak -131/175 Test #142: metacall-plugin-extension-test ................... Passed 1.99 sec - Start 155: metacallcli-node -132/175 Test #123: metacall-typescript-node-test .................... Passed 4.72 sec - Start 156: metacallcli-node-port-py -133/175 Test #145: metacall-sandbox-plugin-test ..................... Passed 2.02 sec - Start 157: metacallcli-node-port-py-rb -134/175 Test #48: metacall-node-port-test .......................... Passed 9.87 sec - Start 158: metacallcli-node-null -135/175 Test #154: metacallcli-inspect-leak ......................... Passed 0.89 sec - Start 159: metacallcli-node-null-empty -136/175 Test #153: metacallcli ...................................... Passed 1.16 sec - Start 160: metacallcli-node-null-undefined -137/175 Test #133: metacall-java-test ............................... Passed 3.56 sec - Start 161: metacallcli-py-port -138/175 Test #155: metacallcli-node ................................. Passed 1.07 sec - Start 162: metacallcli-py-port-rb -139/175 Test #122: metacall-typescript-test ......................... Passed 5.36 sec - Start 163: metacallcli-file -140/175 Test #159: metacallcli-node-null-empty ...................... Passed 0.69 sec - Start 164: metacallcli-file-fail -141/175 Test #124: metacall-typescript-call-map-test ................ Passed 5.78 sec - Start 165: metacallcli-py-naming -142/175 Test #160: metacallcli-node-null-undefined .................. Passed 0.72 sec - Start 166: metacallcli-py-argv -143/175 Test #130: metacall-csharp-static-class-test ................ Passed 5.12 sec - Start 167: metacallcli-py-main -144/175 Test #128: metacall-typescript-jsx-default-test ............. Passed 5.90 sec - Start 168: metacallcli-py-exception -145/175 Test #163: metacallcli-file ................................. Passed 0.92 sec - Start 169: metacallcli-ts -146/175 Test #158: metacallcli-node-null ............................ Passed 1.45 sec - Start 170: metacallcli-tsx-templating -147/175 Test #157: metacallcli-node-port-py-rb ...................... Passed 1.58 sec - Start 171: metacallcli-tsx-loop-fail -148/175 Test #156: metacallcli-node-port-py ......................... Passed 1.70 sec - Start 172: metacallcli-py-tsx -149/175 Test #164: metacallcli-file-fail ............................ Passed 0.84 sec - Start 173: cli_repl_plugin -150/175 Test #162: metacallcli-py-port-rb ........................... Passed 1.43 sec - Start 174: cli_cmd_plugin -151/175 Test #161: metacallcli-py-port .............................. Passed 1.59 sec - Start 175: metacalllog -152/175 Test #175: metacalllog ...................................... Passed 0.03 sec -153/175 Test #173: cli_repl_plugin .................................. Passed 0.69 sec -154/175 Test #174: cli_cmd_plugin ................................... Passed 0.66 sec -155/175 Test #165: metacallcli-py-naming ............................ Passed 1.70 sec -156/175 Test #166: metacallcli-py-argv .............................. Passed 1.79 sec -157/175 Test #132: metacall-cs-test ................................. Passed 6.45 sec -158/175 Test #168: metacallcli-py-exception ......................... Passed 1.97 sec -159/175 Test #167: metacallcli-py-main .............................. Passed 2.32 sec -160/175 Test #127: metacall-typescript-require-test ................. Passed 8.48 sec -161/175 Test #125: metacall-typescript-tsx-test ..................... Passed 8.86 sec -162/175 Test #1: ts_loader_bootstrap .............................. Passed 15.33 sec -163/175 Test #171: metacallcli-tsx-loop-fail ........................ Passed 4.17 sec -164/175 Test #169: metacallcli-ts ................................... Passed 4.44 sec -165/175 Test #146: log-bench ........................................ Passed 8.61 sec -166/175 Test #172: metacallcli-py-tsx ............................... Passed 6.45 sec -167/175 Test #170: metacallcli-tsx-templating ....................... Passed 6.94 sec -168/175 Test #5: go_port .......................................... Passed 20.72 sec -169/175 Test #147: metacall-py-c-api-bench .......................... Passed 14.79 sec -170/175 Test #69: metacall-node-multithread-deadlock-test .......... Passed 22.96 sec -171/175 Test #152: metacall-cs-call-bench ........................... Passed 25.50 sec -172/175 Test #151: metacall-rb-call-bench ........................... Passed 33.41 sec -173/175 Test #148: metacall-py-call-bench ........................... Passed 34.83 sec -174/175 Test #63: metacall-node-async-resources-test ............... Passed 63.56 sec -175/175 Test #150: metacall-node-call-bench ......................... Passed 90.04 sec - -100% tests passed, 0 tests failed out of 175 - -Label Time Summary: -/usr/local/metacall/build/scripts/typedfunc = 28.42 sec*proc (5 tests) -MEMCHECK_IGNORE = 35.41 sec*proc (7 tests) -WORKING_DIRECTORY = 28.42 sec*proc (5 tests) -adt-map-test = 0.03 sec*proc (1 test) -adt-set-test = 0.03 sec*proc (1 test) -adt-trie-test = 0.03 sec*proc (1 test) -adt-vector-test = 0.03 sec*proc (1 test) -configuration-test = 0.07 sec*proc (1 test) -detour-test = 0.08 sec*proc (1 test) -dynlink-test = 0.02 sec*proc (1 test) -environment-test = 0.03 sec*proc (1 test) -go_port = 20.72 sec*proc (1 test) -log-bench = 8.61 sec*proc (1 test) -log-custom-test = 0.03 sec*proc (1 test) -log-test = 0.03 sec*proc (1 test) -metacall-backtrace-plugin-test = 0.45 sec*proc (1 test) -metacall-c-lib-test = 0.19 sec*proc (1 test) -metacall-c-test = 0.15 sec*proc (1 test) -metacall-callback-complex-test = 2.28 sec*proc (1 test) -metacall-cast-test = 0.58 sec*proc (1 test) -metacall-clear-test = 0.98 sec*proc (1 test) -metacall-cobol-test = 0.04 sec*proc (1 test) -metacall-configuration-default-test = 0.02 sec*proc (1 test) -metacall-configuration-exec-path-test = 0.56 sec*proc (1 test) -metacall-cs-call-bench = 25.50 sec*proc (1 test) -metacall-cs-test = 6.45 sec*proc (1 test) -metacall-csharp-static-class-test = 5.12 sec*proc (1 test) -metacall-depends-test = 0.65 sec*proc (1 test) -metacall-distributable-test = 6.31 sec*proc (1 test) -metacall-ducktype-test = 0.54 sec*proc (1 test) -metacall-duplicated-handle-test = 1.56 sec*proc (1 test) -metacall-duplicated-symbols-test = 1.06 sec*proc (1 test) -metacall-dynlink-path-test = 0.01 sec*proc (1 test) -metacall-ext-test = 0.02 sec*proc (1 test) -metacall-file-fail-test = 0.01 sec*proc (1 test) -metacall-file-glob-test = 0.03 sec*proc (1 test) -metacall-file-test = 0.02 sec*proc (1 test) -metacall-fork-test = 0.06 sec*proc (1 test) -metacall-function-test = 1.21 sec*proc (1 test) -metacall-handle-export-test = 1.40 sec*proc (1 test) -metacall-handle-get-test = 1.52 sec*proc (1 test) -metacall-init-fini-test = 0.74 sec*proc (1 test) -metacall-initialize-destroy-multiple-node-test = 0.41 sec*proc (1 test) -metacall-initialize-destroy-multiple-test = 0.02 sec*proc (1 test) -metacall-initialize-ex-test = 0.01 sec*proc (1 test) -metacall-initialize-test = 0.05 sec*proc (1 test) -metacall-inspect-test = 6.67 sec*proc (1 test) -metacall-integration-test = 6.16 sec*proc (1 test) -metacall-invalid-loader-test = 0.02 sec*proc (1 test) -metacall-java-test = 3.56 sec*proc (1 test) -metacall-library-path-without-env-vars-test = 0.02 sec*proc (1 test) -metacall-load-configuration-fail-test = 0.66 sec*proc (1 test) -metacall-load-configuration-node-python-test = 1.52 sec*proc (1 test) -metacall-load-configuration-python-node-test = 1.37 sec*proc (1 test) -metacall-load-configuration-relative-test = 0.46 sec*proc (1 test) -metacall-load-configuration-test = 1.51 sec*proc (1 test) -metacall-load-memory-empty-test = 2.70 sec*proc (1 test) -metacall-load-memory-test = 0.72 sec*proc (1 test) -metacall-logs-test = 0.33 sec*proc (1 test) -metacall-map-await-test = 0.55 sec*proc (1 test) -metacall-map-test = 1.51 sec*proc (1 test) -metacall-node-async-multiple-test = 4.26 sec*proc (1 test) -metacall-node-async-resources-test = 63.56 sec*proc (1 test) -metacall-node-async-test = 0.69 sec*proc (1 test) -metacall-node-await-chain-test = 0.51 sec*proc (1 test) -metacall-node-call-bench = 90.04 sec*proc (1 test) -metacall-node-call-test = 1.36 sec*proc (1 test) -metacall-node-callback-test = 0.89 sec*proc (1 test) -metacall-node-clear-mem-test = 0.42 sec*proc (1 test) -metacall-node-event-loop-signal-test = 0.62 sec*proc (1 test) -metacall-node-event-loop-test = 5.86 sec*proc (1 test) -metacall-node-exception-test = 0.51 sec*proc (1 test) -metacall-node-extension-test = 0.40 sec*proc (1 test) -metacall-node-fail-env-var-test = 0.35 sec*proc (1 test) -metacall-node-fail-load-leak-test = 0.55 sec*proc (1 test) -metacall-node-fail-test = 0.60 sec*proc (1 test) -metacall-node-inline-test = 0.87 sec*proc (1 test) -metacall-node-multithread-deadlock-test = 22.96 sec*proc (1 test) -metacall-node-native-code-test = 0.52 sec*proc (1 test) -metacall-node-port-await-test = 0.86 sec*proc (1 test) -metacall-node-port-c-lib-test = 0.85 sec*proc (1 test) -metacall-node-port-test = 9.87 sec*proc (1 test) -metacall-node-python-async-after-destroy-test = 7.03 sec*proc (1 test) -metacall-node-python-await-test = 0.92 sec*proc (1 test) -metacall-node-python-deadlock-test = 1.25 sec*proc (1 test) -metacall-node-python-exception-test = 0.97 sec*proc (1 test) -metacall-node-python-port-mock-test = 1.13 sec*proc (1 test) -metacall-node-python-port-ruby-test = 1.04 sec*proc (1 test) -metacall-node-python-ruby-test = 2.00 sec*proc (1 test) -metacall-node-reentrant-test = 0.66 sec*proc (1 test) -metacall-node-test = 0.77 sec*proc (1 test) -metacall-node-typescript-test = 4.07 sec*proc (1 test) -metacall-plugin-extension-local-test = 1.52 sec*proc (1 test) -metacall-plugin-extension-test = 1.99 sec*proc (1 test) -metacall-py-c-api-bench = 14.79 sec*proc (1 test) -metacall-py-call-bench = 34.83 sec*proc (1 test) -metacall-py-init-bench = 0.77 sec*proc (1 test) -metacall-python-builtins-test = 0.74 sec*proc (1 test) -metacall-python-callback-test = 1.21 sec*proc (1 test) -metacall-python-dict-test = 0.68 sec*proc (1 test) -metacall-python-exception-test = 0.62 sec*proc (1 test) -metacall-python-fail-test = 0.67 sec*proc (1 test) -metacall-python-gc-test = 0.76 sec*proc (1 test) -metacall-python-object-class-test = 0.65 sec*proc (1 test) -metacall-python-open-test = 6.71 sec*proc (1 test) -metacall-python-pointer-test = 0.57 sec*proc (1 test) -metacall-python-port-callback-test = 0.80 sec*proc (1 test) -metacall-python-port-https-test = 1.28 sec*proc (1 test) -metacall-python-port-import-test = 2.49 sec*proc (1 test) -metacall-python-port-pointer-test = 0.97 sec*proc (1 test) -metacall-python-reentrant-test = 1.09 sec*proc (1 test) -metacall-python-relative-path-test = 0.64 sec*proc (1 test) -metacall-python-test = 1.01 sec*proc (1 test) -metacall-python-varargs-test = 0.86 sec*proc (1 test) -metacall-python-without-env-vars-test = 0.70 sec*proc (1 test) -metacall-python-without-functions-test = 0.65 sec*proc (1 test) -metacall-rb-call-bench = 33.41 sec*proc (1 test) -metacall-reinitialize-test = 0.14 sec*proc (1 test) -metacall-reload-functions-test = 1.82 sec*proc (1 test) -metacall-return-monad-test = 0.49 sec*proc (1 test) -metacall-rpc-test = 1.13 sec*proc (1 test) -metacall-ruby-fail-empty-test = 0.08 sec*proc (1 test) -metacall-ruby-fail-test = 0.06 sec*proc (1 test) -metacall-ruby-object-class-test = 0.04 sec*proc (1 test) -metacall-ruby-parser-integration-test = 0.04 sec*proc (1 test) -metacall-ruby-test = 0.12 sec*proc (1 test) -metacall-sandbox-plugin-test = 2.02 sec*proc (1 test) -metacall-test = 7.34 sec*proc (1 test) -metacall-typescript-call-map-test = 5.78 sec*proc (1 test) -metacall-typescript-jsx-default-test = 5.90 sec*proc (1 test) -metacall-typescript-node-test = 4.72 sec*proc (1 test) -metacall-typescript-require-test = 8.48 sec*proc (1 test) -metacall-typescript-test = 5.36 sec*proc (1 test) -metacall-typescript-tsx-loop-fail-test = 3.83 sec*proc (1 test) -metacall-typescript-tsx-test = 8.86 sec*proc (1 test) -metacall-version-test = 0.01 sec*proc (1 test) -metacall-wasm-python-port-test = 1.07 sec*proc (1 test) -metacall-wasm-test = 0.10 sec*proc (1 test) -metacallcli = 1.16 sec*proc (1 test) -metacallcli-file = 0.92 sec*proc (1 test) -metacallcli-file-fail = 0.84 sec*proc (1 test) -metacallcli-inspect-leak = 0.89 sec*proc (1 test) -metacallcli-node = 1.07 sec*proc (1 test) -metacallcli-node-null = 1.45 sec*proc (1 test) -metacallcli-node-null-empty = 0.69 sec*proc (1 test) -metacallcli-node-null-undefined = 0.72 sec*proc (1 test) -metacallcli-node-port-py = 1.70 sec*proc (1 test) -metacallcli-node-port-py-rb = 1.58 sec*proc (1 test) -metacallcli-py-argv = 1.79 sec*proc (1 test) -metacallcli-py-exception = 1.97 sec*proc (1 test) -metacallcli-py-main = 2.32 sec*proc (1 test) -metacallcli-py-naming = 1.70 sec*proc (1 test) -metacallcli-py-port = 1.59 sec*proc (1 test) -metacallcli-py-port-rb = 1.43 sec*proc (1 test) -metacallcli-py-tsx = 6.45 sec*proc (1 test) -metacallcli-ts = 4.44 sec*proc (1 test) -metacallcli-tsx-loop-fail = 4.17 sec*proc (1 test) -metacallcli-tsx-templating = 6.94 sec*proc (1 test) -metacalllog = 0.03 sec*proc (1 test) -node_port_test = 5.42 sec*proc (1 test) -node_port_test_executable = 5.50 sec*proc (1 test) -portability-path-test = 0.06 sec*proc (1 test) -preprocessor-test = 0.04 sec*proc (1 test) -py-loader-port-test = 0.91 sec*proc (1 test) -py_port_test = 1.72 sec*proc (1 test) -rb-loader-parser-test = 0.06 sec*proc (1 test) -rb_port_test = 0.90 sec*proc (1 test) -reflect-function-test = 0.02 sec*proc (1 test) -reflect-metadata-test = 0.02 sec*proc (1 test) -reflect-object-class-test = 0.02 sec*proc (1 test) -reflect-scope-test = 0.02 sec*proc (1 test) -reflect-value-cast-test = 0.02 sec*proc (1 test) -rs_port = 9.00 sec*proc (1 test) -serial-test = 0.07 sec*proc (1 test) -ts_loader_bootstrap = 15.33 sec*proc (1 test) - -Total Test time (real) = 99.30 sec -+ [ 0 = 1 ] -+ [ 1 = 1 ] -+ [ = ] -+ make install -[ 0%] Built target version -[ 0%] Built target preprocessor -[ 1%] Built target environment -[ 1%] Built target format -[ 1%] Built target threading -[ 2%] Built target portability -[ 6%] Built target log -[ 6%] Built target memory -[ 7%] Built target adt -[ 8%] Built target filesystem -[ 9%] Built target dynlink -[ 10%] Built target plugin -[ 10%] Built target detour -[ 13%] Built target reflect -[ 13%] Built target serial -[ 14%] Built target configuration -[ 14%] Built target loader -[ 29%] Built target metacall -[ 30%] Built target libtcc-depends -[ 30%] Built target c_loader -[ 30%] Built target cob_loader - Determining projects to restore... - All projects are up-to-date for restore. -MSBuild version 17.7.6+77d58ec69 for .NET - Determining projects to restore... - All projects are up-to-date for restore. - project -> /usr/local/metacall/source/loaders/cs_loader/netcore/source/bin/Debug/net7.0/CSLoader.dll - project -> /usr/local/metacall/build/ -[ 30%] Built target cs_loader_impl -[ 31%] Built target cs_loader -[ 32%] Built target ext_loader -[ 32%] Built target file_loader -Note: /usr/local/metacall/source/loaders/java_loader/bootstrap/lib/bootstrap.java uses or overrides a deprecated API. -Note: Recompile with -Xlint:deprecation for details. -[ 32%] Built target java_loader_bootstrap -[ 33%] Built target java_loader -[ 33%] Built target mock_loader -Installing node_loader_bootstrap dependencies - -up to date, audited 5 packages in 437ms - -1 package is looking for funding - run `npm fund` for details - -found 0 vulnerabilities -[ 33%] Built target node_loader_bootstrap_depends -Copying node_loader_bootstrap dependencies -node_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/node_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules -[ 33%] Built target node_loader_bootstrap_copy_depends -[ 33%] Built target node_loader_bootstrap -[ 34%] Built target node_loader -[ 35%] Built target py_loader -[ 35%] Built target rb_loader -[ 36%] Built target rpc_loader -Installing ts_loader_bootstrap dependencies - -up to date, audited 3 packages in 1s - -found 0 vulnerabilities -[ 36%] Built target ts_loader_bootstrap_depends - -> ts_loader_bootstrap@1.1.0 build -> tsc - -[ 36%] Built target ts_loader_bootstrap_build -Copying ts_loader_bootstrap dependencies -ts_loader_bootstrap dependencies copied from /usr/local/metacall/source/loaders/ts_loader/bootstrap/node_modules to /usr/local/metacall/build/node_modules -[ 36%] Built target ts_loader_bootstrap -[ 37%] Built target ts_loader -[ 38%] Built target wasm_loader -[ 39%] Built target metacall_serial -[ 39%] Built target rapid_json_serial -[ 39%] Built target plthook_detour -[ 39%] Built target plugin_extension -[ 39%] Built target backtrace_plugin_config -[ 39%] Built target backtrace_plugin -[ 39%] Built target backward_object -[ 40%] Built target backward -[ 40%] Built target sandbox_plugin_config -[ 40%] Built target sandbox_plugin -Installing node_port - -up to date, audited 81 packages in 722ms - -20 packages are looking for funding - run `npm fund` for details - -3 moderate severity vulnerabilities - -To address all issues (including breaking changes), run: - npm audit fix --force - -Run `npm audit` for details. -[ 40%] Built target node_port -Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing) -[ 40%] Built target rs_port_bindings - Compiling metacall v0.4.2 (/usr/local/metacall/source/ports/rs_port) - Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.31s -[ 40%] Built target rs_port -[ 41%] Built target rb_port_swig_compilation -[ 41%] Built target rb_port -[ 41%] Built target c-compiled -[ 41%] Built target c-ffi -[ 41%] Built target c-cbks -[ 41%] Built target c-loadtest -[ 42%] Built target loadtest -[ 42%] Built target cobol-say -[ 42%] Built target csharp-hello -[ 42%] Built target csharp-static -[ 42%] Built target csharp-function -[ 43%] Built target sum_extension -[ 43%] Built target file-static -[ 43%] Built target file-favicon -[ 43%] Built target file-glob -[ 43%] Built target java-fibonnaci -[ 43%] Built target java-jartest -[ 43%] Built target java-test -[ 43%] Built target nodejs-nod -[ 43%] Built target nodejs-inline -[ 43%] Built target nodejs-export -[ 43%] Built target nodejs-host -[ 43%] Built target nodejs-server -[ 43%] Built target nodejs-factcallback -[ 43%] Built target nodejs-derpyramda - -up to date, audited 49 packages in 608ms - -1 moderate severity vulnerability - -To address all issues, run: - npm audit fix - -Run `npm audit` for details. -[ 43%] Built target nodejs-gram-depends -[ 43%] Built target nodejs-gram -[ 43%] Built target nodejs-duplicated - -up to date, audited 2 packages in 434ms - -found 0 vulnerabilities -[ 43%] Built target nodejs-ramda-depends -[ 43%] Built target nodejs-ramda -[ 43%] Built target python-example -[ 43%] Built target python-helloworld -[ 43%] Built target python-initfini -[ 43%] Built target python-callback -[ 43%] Built target python-function -[ 43%] Built target python-ducktype -[ 43%] Built target python-rsasample -[ 43%] Built target python-garbage -[ 43%] Built target python-classname -[ 43%] Built target python-web -[ 43%] Built target python-landing -[ 43%] Built target python-model -[ 43%] Built target python-pointer -[ 43%] Built target python-dicty -[ 43%] Built target python-host -[ 43%] Built target python-s1 -[ 43%] Built target python-s2 -[ 43%] Built target python-withoutfunctions -[ 43%] Built target python-wasm -[ 43%] Built target python-badimport -[ 43%] Built target python-watzon -[ 43%] Built target python-fnmesh -[ 43%] Built target ruby-hello -[ 43%] Built target ruby-second -[ 43%] Built target ruby-blog -[ 43%] Built target ruby-cache -[ 43%] Built target ruby-ducktype -[ 43%] Built target ruby-invalid -[ 43%] Built target ruby-klass -[ 43%] Built target ruby-failempty -[ 43%] Built target rpc-remote -[ 43%] Built target typescript-typedfunc - -up to date, audited 7 packages in 477ms - -found 0 vulnerabilities -[ 43%] Built target typescript-templating-depends -[ 43%] Built target typescript-templating -[ 43%] Built target typescript-loopfail -[ 43%] Built target typescript-badrequire -[ 43%] Built target typescript-server -[ 43%] Built target wasm-tests -[ 44%] Built target google-test-depends -[ 44%] Built target preprocessor-test -[ 44%] Built target environment-test -[ 45%] Built target log-test -[ 45%] Built target log-custom-test -[ 45%] Built target adt-set-test -[ 46%] Built target adt-trie-test -[ 46%] Built target adt-vector-test -[ 46%] Built target adt-map-test -[ 47%] Built target reflect-value-cast-test -[ 47%] Built target reflect-function-test -[ 48%] Built target reflect-object-class-test -[ 48%] Built target reflect-scope-test -[ 48%] Built target reflect-metadata-test -[ 48%] Built target dynlink-test -[ 48%] Built target detour-test -[ 48%] Built target serial-test -[ 48%] Built target configuration-test -[ 49%] Built target rb-loader-parser-test -[ 50%] Built target portability-path-test -[ 51%] Built target metacall-logs-test -[ 51%] Built target metacall-load-memory-test -[ 51%] Built target metacall-load-memory-empty-test -[ 52%] Built target metacall-load-configuration-test -[ 52%] Built target metacall-load-configuration-fail-test -[ 52%] Built target metacall-load-configuration-relative-test -[ 53%] Built target metacall-load-configuration-python-node-test -[ 53%] Built target metacall-load-configuration-node-python-test -[ 53%] Built target metacall-duplicated-handle-test -[ 53%] Built target metacall-duplicated-symbols-test -[ 53%] Built target metacall-handle-export-test -[ 54%] Built target metacall-handle-get-test -[ 55%] Built target metacall-test -[ 56%] Built target metacall-node-test -[ 56%] Built target metacall-node-event-loop-test -[ 57%] Built target metacall-node-event-loop-signal-test -[ 58%] Built target metacall-node-call-test -[ 58%] Built target metacall-node-inline-test -[ 59%] Built target metacall-node-async-test -[ 60%] Built target metacall-node-async-multiple-test -[ 60%] Built target metacall-node-reentrant-test -[ 60%] Built target metacall-node-port-test -[ 61%] Built target metacall-node-port-await-test -[ 61%] Built target metacall-node-port-c-lib-test -[ 61%] Built target metacall-node-python-port-mock-test -[ 62%] Built target metacall-node-python-port-ruby-test -[ 62%] Built target metacall-node-python-ruby-test -[ 62%] Built target metacall-node-callback-test -[ 62%] Built target metacall-node-fail-test -[ 62%] Built target metacall-node-fail-env-var-test -[ 63%] Built target metacall-node-fail-load-leak-test -[ 63%] Built target metacall-node-typescript-test -[ 64%] Built target metacall-node-python-async-after-destroy-test -[ 64%] Built target metacall-node-python-await-test -[ 65%] Built target metacall-node-python-exception-test -[ 65%] Built target metacall-node-clear-mem-test -[ 65%] Built target metacall-node-async-resources-test -[ 65%] Built target metacall-node-await-chain-test -[ 66%] Built target metacall-node-exception-test -[ 66%] Built target metacall-node-python-deadlock-test -[ 66%] Built target metacall-node-native-code-test -[ 66%] Built target node_extension_test -[ 66%] Built target metacall-node-extension-test -[ 67%] Built target metacall-node-multithread-deadlock-test -[ 67%] Built target metacall-distributable-test -[ 68%] Built target metacall-cast-test -[ 68%] Built target metacall-init-fini-test -[ 69%] Built target metacall-ducktype-test -[ 69%] Built target metacall-inspect-test -[ 70%] Built target metacall-integration-test -[ 71%] Built target metacall-depends-test -[ 71%] Built target metacall-configuration-exec-path-test -[ 71%] Built target metacall-configuration-default-test -[ 71%] Built target metacall-clear-test -[ 71%] Built target metacall-python-test -[ 72%] Built target metacall-python-object-class-test -[ 72%] Built target metacall-python-gc-test - -up to date, audited 16 packages in 514ms - -1 package is looking for funding - run `npm fund` for details - -found 0 vulnerabilities -[ 72%] Built target metacall-python-open-test-depends -[ 72%] Built target metacall-python-open-test -[ 72%] Built target metacall-python-dict-test -[ 72%] Built target metacall-python-pointer-test -[ 72%] Built target metacall-python-reentrant-test -[ 72%] Built target metacall-python-varargs-test -[ 73%] Built target py-loader-port-test -[ 73%] Built target metacall-python-port-https-test -[ 74%] Built target metacall-python-port-callback-test -[ 74%] Built target metacall-python-port-pointer-test -[ 75%] Built target metacall-python-port-import-test -[ 76%] Built target metacall-python-callback-test -[ 76%] Built target metacall-python-fail-test -[ 77%] Built target metacall-python-relative-path-test -[ 77%] Built target metacall-python-without-functions-test -[ 77%] Built target metacall-python-builtins-test -[ 77%] Built target metacall-python-async-test -[ 78%] Built target metacall-python-exception-test -[ 79%] Built target metacall-python-without-env-vars-test -[ 79%] Built target metacall-map-test -[ 79%] Built target metacall-map-await-test -[ 80%] Built target metacall-initialize-test -[ 80%] Built target metacall-initialize-ex-test -[ 81%] Built target metacall-reinitialize-test -[ 81%] Built target metacall-initialize-destroy-multiple-test -[ 82%] Built target metacall-initialize-destroy-multiple-node-test -[ 82%] Built target metacall-reload-functions-test -[ 82%] Built target metacall-invalid-loader-test -[ 83%] Built target metacall-fork-test -[ 84%] Built target metacall-return-monad-test -[ 84%] Built target metacall-callback-complex-test -[ 85%] Built target metacall-ruby-fail-test -[ 85%] Built target metacall-ruby-fail-empty-test -[ 85%] Built target metacall-ruby-object-class-test -[ 85%] Built target metacall-ruby-parser-integration-test -[ 85%] Built target metacall-function-test -[ 86%] Built target metacall-cobol-test -[ 86%] Built target metacall-file-test -[ 86%] Built target metacall-file-fail-test -[ 87%] Built target metacall-file-glob-test -[ 88%] Built target metacall-typescript-test -[ 89%] Built target metacall-typescript-node-test -[ 89%] Built target metacall-typescript-call-map-test -[ 89%] Built target metacall-typescript-tsx-test -[ 89%] Built target metacall-typescript-tsx-loop-fail-test -[ 89%] Built target metacall-typescript-require-test -[ 89%] Built target metacall-typescript-jsx-default-test -[ 89%] Built target metacall-rpc-test -[ 89%] Built target metacall-csharp-static-class-test -[ 90%] Built target metacall-ruby-test -[ 90%] Built target metacall-cs-test -[ 90%] Built target metacall-java-test -[ 90%] Built target metacall-wasm-test -[ 90%] Built target metacall-wasm-python-port-test -[ 90%] Built target metacall-c-test -[ 91%] Built target metacall-c-lib-test -[ 92%] Built target metacall-version-test -[ 93%] Built target metacall-dynlink-path-test -[ 94%] Built target metacall-library-path-without-env-vars-test -[ 94%] Built target metacall-ext-test -[ 95%] Built target metacall-plugin-extension-test -[ 95%] Built target metacall-plugin-extension-local-test -[ 95%] Built target metacall-backtrace-plugin-test -[ 95%] Built target metacall-sandbox-plugin-test -[ 96%] Built target google-bench-depends -[ 96%] Built target log-bench -[ 96%] Built target metacall-py-c-api-bench -[ 96%] Built target metacall-py-call-bench -[ 97%] Built target metacall-py-init-bench -[ 97%] Built target metacall-node-call-bench -[ 97%] Built target metacall-rb-call-bench -[ 98%] Built target metacall-cs-call-bench -[ 98%] Built target cli_repl_plugin -[ 98%] Built target cli_core_plugin -[ 98%] Built target metacallcli-scripts-tests -[ 98%] Built target metacallcli -[ 98%] Built target cli_core_plugin_config -[ 98%] Built target cli_cmd_plugin -[ 99%] Built target cli_sandbox_plugin -[ 99%] Built target cli_sandbox_plugin_config -[100%] Built target metacalllog -Install the project... --- Install configuration: "Debug" --- Installing: /usr/local/share/metacall/configurations --- Installing: /usr/local/share/metacall/configurations/cs_loader.json --- Installing: /usr/local/share/metacall/configurations/node_loader.json --- Installing: /usr/local/share/metacall/configurations/global.json --- Installing: /usr/local/include/metacall --- Installing: /usr/local/include/metacall/metacall_link.h --- Installing: /usr/local/include/metacall/metacall_allocator.h --- Installing: /usr/local/include/metacall/metacall.h --- Installing: /usr/local/include/metacall/metacall_value.h --- Installing: /usr/local/include/metacall/metacall_fork.h --- Installing: /usr/local/include/metacall/metacall_log.h --- Installing: /usr/local/include/metacall/metacall_error.h --- Up-to-date: /usr/local/include/metacall --- Installing: /usr/local/include/metacall/metacall_def.h --- Installing: /usr/local/include/metacall/metacall_api.h --- Installing: /usr/local/lib/libmetacalld.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libmetacalld.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libtcc.so --- Up-to-date: /usr/local/lib --- Installing: /usr/local/lib/libtcc1.a --- Installing: /usr/local/lib/runmain.o --- Installing: /usr/local/lib/bcheck.o --- Installing: /usr/local/lib/bt-log.o --- Installing: /usr/local/lib/bt-exe.o --- Up-to-date: /usr/local/include --- Installing: /usr/local/include/stdatomic.h --- Installing: /usr/local/include/tccdefs.h --- Installing: /usr/local/include/stddef.h --- Installing: /usr/local/include/varargs.h --- Installing: /usr/local/include/tcclib.h --- Installing: /usr/local/include/stdnoreturn.h --- Installing: /usr/local/include/stdarg.h --- Installing: /usr/local/include/stdbool.h --- Installing: /usr/local/include/stdalign.h --- Installing: /usr/local/include/tgmath.h --- Installing: /usr/local/include/float.h --- Installing: /usr/local/lib/libc_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libc_loaderd.so" to "/usr/local/lib:/usr/lib/llvm-14/lib" --- Installing: /usr/local/lib/libcob_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libcob_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/CSLoader.dll --- Installing: /usr/local/lib/Microsoft.CodeAnalysis.dll --- Installing: /usr/local/lib/Microsoft.CodeAnalysis.CSharp.dll --- Installing: /usr/local/lib/libcs_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libcs_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libext_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libext_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libfile_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libfile_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/bootstrap.class --- Installing: /usr/local/lib/libjava_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libjava_loaderd.so" to "/usr/local/lib:/usr/lib/jvm/default-java/lib:/usr/lib/jvm/default-java/lib/server" --- Installing: /usr/local/lib/libmock_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libmock_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/node_modules/espree --- Installing: /usr/local/lib/node_modules/espree/dist --- Installing: /usr/local/lib/node_modules/espree/dist/espree.cjs --- Installing: /usr/local/lib/node_modules/espree/espree.js --- Installing: /usr/local/lib/node_modules/espree/package.json --- Installing: /usr/local/lib/node_modules/espree/LICENSE --- Installing: /usr/local/lib/node_modules/espree/lib --- Installing: /usr/local/lib/node_modules/espree/lib/espree.js --- Installing: /usr/local/lib/node_modules/espree/lib/options.js --- Installing: /usr/local/lib/node_modules/espree/lib/version.js --- Installing: /usr/local/lib/node_modules/espree/lib/token-translator.js --- Installing: /usr/local/lib/node_modules/espree/lib/features.js --- Installing: /usr/local/lib/node_modules/espree/README.md --- Installing: /usr/local/lib/node_modules/acorn --- Installing: /usr/local/lib/node_modules/acorn/dist --- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.mjs.d.ts --- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.d.ts --- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.mjs --- Installing: /usr/local/lib/node_modules/acorn/dist/acorn.js --- Installing: /usr/local/lib/node_modules/acorn/dist/bin.js --- Installing: /usr/local/lib/node_modules/acorn/bin --- Installing: /usr/local/lib/node_modules/acorn/bin/acorn --- Installing: /usr/local/lib/node_modules/acorn/CHANGELOG.md --- Installing: /usr/local/lib/node_modules/acorn/package.json --- Installing: /usr/local/lib/node_modules/acorn/LICENSE --- Installing: /usr/local/lib/node_modules/acorn/README.md --- Installing: /usr/local/lib/node_modules/acorn-jsx --- Installing: /usr/local/lib/node_modules/acorn-jsx/xhtml.js --- Installing: /usr/local/lib/node_modules/acorn-jsx/index.js --- Installing: /usr/local/lib/node_modules/acorn-jsx/package.json --- Installing: /usr/local/lib/node_modules/acorn-jsx/index.d.ts --- Installing: /usr/local/lib/node_modules/acorn-jsx/LICENSE --- Installing: /usr/local/lib/node_modules/acorn-jsx/README.md --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/index.d.ts --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/package.json --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/LICENSE --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib/visitor-keys.js --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/lib/index.js --- Installing: /usr/local/lib/node_modules/eslint-visitor-keys/README.md --- Installing: /usr/local/lib/bootstrap.js --- Installing: /usr/local/lib/libnode_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libnode_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libpy_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libpy_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/librb_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/librb_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/librpc_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/librpc_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/node_modules/typescript --- Installing: /usr/local/lib/node_modules/typescript/CODE_OF_CONDUCT.md --- Installing: /usr/local/lib/node_modules/typescript/LICENSE.txt --- Installing: /usr/local/lib/node_modules/typescript/bin --- Installing: /usr/local/lib/node_modules/typescript/bin/tsserver --- Installing: /usr/local/lib/node_modules/typescript/bin/tsc --- Installing: /usr/local/lib/node_modules/typescript/CopyrightNotice.txt --- Installing: /usr/local/lib/node_modules/typescript/loc --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/DEU/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PTB/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/RUS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ESN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHS/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/PLK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/TRK/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CHT/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/KOR/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/ITA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/JPN/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/CSY/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptLanguageService --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptLanguageService/Microsoft.CodeAnalysis.TypeScript.EditorFeatures.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptCompile.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/ProjectItemsSchema.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/Targets/TypeScriptProjectProperties.xaml.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptTasks --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptTasks/TypeScript.Tasks.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptDebugEngine --- Installing: /usr/local/lib/node_modules/typescript/loc/lcl/FRA/TypeScriptDebugEngine/TypeScriptDebugEngine.dll.lcl --- Installing: /usr/local/lib/node_modules/typescript/AUTHORS.md --- Installing: /usr/local/lib/node_modules/typescript/ThirdPartyNoticeText.txt --- Installing: /usr/local/lib/node_modules/typescript/package.json --- Installing: /usr/local/lib/node_modules/typescript/lib --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.intl.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es5.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.object.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.collection.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typescriptServices.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/tsserverlibrary.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/cs --- Installing: /usr/local/lib/node_modules/typescript/lib/cs/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.core.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typesMap.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/tr --- Installing: /usr/local/lib/node_modules/typescript/lib/tr/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.promise.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/ko --- Installing: /usr/local/lib/node_modules/typescript/lib/ko/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/es --- Installing: /usr/local/lib/node_modules/typescript/lib/es/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.string.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.weakref.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.scripthost.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typescript.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.reflect.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/protocol.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.promise.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.string.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/pl --- Installing: /usr/local/lib/node_modules/typescript/lib/pl/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/fr --- Installing: /usr/local/lib/node_modules/typescript/lib/fr/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.generator.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.string.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typescript.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/cancellationToken.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/tsserverlibrary.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.iterable.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/ja --- Installing: /usr/local/lib/node_modules/typescript/lib/ja/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.regexp.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.intl.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/pt-br --- Installing: /usr/local/lib/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.intl.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/zh-tw --- Installing: /usr/local/lib/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.object.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/tsserver.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.array.include.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/de --- Installing: /usr/local/lib/node_modules/typescript/lib/de/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.intl.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.dom.iterable.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typescriptServices.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.string.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.dom.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/watchGuard.js --- Installing: /usr/local/lib/node_modules/typescript/lib/zh-cn --- Installing: /usr/local/lib/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/ru --- Installing: /usr/local/lib/node_modules/typescript/lib/ru/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.symbol.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/typingsInstaller.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.esnext.promise.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.promise.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/README.md --- Installing: /usr/local/lib/node_modules/typescript/lib/it --- Installing: /usr/local/lib/node_modules/typescript/lib/it/diagnosticMessages.generated.json --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2016.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.array.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2020.bigint.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.full.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/tsc.js --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2015.proxy.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es6.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.webworker.importscripts.d.ts --- Installing: /usr/local/lib/node_modules/typescript/lib/lib.es2019.d.ts --- Installing: /usr/local/lib/node_modules/typescript/README.md --- Installing: /usr/local/lib/bootstrap.ts --- Installing: /usr/local/lib/libts_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libts_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libwasm_loaderd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libwasm_loaderd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libwasmtime.so --- Installing: /usr/local/lib/libmetacall_seriald.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libmetacall_seriald.so" to "/usr/local/lib" --- Installing: /usr/local/lib/librapid_json_seriald.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/librapid_json_seriald.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libplthook_detourd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libplthook_detourd.so" to "/usr/local/lib" --- Installing: /usr/local/lib/libplugin_extensiond.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/libplugin_extensiond.so" to "/usr/local/lib" --- Installing: /usr/local/include/backward.hpp --- Installing: /usr/local/lib/backward/BackwardConfig.cmake --- Installing: /usr/local/lib/plugins --- Installing: /usr/local/lib/plugins/backtrace_plugin --- Installing: /usr/local/lib/plugins/backtrace_plugin/libbacktrace_plugind.so --- Installing: /usr/local/lib/plugins/backtrace_plugin/metacall.json --- Installing: /usr/local/lib/plugins/cli --- Installing: /usr/local/lib/plugins/cli/cmd --- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin --- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin/libcli_sandbox_plugind.so --- Installing: /usr/local/lib/plugins/cli/cmd/cli_sandbox_plugin/metacall.json --- Installing: /usr/local/lib/plugins/cli/internal --- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin --- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/cli_repl_plugin.js --- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/parser.js --- Installing: /usr/local/lib/plugins/cli/internal/cli_repl_plugin/metacall.json --- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin --- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin/cli_cmd_plugin.js --- Installing: /usr/local/lib/plugins/cli/internal/cli_cmd_plugin/metacall.json --- Installing: /usr/local/lib/plugins/cli/repl --- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin --- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/libcli_core_plugind.so --- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/cli_core_plugin_repl.js --- Installing: /usr/local/lib/plugins/cli/repl/cli_core_plugin/metacall.json --- Installing: /usr/local/lib/plugins/sandbox_plugin --- Installing: /usr/local/lib/plugins/sandbox_plugin/libsandbox_plugind.so --- Installing: /usr/local/lib/plugins/sandbox_plugin/metacall.json --- Installing: /usr/local/lib/node_modules/metacall/index.js --- Installing: /usr/local/lib/node_modules/metacall/index.d.ts --- Installing: /usr/local/lib/node_modules/metacall/package.json --- Installing: /usr/local/lib/node_modules/metacall/package-lock.json --- Installing: /usr/local/lib/node_modules/metacall/LICENSE -Processing /usr/local/metacall/source/ports/py_port - Preparing metadata (setup.py): started - Preparing metadata (setup.py): finished with status 'done' -Building wheels for collected packages: metacall - Building wheel for metacall (setup.py): started - Building wheel for metacall (setup.py): finished with status 'done' - Created wheel for metacall: filename=metacall-0.5.1-py2.py3-none-any.whl size=14061 sha256=015f92f2fa3cc2bc911cd45a282a12c381d25ca1c498f99098a4a30018c24e84 - Stored in directory: /tmp/pip-ephem-wheel-cache-a3n0sbsf/wheels/67/d1/05/9442633228a4c6adb005b8d5d97a193b9876b444ce637c7bbe -Successfully built metacall -Installing collected packages: metacall -Successfully installed metacall-0.5.1 -WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. --- Installing: /usr/local/lib/rb_portd.so --- Set non-toolchain portion of runtime path of "/usr/local/lib/rb_portd.so" to "/usr/local/lib" --- Installing: /usr/local/bin/metacallclid --- Set non-toolchain portion of runtime path of "/usr/local/bin/metacallclid" to "/usr/local/lib" --- Up-to-date: /usr/local/include/metacall --- Installing: /usr/local/include/metacall/metacall_loaders.h --- Installing: /usr/local/include/metacall/metacall_version.h -MetaCall configuration paths (overwritables) -LOADER_SCRIPT_PATH: - Description: Directory where scripts are located - Install Location: N/A - Default Location: scripts -CONFIGURATION_PATH: - Description: Path to the main global MetaCall configuration - Install Location: /usr/local/share/metacall/configurations/global.json - Default Location: configurations/global.json -LOADER_LIBRARY_PATH: - Description: Directory where MetaCall loader plugins are located - Install Location: /usr/local/lib - Default Location: . -SERIAL_LIBRARY_PATH: - Description: Directory where MetaCall serial plugins are located - Install Location: /usr/local/lib - Default Location: serials -DETOUR_LIBRARY_PATH: - Description: Directory where MetaCall detour plugins are located - Install Location: /usr/local/lib - Default Location: detours --- Installing: /usr/local/share/metacall/VERSION --- Installing: /usr/local/share/metacall/metacall-config.cmake --- Installing: /usr/local/share/metacall/metacall-config-version.cmake --- Installing: /usr/local/share/metacall/AUTHORS --- Installing: /usr/local/share/metacall/LICENSE --- Installing: /usr/local/share/metacall/README.md -Removing intermediate container 8fc0ef566964 - ---> a154882bd14f -Successfully built a154882bd14f -Successfully tagged metacall/core:dev diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index ba955b7d8a..d114092a92 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -13,6 +13,8 @@ if(NOT OPTION_BUILD_GUIX) FetchContent_Declare(BackwardCpp GIT_REPOSITORY https://github.com/bombela/backward-cpp GIT_TAG f30744bcf726ea3735df7ecf9e9de9ddac540283 + CMAKE_ARGS + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ) FetchContent_MakeAvailable(BackwardCpp) From 1bcab450d20bd708e6ba725bbc02f5e1c9f9d74b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 19:16:16 +0200 Subject: [PATCH 093/364] Solve issues in release. --- source/tests/dynlink_test/CMakeLists.txt | 3 +++ source/tests/dynlink_test/source/dynlink_test.cpp | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index d0e0d844d4..2ba18f0d37 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -115,6 +115,9 @@ target_compile_options(${target} target_link_options(${target} PRIVATE ${DEFAULT_LINKER_OPTIONS} + + $<$,$>:-Wl,-export_dynamic> + $<$:-rdynamic> ) # diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 1ba674206d..dea1c0c8e2 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -38,7 +38,7 @@ class dynlink_test : public testing::Test #ifdef _WIN32 #define EXPORT_SYMBOL __declspec(dllexport) #else - #define EXPORT_SYMBOL __attribute__((used)) __attribute__((visibility("default"))) + #define EXPORT_SYMBOL __attribute__((visibility("default"))) #endif extern "C" EXPORT_SYMBOL int function_from_current_executable(void) @@ -114,8 +114,6 @@ TEST_F(dynlink_test, DefaultConstructor) dynlink_symbol_addr addr; - EXPECT_EQ((int)48, (int)function_from_current_executable()); - EXPECT_EQ((int)0, dynlink_symbol(proc, "function_from_current_executable", &addr)); ASSERT_NE((dynlink_symbol_addr)addr, (dynlink_symbol_addr)NULL); From 9171ce67af3905c16eec00865c43778cd35f809f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 10 Apr 2025 19:34:52 +0200 Subject: [PATCH 094/364] Solve issues with atomic. --- source/metacall/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/metacall/CMakeLists.txt b/source/metacall/CMakeLists.txt index 7aefaabd1a..25f45878e7 100644 --- a/source/metacall/CMakeLists.txt +++ b/source/metacall/CMakeLists.txt @@ -202,6 +202,9 @@ target_link_libraries(${target} $<$:${CMAKE_DL_LIBS}> # Native dynamic load library + # Fix issues with atomics in armv6 and armv7 + $<$:-latomic> + INTERFACE ) From 06014cfb535a924373074973a6438e3358c78452 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 11 Apr 2025 00:25:43 +0200 Subject: [PATCH 095/364] Solve issues with logs on 32 b32 bits. --- source/log/source/log_policy_format_text.c | 4 ++-- source/tests/log_custom_test/source/log_custom_test.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/log/source/log_policy_format_text.c b/source/log/source/log_policy_format_text.c index 1deea2c22f..7f30cae362 100644 --- a/source/log/source/log_policy_format_text.c +++ b/source/log/source/log_policy_format_text.c @@ -20,8 +20,8 @@ /* -- Definitions -- */ -#define LOG_POLICY_FORMAT_TEXT_STR_DEBUG "[%.19s] #%" PRIuS " [ %" PRIuS " | %s | %s ] @%s : " -#define LOG_POLICY_FORMAT_TEXT_STR_RELEASE "[%.19s] #%" PRIuS " @%s : " +#define LOG_POLICY_FORMAT_TEXT_STR_DEBUG "[%.19s] #%" PRIu64 " [ %" PRIuS " | %s | %s ] @%s : " +#define LOG_POLICY_FORMAT_TEXT_STR_RELEASE "[%.19s] #%" PRIu64 " @%s : " #define LOG_POLICY_FORMAT_TEXT_STR_PRETTY "\x1b[32m%s\x1b[0m: " /* -- Macros -- */ diff --git a/source/tests/log_custom_test/source/log_custom_test.cpp b/source/tests/log_custom_test/source/log_custom_test.cpp index 51754be999..f97ebcc6b6 100644 --- a/source/tests/log_custom_test/source/log_custom_test.cpp +++ b/source/tests/log_custom_test/source/log_custom_test.cpp @@ -25,7 +25,7 @@ #include #include -static const char format[] = "%.19s #%" PRIuS " %s:%" PRIuS " %s @%s "; +static const char format[] = "%.19s #%" PRIu64 " %s:%" PRIuS " %s @%s "; class log_custom_test : public testing::Test { From 1e241818a7f746001d4f1a80102fadb35c5f722b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 11 Apr 2025 17:12:34 +0200 Subject: [PATCH 096/364] Update backtrace. --- .../plugins/backtrace_plugin/CMakeLists.txt | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index d114092a92..441fe1b402 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -12,9 +12,7 @@ if(NOT OPTION_BUILD_GUIX) FetchContent_Declare(BackwardCpp GIT_REPOSITORY https://github.com/bombela/backward-cpp - GIT_TAG f30744bcf726ea3735df7ecf9e9de9ddac540283 - CMAKE_ARGS - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + GIT_TAG 94718085efa256fb25a311a46b5948ee0d95890a ) FetchContent_MakeAvailable(BackwardCpp) @@ -25,7 +23,7 @@ if(NOT OPTION_BUILD_GUIX) ) if(NOT BackwardCpp_POPULATED) - FetchContent_Populate(backward-cpp) + FetchContent_Populate(BackwardCpp) endif() endif() @@ -33,18 +31,6 @@ if(NOT BackwardCpp_POPULATED OR NOT BackwardCpp_SOURCE) message(STATUS "BackwardCpp could not be installed, trying to find it on the system") endif() -find_package(Backward - CONFIG - PATHS ${BackwardCpp_SOURCE} -) - -if(NOT BACKWARD_FOUND) - message(WARNING "BackwardCpp could not be found, skipping backtrace plugin compilation") - return() -endif() - -include(${BackwardCpp_SOURCE}/BackwardConfig.cmake) - # # Plugin name and options # @@ -161,8 +147,6 @@ target_include_directories(${target} $ # MetaCall includes - ${BACKWARD_INCLUDE_DIR} # Backward-cpp includes - PUBLIC ${DEFAULT_INCLUDE_DIRECTORIES} @@ -180,11 +164,11 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library + Backward::Interface # Backward-cpp library + PUBLIC ${DEFAULT_LIBRARIES} - Backward::Backward # Backward-cpp library - INTERFACE ) From 69dc5d40bfaef482533f03a4ac4827dc64135d74 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 11 Apr 2025 17:13:12 +0200 Subject: [PATCH 097/364] Solve issues in node loader for 32 bits. --- source/loaders/node_loader/source/node_loader_impl.cpp | 8 ++++---- .../node_loader/source/node_loader_trampoline.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index d622cbb0da..9a318719d2 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -619,7 +619,7 @@ typedef struct node_loader_impl_startup_args_type } /* Get node impl pointer */ - ssize_t node_impl_ptr_length = snprintf(NULL, 0, "%p", (void *)node_impl); + ssize_t node_impl_ptr_length = snprintf(NULL, 0, "%" PRIxPTR, (uintptr_t)(node_impl)); if (node_impl_ptr_length <= 0) { @@ -636,10 +636,10 @@ typedef struct node_loader_impl_startup_args_type return 1; } - snprintf(node_impl_ptr_str, node_impl_ptr_str_size, "%p", (void *)node_impl); + snprintf(node_impl_ptr_str, node_impl_ptr_str_size, "%" PRIxPTR, (uintptr_t)(node_impl)); /* Get register pointer */ - ssize_t register_ptr_length = snprintf(NULL, 0, "%p", (void *)&node_loader_impl_register); + ssize_t register_ptr_length = snprintf(NULL, 0, "%" PRIxPTR, (uintptr_t)(&node_loader_impl_register)); if (register_ptr_length <= 0) { @@ -656,7 +656,7 @@ typedef struct node_loader_impl_startup_args_type return 1; } - snprintf(register_ptr_str, register_ptr_str_size, "%p", (void *)&node_loader_impl_register); + snprintf(register_ptr_str, register_ptr_str_size, "%" PRIxPTR, (uintptr_t)(&node_loader_impl_register)); return 0; } diff --git a/source/loaders/node_loader/source/node_loader_trampoline.cpp b/source/loaders/node_loader/source/node_loader_trampoline.cpp index 9083223a15..3dbb352939 100644 --- a/source/loaders/node_loader/source/node_loader_trampoline.cpp +++ b/source/loaders/node_loader/source/node_loader_trampoline.cpp @@ -9,7 +9,8 @@ #include #include -#include /* TODO: Improve this trick */ +#include +#include /* TODO: Improve this trick */ #define NODE_LOADER_TRAMPOLINE_DECLARE_NAPI_METHOD(name, func) \ { \ @@ -45,7 +46,7 @@ union loader_impl_trampoline_cast */ static void node_loader_trampoline_parse_pointer(napi_env env, napi_value v, void **ptr) { - const size_t ptr_str_size = (sizeof(void *) * 2) + 1; + const size_t ptr_str_size = (sizeof(uintptr_t) * 2) + 1; size_t ptr_str_size_copied = 0; char ptr_str[ptr_str_size]; napi_status status = napi_get_value_string_utf8(env, v, ptr_str, ptr_str_size, &ptr_str_size_copied); @@ -53,7 +54,9 @@ static void node_loader_trampoline_parse_pointer(napi_env env, napi_value v, voi node_loader_impl_exception(env, status); /* Convert the string to pointer type */ - sscanf(ptr_str, "%p", ptr); + uintptr_t uint_ptr; + sscanf(ptr_str, "%" SCNxPTR, &uint_ptr); + *ptr = (void *)uint_ptr; } napi_value node_loader_trampoline_register(napi_env env, napi_callback_info info) From 633e9f38b5ad552e642f7c3e359b4768e61805f1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 15 Apr 2025 17:09:42 +0200 Subject: [PATCH 098/364] Updated gtest, add comments on fork. --- cmake/InstallGTest.cmake | 2 +- source/metacall/source/metacall_fork.c | 2 ++ source/tests/metacall_fork_test/source/metacall_fork_test.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/InstallGTest.cmake b/cmake/InstallGTest.cmake index 7977751f06..24cb396657 100644 --- a/cmake/InstallGTest.cmake +++ b/cmake/InstallGTest.cmake @@ -24,7 +24,7 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) if(NOT GTEST_VERSION OR USE_BUNDLED_GTEST) - set(GTEST_VERSION 1.11.0) + set(GTEST_VERSION 1.16.0) endif() find_package(Threads REQUIRED) diff --git a/source/metacall/source/metacall_fork.c b/source/metacall/source/metacall_fork.c index e353879fd3..0c626a96dc 100644 --- a/source/metacall/source/metacall_fork.c +++ b/source/metacall/source/metacall_fork.c @@ -316,6 +316,8 @@ void metacall_fork_destroy(void) { detour d = detour_create(metacall_detour()); + /* TODO: Restore the hook? We need support for this on the detour API */ + detour_unload(d, detour_fork_handle); detour_fork_handle = NULL; diff --git a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp index 2b288b12f7..0f34b6bd77 100644 --- a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp +++ b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp @@ -115,7 +115,7 @@ pid_t fork() } else if (result == RTL_CLONE_CHILD) { - /* fix stdio */ + /* Fix stdio */ AllocConsole(); return 0; } From 8d8a6fc1beffb9ae5e6d11031793595609035f33 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 15 Apr 2025 20:23:21 +0200 Subject: [PATCH 099/364] Update google test version. --- source/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index aca1cfdaa3..bf31bbbf9b 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -12,7 +12,7 @@ if("${CMAKE_VERSION}" VERSION_LESS "3.11" AND POLICY CMP0037) set_policy(CMP0037 OLD) endif() -set(GTEST_VERSION 1.11.0) +set(GTEST_VERSION 1.16.0) find_package(GTest ${GTEST_VERSION}) From 8b20384e3ad253f62aa603c445f280e3fbeb3c49 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 15 Apr 2025 20:33:09 +0200 Subject: [PATCH 100/364] Solve issues with gtest. --- cmake/InstallGTest.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/InstallGTest.cmake b/cmake/InstallGTest.cmake index 24cb396657..6f03ef2fcb 100644 --- a/cmake/InstallGTest.cmake +++ b/cmake/InstallGTest.cmake @@ -38,7 +38,7 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) # Import Google Test Framework ExternalProject_Add(google-test-depends GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-${GTEST_VERSION} + GIT_TAG v${GTEST_VERSION} CMAKE_ARGS -Dgtest_build_samples=OFF -Dgtest_build_tests=OFF From 00600e7db5e9530c840117498bc74857eb64f713 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 15 Apr 2025 21:21:42 +0200 Subject: [PATCH 101/364] Update gtest properly to c++17. --- cmake/Portability.cmake | 12 ++++++------ source/tests/adt_map_test/CMakeLists.txt | 9 +++++++++ source/tests/adt_set_test/CMakeLists.txt | 9 +++++++++ source/tests/adt_trie_test/CMakeLists.txt | 9 +++++++++ source/tests/adt_vector_test/CMakeLists.txt | 9 +++++++++ source/tests/configuration_test/CMakeLists.txt | 9 +++++++++ source/tests/detour_test/CMakeLists.txt | 9 +++++++++ source/tests/dynlink_test/CMakeLists.txt | 9 +++++++++ source/tests/environment_test/CMakeLists.txt | 9 +++++++++ source/tests/log_custom_test/CMakeLists.txt | 9 +++++++++ source/tests/log_test/CMakeLists.txt | 9 +++++++++ .../metacall_backtrace_plugin_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_c_lib_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_c_test/CMakeLists.txt | 9 +++++++++ .../metacall_callback_complex_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_cast_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_clear_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_cli_core_plugin_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_cobol_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_cs_test/CMakeLists.txt | 9 +++++++++ .../metacall_csharp_function_test/CMakeLists.txt | 9 +++++++++ .../metacall_csharp_static_class_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_depends_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_distributable_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_ducktype_test/CMakeLists.txt | 9 +++++++++ .../metacall_duplicated_handle_test/CMakeLists.txt | 9 +++++++++ .../metacall_duplicated_symbols_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_dynlink_path_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_ext_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_file_fail_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_file_glob_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_file_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_fork_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_function_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_handle_export_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_handle_get_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_init_fini_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../tests/metacall_initialize_ex_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_initialize_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_inspect_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_integration_test/CMakeLists.txt | 9 +++++++++ .../metacall_invalid_loader_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_java_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_julia_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_llvm_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_load_configuration_test/CMakeLists.txt | 9 +++++++++ .../metacall_load_memory_empty_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_load_memory_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_logs_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_lua_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_map_await_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_map_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_async_multiple_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_node_async_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_await_chain_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_node_call_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_node_callback_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_clear_mem_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_default_export_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_node_event_loop_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_exception_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_extension_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_fail_env_var_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_fail_load_leak_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_node_fail_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_node_inline_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_node_native_code_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_port_await_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_port_c_lib_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_node_port_rs_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_node_port_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_node_python_await_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_node_python_ruby_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_reentrant_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_signal_handler_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_node_test/CMakeLists.txt | 9 +++++++++ .../metacall_node_typescript_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_plugin_extension_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_async_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_await_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_builtins_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_callback_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_dict_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_exception_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_fail_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_python_gc_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_loader_port_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_model_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_node_await_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_object_class_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_open_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_pointer_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_python_port_https_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_port_import_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_port_pointer_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_python_port_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_reentrant_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_python_test/CMakeLists.txt | 9 +++++++++ .../metacall_python_varargs_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../tests/metacall_reinitialize_test/CMakeLists.txt | 9 +++++++++ .../metacall_reload_functions_test/CMakeLists.txt | 9 +++++++++ .../tests/metacall_return_monad_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_rpc_test/CMakeLists.txt | 9 +++++++++ .../metacall_ruby_fail_empty_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_ruby_fail_test/CMakeLists.txt | 9 +++++++++ .../metacall_ruby_object_class_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_ruby_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_rust_class_test/CMakeLists.txt | 9 +++++++++ .../metacall_rust_load_from_mem_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ source/tests/metacall_rust_test/CMakeLists.txt | 9 +++++++++ .../metacall_sandbox_plugin_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_test/CMakeLists.txt | 9 +++++++++ .../metacall_typescript_call_map_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_typescript_node_test/CMakeLists.txt | 9 +++++++++ .../metacall_typescript_require_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_typescript_test/CMakeLists.txt | 9 +++++++++ .../CMakeLists.txt | 9 +++++++++ .../metacall_typescript_tsx_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_version_test/CMakeLists.txt | 9 +++++++++ .../metacall_wasm_python_port_test/CMakeLists.txt | 9 +++++++++ source/tests/metacall_wasm_test/CMakeLists.txt | 9 +++++++++ source/tests/portability_path_test/CMakeLists.txt | 9 +++++++++ source/tests/preprocessor_test/CMakeLists.txt | 9 +++++++++ source/tests/rb_loader_parser_test/CMakeLists.txt | 9 +++++++++ source/tests/reflect_function_test/CMakeLists.txt | 9 +++++++++ source/tests/reflect_metadata_test/CMakeLists.txt | 9 +++++++++ .../tests/reflect_object_class_test/CMakeLists.txt | 9 +++++++++ source/tests/reflect_scope_test/CMakeLists.txt | 9 +++++++++ source/tests/reflect_value_cast_test/CMakeLists.txt | 9 +++++++++ source/tests/serial_test/CMakeLists.txt | 9 +++++++++ 162 files changed, 1455 insertions(+), 6 deletions(-) diff --git a/cmake/Portability.cmake b/cmake/Portability.cmake index 86193291c8..556427b187 100644 --- a/cmake/Portability.cmake +++ b/cmake/Portability.cmake @@ -146,11 +146,10 @@ set(PROJECT_ARCH_NAME ${CMAKE_SYSTEM_PROCESSOR}) # 32 or 64 bit Linux if(PROJECT_OS_LINUX) - if(${PROJECT_ARCH_NAME} STREQUAL "x86") + if (${PROJECT_ARCH_NAME} MATCHES "^(x86|i[3-6]86|x86_64)$" AND "${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") set(PROJECT_ARCH_32BIT TRUE BOOL INTERNAL) - endif() - - if(${PROJECT_ARCH_NAME} MATCHES "(x86_64)|(amd64)|(AMD64)") + set(PROJECT_ARCH_X86 TRUE BOOL INTERNAL) + elseif(${PROJECT_ARCH_NAME} MATCHES "(x86_64)|(amd64)|(AMD64)") set(PROJECT_ARCH_64BIT TRUE BOOL INTERNAL) set(PROJECT_ARCH_AMD64 TRUE BOOL INTERNAL) elseif(${PROJECT_ARCH_NAME} STREQUAL "aarch64") @@ -162,6 +161,7 @@ if(PROJECT_OS_LINUX) set(PROJECT_ARCH_64BIT TRUE BOOL INTERNAL) endif() + # Verify the architecture is correct if(PROJECT_ARCH_32BIT) if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") message(STATUS "Linux ${PROJECT_ARCH_NAME} 32bit detected") @@ -183,7 +183,7 @@ endif() if(NOT PROJECT_ARCH_32BIT AND NOT PROJECT_ARCH_64BIT) if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") message(STATUS "32bit architecture ${PROJECT_ARCH_NAME} detected") - set(PROJECT_ARCH_32BIT TRUE BOOL INTERNAL) + set(PROJECT_ARCH_32BIT TRUE BOOL INTERNAL) if(PROJECT_OS_WIN) set(WINXBITS Win32) @@ -191,7 +191,7 @@ if(NOT PROJECT_ARCH_32BIT AND NOT PROJECT_ARCH_64BIT) elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") message(STATUS "64bit architecture ${PROJECT_ARCH_NAME} detected") - set(PROJECT_ARCH_64BIT TRUE BOOL INTERNAL) + set(PROJECT_ARCH_64BIT TRUE BOOL INTERNAL) if(PROJECT_OS_WIN) set(WINXBITS Win64) diff --git a/source/tests/adt_map_test/CMakeLists.txt b/source/tests/adt_map_test/CMakeLists.txt index 29ae7e7e9a..0767bcbb2b 100644 --- a/source/tests/adt_map_test/CMakeLists.txt +++ b/source/tests/adt_map_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/adt_set_test/CMakeLists.txt b/source/tests/adt_set_test/CMakeLists.txt index d46b7064fb..a3d3b1c3f0 100644 --- a/source/tests/adt_set_test/CMakeLists.txt +++ b/source/tests/adt_set_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/adt_trie_test/CMakeLists.txt b/source/tests/adt_trie_test/CMakeLists.txt index 1bac7e403d..19babf556b 100644 --- a/source/tests/adt_trie_test/CMakeLists.txt +++ b/source/tests/adt_trie_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/adt_vector_test/CMakeLists.txt b/source/tests/adt_vector_test/CMakeLists.txt index dab9ae9a6c..e454f0266d 100644 --- a/source/tests/adt_vector_test/CMakeLists.txt +++ b/source/tests/adt_vector_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/configuration_test/CMakeLists.txt b/source/tests/configuration_test/CMakeLists.txt index c9f8049547..0700e2bf71 100644 --- a/source/tests/configuration_test/CMakeLists.txt +++ b/source/tests/configuration_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/detour_test/CMakeLists.txt b/source/tests/detour_test/CMakeLists.txt index d73991ebc3..06e3ef9794 100644 --- a/source/tests/detour_test/CMakeLists.txt +++ b/source/tests/detour_test/CMakeLists.txt @@ -117,6 +117,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index 2ba18f0d37..1010f0fb90 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/environment_test/CMakeLists.txt b/source/tests/environment_test/CMakeLists.txt index ec3e144498..3472e06a8b 100644 --- a/source/tests/environment_test/CMakeLists.txt +++ b/source/tests/environment_test/CMakeLists.txt @@ -103,6 +103,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/log_custom_test/CMakeLists.txt b/source/tests/log_custom_test/CMakeLists.txt index 73ef1f64ac..f46ff859e2 100644 --- a/source/tests/log_custom_test/CMakeLists.txt +++ b/source/tests/log_custom_test/CMakeLists.txt @@ -105,6 +105,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/log_test/CMakeLists.txt b/source/tests/log_test/CMakeLists.txt index d3f70ddc3f..d091de149f 100644 --- a/source/tests/log_test/CMakeLists.txt +++ b/source/tests/log_test/CMakeLists.txt @@ -105,6 +105,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt index 013b1d7421..900355faad 100644 --- a/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_backtrace_plugin_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_c_lib_test/CMakeLists.txt b/source/tests/metacall_c_lib_test/CMakeLists.txt index eace7e1da9..d3a3750646 100644 --- a/source/tests/metacall_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_c_lib_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_c_test/CMakeLists.txt b/source/tests/metacall_c_test/CMakeLists.txt index 7599f98cbf..a5c3e0edde 100644 --- a/source/tests/metacall_c_test/CMakeLists.txt +++ b/source/tests/metacall_c_test/CMakeLists.txt @@ -120,6 +120,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_callback_complex_test/CMakeLists.txt b/source/tests/metacall_callback_complex_test/CMakeLists.txt index 00183a9c2f..ddf680698a 100644 --- a/source/tests/metacall_callback_complex_test/CMakeLists.txt +++ b/source/tests/metacall_callback_complex_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_cast_test/CMakeLists.txt b/source/tests/metacall_cast_test/CMakeLists.txt index ec7b1876bf..674a145164 100644 --- a/source/tests/metacall_cast_test/CMakeLists.txt +++ b/source/tests/metacall_cast_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_clear_test/CMakeLists.txt b/source/tests/metacall_clear_test/CMakeLists.txt index bb461a5e9f..859807d95c 100644 --- a/source/tests/metacall_clear_test/CMakeLists.txt +++ b/source/tests/metacall_clear_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt index 9c444e0847..13284fb395 100644 --- a/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_await_test/CMakeLists.txt @@ -119,6 +119,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt index 8de5b40efb..f0ecb936bc 100644 --- a/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_cli_core_plugin_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_cobol_test/CMakeLists.txt b/source/tests/metacall_cobol_test/CMakeLists.txt index c524b462ca..3667141bca 100644 --- a/source/tests/metacall_cobol_test/CMakeLists.txt +++ b/source/tests/metacall_cobol_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_configuration_default_test/CMakeLists.txt b/source/tests/metacall_configuration_default_test/CMakeLists.txt index 571fc6786f..8cf0d40070 100644 --- a/source/tests/metacall_configuration_default_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_default_test/CMakeLists.txt @@ -125,6 +125,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt index e63ff23b96..ff845b77b7 100644 --- a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_cs_test/CMakeLists.txt b/source/tests/metacall_cs_test/CMakeLists.txt index 084e5f8191..6eb981ca3c 100644 --- a/source/tests/metacall_cs_test/CMakeLists.txt +++ b/source/tests/metacall_cs_test/CMakeLists.txt @@ -113,6 +113,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_csharp_function_test/CMakeLists.txt b/source/tests/metacall_csharp_function_test/CMakeLists.txt index 53e8df1acc..0a70cedb5e 100644 --- a/source/tests/metacall_csharp_function_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_function_test/CMakeLists.txt @@ -121,6 +121,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt index 9b04dac501..7c2289c3dd 100644 --- a/source/tests/metacall_csharp_static_class_test/CMakeLists.txt +++ b/source/tests/metacall_csharp_static_class_test/CMakeLists.txt @@ -121,6 +121,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_depends_test/CMakeLists.txt b/source/tests/metacall_depends_test/CMakeLists.txt index ddc10ae8d4..46fe418c77 100644 --- a/source/tests/metacall_depends_test/CMakeLists.txt +++ b/source/tests/metacall_depends_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_distributable_test/CMakeLists.txt b/source/tests/metacall_distributable_test/CMakeLists.txt index 87354950d2..07d5581616 100644 --- a/source/tests/metacall_distributable_test/CMakeLists.txt +++ b/source/tests/metacall_distributable_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ducktype_test/CMakeLists.txt b/source/tests/metacall_ducktype_test/CMakeLists.txt index d092bc229f..c8d507e6f0 100644 --- a/source/tests/metacall_ducktype_test/CMakeLists.txt +++ b/source/tests/metacall_ducktype_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt index 977c38726a..35032c7c5e 100644 --- a/source/tests/metacall_duplicated_handle_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_handle_test/CMakeLists.txt @@ -110,6 +110,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt index 8ad6ff0c3f..c5612d9658 100644 --- a/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt +++ b/source/tests/metacall_duplicated_symbols_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_dynlink_path_test/CMakeLists.txt b/source/tests/metacall_dynlink_path_test/CMakeLists.txt index 70537e13e4..c1c9a76c42 100644 --- a/source/tests/metacall_dynlink_path_test/CMakeLists.txt +++ b/source/tests/metacall_dynlink_path_test/CMakeLists.txt @@ -111,6 +111,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ext_test/CMakeLists.txt b/source/tests/metacall_ext_test/CMakeLists.txt index c7df0805ad..3c6b986981 100644 --- a/source/tests/metacall_ext_test/CMakeLists.txt +++ b/source/tests/metacall_ext_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_file_fail_test/CMakeLists.txt b/source/tests/metacall_file_fail_test/CMakeLists.txt index fb4c65e7b4..ab6236fe16 100644 --- a/source/tests/metacall_file_fail_test/CMakeLists.txt +++ b/source/tests/metacall_file_fail_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_file_glob_test/CMakeLists.txt b/source/tests/metacall_file_glob_test/CMakeLists.txt index b5479a0f3d..ffc5a1c274 100644 --- a/source/tests/metacall_file_glob_test/CMakeLists.txt +++ b/source/tests/metacall_file_glob_test/CMakeLists.txt @@ -119,6 +119,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_file_test/CMakeLists.txt b/source/tests/metacall_file_test/CMakeLists.txt index 7be85a2a6a..9dd2a4fb04 100644 --- a/source/tests/metacall_file_test/CMakeLists.txt +++ b/source/tests/metacall_file_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_fork_test/CMakeLists.txt b/source/tests/metacall_fork_test/CMakeLists.txt index 122637bdd4..90c96bdef3 100644 --- a/source/tests/metacall_fork_test/CMakeLists.txt +++ b/source/tests/metacall_fork_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_function_test/CMakeLists.txt b/source/tests/metacall_function_test/CMakeLists.txt index 2584da52b4..9ac6fe47dc 100644 --- a/source/tests/metacall_function_test/CMakeLists.txt +++ b/source/tests/metacall_function_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_handle_export_test/CMakeLists.txt b/source/tests/metacall_handle_export_test/CMakeLists.txt index 762cb174ba..fb1a708563 100644 --- a/source/tests/metacall_handle_export_test/CMakeLists.txt +++ b/source/tests/metacall_handle_export_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_handle_get_test/CMakeLists.txt b/source/tests/metacall_handle_get_test/CMakeLists.txt index 73178da786..c99af8c34e 100644 --- a/source/tests/metacall_handle_get_test/CMakeLists.txt +++ b/source/tests/metacall_handle_get_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_init_fini_test/CMakeLists.txt b/source/tests/metacall_init_fini_test/CMakeLists.txt index bb1783bf3c..c757cffb72 100644 --- a/source/tests/metacall_init_fini_test/CMakeLists.txt +++ b/source/tests/metacall_init_fini_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt index 3d0c2ffde6..9b06663fda 100644 --- a/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_node_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt index 2de694d0a2..3424ea8817 100644 --- a/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_destroy_multiple_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_initialize_ex_test/CMakeLists.txt b/source/tests/metacall_initialize_ex_test/CMakeLists.txt index 94332f3b40..714d7ce5b3 100644 --- a/source/tests/metacall_initialize_ex_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_ex_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_initialize_test/CMakeLists.txt b/source/tests/metacall_initialize_test/CMakeLists.txt index f8b5b901a8..e66bf472e5 100644 --- a/source/tests/metacall_initialize_test/CMakeLists.txt +++ b/source/tests/metacall_initialize_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_inspect_test/CMakeLists.txt b/source/tests/metacall_inspect_test/CMakeLists.txt index ff5eaf740b..8a97a0c8b8 100644 --- a/source/tests/metacall_inspect_test/CMakeLists.txt +++ b/source/tests/metacall_inspect_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_integration_test/CMakeLists.txt b/source/tests/metacall_integration_test/CMakeLists.txt index 55b69ede2a..bf2cc13b9f 100644 --- a/source/tests/metacall_integration_test/CMakeLists.txt +++ b/source/tests/metacall_integration_test/CMakeLists.txt @@ -113,6 +113,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_invalid_loader_test/CMakeLists.txt b/source/tests/metacall_invalid_loader_test/CMakeLists.txt index 8186d93620..cef1167c5a 100644 --- a/source/tests/metacall_invalid_loader_test/CMakeLists.txt +++ b/source/tests/metacall_invalid_loader_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_java_test/CMakeLists.txt b/source/tests/metacall_java_test/CMakeLists.txt index d9000eeb69..fb814afc1f 100644 --- a/source/tests/metacall_java_test/CMakeLists.txt +++ b/source/tests/metacall_java_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_julia_test/CMakeLists.txt b/source/tests/metacall_julia_test/CMakeLists.txt index 32dc65a6df..0bfe22f233 100644 --- a/source/tests/metacall_julia_test/CMakeLists.txt +++ b/source/tests/metacall_julia_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt index e38ecba461..33428a51b8 100644 --- a/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_library_path_without_env_vars_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_llvm_test/CMakeLists.txt b/source/tests/metacall_llvm_test/CMakeLists.txt index 76f79b68c0..cbe63c93f1 100644 --- a/source/tests/metacall_llvm_test/CMakeLists.txt +++ b/source/tests/metacall_llvm_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt index 3a6293c6d7..c49bf0e10d 100644 --- a/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_fail_test/CMakeLists.txt @@ -110,6 +110,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt index f38f63ffbe..6653f9010f 100644 --- a/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_node_python_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt index 5d1c090426..f8dd16c325 100644 --- a/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_python_node_test/CMakeLists.txt @@ -112,6 +112,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt index 4cb9cfb731..a16c0c46f7 100644 --- a/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_relative_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_configuration_test/CMakeLists.txt b/source/tests/metacall_load_configuration_test/CMakeLists.txt index 52f0a339fd..3c42adeb57 100644 --- a/source/tests/metacall_load_configuration_test/CMakeLists.txt +++ b/source/tests/metacall_load_configuration_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt index 18371653f9..b98f18bca6 100644 --- a/source/tests/metacall_load_memory_empty_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_empty_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_load_memory_test/CMakeLists.txt b/source/tests/metacall_load_memory_test/CMakeLists.txt index 7e45abf253..9203a34ca2 100644 --- a/source/tests/metacall_load_memory_test/CMakeLists.txt +++ b/source/tests/metacall_load_memory_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_logs_test/CMakeLists.txt b/source/tests/metacall_logs_test/CMakeLists.txt index 35386f0f7a..2a56bf6371 100644 --- a/source/tests/metacall_logs_test/CMakeLists.txt +++ b/source/tests/metacall_logs_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_lua_test/CMakeLists.txt b/source/tests/metacall_lua_test/CMakeLists.txt index b9b6a62c2c..d356553b5c 100644 --- a/source/tests/metacall_lua_test/CMakeLists.txt +++ b/source/tests/metacall_lua_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_map_await_test/CMakeLists.txt b/source/tests/metacall_map_await_test/CMakeLists.txt index b36cdee473..6b1df3e956 100644 --- a/source/tests/metacall_map_await_test/CMakeLists.txt +++ b/source/tests/metacall_map_await_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_map_test/CMakeLists.txt b/source/tests/metacall_map_test/CMakeLists.txt index 6022a8abdb..b9d40bf14a 100644 --- a/source/tests/metacall_map_test/CMakeLists.txt +++ b/source/tests/metacall_map_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt index fe9cea8ae7..77c1e4b31e 100644 --- a/source/tests/metacall_node_async_multiple_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_multiple_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_async_resources_test/CMakeLists.txt b/source/tests/metacall_node_async_resources_test/CMakeLists.txt index a3edb0a50d..17e130e414 100644 --- a/source/tests/metacall_node_async_resources_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_resources_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_async_test/CMakeLists.txt b/source/tests/metacall_node_async_test/CMakeLists.txt index 3a29a55a44..d58db66234 100644 --- a/source/tests/metacall_node_async_test/CMakeLists.txt +++ b/source/tests/metacall_node_async_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_await_chain_test/CMakeLists.txt b/source/tests/metacall_node_await_chain_test/CMakeLists.txt index 2b34facf97..52e4ab39e3 100644 --- a/source/tests/metacall_node_await_chain_test/CMakeLists.txt +++ b/source/tests/metacall_node_await_chain_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_call_test/CMakeLists.txt b/source/tests/metacall_node_call_test/CMakeLists.txt index 361544791b..c0a877d4df 100644 --- a/source/tests/metacall_node_call_test/CMakeLists.txt +++ b/source/tests/metacall_node_call_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_callback_test/CMakeLists.txt b/source/tests/metacall_node_callback_test/CMakeLists.txt index 2fa56024b3..1ba50b6375 100644 --- a/source/tests/metacall_node_callback_test/CMakeLists.txt +++ b/source/tests/metacall_node_callback_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt index 249b9066b7..d7f9e9124c 100644 --- a/source/tests/metacall_node_clear_mem_test/CMakeLists.txt +++ b/source/tests/metacall_node_clear_mem_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_default_export_test/CMakeLists.txt b/source/tests/metacall_node_default_export_test/CMakeLists.txt index 56d39f320f..c009589339 100644 --- a/source/tests/metacall_node_default_export_test/CMakeLists.txt +++ b/source/tests/metacall_node_default_export_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt index dbb6410c14..cb3e4701ce 100644 --- a/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_signal_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_event_loop_test/CMakeLists.txt b/source/tests/metacall_node_event_loop_test/CMakeLists.txt index 805dd2a9b8..d1d83d4416 100644 --- a/source/tests/metacall_node_event_loop_test/CMakeLists.txt +++ b/source/tests/metacall_node_event_loop_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_exception_test/CMakeLists.txt b/source/tests/metacall_node_exception_test/CMakeLists.txt index 707e529421..1129b31459 100644 --- a/source/tests/metacall_node_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_exception_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_extension_test/CMakeLists.txt b/source/tests/metacall_node_extension_test/CMakeLists.txt index 1aac1018ec..f56da937ab 100644 --- a/source/tests/metacall_node_extension_test/CMakeLists.txt +++ b/source/tests/metacall_node_extension_test/CMakeLists.txt @@ -110,6 +110,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt index e8310a78cf..ecd42051ef 100644 --- a/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_env_var_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt index aaed9e5221..3b1cc5bc5e 100644 --- a/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_load_leak_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_fail_test/CMakeLists.txt b/source/tests/metacall_node_fail_test/CMakeLists.txt index 62fb239d4a..2f46c9261f 100644 --- a/source/tests/metacall_node_fail_test/CMakeLists.txt +++ b/source/tests/metacall_node_fail_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_inline_test/CMakeLists.txt b/source/tests/metacall_node_inline_test/CMakeLists.txt index af8f0c8b5a..8f7c771f26 100644 --- a/source/tests/metacall_node_inline_test/CMakeLists.txt +++ b/source/tests/metacall_node_inline_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt index 6f3f91f478..e09b978263 100644 --- a/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_multithread_deadlock_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_native_code_test/CMakeLists.txt b/source/tests/metacall_node_native_code_test/CMakeLists.txt index 31b61509e6..2f485938eb 100644 --- a/source/tests/metacall_node_native_code_test/CMakeLists.txt +++ b/source/tests/metacall_node_native_code_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_port_await_test/CMakeLists.txt b/source/tests/metacall_node_port_await_test/CMakeLists.txt index c72587ba48..819a878a01 100644 --- a/source/tests/metacall_node_port_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_await_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt index 3c13cf6be2..ab55d51e7d 100644 --- a/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_c_lib_test/CMakeLists.txt @@ -124,6 +124,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_port_rs_test/CMakeLists.txt b/source/tests/metacall_node_port_rs_test/CMakeLists.txt index 1f4f82043f..57422785bd 100644 --- a/source/tests/metacall_node_port_rs_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_rs_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_port_test/CMakeLists.txt b/source/tests/metacall_node_port_test/CMakeLists.txt index 86dadd93d8..97aa855b33 100644 --- a/source/tests/metacall_node_port_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt index 6388179f78..6c88f28d6b 100644 --- a/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_async_after_destroy_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt index e7576cb188..a82165e896 100644 --- a/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_extended_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_await_test/CMakeLists.txt b/source/tests/metacall_node_python_await_test/CMakeLists.txt index 2edadbea76..3553dbc2ca 100644 --- a/source/tests/metacall_node_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_await_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt index 4e1fb4b715..55bcbfed39 100644 --- a/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_deadlock_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_exception_test/CMakeLists.txt b/source/tests/metacall_node_python_exception_test/CMakeLists.txt index f759a0b30c..0d4b368692 100644 --- a/source/tests/metacall_node_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_exception_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt index 105e401fc2..cbe593374d 100644 --- a/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_mock_test/CMakeLists.txt @@ -112,6 +112,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt index 06e1e46bb0..6dfbd6c337 100644 --- a/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_port_ruby_test/CMakeLists.txt @@ -112,6 +112,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt index a9756c0917..b5e2914333 100644 --- a/source/tests/metacall_node_python_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_node_python_ruby_test/CMakeLists.txt @@ -118,6 +118,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_reentrant_test/CMakeLists.txt b/source/tests/metacall_node_reentrant_test/CMakeLists.txt index a4ec68f529..6dfff474f4 100644 --- a/source/tests/metacall_node_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_node_reentrant_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt index 16e7cbd5e5..473ad45e51 100644 --- a/source/tests/metacall_node_signal_handler_test/CMakeLists.txt +++ b/source/tests/metacall_node_signal_handler_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_test/CMakeLists.txt b/source/tests/metacall_node_test/CMakeLists.txt index 238ccbd4cd..7c08d7c101 100644 --- a/source/tests/metacall_node_test/CMakeLists.txt +++ b/source/tests/metacall_node_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_node_typescript_test/CMakeLists.txt b/source/tests/metacall_node_typescript_test/CMakeLists.txt index f0858d2465..a7959a04b6 100644 --- a/source/tests/metacall_node_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_node_typescript_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt index f110645997..0bf7f39890 100644 --- a/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_destroy_order_test/CMakeLists.txt @@ -118,6 +118,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt index fc0d796609..6e5da526f6 100644 --- a/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_invalid_path_test/CMakeLists.txt @@ -111,6 +111,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt index 20f25e9fdd..174628c0ec 100644 --- a/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_local_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_plugin_extension_test/CMakeLists.txt b/source/tests/metacall_plugin_extension_test/CMakeLists.txt index a6eead0013..ed506009f8 100644 --- a/source/tests/metacall_plugin_extension_test/CMakeLists.txt +++ b/source/tests/metacall_plugin_extension_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_async_test/CMakeLists.txt b/source/tests/metacall_python_async_test/CMakeLists.txt index 3acc0f2114..c329c7a319 100644 --- a/source/tests/metacall_python_async_test/CMakeLists.txt +++ b/source/tests/metacall_python_async_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_await_test/CMakeLists.txt b/source/tests/metacall_python_await_test/CMakeLists.txt index 767eda765f..9c34033915 100644 --- a/source/tests/metacall_python_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_await_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_builtins_test/CMakeLists.txt b/source/tests/metacall_python_builtins_test/CMakeLists.txt index d9ca104c3b..698df7f4bb 100644 --- a/source/tests/metacall_python_builtins_test/CMakeLists.txt +++ b/source/tests/metacall_python_builtins_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_callback_test/CMakeLists.txt b/source/tests/metacall_python_callback_test/CMakeLists.txt index 4f7a4e1b30..e576930fb8 100644 --- a/source/tests/metacall_python_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_callback_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_dict_test/CMakeLists.txt b/source/tests/metacall_python_dict_test/CMakeLists.txt index 8cc1916d7a..835a24fed9 100644 --- a/source/tests/metacall_python_dict_test/CMakeLists.txt +++ b/source/tests/metacall_python_dict_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_exception_test/CMakeLists.txt b/source/tests/metacall_python_exception_test/CMakeLists.txt index 31109d3559..e06790523f 100644 --- a/source/tests/metacall_python_exception_test/CMakeLists.txt +++ b/source/tests/metacall_python_exception_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_fail_test/CMakeLists.txt b/source/tests/metacall_python_fail_test/CMakeLists.txt index fdf0097edf..d16a571d28 100644 --- a/source/tests/metacall_python_fail_test/CMakeLists.txt +++ b/source/tests/metacall_python_fail_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_gc_test/CMakeLists.txt b/source/tests/metacall_python_gc_test/CMakeLists.txt index dea0f4ae2a..b726024342 100644 --- a/source/tests/metacall_python_gc_test/CMakeLists.txt +++ b/source/tests/metacall_python_gc_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_loader_port_test/CMakeLists.txt b/source/tests/metacall_python_loader_port_test/CMakeLists.txt index 82bfb75291..eed75ba06a 100644 --- a/source/tests/metacall_python_loader_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_loader_port_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_model_test/CMakeLists.txt b/source/tests/metacall_python_model_test/CMakeLists.txt index 59494beaca..01475c8c83 100644 --- a/source/tests/metacall_python_model_test/CMakeLists.txt +++ b/source/tests/metacall_python_model_test/CMakeLists.txt @@ -118,6 +118,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_node_await_test/CMakeLists.txt b/source/tests/metacall_python_node_await_test/CMakeLists.txt index 9995c37e0b..e2d89c8ffc 100644 --- a/source/tests/metacall_python_node_await_test/CMakeLists.txt +++ b/source/tests/metacall_python_node_await_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_object_class_test/CMakeLists.txt b/source/tests/metacall_python_object_class_test/CMakeLists.txt index 475a515cae..f81c535ee8 100644 --- a/source/tests/metacall_python_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_python_object_class_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_open_test/CMakeLists.txt b/source/tests/metacall_python_open_test/CMakeLists.txt index ce067050d2..32959b3635 100644 --- a/source/tests/metacall_python_open_test/CMakeLists.txt +++ b/source/tests/metacall_python_open_test/CMakeLists.txt @@ -127,6 +127,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_pointer_test/CMakeLists.txt b/source/tests/metacall_python_pointer_test/CMakeLists.txt index 4beab7b928..fe6f4ee616 100644 --- a/source/tests/metacall_python_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_pointer_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_port_callback_test/CMakeLists.txt b/source/tests/metacall_python_port_callback_test/CMakeLists.txt index 95ddf1ad7c..bbf27070a8 100644 --- a/source/tests/metacall_python_port_callback_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_callback_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_port_https_test/CMakeLists.txt b/source/tests/metacall_python_port_https_test/CMakeLists.txt index fa4127119e..1f1335666e 100644 --- a/source/tests/metacall_python_port_https_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_https_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_port_import_test/CMakeLists.txt b/source/tests/metacall_python_port_import_test/CMakeLists.txt index 8d1d94f1c9..051f059533 100644 --- a/source/tests/metacall_python_port_import_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_import_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt index 463a4e5b66..2c4133672e 100644 --- a/source/tests/metacall_python_port_pointer_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_pointer_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_port_test/CMakeLists.txt b/source/tests/metacall_python_port_test/CMakeLists.txt index 431379d4aa..a4179b7f20 100644 --- a/source/tests/metacall_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_test/CMakeLists.txt @@ -109,6 +109,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_reentrant_test/CMakeLists.txt b/source/tests/metacall_python_reentrant_test/CMakeLists.txt index 8f6a82e07f..ab29592ef2 100644 --- a/source/tests/metacall_python_reentrant_test/CMakeLists.txt +++ b/source/tests/metacall_python_reentrant_test/CMakeLists.txt @@ -110,6 +110,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_relative_path_test/CMakeLists.txt b/source/tests/metacall_python_relative_path_test/CMakeLists.txt index 2a5ad0ff8f..22cae4f281 100644 --- a/source/tests/metacall_python_relative_path_test/CMakeLists.txt +++ b/source/tests/metacall_python_relative_path_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_test/CMakeLists.txt b/source/tests/metacall_python_test/CMakeLists.txt index 5fb1bec579..6f89617e34 100644 --- a/source/tests/metacall_python_test/CMakeLists.txt +++ b/source/tests/metacall_python_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_varargs_test/CMakeLists.txt b/source/tests/metacall_python_varargs_test/CMakeLists.txt index bae80e62d0..f8636d21e2 100644 --- a/source/tests/metacall_python_varargs_test/CMakeLists.txt +++ b/source/tests/metacall_python_varargs_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt index 9e871cf890..3aca8756e3 100644 --- a/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_env_vars_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_python_without_functions_test/CMakeLists.txt b/source/tests/metacall_python_without_functions_test/CMakeLists.txt index a4f92966ae..e2092380eb 100644 --- a/source/tests/metacall_python_without_functions_test/CMakeLists.txt +++ b/source/tests/metacall_python_without_functions_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_reinitialize_test/CMakeLists.txt b/source/tests/metacall_reinitialize_test/CMakeLists.txt index 73beda512e..c1adf593e3 100644 --- a/source/tests/metacall_reinitialize_test/CMakeLists.txt +++ b/source/tests/metacall_reinitialize_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_reload_functions_test/CMakeLists.txt b/source/tests/metacall_reload_functions_test/CMakeLists.txt index 4398e0a2de..8d7682d2ce 100644 --- a/source/tests/metacall_reload_functions_test/CMakeLists.txt +++ b/source/tests/metacall_reload_functions_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_return_monad_test/CMakeLists.txt b/source/tests/metacall_return_monad_test/CMakeLists.txt index 54f90028d4..bcf5ad5c57 100644 --- a/source/tests/metacall_return_monad_test/CMakeLists.txt +++ b/source/tests/metacall_return_monad_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rpc_test/CMakeLists.txt b/source/tests/metacall_rpc_test/CMakeLists.txt index 091cd4196f..04925f1f1c 100644 --- a/source/tests/metacall_rpc_test/CMakeLists.txt +++ b/source/tests/metacall_rpc_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt index 4503b7df1b..a480292e1c 100644 --- a/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_empty_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_fail_test/CMakeLists.txt b/source/tests/metacall_ruby_fail_test/CMakeLists.txt index 7211d396ee..a34d4318cd 100644 --- a/source/tests/metacall_ruby_fail_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_fail_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt index 50908e4399..c4d2ad9b38 100644 --- a/source/tests/metacall_ruby_object_class_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_object_class_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt index 49a899ecfa..ecd892ffb0 100644 --- a/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_parser_integration_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt index a2afac7514..6559f627a6 100644 --- a/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_rails_integration_test/CMakeLists.txt @@ -114,6 +114,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_ruby_test/CMakeLists.txt b/source/tests/metacall_ruby_test/CMakeLists.txt index 41d084aade..163c170a64 100644 --- a/source/tests/metacall_ruby_test/CMakeLists.txt +++ b/source/tests/metacall_ruby_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_class_test/CMakeLists.txt b/source/tests/metacall_rust_class_test/CMakeLists.txt index dd529756fa..28a7f1dac5 100644 --- a/source/tests/metacall_rust_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_class_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt index efcfafdcb7..026115ba3b 100644 --- a/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_mem_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt index 33b0b29099..0f98b613a9 100644 --- a/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_class_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt index 3f9d02f865..7ac9429cf3 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_dep_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt index e46e552dd5..a5aaabbe66 100644 --- a/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt +++ b/source/tests/metacall_rust_load_from_package_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_rust_test/CMakeLists.txt b/source/tests/metacall_rust_test/CMakeLists.txt index 9b0cfc8b30..31434b1be3 100644 --- a/source/tests/metacall_rust_test/CMakeLists.txt +++ b/source/tests/metacall_rust_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt index 67732e3108..3a98235b10 100644 --- a/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt +++ b/source/tests/metacall_sandbox_plugin_test/CMakeLists.txt @@ -123,6 +123,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_test/CMakeLists.txt b/source/tests/metacall_test/CMakeLists.txt index 4d75fe9b7a..8751e1fe0e 100644 --- a/source/tests/metacall_test/CMakeLists.txt +++ b/source/tests/metacall_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt index 46f4918045..9badf87526 100644 --- a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt index a41409a5b5..32674e550f 100644 --- a/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_jsx_default_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_node_test/CMakeLists.txt b/source/tests/metacall_typescript_node_test/CMakeLists.txt index 95954f202f..e91cc17171 100644 --- a/source/tests/metacall_typescript_node_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_node_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_require_test/CMakeLists.txt b/source/tests/metacall_typescript_require_test/CMakeLists.txt index 2e1e327bd3..7ab3292c5f 100644 --- a/source/tests/metacall_typescript_require_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_require_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_test/CMakeLists.txt b/source/tests/metacall_typescript_test/CMakeLists.txt index 1ad8d87d36..6827e08042 100644 --- a/source/tests/metacall_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt index 59789903b2..ca6465387a 100644 --- a/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_loop_fail_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt index b6732071c5..53682fa434 100644 --- a/source/tests/metacall_typescript_tsx_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_tsx_test/CMakeLists.txt @@ -107,6 +107,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_version_test/CMakeLists.txt b/source/tests/metacall_version_test/CMakeLists.txt index 8b3465541b..4d93e4fec3 100644 --- a/source/tests/metacall_version_test/CMakeLists.txt +++ b/source/tests/metacall_version_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt index 09c1efe109..7233aa5796 100644 --- a/source/tests/metacall_wasm_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_python_port_test/CMakeLists.txt @@ -108,6 +108,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/metacall_wasm_test/CMakeLists.txt b/source/tests/metacall_wasm_test/CMakeLists.txt index 5aeb8ca0a5..6ceca66927 100644 --- a/source/tests/metacall_wasm_test/CMakeLists.txt +++ b/source/tests/metacall_wasm_test/CMakeLists.txt @@ -106,6 +106,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/portability_path_test/CMakeLists.txt b/source/tests/portability_path_test/CMakeLists.txt index 37274fd9e2..b95e327189 100644 --- a/source/tests/portability_path_test/CMakeLists.txt +++ b/source/tests/portability_path_test/CMakeLists.txt @@ -101,6 +101,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/preprocessor_test/CMakeLists.txt b/source/tests/preprocessor_test/CMakeLists.txt index 68470eab20..b96a639036 100644 --- a/source/tests/preprocessor_test/CMakeLists.txt +++ b/source/tests/preprocessor_test/CMakeLists.txt @@ -102,6 +102,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/rb_loader_parser_test/CMakeLists.txt b/source/tests/rb_loader_parser_test/CMakeLists.txt index 4e6162aa55..dac449a563 100644 --- a/source/tests/rb_loader_parser_test/CMakeLists.txt +++ b/source/tests/rb_loader_parser_test/CMakeLists.txt @@ -121,6 +121,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/reflect_function_test/CMakeLists.txt b/source/tests/reflect_function_test/CMakeLists.txt index 9beb3781aa..fd1875cd36 100644 --- a/source/tests/reflect_function_test/CMakeLists.txt +++ b/source/tests/reflect_function_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/reflect_metadata_test/CMakeLists.txt b/source/tests/reflect_metadata_test/CMakeLists.txt index 37e635bc63..33497b513c 100644 --- a/source/tests/reflect_metadata_test/CMakeLists.txt +++ b/source/tests/reflect_metadata_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/reflect_object_class_test/CMakeLists.txt b/source/tests/reflect_object_class_test/CMakeLists.txt index 77f8371831..3a74590dc5 100644 --- a/source/tests/reflect_object_class_test/CMakeLists.txt +++ b/source/tests/reflect_object_class_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/reflect_scope_test/CMakeLists.txt b/source/tests/reflect_scope_test/CMakeLists.txt index 0a4bd718cf..83990f2359 100644 --- a/source/tests/reflect_scope_test/CMakeLists.txt +++ b/source/tests/reflect_scope_test/CMakeLists.txt @@ -115,6 +115,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/reflect_value_cast_test/CMakeLists.txt b/source/tests/reflect_value_cast_test/CMakeLists.txt index 46e51f3ae7..4b28d3a1a9 100644 --- a/source/tests/reflect_value_cast_test/CMakeLists.txt +++ b/source/tests/reflect_value_cast_test/CMakeLists.txt @@ -121,6 +121,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # diff --git a/source/tests/serial_test/CMakeLists.txt b/source/tests/serial_test/CMakeLists.txt index 8b32df06a0..12356bc112 100644 --- a/source/tests/serial_test/CMakeLists.txt +++ b/source/tests/serial_test/CMakeLists.txt @@ -120,6 +120,15 @@ target_compile_options(${target} ${DEFAULT_COMPILE_OPTIONS} ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # From 75816ff528634ea039c43ac411cf7ad49bd7a1b7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 15 Apr 2025 23:50:09 +0200 Subject: [PATCH 102/364] Trying to solve issues with docker hub ci. --- .github/workflows/docker-hub.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 123c572b48..9b97c8c227 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -70,20 +70,12 @@ jobs: ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} done - - name: Push Platform Images - run: | - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - for tag in "deps" "dev" "runtime" "cli"; do - echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" - docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - name: Run Tests run: | set -exuo pipefail platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') cat < Dockerfile.test - FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag} + FROM metacall/${IMAGE_NAME}:cli RUN echo "console.log('abcde')" > script.js RUN metacallcli script.js EOF @@ -91,6 +83,16 @@ jobs: docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . docker run --rm --platform=${{ matrix.platform }} test-image + - name: Push Platform Images + # Only run when master or when tagging a version + if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' + run: | + platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + for tag in "deps" "dev" "runtime" "cli"; do + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" + docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + done + manifest: name: Create and Push Manifest Lists needs: build @@ -153,7 +155,8 @@ jobs: name: Cleanup Platform Specific Tags needs: [build, manifest] runs-on: ubuntu-latest - if: always() + # Only run when master or when tagging a version + if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' steps: - name: Remove Platform-Specific Tags run: | From a75415a0fa23f10c053bf35db29b68f896c2d826 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 00:08:08 +0200 Subject: [PATCH 103/364] Trying to improve docker hub. --- .github/workflows/docker-hub.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 9b97c8c227..007080e8b5 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -35,6 +35,12 @@ jobs: - linux/s390x - linux/arm/v7 - linux/arm/v6 + # TODO: + # - linux/amd64/v2 + # - linux/amd64/v3 + # - linux/mips64le + # - linux/mips64 + # - linux/loong64 steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -63,9 +69,12 @@ jobs: - name: Tag Platform Images run: | + set -exuo pipefail platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') echo "Platform Tag: ${platform_tag}" for tag in "deps" "dev" "runtime" "cli"; do + docker tag metacall/${IMAGE_NAME}:${tag} \ + metacall/${IMAGE_NAME}:${tag}-${platform_tag} docker tag metacall/${IMAGE_NAME}:${tag} \ ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} done @@ -75,13 +84,14 @@ jobs: set -exuo pipefail platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') cat < Dockerfile.test - FROM metacall/${IMAGE_NAME}:cli - RUN echo "console.log('abcde')" > script.js + FROM metacall/${IMAGE_NAME}:${tag}-${platform_tag} + RUN echo "console.log('0123456789abcdef')" > script.js RUN metacallcli script.js EOF - docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - docker run --rm --platform=${{ matrix.platform }} test-image + docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . &> output.txt + cat output.txt + grep "0123456789abcdef" output.txt - name: Push Platform Images # Only run when master or when tagging a version @@ -155,8 +165,7 @@ jobs: name: Cleanup Platform Specific Tags needs: [build, manifest] runs-on: ubuntu-latest - # Only run when master or when tagging a version - if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' + if: always() steps: - name: Remove Platform-Specific Tags run: | From 5db8d09c5e992e4fc6f784f74501c7d68dedd40c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 00:37:16 +0200 Subject: [PATCH 104/364] Sovle issues from dynlink. --- source/tests/dynlink_test/CMakeLists.txt | 10 ++++- .../dynlink_test/source/dynlink_test.cpp | 38 +++++++++---------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index 1010f0fb90..7e39df1938 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -137,6 +137,14 @@ add_test(NAME ${target} COMMAND $ ) +# +# Define dependencies +# + +add_dependencies(${target} + ${META_PROJECT_NAME}::metacall +) + # # Define test labels # @@ -149,5 +157,5 @@ include(TestEnvironmentVariables) test_environment_variables(${target} "" - "DYNLINK_TEST_LIBRARY_PATH=@OUTPUT_DIRECTORY_DIR@" + "METACALL_TEST_LIBRARY_PATH=@OUTPUT_DIRECTORY_DIR@" ) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index dea1c0c8e2..a419c406c7 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -26,9 +26,9 @@ #include -#define DYNLINK_TEST_LIBRARY_PATH "DYNLINK_TEST_LIBRARY_PATH" +#define METACALL_TEST_LIBRARY_PATH "METACALL_TEST_LIBRARY_PATH" -typedef void (*dynlink_print_func)(void); +typedef const char *(*metacall_print_func)(void); class dynlink_test : public testing::Test { @@ -61,12 +61,12 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object extension: %s", dynlink_extension()); #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - const char library_name[] = "dynlinkd"; + const char library_name[] = "metacalld"; #else - const char library_name[] = "dynlink"; + const char library_name[] = "metacall"; #endif - char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); + char *path = environment_variable_path_create(METACALL_TEST_LIBRARY_PATH, NULL, 0, NULL); ASSERT_NE((char *)path, (char *)NULL); @@ -82,24 +82,24 @@ TEST_F(dynlink_test, DefaultConstructor) if (handle != NULL) { - dynlink_symbol_addr dynlink_print_info_addr; + dynlink_symbol_addr metacall_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "metacall_print_info", &metacall_print_info_addr)); - if (dynlink_print_info_addr != NULL) + if (metacall_print_info_addr != NULL) { - dynlink_print_func print = dynlink_print_info_addr; + metacall_print_func print = (metacall_print_func)metacall_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)metacall_print_info_addr); - if (dynlink_print_info_addr != NULL) + if (metacall_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } - print(); + log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); } dynlink_unload(handle); @@ -149,24 +149,24 @@ TEST_F(dynlink_test, DefaultConstructor) if (handle != NULL) { - dynlink_symbol_addr dynlink_print_info_addr; + dynlink_symbol_addr metacall_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "metacall_print_info", &metacall_print_info_addr)); - if (dynlink_print_info_addr != NULL) + if (metacall_print_info_addr != NULL) { - dynlink_print_func print = dynlink_print_info_addr; + metacall_print_func print = (metacall_print_func)metacall_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)metacall_print_info_addr); - if (dynlink_print_info_addr != NULL) + if (metacall_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } - print(); + log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); } dynlink_unload(handle); From dd45fb384246be4ecda8c7bba5e3a3a5df9f480c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 00:37:28 +0200 Subject: [PATCH 105/364] Solve issues from docker hub. --- .github/workflows/docker-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 007080e8b5..94b732adb6 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -84,7 +84,7 @@ jobs: set -exuo pipefail platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') cat < Dockerfile.test - FROM metacall/${IMAGE_NAME}:${tag}-${platform_tag} + FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js RUN metacallcli script.js EOF From e032b9c1b16a6745264906506f24e966cba1ca3f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 17:03:59 +0200 Subject: [PATCH 106/364] Solve issues in tests. --- source/tests/dynlink_test/CMakeLists.txt | 10 +----- .../dynlink_test/source/dynlink_test.cpp | 34 +++++++++---------- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../metacall_typescript_test/CMakeLists.txt | 2 +- 7 files changed, 23 insertions(+), 31 deletions(-) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index 7e39df1938..1010f0fb90 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -137,14 +137,6 @@ add_test(NAME ${target} COMMAND $ ) -# -# Define dependencies -# - -add_dependencies(${target} - ${META_PROJECT_NAME}::metacall -) - # # Define test labels # @@ -157,5 +149,5 @@ include(TestEnvironmentVariables) test_environment_variables(${target} "" - "METACALL_TEST_LIBRARY_PATH=@OUTPUT_DIRECTORY_DIR@" + "DYNLINK_TEST_LIBRARY_PATH=@OUTPUT_DIRECTORY_DIR@" ) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index a419c406c7..e506c69fa8 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -26,9 +26,9 @@ #include -#define METACALL_TEST_LIBRARY_PATH "METACALL_TEST_LIBRARY_PATH" +#define DYNLINK_TEST_LIBRARY_PATH "DYNLINK_TEST_LIBRARY_PATH" -typedef const char *(*metacall_print_func)(void); +typedef const char *(*dynlink_print_func)(void); class dynlink_test : public testing::Test { @@ -61,12 +61,12 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object extension: %s", dynlink_extension()); #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - const char library_name[] = "metacalld"; + const char library_name[] = "dynlinkd"; #else - const char library_name[] = "metacall"; + const char library_name[] = "dynlink"; #endif - char *path = environment_variable_path_create(METACALL_TEST_LIBRARY_PATH, NULL, 0, NULL); + char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); ASSERT_NE((char *)path, (char *)NULL); @@ -82,19 +82,19 @@ TEST_F(dynlink_test, DefaultConstructor) if (handle != NULL) { - dynlink_symbol_addr metacall_print_info_addr; + dynlink_symbol_addr dynlink_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, "metacall_print_info", &metacall_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); - if (metacall_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { - metacall_print_func print = (metacall_print_func)metacall_print_info_addr; + dynlink_print_func print = (dynlink_print_func)dynlink_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)metacall_print_info_addr); + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); - if (metacall_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } @@ -149,19 +149,19 @@ TEST_F(dynlink_test, DefaultConstructor) if (handle != NULL) { - dynlink_symbol_addr metacall_print_info_addr; + dynlink_symbol_addr dynlink_print_info_addr; - EXPECT_EQ((int)0, dynlink_symbol(handle, "metacall_print_info", &metacall_print_info_addr)); + EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); - if (metacall_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { - metacall_print_func print = (metacall_print_func)metacall_print_info_addr; + dynlink_print_func print = (dynlink_print_func)dynlink_print_info_addr; log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)metacall_print_info_addr); + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); - if (metacall_print_info_addr != NULL) + if (dynlink_print_info_addr != NULL) { log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); } diff --git a/source/tests/metacall_node_typescript_test/CMakeLists.txt b/source/tests/metacall_node_typescript_test/CMakeLists.txt index a7959a04b6..499baca66e 100644 --- a/source/tests/metacall_node_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_node_typescript_test/CMakeLists.txt @@ -131,6 +131,7 @@ target_link_options(${target} add_test(NAME ${target} COMMAND $ + WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) # @@ -148,7 +149,6 @@ add_dependencies(${target} set_property(TEST ${target} PROPERTY LABELS ${target} - WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) include(TestEnvironmentVariables) diff --git a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt index 9badf87526..4005debcf6 100644 --- a/source/tests/metacall_typescript_call_map_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_call_map_test/CMakeLists.txt @@ -131,6 +131,7 @@ target_link_options(${target} add_test(NAME ${target} COMMAND $ + WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) # @@ -148,7 +149,6 @@ add_dependencies(${target} set_property(TEST ${target} PROPERTY LABELS ${target} - WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) include(TestEnvironmentVariables) diff --git a/source/tests/metacall_typescript_node_test/CMakeLists.txt b/source/tests/metacall_typescript_node_test/CMakeLists.txt index e91cc17171..9dbd14de9d 100644 --- a/source/tests/metacall_typescript_node_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_node_test/CMakeLists.txt @@ -131,6 +131,7 @@ target_link_options(${target} add_test(NAME ${target} COMMAND $ + WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) # @@ -148,7 +149,6 @@ add_dependencies(${target} set_property(TEST ${target} PROPERTY LABELS ${target} - WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) include(TestEnvironmentVariables) diff --git a/source/tests/metacall_typescript_require_test/CMakeLists.txt b/source/tests/metacall_typescript_require_test/CMakeLists.txt index 7ab3292c5f..d4d51e4660 100644 --- a/source/tests/metacall_typescript_require_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_require_test/CMakeLists.txt @@ -131,6 +131,7 @@ target_link_options(${target} add_test(NAME ${target} COMMAND $ + WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) # @@ -148,7 +149,6 @@ add_dependencies(${target} set_property(TEST ${target} PROPERTY LABELS ${target} - WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) include(TestEnvironmentVariables) diff --git a/source/tests/metacall_typescript_test/CMakeLists.txt b/source/tests/metacall_typescript_test/CMakeLists.txt index 6827e08042..9af3378ebb 100644 --- a/source/tests/metacall_typescript_test/CMakeLists.txt +++ b/source/tests/metacall_typescript_test/CMakeLists.txt @@ -131,6 +131,7 @@ target_link_options(${target} add_test(NAME ${target} COMMAND $ + WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) # @@ -148,7 +149,6 @@ add_dependencies(${target} set_property(TEST ${target} PROPERTY LABELS ${target} - WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}/typedfunc ) include(TestEnvironmentVariables) From 4ec09506aa874a848f8f45e18e4dbe7649164c6e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 17:04:24 +0200 Subject: [PATCH 107/364] Add base for detour improvements. --- source/detour/source/detour.c | 49 ++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/source/detour/source/detour.c b/source/detour/source/detour.c index d894a8d5ba..c1e4646e01 100644 --- a/source/detour/source/detour.c +++ b/source/detour/source/detour.c @@ -39,6 +39,8 @@ struct detour_handle_type * and store all the symbols in the hash table then iterate and replace at the * same time, so the functions are accessed in O(1) instead of O(n) */ + set symbol_map; + set replaced_symbols; detour_impl_handle impl; }; @@ -69,6 +71,41 @@ const char *detour_name(detour d) return plugin_name(d); } +static detour_handle detour_handle_allocate(void) +{ + detour_handle handle = malloc(sizeof(struct detour_handle_type)); + + if (handle == NULL) + { + goto alloc_handle_error; + } + + handle->symbol_map = set_create(&hash_callback_ptr, &comparable_callback_ptr); + + if (handle->symbol_map == NULL) + { + goto alloc_symbol_map_error; + } + + handle->replaced_symbols = set_create(&hash_callback_ptr, &comparable_callback_ptr); + + if (handle->replaced_symbols == NULL) + { + goto alloc_replaced_symbols_error; + } + + handle->impl = NULL; + + return handle; + +alloc_replaced_symbols_error: + set_destroy(handle->symbol_map); +alloc_symbol_map_error: + free(handle); +alloc_handle_error: + return NULL; +} + detour_handle detour_load_file(detour d, const char *path) { detour_handle handle; @@ -80,7 +117,7 @@ detour_handle detour_load_file(detour d, const char *path) return NULL; } - handle = malloc(sizeof(struct detour_handle_type)); + handle = detour_handle_allocate(); if (handle == NULL) { @@ -112,7 +149,7 @@ detour_handle detour_load_handle(detour d, dynlink library) return NULL; } - handle = malloc(sizeof(struct detour_handle_type)); + handle = detour_handle_allocate(); if (handle == NULL) { @@ -144,7 +181,7 @@ detour_handle detour_load_address(detour d, void (*address)(void)) return NULL; } - handle = malloc(sizeof(struct detour_handle_type)); + handle = detour_handle_allocate(); if (handle == NULL) { @@ -197,7 +234,13 @@ void detour_unload(detour d, detour_handle handle) return; } + /* TODO: Should we restore all the replaced symbols? */ + detour_iface(d)->destroy(handle->impl); + + set_destroy(handle->symbol_map); + + set_destroy(handle->replaced_symbols); } int detour_clear(detour d) From e1690300fc212bbfa7e0f71e435a9795445d0fd4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 17:04:40 +0200 Subject: [PATCH 108/364] Minor bug in metacall link. --- source/metacall/source/metacall_link.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index df4b05cce2..f9be116964 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -213,6 +213,11 @@ int metacall_link_unregister(const char *tag, const char *library, const char *s return 1; } + if (set_get(metacall_link_table, (set_key)symbol) == NULL) + { + return 0; + } + /* TODO: Restore the hook? We need support for this on the detour API */ (void)tag; (void)library; From 97cfe6ff98603e42aa63b646f33714e0f7d50b13 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 16 Apr 2025 17:04:56 +0200 Subject: [PATCH 109/364] Trying to solve issues with dockerhub. --- .github/workflows/docker-hub.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 94b732adb6..93a95125b7 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -89,8 +89,8 @@ jobs: RUN metacallcli script.js EOF - docker build --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . &> output.txt - cat output.txt + export DOCKER_BUILDKIT=1 + docker build --progress=plain --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . | tee output.txt grep "0123456789abcdef" output.txt - name: Push Platform Images From 25caa343d4ee3d1b4a0f26e282e09c8792d0afd3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 23 Apr 2025 22:43:10 +0200 Subject: [PATCH 110/364] Trying path in docker. --- tools/cli/Dockerfile | 3 ++- tools/dev/Dockerfile | 3 ++- tools/metacall-build.sh | 6 +++--- tools/metacall-configure.sh | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index fed409c5e2..5b387470d3 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -40,7 +40,8 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true + DOTNET_CLI_TELEMETRY_OPTOUT=true \ + PATH="/usr/local/bin:$PATH" # Define working directory WORKDIR $LOADER_SCRIPT_PATH diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 9f5805944d..8d239a0b81 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -40,7 +40,8 @@ ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build \ PORT_LIBRARY_PATH=$METACALL_PATH/build \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true + DOTNET_CLI_TELEMETRY_OPTOUT=true \ + PATH="/usr/local/bin:$PATH" # Define working directory WORKDIR $METACALL_PATH diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index 74826e22f2..1cfcc7f69a 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -74,9 +74,9 @@ sub_build() { make -j$(getconf _NPROCESSORS_ONLN) # Tests (coverage needs to run the tests) - if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then - ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE - fi + # if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then + # ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE + # fi # Coverage if [ $BUILD_COVERAGE = 1 ]; then diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 0360f472fb..61a8027579 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -529,7 +529,7 @@ sub_configure() { fi # Build type - BUILD_STRING="$BUILD_STRING -DCMAKE_BUILD_TYPE=$BUILD_TYPE" + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_ADDRESS_SANITIZER=On -DCMAKE_BUILD_TYPE=Debug" #$BUILD_TYPE" # Execute CMake cmake -Wno-dev -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. From e316bbfe28b43d153565641927518922120eca15 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 23 Apr 2025 22:46:44 +0200 Subject: [PATCH 111/364] Revert "Trying path in docker." This reverts commit 25caa343d4ee3d1b4a0f26e282e09c8792d0afd3. --- tools/cli/Dockerfile | 3 +-- tools/dev/Dockerfile | 3 +-- tools/metacall-build.sh | 6 +++--- tools/metacall-configure.sh | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index 5b387470d3..fed409c5e2 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -40,8 +40,7 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true \ - PATH="/usr/local/bin:$PATH" + DOTNET_CLI_TELEMETRY_OPTOUT=true # Define working directory WORKDIR $LOADER_SCRIPT_PATH diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 8d239a0b81..9f5805944d 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -40,8 +40,7 @@ ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build \ PORT_LIBRARY_PATH=$METACALL_PATH/build \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true \ - PATH="/usr/local/bin:$PATH" + DOTNET_CLI_TELEMETRY_OPTOUT=true # Define working directory WORKDIR $METACALL_PATH diff --git a/tools/metacall-build.sh b/tools/metacall-build.sh index 1cfcc7f69a..74826e22f2 100755 --- a/tools/metacall-build.sh +++ b/tools/metacall-build.sh @@ -74,9 +74,9 @@ sub_build() { make -j$(getconf _NPROCESSORS_ONLN) # Tests (coverage needs to run the tests) - # if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then - # ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE - # fi + if [ $BUILD_TESTS = 1 ] || [ $BUILD_BENCHMARKS=1 ] || [ $BUILD_COVERAGE = 1 ]; then + ctest -j$(getconf _NPROCESSORS_ONLN) --timeout 5400 --output-on-failure --test-output-size-failed 3221000000 -C $BUILD_TYPE + fi # Coverage if [ $BUILD_COVERAGE = 1 ]; then diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 61a8027579..0360f472fb 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -529,7 +529,7 @@ sub_configure() { fi # Build type - BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_ADDRESS_SANITIZER=On -DCMAKE_BUILD_TYPE=Debug" #$BUILD_TYPE" + BUILD_STRING="$BUILD_STRING -DCMAKE_BUILD_TYPE=$BUILD_TYPE" # Execute CMake cmake -Wno-dev -DOPTION_GIT_HOOKS=Off $BUILD_STRING .. From 7ba08234fed06956e430087b09e1c83fdbe35735 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 23 Apr 2025 22:49:00 +0200 Subject: [PATCH 112/364] Docker path. --- tools/cli/Dockerfile | 3 ++- tools/dev/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index fed409c5e2..5b387470d3 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -40,7 +40,8 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true + DOTNET_CLI_TELEMETRY_OPTOUT=true \ + PATH="/usr/local/bin:$PATH" # Define working directory WORKDIR $LOADER_SCRIPT_PATH diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 9f5805944d..8d239a0b81 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -40,7 +40,8 @@ ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build \ PORT_LIBRARY_PATH=$METACALL_PATH/build \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true + DOTNET_CLI_TELEMETRY_OPTOUT=true \ + PATH="/usr/local/bin:$PATH" # Define working directory WORKDIR $METACALL_PATH From 9c2b3e3fade1d06339217240ebade0e77fc035f5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 23 Apr 2025 23:22:27 +0200 Subject: [PATCH 113/364] Trying to solve issues with docker hub. --- .github/workflows/docker-hub.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 93a95125b7..55c7b68b3a 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -86,12 +86,12 @@ jobs: cat < Dockerfile.test FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js - RUN metacallcli script.js + RUN metacallcli script.js | tee output.txt + RUN grep 0123456789abcdef output.txt EOF export DOCKER_BUILDKIT=1 - docker build --progress=plain --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . | tee output.txt - grep "0123456789abcdef" output.txt + docker build --progress=plain --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - name: Push Platform Images # Only run when master or when tagging a version From b9d0940400caab8e0137ff2ac4491ea5c980cf3d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 00:04:53 +0200 Subject: [PATCH 114/364] Add deubg. --- .github/workflows/docker-hub.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 55c7b68b3a..151fcf788c 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -86,6 +86,7 @@ jobs: cat < Dockerfile.test FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js + RUN ls -la /usr/local/bin RUN metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF From 0faf2e825ab75763efcf1f735fec6e4d8dc1d921 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 00:30:50 +0200 Subject: [PATCH 115/364] Use the binary on docker hub. --- .github/workflows/docker-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 151fcf788c..3c1842dbeb 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -87,7 +87,7 @@ jobs: FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js RUN ls -la /usr/local/bin - RUN metacallcli script.js | tee output.txt + RUN /usr/local/bin/metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF From 9a35d0f5f1c7941c362d02fdb83322855a5126ed Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 01:03:49 +0200 Subject: [PATCH 116/364] Testing things with dockerhub. --- .github/workflows/docker-hub.yml | 7 ++++++- tools/cli/Dockerfile | 3 +-- tools/dev/Dockerfile | 3 +-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 3c1842dbeb..eab4e4d0d9 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -86,13 +86,18 @@ jobs: cat < Dockerfile.test FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js + RUN pwd + RUN ls -la RUN ls -la /usr/local/bin + RUN whoami + RUN /usr/local/bin/metacallcli `pwd`/script.js + RUN /usr/local/bin/metacallcli script.js RUN /usr/local/bin/metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF export DOCKER_BUILDKIT=1 - docker build --progress=plain --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker build --progress=plain --platform=${{ matrix.platform }} -f Dockerfile.test -t test-image . - name: Push Platform Images # Only run when master or when tagging a version diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index 5b387470d3..fed409c5e2 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -40,8 +40,7 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true \ - PATH="/usr/local/bin:$PATH" + DOTNET_CLI_TELEMETRY_OPTOUT=true # Define working directory WORKDIR $LOADER_SCRIPT_PATH diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 8d239a0b81..9f5805944d 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -40,8 +40,7 @@ ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build \ PORT_LIBRARY_PATH=$METACALL_PATH/build \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/lib/node_modules \ - DOTNET_CLI_TELEMETRY_OPTOUT=true \ - PATH="/usr/local/bin:$PATH" + DOTNET_CLI_TELEMETRY_OPTOUT=true # Define working directory WORKDIR $METACALL_PATH From 0785ea1ea84fcd593002f549d48fc076156400f5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 01:31:54 +0200 Subject: [PATCH 117/364] More debug of dockerhub. --- .github/workflows/docker-hub.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index eab4e4d0d9..c2d7451a86 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -83,15 +83,12 @@ jobs: run: | set -exuo pipefail platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') + docker image inspect metacall/${IMAGE_NAME}:cli-${platform_tag} --format='{{.Os}}/{{.Architecture}}' cat < Dockerfile.test FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js - RUN pwd - RUN ls -la - RUN ls -la /usr/local/bin - RUN whoami - RUN /usr/local/bin/metacallcli `pwd`/script.js - RUN /usr/local/bin/metacallcli script.js + RUN file /usr/local/bin/metacallcli + RUN /usr/local/bin/metacallcli /usr/local/scripts/script.js RUN /usr/local/bin/metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF From 64bd9080071ebd14ebf676291400fbf49ac3037c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 01:52:24 +0200 Subject: [PATCH 118/364] Add file dependency for debug dockerhub. --- .github/workflows/docker-hub.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index c2d7451a86..cf4a818484 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -87,6 +87,7 @@ jobs: cat < Dockerfile.test FROM metacall/${IMAGE_NAME}:cli-${platform_tag} RUN echo "console.log('0123456789abcdef')" > script.js + RUN apt-get update && apt-get install file RUN file /usr/local/bin/metacallcli RUN /usr/local/bin/metacallcli /usr/local/scripts/script.js RUN /usr/local/bin/metacallcli script.js | tee output.txt From 44379ca690c5a1c67b2a8ca3c74f2e94e6874ed8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 02:29:08 +0200 Subject: [PATCH 119/364] Trying to solve issues with atomic abi. --- source/reflect/source/reflect_class.c | 2 +- source/reflect/source/reflect_exception.c | 2 +- source/reflect/source/reflect_function.c | 2 +- source/reflect/source/reflect_object.c | 2 +- .../threading/threading_atomic_ref_count.h | 22 +++++++++---------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index 77ea42baad..4a8c540589 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -42,7 +42,7 @@ struct class_type enum accessor_type_id accessor; class_impl impl; class_interface interface; - struct threading_atomic_ref_count_type ref; + threading_atomic_ref_count_type ref; vector constructors; map methods; map static_methods; diff --git a/source/reflect/source/reflect_exception.c b/source/reflect/source/reflect_exception.c index 179aa237a5..25752bdd93 100644 --- a/source/reflect/source/reflect_exception.c +++ b/source/reflect/source/reflect_exception.c @@ -37,7 +37,7 @@ struct exception_type int64_t code; /* Numeric code of error */ char *stacktrace; /* Stack trace of the error */ uint64_t id; /* Thread id where the error was raised */ - struct threading_atomic_ref_count_type ref; + threading_atomic_ref_count_type ref; /* TODO: value attributes; // This should implement a map for representing the extra attributes of an exception */ }; diff --git a/source/reflect/source/reflect_function.c b/source/reflect/source/reflect_function.c index d64ab1c90e..27da107fd2 100644 --- a/source/reflect/source/reflect_function.c +++ b/source/reflect/source/reflect_function.c @@ -36,7 +36,7 @@ struct function_type signature s; function_impl impl; function_interface interface; - struct threading_atomic_ref_count_type ref; + threading_atomic_ref_count_type ref; enum async_id async; void *data; }; diff --git a/source/reflect/source/reflect_object.c b/source/reflect/source/reflect_object.c index 1938d55ec7..c4b068f671 100644 --- a/source/reflect/source/reflect_object.c +++ b/source/reflect/source/reflect_object.c @@ -40,7 +40,7 @@ struct object_type enum accessor_type_id accessor; object_impl impl; object_interface interface; - struct threading_atomic_ref_count_type ref; + threading_atomic_ref_count_type ref; klass cls; }; diff --git a/source/threading/include/threading/threading_atomic_ref_count.h b/source/threading/include/threading/threading_atomic_ref_count.h index 165ef565c9..8dd8531fc0 100644 --- a/source/threading/include/threading/threading_atomic_ref_count.h +++ b/source/threading/include/threading/threading_atomic_ref_count.h @@ -46,19 +46,19 @@ extern "C" { /* -- Member Data -- */ -struct threading_atomic_ref_count_type -{ #if defined(__THREAD_SANITIZER__) +typedef struct +{ uintmax_t count; threading_mutex_type m; +} threading_atomic_ref_count_type; #else - atomic_uintmax_t count; +typedef atomic_uintmax_t threading_atomic_ref_count_type; #endif -}; /* -- Type Definitions -- */ -typedef struct threading_atomic_ref_count_type *threading_atomic_ref_count; +typedef threading_atomic_ref_count_type *threading_atomic_ref_count; /* -- Methods -- */ @@ -67,7 +67,7 @@ static inline void threading_atomic_ref_count_store(threading_atomic_ref_count r #if defined(__THREAD_SANITIZER__) threading_mutex_store(&ref->m, &ref->count, &v, sizeof(uintmax_t)); #else - atomic_store(&ref->count, v); + atomic_store(ref, v); #endif } @@ -93,7 +93,7 @@ static inline uintmax_t threading_atomic_ref_count_load(threading_atomic_ref_cou return result; #else - return atomic_load_explicit(&ref->count, memory_order_relaxed); + return atomic_load_explicit(ref, memory_order_relaxed); #endif } @@ -106,12 +106,12 @@ static inline int threading_atomic_ref_count_increment(threading_atomic_ref_coun } threading_mutex_unlock(&ref->m); #else - if (atomic_load_explicit(&ref->count, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MAX) + if (atomic_load_explicit(ref, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MAX) { return 1; } - atomic_fetch_add_explicit(&ref->count, 1, memory_order_relaxed); + atomic_fetch_add_explicit(ref, 1, memory_order_relaxed); #endif return 0; @@ -126,12 +126,12 @@ static inline int threading_atomic_ref_count_decrement(threading_atomic_ref_coun } threading_mutex_unlock(&ref->m); #else - if (atomic_load_explicit(&ref->count, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MIN) + if (atomic_load_explicit(ref, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MIN) { return 1; } - uintmax_t old_ref_count = atomic_fetch_sub_explicit(&ref->count, 1, memory_order_release); + uintmax_t old_ref_count = atomic_fetch_sub_explicit(ref, 1, memory_order_release); if (old_ref_count == THREADING_ATOMIC_REF_COUNT_MIN + 1) { From bcf26cb2b0b94c6dae60c95a66b077f9974f4378 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 17:07:03 +0200 Subject: [PATCH 120/364] Solve issues on docker, improbe build warnings. --- .github/workflows/docker-hub.yml | 30 +++----- docker-compose.test.yml | 4 +- .../include/node_loader/node_loader_impl.h | 2 +- .../node_loader/source/node_loader_impl.cpp | 73 ++++++++++++------- .../source/node_loader_trampoline.cpp | 9 ++- .../loaders/py_loader/source/py_loader_dict.c | 22 ++++++ .../loaders/py_loader/source/py_loader_impl.c | 2 - .../py_loader/source/py_loader_threading.cpp | 2 - .../loaders/rb_loader/source/rb_loader_impl.c | 1 + source/ports/py_port/helper.py | 2 +- source/reflect/source/reflect_class.c | 1 + source/reflect/source/reflect_exception.c | 10 ++- source/reflect/source/reflect_function.c | 18 +++-- source/reflect/source/reflect_object.c | 24 +++--- .../threading/threading_atomic_ref_count.h | 18 ++--- tools/metacall-configure.sh | 21 ++++++ tools/metacall-environment.sh | 23 ++++++ tools/metacall-runtime.sh | 9 +++ tools/metacall-sanitizer.sh | 2 +- 19 files changed, 186 insertions(+), 87 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index cf4a818484..718bae74c4 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -67,42 +67,32 @@ jobs: run: | ./docker-compose.sh platform - - name: Tag Platform Images - run: | - set -exuo pipefail - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - echo "Platform Tag: ${platform_tag}" - for tag in "deps" "dev" "runtime" "cli"; do - docker tag metacall/${IMAGE_NAME}:${tag} \ - metacall/${IMAGE_NAME}:${tag}-${platform_tag} - docker tag metacall/${IMAGE_NAME}:${tag} \ - ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} - done - - name: Run Tests run: | set -exuo pipefail - platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') - docker image inspect metacall/${IMAGE_NAME}:cli-${platform_tag} --format='{{.Os}}/{{.Architecture}}' + docker image inspect ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli --format='{{.Os}}/{{.Architecture}}' cat < Dockerfile.test - FROM metacall/${IMAGE_NAME}:cli-${platform_tag} - RUN echo "console.log('0123456789abcdef')" > script.js - RUN apt-get update && apt-get install file + FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli + RUN apt-get update && apt-get install -y file RUN file /usr/local/bin/metacallcli - RUN /usr/local/bin/metacallcli /usr/local/scripts/script.js - RUN /usr/local/bin/metacallcli script.js | tee output.txt + RUN echo "console.log('0123456789abcdef')" > script.js + RUN metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF export DOCKER_BUILDKIT=1 docker build --progress=plain --platform=${{ matrix.platform }} -f Dockerfile.test -t test-image . - - name: Push Platform Images + - name: Tag & Push Platform Images # Only run when master or when tagging a version if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' run: | platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') for tag in "deps" "dev" "runtime" "cli"; do + docker tag \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} \ + ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} + echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" docker push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} done diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 0834f67a0d..a6946f3a55 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -25,10 +25,10 @@ services: build: args: METACALL_BUILD_TYPE: ${METACALL_BUILD_TYPE} - METACALL_INSTALL_OPTIONS: base python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust rapidjson swig pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 + METACALL_INSTALL_OPTIONS: base python ruby netcore8 nodejs typescript file rpc wasm java c cobol go rust rapidjson swig pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 dev: image: metacall/core:dev build: args: METACALL_BUILD_TYPE: ${METACALL_BUILD_TYPE} - METACALL_BUILD_OPTIONS: ${METACALL_BUILD_SANITIZER} python ruby netcore7 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks ${METACALL_BUILD_COVERAGE} # v8 + METACALL_BUILD_OPTIONS: ${METACALL_BUILD_SANITIZER} python ruby netcore8 nodejs typescript file rpc wasm java c cobol go rust examples tests scripts ports install pack sandbox benchmarks ${METACALL_BUILD_COVERAGE} # v8 diff --git a/source/loaders/node_loader/include/node_loader/node_loader_impl.h b/source/loaders/node_loader/include/node_loader/node_loader_impl.h index 094f3b24ef..ee424c9b30 100644 --- a/source/loaders/node_loader/include/node_loader/node_loader_impl.h +++ b/source/loaders/node_loader/include/node_loader/node_loader_impl.h @@ -67,7 +67,7 @@ NODE_LOADER_NO_EXPORT void node_loader_impl_destroy_safe_impl(loader_impl_node n NODE_LOADER_NO_EXPORT void node_loader_impl_print_handles(loader_impl_node node_impl); -NODE_LOADER_NO_EXPORT int64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl); +NODE_LOADER_NO_EXPORT uint64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl); NODE_LOADER_NO_EXPORT napi_value node_loader_impl_register_bootstrap_startup(loader_impl_node node_impl, napi_env env); diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 9a318719d2..adda1440f6 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -704,8 +704,8 @@ struct loader_impl_node_type /* TODO: This implementation won't work for multi-isolate environments. We should test it. */ std::thread::id js_thread_id; - int64_t base_active_handles; - std::atomic_int64_t extra_active_handles; + uint64_t base_active_handles; + std::atomic_uint64_t extra_active_handles; uv_prepare_t destroy_prepare; uv_check_t destroy_check; std::atomic_bool event_loop_empty; @@ -874,7 +874,7 @@ static void node_loader_impl_thread_log(void *data); static void node_loader_impl_walk_async_handles_count(uv_handle_t *handle, void *arg); #endif -static int64_t node_loader_impl_async_handles_count(loader_impl_node node_impl); +static uint64_t node_loader_impl_async_handles_count(loader_impl_node node_impl); static void node_loader_impl_try_destroy(loader_impl_node node_impl); @@ -4346,7 +4346,7 @@ static void node_loader_impl_destroy_cb(loader_impl_node node_impl) node_loader_impl_print_handles(node_impl); #endif - if (node_impl->event_loop_empty.load() == false && node_loader_impl_user_async_handles_count(node_impl) <= 0) + if (node_impl->event_loop_empty.load() == false && node_loader_impl_user_async_handles_count(node_impl) == 0) { loader_impl_handle_safe_cast destroy_prepare_cast = { NULL }; loader_impl_handle_safe_cast destroy_check_cast = { NULL }; @@ -4399,7 +4399,7 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe_ node_loader_impl_exception(env, status); /* Check if there are async handles, destroy if the queue is empty, otherwise request the destroy */ - if (node_loader_impl_user_async_handles_count(node_impl) <= 0 || node_impl->event_loop_empty.load() == true) + if (node_loader_impl_user_async_handles_count(node_impl) == 0 || node_impl->event_loop_empty.load() == true) { node_loader_impl_destroy_safe_impl(node_impl, env); destroy_safe->has_finished = true; @@ -4431,7 +4431,7 @@ static inline int uv__queue_empty(const struct node_loader_impl_uv__queue *q) #if (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) void node_loader_impl_walk_async_handles_count(uv_handle_t *handle, void *arg) { - int64_t *async_count = static_cast(arg); + uint64_t *async_count = static_cast(arg); if (uv_is_active(handle) && !uv_is_closing(handle)) { @@ -4447,11 +4447,11 @@ void node_loader_impl_walk_async_handles_count(uv_handle_t *handle, void *arg) } #endif -int64_t node_loader_impl_async_closing_handles_count(loader_impl_node node_impl) +uint64_t node_loader_impl_async_closing_handles_count(loader_impl_node node_impl) { #if defined(WIN32) || defined(_WIN32) - return (int64_t)(node_impl->thread_loop->pending_reqs_tail != NULL) + - (int64_t)(node_impl->thread_loop->endgame_handles != NULL); + return (uint64_t)(node_impl->thread_loop->pending_reqs_tail != NULL) + + (uint64_t)(node_impl->thread_loop->endgame_handles != NULL); #else union { @@ -4461,49 +4461,66 @@ int64_t node_loader_impl_async_closing_handles_count(loader_impl_node node_impl) uv__queue_cast.data = (void *)&node_impl->thread_loop->pending_queue; - return (int64_t)(!uv__queue_empty(uv__queue_cast.ptr)) + - (int64_t)(node_impl->thread_loop->closing_handles != NULL); + return (uint64_t)(!uv__queue_empty(uv__queue_cast.ptr)) + + (uint64_t)(node_impl->thread_loop->closing_handles != NULL); #endif } -int64_t node_loader_impl_async_handles_count(loader_impl_node node_impl) +uint64_t node_loader_impl_async_handles_count(loader_impl_node node_impl) { #if (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - int64_t active_handles = 0; + uint64_t active_handles = 0; uv_walk(node_impl->thread_loop, node_loader_impl_walk_async_handles_count, (void *)&active_handles); return active_handles + - (int64_t)(node_impl->thread_loop->active_reqs.count > 0) + + (uint64_t)(node_impl->thread_loop->active_reqs.count > 0) + node_loader_impl_async_closing_handles_count(node_impl); #else - int64_t active_handles = (int64_t)node_impl->thread_loop->active_handles + - (int64_t)(node_impl->thread_loop->active_reqs.count > 0) + - node_loader_impl_async_closing_handles_count(node_impl); + uint64_t active_handles = (uint64_t)node_impl->thread_loop->active_handles + + (uint64_t)(node_impl->thread_loop->active_reqs.count > 0) + + node_loader_impl_async_closing_handles_count(node_impl); return active_handles; #endif } -int64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl) +uint64_t node_loader_impl_user_async_handles_count(loader_impl_node node_impl) { - int64_t active_handles = node_loader_impl_async_handles_count(node_impl); - int64_t extra_active_handles = node_impl->extra_active_handles.load(); + uint64_t active_handles = node_loader_impl_async_handles_count(node_impl); + uint64_t extra_active_handles = node_impl->extra_active_handles.load(); + uint64_t base_active_handles = node_impl->base_active_handles; /* TODO: Uncomment for debugging handles */ /* #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - int64_t closing = node_loader_impl_async_closing_handles_count(node_impl); + uint64_t closing = node_loader_impl_async_closing_handles_count(node_impl); printf("[active_handles] - [base_active_handles] - [extra_active_handles] + [active_reqs] + [closing]\n"); - printf(" %" PRId64 " - %" PRId64 " - %" PRId64 " + %" PRId64 " [> 0] + %" PRId64 "\n", - (int64_t)node_impl->thread_loop->active_handles, - node_impl->base_active_handles, + printf(" %" PRIu64 " - %" PRIu64 " - %" PRIu64 " + %" PRIu64 " [> 0] + %" PRIu64 "\n", + (uint64_t)node_impl->thread_loop->active_handles, + base_active_handles, extra_active_handles, - (int64_t)node_impl->thread_loop->active_reqs.count, + (uint64_t)node_impl->thread_loop->active_reqs.count, closing); #endif */ - return active_handles - node_impl->base_active_handles - extra_active_handles; + /* Check for overflow */ + uint64_t total_base_handles = base_active_handles + extra_active_handles; + + if (total_base_handles < base_active_handles) + { + /* Overflow occurred */ + return UINT64_MAX; + } + + /* Check for underflow */ + if (active_handles < total_base_handles) + { + /* Underflow occurred */ + return 0; + } + + return active_handles - total_base_handles; } void node_loader_impl_print_handles(loader_impl_node node_impl) @@ -4512,8 +4529,8 @@ void node_loader_impl_print_handles(loader_impl_node node_impl) /* TODO: Uncomment for debugging handles */ /* - printf("Number of active handles: %" PRId64 "\n", node_loader_impl_async_handles_count(node_impl)); - printf("Number of user active handles: %" PRId64 "\n", node_loader_impl_user_async_handles_count(node_impl)); + printf("Number of active handles: %" PRIu64 "\n", node_loader_impl_async_handles_count(node_impl)); + printf("Number of user active handles: %" PRIu64 "\n", node_loader_impl_user_async_handles_count(node_impl)); uv_print_active_handles(node_impl->thread_loop, stdout); fflush(stdout); */ diff --git a/source/loaders/node_loader/source/node_loader_trampoline.cpp b/source/loaders/node_loader/source/node_loader_trampoline.cpp index 3dbb352939..5d5aebbc89 100644 --- a/source/loaders/node_loader/source/node_loader_trampoline.cpp +++ b/source/loaders/node_loader/source/node_loader_trampoline.cpp @@ -397,12 +397,17 @@ napi_value node_loader_trampoline_active_handles(napi_env env, napi_callback_inf return nullptr; } - int64_t active_handles = node_loader_impl_user_async_handles_count(node_impl_cast.data); + uint64_t active_handles = node_loader_impl_user_async_handles_count(node_impl_cast.data); /* Create the integer return value */ napi_value result; - status = napi_create_int64(env, active_handles, &result); + if (active_handles > (uint64_t)INT64_MAX) + { + active_handles = (uint64_t)INT64_MAX; + } + + status = napi_create_int64(env, (int64_t)active_handles, &result); node_loader_impl_exception(env, status); diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index 2982a43676..48c1bdee61 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -26,10 +26,32 @@ #include #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 13 + /* Disable warnings from Python */ + #if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wredundant-decls" + #pragma clang diagnostic ignored "-Wstrict-aliasing" + #pragma clang diagnostic ignored "-Wunused-parameter" + #pragma clang diagnostic ignored "-Wdeprecated-declarations" + #elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wredundant-decls" + #pragma GCC diagnostic ignored "-Wstrict-aliasing" + #pragma GCC diagnostic ignored "-Wunused-parameter" + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #endif + #ifndef Py_BUILD_CORE #define Py_BUILD_CORE #endif #include + + /* Disable warnings from Python */ + #if defined(__clang__) + #pragma clang diagnostic pop + #elif defined(__GNUC__) + #pragma GCC diagnostic pop + #endif #endif struct py_loader_impl_dict_obj diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 79d655d019..32fedc6924 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -44,8 +44,6 @@ #include #include -#include - #define PY_LOADER_IMPL_FUNCTION_TYPE_INVOKE_FUNC "__py_loader_impl_function_type_invoke__" #define PY_LOADER_IMPL_FINALIZER_FUNC "__py_loader_impl_finalizer__" diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index c49add1c36..5aa5173a92 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -24,8 +24,6 @@ #include -#include - struct py_thread_state { uint64_t ref_count; diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index ea3f817ae6..3451dec8fa 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -42,6 +42,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wredundant-decls" #pragma GCC diagnostic ignored "-Wpedantic" + #pragma GCC diagnostic ignored "-Wunused-parameter" #endif #include diff --git a/source/ports/py_port/helper.py b/source/ports/py_port/helper.py index 86f8513818..1a0a77df86 100644 --- a/source/ports/py_port/helper.py +++ b/source/ports/py_port/helper.py @@ -112,7 +112,7 @@ def pre_install(components): def pre_install_prompt(): answers = {'yes': True, 'y': True, 'no': False, 'n': False} - components = ['python', 'ruby', 'netcore7', 'v8', 'nodejs', 'ports'] + components = ['python', 'ruby', 'netcore8', 'v8', 'nodejs', 'ports'] args = [] try: diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index 4a8c540589..63643a24f9 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -123,6 +123,7 @@ klass class_create(const char *name, enum accessor_type_id accessor, class_impl log_write("metacall", LOG_LEVEL_ERROR, "Invalid class (%s) create callback <%p>", cls->name, cls->interface->create); free(cls->name); + threading_atomic_ref_count_destroy(&cls->ref); vector_destroy(cls->constructors); map_destroy(cls->methods); map_destroy(cls->static_methods); diff --git a/source/reflect/source/reflect_exception.c b/source/reflect/source/reflect_exception.c index 25752bdd93..34b3dc2d38 100644 --- a/source/reflect/source/reflect_exception.c +++ b/source/reflect/source/reflect_exception.c @@ -138,9 +138,15 @@ exception exception_create_const(const char *message, const char *label, int64_t return ex; stacktrace_bad_alloc: - free(ex->label); + if (ex->label != NULL) + { + free(ex->label); + } label_bad_alloc: - free(ex->message); + if (ex->message != NULL) + { + free(ex->message); + } message_bad_alloc: free(ex); exception_bad_alloc: diff --git a/source/reflect/source/reflect_function.c b/source/reflect/source/reflect_function.c index 27da107fd2..b9a03512f8 100644 --- a/source/reflect/source/reflect_function.c +++ b/source/reflect/source/reflect_function.c @@ -66,9 +66,7 @@ function function_create(const char *name, size_t args_count, function_impl impl { log_write("metacall", LOG_LEVEL_ERROR, "Invalid function name allocation <%s>", name); - free(func); - - return NULL; + goto name_error; } memcpy(func->name, name, func_name_size); @@ -88,7 +86,7 @@ function function_create(const char *name, size_t args_count, function_impl impl { log_write("metacall", LOG_LEVEL_ERROR, "Invalid function signature allocation"); - goto function_create_error; + goto signature_error; } threading_atomic_ref_count_initialize(&func->ref); @@ -101,7 +99,7 @@ function function_create(const char *name, size_t args_count, function_impl impl { log_write("metacall", LOG_LEVEL_ERROR, "Invalid function (%s) create callback <%p>", func->name, func->interface->create); - goto function_create_error; + goto interface_create_error; } } @@ -109,8 +107,14 @@ function function_create(const char *name, size_t args_count, function_impl impl return func; -function_create_error: - free(func->name); +interface_create_error: + signature_destroy(func->s); +signature_error: + if (func->name != NULL) + { + free(func->name); + } +name_error: free(func); return NULL; diff --git a/source/reflect/source/reflect_object.c b/source/reflect/source/reflect_object.c index c4b068f671..a568b24d70 100644 --- a/source/reflect/source/reflect_object.c +++ b/source/reflect/source/reflect_object.c @@ -67,9 +67,7 @@ object object_create(const char *name, enum accessor_type_id accessor, object_im { log_write("metacall", LOG_LEVEL_ERROR, "Invalid object name allocation <%s>", name); - free(obj); - - return NULL; + goto name_error; } memcpy(obj->name, name, obj_name_size); @@ -79,12 +77,11 @@ object object_create(const char *name, enum accessor_type_id accessor, object_im obj->name = NULL; } - obj->impl = impl; - obj->accessor = accessor; threading_atomic_ref_count_initialize(&obj->ref); + obj->impl = impl; + obj->accessor = accessor; obj->interface = singleton ? singleton() : NULL; - obj->cls = cls; if (obj->interface != NULL && obj->interface->create != NULL) @@ -93,16 +90,23 @@ object object_create(const char *name, enum accessor_type_id accessor, object_im { log_write("metacall", LOG_LEVEL_ERROR, "Invalid object (%s) create callback <%p>", obj->name, obj->interface->create); - free(obj->name); - free(obj); - - return NULL; + goto interface_create_error; } } reflect_memory_tracker_allocation(object_stats); return obj; + +interface_create_error: + if (obj->name != NULL) + { + free(obj->name); + } +name_error: + free(obj); + + return NULL; } int object_increment_reference(object obj) diff --git a/source/threading/include/threading/threading_atomic_ref_count.h b/source/threading/include/threading/threading_atomic_ref_count.h index 8dd8531fc0..8a1dc1cc45 100644 --- a/source/threading/include/threading/threading_atomic_ref_count.h +++ b/source/threading/include/threading/threading_atomic_ref_count.h @@ -46,15 +46,15 @@ extern "C" { /* -- Member Data -- */ -#if defined(__THREAD_SANITIZER__) typedef struct { +#if defined(__THREAD_SANITIZER__) uintmax_t count; threading_mutex_type m; -} threading_atomic_ref_count_type; #else -typedef atomic_uintmax_t threading_atomic_ref_count_type; + atomic_uintmax_t count; #endif +} threading_atomic_ref_count_type; /* -- Type Definitions -- */ @@ -67,7 +67,7 @@ static inline void threading_atomic_ref_count_store(threading_atomic_ref_count r #if defined(__THREAD_SANITIZER__) threading_mutex_store(&ref->m, &ref->count, &v, sizeof(uintmax_t)); #else - atomic_store(ref, v); + atomic_store(&ref->count, v); #endif } @@ -93,7 +93,7 @@ static inline uintmax_t threading_atomic_ref_count_load(threading_atomic_ref_cou return result; #else - return atomic_load_explicit(ref, memory_order_relaxed); + return atomic_load_explicit(&ref->count, memory_order_relaxed); #endif } @@ -106,12 +106,12 @@ static inline int threading_atomic_ref_count_increment(threading_atomic_ref_coun } threading_mutex_unlock(&ref->m); #else - if (atomic_load_explicit(ref, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MAX) + if (atomic_load_explicit(&ref->count, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MAX) { return 1; } - atomic_fetch_add_explicit(ref, 1, memory_order_relaxed); + atomic_fetch_add_explicit(&ref->count, 1, memory_order_relaxed); #endif return 0; @@ -126,12 +126,12 @@ static inline int threading_atomic_ref_count_decrement(threading_atomic_ref_coun } threading_mutex_unlock(&ref->m); #else - if (atomic_load_explicit(ref, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MIN) + if (atomic_load_explicit(&ref->count, memory_order_relaxed) == THREADING_ATOMIC_REF_COUNT_MIN) { return 1; } - uintmax_t old_ref_count = atomic_fetch_sub_explicit(ref, 1, memory_order_release); + uintmax_t old_ref_count = atomic_fetch_sub_explicit(&ref->count, 1, memory_order_release); if (old_ref_count == THREADING_ATOMIC_REF_COUNT_MIN + 1) { diff --git a/tools/metacall-configure.sh b/tools/metacall-configure.sh index 0360f472fb..7847a0d347 100755 --- a/tools/metacall-configure.sh +++ b/tools/metacall-configure.sh @@ -29,6 +29,7 @@ BUILD_NETCORE=0 BUILD_NETCORE2=0 BUILD_NETCORE5=0 BUILD_NETCORE7=0 +BUILD_NETCORE8=0 BUILD_V8=0 BUILD_NODEJS=0 BUILD_TYPESCRIPT=0 @@ -112,6 +113,10 @@ sub_options() { echo "Build with netcore 7 support" BUILD_NETCORE7=1 fi + if [ "$option" = 'netcore8' ]; then + echo "Build with netcore 8 support" + BUILD_NETCORE8=1 + fi if [ "$option" = 'v8' ]; then echo "Build with v8 support" BUILD_V8=1 @@ -318,6 +323,21 @@ sub_configure() { fi fi + # NetCore 8 + if [ $BUILD_NETCORE8 = 1 ]; then + BUILD_STRING="$BUILD_STRING \ + -DOPTION_BUILD_LOADERS_CS=On \ + -DDOTNET_CORE_PATH=`sub_find_dotnet_runtime 8`" + + if [ $BUILD_SCRIPTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_SCRIPTS_CS=On" + fi + + if [ $BUILD_PORTS = 1 ]; then + BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_PORTS_CS=On" + fi + fi + # V8 if [ $BUILD_V8 = 1 ]; then BUILD_STRING="$BUILD_STRING -DOPTION_BUILD_LOADERS_JS=On" @@ -545,6 +565,7 @@ sub_help() { echo " netcore2: build with netcore 2 support" echo " netcore5: build with netcore 5 support" echo " netcore7: build with netcore 7 support" + echo " netcore8: build with netcore 8 support" echo " v8: build with v8 support" echo " nodejs: build with nodejs support" echo " typescript: build with typescript support" diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 593ac4b93a..fb5ca4761c 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -34,6 +34,7 @@ INSTALL_NETCORE=0 INSTALL_NETCORE2=0 INSTALL_NETCORE5=0 INSTALL_NETCORE7=0 +INSTALL_NETCORE8=0 INSTALL_V8=0 INSTALL_V8REPO=0 INSTALL_V8REPO58=0 @@ -387,6 +388,20 @@ sub_netcore7(){ fi } +# NetCore 8 +sub_netcore8(){ + echo "configure netcore 8" + cd $ROOT_DIR + + if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then + if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then + wget -O - https://dot.net/v1/dotnet-install.sh | $SUDO_CMD bash -s -- --version 8.0.408 --install-dir /usr/local/bin + elif [ "${LINUX_DISTRO}" = "alpine" ]; then + $SUDO_CMD apk add --no-cache dotnet8-sdk + fi + fi +} + # V8 Repository sub_v8repo(){ echo "configure v8 from repository" @@ -922,6 +937,9 @@ sub_install(){ if [ $INSTALL_NETCORE7 = 1 ]; then sub_netcore7 fi + if [ $INSTALL_NETCORE8 = 1 ]; then + sub_netcore8 + fi if [ $INSTALL_V8 = 1 ]; then sub_v8 fi @@ -1025,6 +1043,10 @@ sub_options(){ echo "netcore 7 selected" INSTALL_NETCORE7=1 fi + if [ "$option" = 'netcore8' ]; then + echo "netcore 8 selected" + INSTALL_NETCORE8=1 + fi if [ "$option" = 'rapidjson' ]; then echo "rapidjson selected" INSTALL_RAPIDJSON=1 @@ -1134,6 +1156,7 @@ sub_help() { echo " netcore2" echo " netcore5" echo " netcore7" + echo " netcore8" echo " rapidjson" echo " v8" echo " v8rep51" diff --git a/tools/metacall-runtime.sh b/tools/metacall-runtime.sh index aea5bab164..9ef4afba2d 100755 --- a/tools/metacall-runtime.sh +++ b/tools/metacall-runtime.sh @@ -170,6 +170,15 @@ sub_netcore7(){ sub_apt_install_hold dotnet-runtime-7.0=7.0.5-1 } +# NetCore 8 +sub_netcore8(){ + echo "configure netcore 8" + cd $ROOT_DIR + + # Install NET Core Runtime 8.x + wget -O - https://dot.net/v1/dotnet-install.sh | $SUDO_CMD bash -s -- --version 8.0.408 --install-dir /usr/local/bin --runtime dotnet +} + # V8 sub_v8(){ echo "configure v8" diff --git a/tools/metacall-sanitizer.sh b/tools/metacall-sanitizer.sh index d5f9ac5294..9e0856a502 100755 --- a/tools/metacall-sanitizer.sh +++ b/tools/metacall-sanitizer.sh @@ -23,7 +23,7 @@ set -euxo pipefail BUILD_SANITIZER=${1:-address-sanitizer} BUILD_LANGUAGES=( - python ruby netcore7 nodejs typescript file rpc wasm java c cobol rust + python ruby netcore8 nodejs typescript file rpc wasm java c cobol rust ) SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) ROOT_DIR=$(dirname "$SCRIPT_DIR") From 8a1e352601b7153fd5ee9e2b7d1bdce1907a18f2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 18:20:41 +0200 Subject: [PATCH 121/364] Trying to solve dockerhub. --- .github/workflows/docker-hub.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 718bae74c4..91caf530cb 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -64,23 +64,24 @@ jobs: - name: Build MetaCall Docker Images env: METACALL_PLATFORM: ${{ matrix.platform }} + DOCKER_BUILDKIT: 1 run: | ./docker-compose.sh platform - - name: Run Tests - run: | + echo + echo "-------------------- Run Tests --------------------" + echo set -exuo pipefail docker image inspect ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli --format='{{.Os}}/{{.Architecture}}' cat < Dockerfile.test FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli RUN apt-get update && apt-get install -y file - RUN file /usr/local/bin/metacallcli + RUN file /usr/local/bin/metacallcli && ldd /usr/local/bin/metacallcli RUN echo "console.log('0123456789abcdef')" > script.js RUN metacallcli script.js | tee output.txt RUN grep 0123456789abcdef output.txt EOF - export DOCKER_BUILDKIT=1 docker build --progress=plain --platform=${{ matrix.platform }} -f Dockerfile.test -t test-image . - name: Tag & Push Platform Images From 309414fdaf3687b4a0ff40bb97397042a10ffff5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 18:45:29 +0200 Subject: [PATCH 122/364] Trying buildx in dockerhub. --- .github/workflows/docker-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 91caf530cb..5e3aeb71b0 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -82,7 +82,7 @@ jobs: RUN grep 0123456789abcdef output.txt EOF - docker build --progress=plain --platform=${{ matrix.platform }} -f Dockerfile.test -t test-image . + docker buildx build --progress=plain --platform ${{ matrix.platform }} -f Dockerfile.test -t test-image . - name: Tag & Push Platform Images # Only run when master or when tagging a version From ef5efab583a3c2f0afe7c3087448569f68ee840f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 20:32:31 +0200 Subject: [PATCH 123/364] Improve minor issues rapidjson. --- cmake/InstallRapidJSON.cmake | 2 +- .../source/rapid_json_serial_impl.cpp | 35 ++++++++++++++----- tools/metacall-environment.sh | 4 +-- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/cmake/InstallRapidJSON.cmake b/cmake/InstallRapidJSON.cmake index 41c302027b..f90dfc4a4e 100644 --- a/cmake/InstallRapidJSON.cmake +++ b/cmake/InstallRapidJSON.cmake @@ -24,7 +24,7 @@ if(NOT RAPIDJSON_FOUND OR USE_BUNDLED_RAPIDJSON) if(NOT RAPIDJSON_VERSION OR USE_BUNDLED_RAPIDJSON) - set(RAPIDJSON_VERSION ab1842a2dae061284c0a62dca1cc6d5e7e37e346) + set(RAPIDJSON_VERSION 24b5e7a8b27f42fa16b96fc70aade9106cf7102f) endif() ExternalProject_Add(rapid-json-depends diff --git a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp index 973c06da3e..e2e981d7f8 100644 --- a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp +++ b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp @@ -12,14 +12,27 @@ #include -// TODO: RapidJSON seems to be outdated, but we use it meanwhile there's a better solution. -// Here's a patch for some of the bugs in the library: https://github.com/Tencent/rapidjson/issues/1928 +/* Disable warnings from RapidJSON */ +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wstrict-overflow" +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-overflow" +#endif #include #include #include #include +/* Disable warnings from RapidJSON */ +#if defined(__clang__) + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic pop +#endif + #include /* -- Type Definitions -- */ @@ -41,7 +54,6 @@ static value rapid_json_serial_impl_deserialize_value(const rapidjson::Value *v) /* -- Classes -- */ -// https://techoverflow.net/2020/01/13/how-to-fix-rapidjson-segmentation-faults-when-building-nested-documents/ rapidjson::MemoryPoolAllocator<> rapid_json_allocator; /* -- Methods -- */ @@ -91,9 +103,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) { short s = value_to_short(v); - int i = (int)s; - - json_v->SetInt(i); + json_v->SetInt((int)s); } else if (id == TYPE_INT) { @@ -105,9 +115,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) { long l = value_to_long(v); - log_write("metacall", LOG_LEVEL_WARNING, "Casting long to int64_t (posible incompatible types) in RapidJSON implementation"); - - json_v->SetInt64(l); + json_v->SetInt64((int64_t)l); } else if (id == TYPE_FLOAT) { @@ -394,6 +402,7 @@ value rapid_json_serial_impl_deserialize_value(const rapidjson::Value *v) { unsigned int ui = v->GetUint(); + /* TODO: Review this, in case of underflow/overflow store it in a bigger type? */ log_write("metacall", LOG_LEVEL_WARNING, "Casting unsigned integer to integer (posible overflow) in RapidJSON implementation"); return value_create_int((int)ui); @@ -402,13 +411,21 @@ value rapid_json_serial_impl_deserialize_value(const rapidjson::Value *v) { int64_t i = v->GetInt64(); + /* TODO: Review this, in case of underflow/overflow store it in a bigger type? */ +#if LONG_MAX < INT64_MAX + log_write("metacall", LOG_LEVEL_WARNING, "Casting long to int (posible overflow) in RapidJSON implementation"); +#endif + return value_create_long((long)i); } else if (v->IsUint64() == true) { uint64_t ui = v->GetUint64(); + /* TODO: Review this, in case of underflow/overflow store it in a bigger type? */ +#if LONG_MAX < UINT64_MAX log_write("metacall", LOG_LEVEL_WARNING, "Casting unsigned long to int (posible overflow) in RapidJSON implementation"); +#endif return value_create_long((long)ui); } diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index fb5ca4761c..b244764438 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -250,9 +250,9 @@ sub_rapidjson(){ cd $ROOT_DIR if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then - git clone https://github.com/miloyip/rapidjson.git + git clone https://github.com/Tencent/rapidjson.git cd rapidjson - git checkout ab1842a2dae061284c0a62dca1cc6d5e7e37e346 + git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f mkdir build cd build cmake -DRAPIDJSON_BUILD_DOC=Off -DRAPIDJSON_BUILD_EXAMPLES=Off -DRAPIDJSON_BUILD_TESTS=Off .. From 8b42427b42fdd8bfc551b1a574b17bfb0255ef71 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 20:58:13 +0200 Subject: [PATCH 124/364] Improved the architecture build. --- .github/workflows/docker-hub.yml | 40 ++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 5e3aeb71b0..c50d9d3a4e 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -19,6 +19,25 @@ env: IMAGE_NAME: core BUILDKIT_VERSION: 0.13.0 + # TODO: Tests failing + # - linux/s390x + # TODO: Not tested or no hooking support + # - linux/mips64le + # - linux/mips64 + # - linux/loong64 + PLATFORM_LIST: > + [ + "linux/amd64", + "linux/amd64/v2" + "linux/amd64/v3" + "linux/386", + "linux/arm64", + "linux/riscv64", + "linux/ppc64le", + "linux/arm/v7", + "linux/arm/v6" + ] + jobs: build: name: Build @@ -26,21 +45,8 @@ jobs: strategy: fail-fast: false matrix: - platform: - - linux/amd64 - - linux/386 - - linux/arm64 - - linux/riscv64 - - linux/ppc64le - - linux/s390x - - linux/arm/v7 - - linux/arm/v6 - # TODO: - # - linux/amd64/v2 - # - linux/amd64/v3 - # - linux/mips64le - # - linux/mips64 - # - linux/loong64 + platform: ${{ fromJSON(env.PLATFORM_LIST) }} + steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -114,7 +120,7 @@ jobs: - name: Create and Push Manifest Lists run: | tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + platforms=("${{ join(fromJSON(env.PLATFORM_LIST), '" "') }}") echo "Create all the tags by platform" @@ -165,7 +171,7 @@ jobs: - name: Remove Platform-Specific Tags run: | tags=("deps" "dev" "runtime" "cli") - platforms=("linux/amd64" "linux/386" "linux/arm64" "linux/riscv64" "linux/ppc64le" "linux/s390x" "linux/arm/v7" "linux/arm/v6") + platforms=("${{ join(fromJSON(env.PLATFORM_LIST), '" "') }}") for tag in "${tags[@]}"; do for platform in "${platforms[@]}"; do From 787220cf122656a9cd72643b217c90d40ca93668 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:03:43 +0200 Subject: [PATCH 125/364] Extend timeout of rpc test. --- source/tests/metacall_rpc_test/source/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/metacall_rpc_test/source/test.js b/source/tests/metacall_rpc_test/source/test.js index 42c12bd331..15d5a9dac5 100644 --- a/source/tests/metacall_rpc_test/source/test.js +++ b/source/tests/metacall_rpc_test/source/test.js @@ -62,7 +62,7 @@ process.on('uncaughtException', killTest); if (ready === false) { killTest('Timeout reached, server is not ready'); } - }, 10000); + }, 60000); while (ready !== true) { try { From 27b8fdeca5233bcda567f3d840f2e33e41b3dfec Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:14:05 +0200 Subject: [PATCH 126/364] Keep trying solving issues with dockerhub. --- .github/workflows/docker-hub.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index c50d9d3a4e..7770d93d16 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -39,13 +39,26 @@ env: ] jobs: + generate_matrix: + name: Generate Platform List + runs-on: ubuntu-latest + outputs: + platform_list: ${{ steps.generate_platform_list.outputs.platform_list }} + steps: + - name: Generate platform list + id: generate_platform_list + run: | + echo "PLATFORM_LIST=${{ env.PLATFORM_LIST }}" >> $GITHUB_ENV + echo "::set-output name=platform_list::$PLATFORM_LIST" + build: name: Build runs-on: ubuntu-latest + needs: generate_matrix strategy: fail-fast: false matrix: - platform: ${{ fromJSON(env.PLATFORM_LIST) }} + platform: ${{ fromJSON(needs.generate_matrix.outputs.platform_list) }} steps: - name: Checkout Repository @@ -120,7 +133,7 @@ jobs: - name: Create and Push Manifest Lists run: | tags=("deps" "dev" "runtime" "cli") - platforms=("${{ join(fromJSON(env.PLATFORM_LIST), '" "') }}") + platforms=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") echo "Create all the tags by platform" @@ -171,7 +184,7 @@ jobs: - name: Remove Platform-Specific Tags run: | tags=("deps" "dev" "runtime" "cli") - platforms=("${{ join(fromJSON(env.PLATFORM_LIST), '" "') }}") + platforms=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") for tag in "${tags[@]}"; do for platform in "${platforms[@]}"; do From 549c965b7fc36d86c9f4c2dbdae59c4d7478c914 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:18:50 +0200 Subject: [PATCH 127/364] Solve issues dockerhub. --- .github/workflows/docker-hub.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 7770d93d16..ea3b72317f 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -48,7 +48,8 @@ jobs: - name: Generate platform list id: generate_platform_list run: | - echo "PLATFORM_LIST=${{ env.PLATFORM_LIST }}" >> $GITHUB_ENV + PLATFORM_LIST=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") + echo "PLATFORM_LIST=$PLATFORM_LIST" >> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" build: From 71da141aa51a5d70501d0cd3d45abb30c9bb4cfc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:29:41 +0200 Subject: [PATCH 128/364] Try to improve dockerhub. --- .github/workflows/docker-hub.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index ea3b72317f..75ba2e654a 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -48,7 +48,10 @@ jobs: - name: Generate platform list id: generate_platform_list run: | - PLATFORM_LIST=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") + PLATFORM_STRING=$(cat <> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" From 4952f19bfd64859d4d8ec37a4c925d10282362a5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:32:55 +0200 Subject: [PATCH 129/364] Solve issues dockerhub. --- .github/workflows/docker-hub.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 75ba2e654a..c9aa158616 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -48,8 +48,10 @@ jobs: - name: Generate platform list id: generate_platform_list run: | + set -exuo pipefail PLATFORM_STRING=$(cat <> $GITHUB_ENV From 895a214f359c5a6f5ba6e8febfc9f5bb98018d80 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:34:08 +0200 Subject: [PATCH 130/364] Solve more issues dockerhub. --- .github/workflows/docker-hub.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index c9aa158616..68efe67101 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -28,8 +28,8 @@ env: PLATFORM_LIST: > [ "linux/amd64", - "linux/amd64/v2" - "linux/amd64/v3" + "linux/amd64/v2", + "linux/amd64/v3", "linux/386", "linux/arm64", "linux/riscv64", From 95c73c1e058470794ad483dcb34ce5ec073ab8b0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:37:57 +0200 Subject: [PATCH 131/364] Solve issues dockerhub. --- .github/workflows/docker-hub.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 68efe67101..a23d7792ed 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -53,7 +53,8 @@ jobs: ${{ env.PLATFORM_LIST }} EOF ) - PLATFORM_LIST=$(echo "$PLATFORM_STRING" | jq .) + # Convert array to comma-separated string with each element quoted + PLATFORM_LIST=$(echo $PLATFORM_STRING | jq -r '[.[] | "\""+tostring+"\""] | join(",")') echo "PLATFORM_LIST=$PLATFORM_LIST" >> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" From 75af00500e9a7a5ffdc7abfaded874b00106b3cc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 24 Apr 2025 21:41:35 +0200 Subject: [PATCH 132/364] Dockerhub. --- .github/workflows/docker-hub.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index a23d7792ed..dc7f68d9dd 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -53,8 +53,7 @@ jobs: ${{ env.PLATFORM_LIST }} EOF ) - # Convert array to comma-separated string with each element quoted - PLATFORM_LIST=$(echo $PLATFORM_STRING | jq -r '[.[] | "\""+tostring+"\""] | join(",")') + PLATFORM_LIST=$(echo $PLATFORM_STRING | jq -c .) echo "PLATFORM_LIST=$PLATFORM_LIST" >> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" From 4bee75e2570ca116a9888447833cf340c89a25bd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:08:15 +0200 Subject: [PATCH 133/364] Test platform. --- .github/workflows/docker-hub.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index dc7f68d9dd..885cbe0625 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -57,10 +57,23 @@ jobs: echo "PLATFORM_LIST=$PLATFORM_LIST" >> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" + test_matrix: + name: Test Platform List + runs-on: ubuntu-latest + needs: generate_matrix + steps: + - name: Test platform list + run: | + set -exuo pipefail + platforms=($(echo "${{ needs.generate_matrix.outputs.platform_list }}" | jq -r '.[]')) + for platform in "${platforms[@]}"; do + echo "$platform" + done + build: name: Build runs-on: ubuntu-latest - needs: generate_matrix + needs: test_matrix strategy: fail-fast: false matrix: From 4cc921c5873367a4fba144493ce625ca171557fd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:15:21 +0200 Subject: [PATCH 134/364] Test platform. --- .github/workflows/docker-hub.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 885cbe0625..8fa86e9699 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -65,7 +65,7 @@ jobs: - name: Test platform list run: | set -exuo pipefail - platforms=($(echo "${{ needs.generate_matrix.outputs.platform_list }}" | jq -r '.[]')) + platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) for platform in "${platforms[@]}"; do echo "$platform" done From 277e5e464bf1cdfe97ac85e25b484f0446514bc9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:20:06 +0200 Subject: [PATCH 135/364] Final version of dockerhub. --- .github/workflows/docker-hub.yml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 8fa86e9699..f5ed9218be 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -57,23 +57,10 @@ jobs: echo "PLATFORM_LIST=$PLATFORM_LIST" >> $GITHUB_ENV echo "::set-output name=platform_list::$PLATFORM_LIST" - test_matrix: - name: Test Platform List - runs-on: ubuntu-latest - needs: generate_matrix - steps: - - name: Test platform list - run: | - set -exuo pipefail - platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) - for platform in "${platforms[@]}"; do - echo "$platform" - done - build: name: Build runs-on: ubuntu-latest - needs: test_matrix + needs: generate_matrix strategy: fail-fast: false matrix: @@ -106,9 +93,10 @@ jobs: run: | ./docker-compose.sh platform - echo - echo "-------------------- Run Tests --------------------" - echo + - name: Run Tests + env: + DOCKER_BUILDKIT: 1 + run: | set -exuo pipefail docker image inspect ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli --format='{{.Os}}/{{.Architecture}}' cat < Dockerfile.test @@ -152,7 +140,7 @@ jobs: - name: Create and Push Manifest Lists run: | tags=("deps" "dev" "runtime" "cli") - platforms=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") + platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) echo "Create all the tags by platform" @@ -203,7 +191,7 @@ jobs: - name: Remove Platform-Specific Tags run: | tags=("deps" "dev" "runtime" "cli") - platforms=("${{ join(fromJSON(needs.generate_matrix.outputs.platform_list), '" "') }}") + platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) for tag in "${tags[@]}"; do for platform in "${platforms[@]}"; do From 469c4e481c1ee30e7148fee505a8d4e11802e76f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:20:42 +0200 Subject: [PATCH 136/364] Simplify list. --- .github/workflows/docker-hub.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index f5ed9218be..aa40e7ab8e 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -27,17 +27,22 @@ env: # - linux/loong64 PLATFORM_LIST: > [ - "linux/amd64", - "linux/amd64/v2", - "linux/amd64/v3", - "linux/386", - "linux/arm64", - "linux/riscv64", - "linux/ppc64le", - "linux/arm/v7", - "linux/arm/v6" + "linux/amd64" ] + + # [ + # "linux/amd64", + # "linux/amd64/v2", + # "linux/amd64/v3", + # "linux/386", + # "linux/arm64", + # "linux/riscv64", + # "linux/ppc64le", + # "linux/arm/v7", + # "linux/arm/v6" + # ] + jobs: generate_matrix: name: Generate Platform List From 5c01e5b2289e9b3f4ac5e4f661d696c312ceebf8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:36:57 +0200 Subject: [PATCH 137/364] Testing dockerhub. --- .github/workflows/docker-hub.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index aa40e7ab8e..c52e9053b2 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -44,7 +44,7 @@ env: # ] jobs: - generate_matrix: + matrix: name: Generate Platform List runs-on: ubuntu-latest outputs: @@ -65,11 +65,11 @@ jobs: build: name: Build runs-on: ubuntu-latest - needs: generate_matrix + needs: matrix strategy: fail-fast: false matrix: - platform: ${{ fromJSON(needs.generate_matrix.outputs.platform_list) }} + platform: ${{ fromJSON(needs.matrix.outputs.platform_list) }} steps: - name: Checkout Repository @@ -131,7 +131,7 @@ jobs: manifest: name: Create and Push Manifest Lists - needs: build + needs: [matrix, build] # Only run when master or when tagging a version if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' runs-on: ubuntu-latest @@ -144,8 +144,10 @@ jobs: - name: Create and Push Manifest Lists run: | + set -exuo pipefail + tags=("deps" "dev" "runtime" "cli") - platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) + platforms=($(echo '${{ needs.matrix.outputs.platform_list }}' | jq -r '.[]')) echo "Create all the tags by platform" @@ -189,14 +191,16 @@ jobs: cleanup: name: Cleanup Platform Specific Tags - needs: [build, manifest] + needs: [matrix, build, manifest] runs-on: ubuntu-latest if: always() steps: - name: Remove Platform-Specific Tags run: | + set -exuo pipefail + tags=("deps" "dev" "runtime" "cli") - platforms=($(echo '${{ needs.generate_matrix.outputs.platform_list }}' | jq -r '.[]')) + platforms=($(echo '${{ needs.matrix.outputs.platform_list }}' | jq -r '.[]')) for tag in "${tags[@]}"; do for platform in "${platforms[@]}"; do From 3b370c6ffb42a2be20f41b2ab6f738028d69c623 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 00:58:15 +0200 Subject: [PATCH 138/364] Finished docker hub CI, remove warning from node loader. --- .github/workflows/docker-hub.yml | 23 ++++++++----------- .../node_loader/source/node_loader_impl.cpp | 23 +++++++++++++++++++ 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index c52e9053b2..2cbe1634d1 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -27,22 +27,17 @@ env: # - linux/loong64 PLATFORM_LIST: > [ - "linux/amd64" + "linux/amd64", + "linux/amd64/v2", + "linux/amd64/v3", + "linux/386", + "linux/arm64", + "linux/riscv64", + "linux/ppc64le", + "linux/arm/v7", + "linux/arm/v6" ] - - # [ - # "linux/amd64", - # "linux/amd64/v2", - # "linux/amd64/v3", - # "linux/386", - # "linux/arm64", - # "linux/riscv64", - # "linux/ppc64le", - # "linux/arm/v7", - # "linux/arm/v6" - # ] - jobs: matrix: name: Generate Platform List diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index adda1440f6..8b3b45ad11 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -919,11 +919,34 @@ static detour_handle node_module_handle_a_handle = NULL; void node_loader_impl_register_linked_bindings() { + /* + * For now napi_module_register won't be deprecated: https://github.com/nodejs/node/issues/56153 + * If this changes, we can investigate the alternative approach. + */ +#if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable : 4996) +#elif defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + /* Initialize Node Loader Trampoline */ node_loader_impl_register_module("node_loader_trampoline_module", node_loader_trampoline_initialize); /* Initialize Node Loader Port */ node_loader_impl_register_module("node_loader_port_module", node_loader_port_initialize); + +#if defined(_MSC_VER) + #pragma warning(pop) +#elif defined(__clang__) + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic pop +#endif } void node_loader_impl_exception(napi_env env, napi_status status) From e804bef14c6f9398e3d2b4fb7fc04888514211f5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 01:15:42 +0200 Subject: [PATCH 139/364] Solve issues with macos. --- source/tests/dynlink_test/CMakeLists.txt | 12 ++ .../dynlink_test/source/dynlink_test.cpp | 152 +++++++++--------- 2 files changed, 90 insertions(+), 74 deletions(-) diff --git a/source/tests/dynlink_test/CMakeLists.txt b/source/tests/dynlink_test/CMakeLists.txt index 1010f0fb90..ae0eabeeea 100644 --- a/source/tests/dynlink_test/CMakeLists.txt +++ b/source/tests/dynlink_test/CMakeLists.txt @@ -97,6 +97,8 @@ target_link_libraries(${target} target_compile_definitions(${target} PRIVATE ${DEFAULT_COMPILE_DEFINITIONS} + + $<$,$>:DYNLINK_TEST_MOCK_LOADER> ) # @@ -137,6 +139,16 @@ add_test(NAME ${target} COMMAND $ ) +# +# Define dependencies +# + +if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_MOCK) + add_dependencies(${target} + mock_loader + ) +endif() + # # Define test labels # diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index e506c69fa8..1ebd63613a 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -28,7 +28,7 @@ #define DYNLINK_TEST_LIBRARY_PATH "DYNLINK_TEST_LIBRARY_PATH" -typedef const char *(*dynlink_print_func)(void); +typedef const char *(*mock_loader_print_func)(void); class dynlink_test : public testing::Test { @@ -60,52 +60,6 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object extension: %s", dynlink_extension()); -#if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - const char library_name[] = "dynlinkd"; -#else - const char library_name[] = "dynlink"; -#endif - - char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); - - ASSERT_NE((char *)path, (char *)NULL); - - /* Test library loading */ - { - dynlink handle = dynlink_load(path, library_name, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); - - ASSERT_NE(handle, (dynlink)NULL); - - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_path(handle)); - - EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); - - if (handle != NULL) - { - dynlink_symbol_addr dynlink_print_info_addr; - - EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); - - if (dynlink_print_info_addr != NULL) - { - dynlink_print_func print = (dynlink_print_func)dynlink_print_info_addr; - - log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); - - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); - - if (dynlink_print_info_addr != NULL) - { - log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); - } - - log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); - } - - dynlink_unload(handle); - } - } - /* Test loading symbols from current process */ { dynlink proc = dynlink_load_self(DYNLINK_FLAGS_BIND_GLOBAL | DYNLINK_FLAGS_BIND_LAZY); @@ -127,51 +81,101 @@ TEST_F(dynlink_test, DefaultConstructor) dynlink_unload(proc); /* Should do nothing except by freeing the handle */ } - /* Test loading symbols from absolute path */ +#ifdef DYNLINK_TEST_MOCK_LOADER { - char library_name_platform[PORTABILITY_PATH_SIZE]; - char absolute_path[PORTABILITY_PATH_SIZE]; + #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) + const char library_name[] = "mock_loaderd"; + #else + const char library_name[] = "mock_loader"; + #endif - dynlink_platform_name(library_name, library_name_platform); + char *path = environment_variable_path_create(DYNLINK_TEST_LIBRARY_PATH, NULL, 0, NULL); - portability_path_join(path, strlen(path) + 1, library_name_platform, strlen(library_name_platform) + 1, absolute_path, PORTABILITY_PATH_SIZE); + ASSERT_NE((char *)path, (char *)NULL); - dynlink handle = dynlink_load_absolute(absolute_path, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); + /* Test library loading */ + { + dynlink handle = dynlink_load(path, library_name, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); - ASSERT_NE(handle, (dynlink)NULL); + ASSERT_NE(handle, (dynlink)NULL); - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object absolute path: %s", absolute_path); - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_path(handle)); - log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name(handle)); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_path(handle)); - EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_path(handle))); - EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); - if (handle != NULL) + if (handle != NULL) + { + dynlink_symbol_addr mock_loader_print_info_addr; + + EXPECT_EQ((int)0, dynlink_symbol(handle, "mock_loader_print_info", &mock_loader_print_info_addr)); + + if (mock_loader_print_info_addr != NULL) + { + mock_loader_print_func print = (mock_loader_print_func)mock_loader_print_info_addr; + + log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); + + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)mock_loader_print_info_addr); + + if (mock_loader_print_info_addr != NULL) + { + log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); + } + + log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); + } + + dynlink_unload(handle); + } + } + + /* Test loading symbols from absolute path */ { - dynlink_symbol_addr dynlink_print_info_addr; + char library_name_platform[PORTABILITY_PATH_SIZE]; + char absolute_path[PORTABILITY_PATH_SIZE]; - EXPECT_EQ((int)0, dynlink_symbol(handle, "dynlink_print_info", &dynlink_print_info_addr)); + dynlink_platform_name(library_name, library_name_platform); - if (dynlink_print_info_addr != NULL) - { - dynlink_print_func print = (dynlink_print_func)dynlink_print_info_addr; + portability_path_join(path, strlen(path) + 1, library_name_platform, strlen(library_name_platform) + 1, absolute_path, PORTABILITY_PATH_SIZE); - log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); + dynlink handle = dynlink_load_absolute(absolute_path, DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); - log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)dynlink_print_info_addr); + ASSERT_NE(handle, (dynlink)NULL); - if (dynlink_print_info_addr != NULL) + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object absolute path: %s", absolute_path); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_path(handle)); + log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name(handle)); + + EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_path(handle))); + EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + + if (handle != NULL) + { + dynlink_symbol_addr mock_loader_print_info_addr; + + EXPECT_EQ((int)0, dynlink_symbol(handle, "mock_loader_print_info", &mock_loader_print_info_addr)); + + if (mock_loader_print_info_addr != NULL) { - log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); + mock_loader_print_func print = (mock_loader_print_func)mock_loader_print_info_addr; + + log_write("metacall", LOG_LEVEL_DEBUG, "Print function: %p", (void *)print); + + log_write("metacall", LOG_LEVEL_DEBUG, "Symbol pointer: %p", (void *)mock_loader_print_info_addr); + + if (mock_loader_print_info_addr != NULL) + { + log_write("metacall", LOG_LEVEL_DEBUG, "Pointer is valid"); + } + + log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); } - log_write("metacall", LOG_LEVEL_DEBUG, "Print: %s", print()); + dynlink_unload(handle); } - - dynlink_unload(handle); } - } - environment_variable_path_destroy(path); + environment_variable_path_destroy(path); + } +#endif } From cb8429fc559e4a028441f7865bee0ed5e7e899ab Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 25 Apr 2025 17:21:31 +0200 Subject: [PATCH 140/364] Solved warnings, trying to mto make windows work. --- cmake/Warnings.cmake | 5 +- source/adt/source/adt_map.c | 8 +- source/adt/source/adt_set.c | 8 +- source/dynlink/source/dynlink.c | 2 +- source/loader/source/loader_host.c | 6 +- source/loader/source/loader_impl.c | 4 +- source/loaders/node_loader/CMakeLists.txt | 6 +- .../node_loader/source/node_loader_impl.cpp | 4 +- source/plugin/source/plugin_manager.c | 6 +- source/portability/CMakeLists.txt | 2 - .../portability/portability_dependency.h | 44 ---- .../portability/portability_library_path.h | 25 ++- .../source/portability_dependency.c | 135 ------------ .../source/portability_library_path.c | 194 +++++++++++++----- source/reflect/source/reflect_scope.c | 8 +- 15 files changed, 192 insertions(+), 265 deletions(-) delete mode 100644 source/portability/include/portability/portability_dependency.h delete mode 100644 source/portability/source/portability_dependency.c diff --git a/cmake/Warnings.cmake b/cmake/Warnings.cmake index 685d3b6a8c..23f057afd2 100644 --- a/cmake/Warnings.cmake +++ b/cmake/Warnings.cmake @@ -46,6 +46,7 @@ if(WARNINGS_ENABLED) # Define C compiler warning flags if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") + # TODO: Uncomment the rest of the warnings, enable Weverything for clang add_compile_options(-Wall) add_compile_options(-Wextra) add_compile_options(-Wunused) @@ -85,7 +86,7 @@ if(WARNINGS_ENABLED) string(REPLACE "/W1" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "/W2" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "/W3" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /Wall") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") # /Wall set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CTR_NONSTDC_NO_WARNINGS=1") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CTR_SECURE_NO_WARNINGS=1") set(WARNINGS_C_AVAILABLE 1) @@ -105,7 +106,7 @@ if(WARNINGS_ENABLED) string(REPLACE "/W1" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "/W2" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /Wall") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") # /Wall set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CTR_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CTR_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D _CTR_NONSTDC_NO_WARNINGS=1") diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 9f54b623f9..4f28a10cbd 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -239,9 +239,9 @@ vector map_get(map m, map_key key) { if (m != NULL && key != NULL) { - map_hash hash = m->hash_cb(key); + map_hash h = m->hash_cb(key); - size_t index = hash % m->capacity; + size_t index = h % m->capacity; bucket b = &m->buckets[index]; @@ -255,9 +255,9 @@ int map_contains(map m, map_key key) { if (m != NULL && key != NULL) { - map_hash hash = m->hash_cb(key); + map_hash h = m->hash_cb(key); - size_t index = hash % m->capacity; + size_t index = h % m->capacity; bucket b = &m->buckets[index]; diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index d7f38ea958..e54b8faee7 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -256,9 +256,9 @@ set_value set_get(set s, set_key key) { if (s != NULL && key != NULL) { - set_hash hash = s->hash_cb(key); + set_hash h = s->hash_cb(key); - size_t index = hash % s->capacity; + size_t index = h % s->capacity; bucket b = &s->buckets[index]; @@ -277,9 +277,9 @@ int set_contains(set s, set_key key) { if (s != NULL && key != NULL) { - set_hash hash = s->hash_cb(key); + set_hash h = s->hash_cb(key); - size_t index = hash % s->capacity; + size_t index = h % s->capacity; bucket b = &s->buckets[index]; diff --git a/source/dynlink/source/dynlink.c b/source/dynlink/source/dynlink.c index 580cef5217..216c18d37b 100644 --- a/source/dynlink/source/dynlink.c +++ b/source/dynlink/source/dynlink.c @@ -240,7 +240,7 @@ int dynlink_library_path(const char *name, dynlink_path path, size_t *length) dynlink_impl_get_name(name, name_impl, PORTABILITY_PATH_SIZE); - if (portability_library_path(name_impl, path, length) != 0) + if (portability_library_path_find(name_impl, path, length) != 0) { return 1; } diff --git a/source/loader/source/loader_host.c b/source/loader/source/loader_host.c index 440e3d36aa..7ddfb65a4d 100644 --- a/source/loader/source/loader_host.c +++ b/source/loader/source/loader_host.c @@ -44,7 +44,7 @@ union loader_host_invoke_cast static value function_host_interface_invoke(function func, function_impl func_impl, function_args args, size_t size); -static function_return function_host_interface_await(function func, function_impl impl, function_args args, size_t size, function_resolve_callback resolve_callback, function_reject_callback reject_callback, void *context); +static function_return function_host_interface_await(function func, function_impl impl, function_args args, size_t size, function_resolve_callback resolve_callback, function_reject_callback reject_callback, void *ctx); static function_interface function_host_singleton(void); @@ -64,7 +64,7 @@ function_return function_host_interface_invoke(function func, function_impl func return invoke_cast.fn(size, args, data); } -function_return function_host_interface_await(function func, function_impl impl, function_args args, size_t size, function_resolve_callback resolve_callback, function_reject_callback reject_callback, void *context) +function_return function_host_interface_await(function func, function_impl impl, function_args args, size_t size, function_resolve_callback resolve_callback, function_reject_callback reject_callback, void *ctx) { /* TODO */ @@ -74,7 +74,7 @@ function_return function_host_interface_await(function func, function_impl impl, (void)size; (void)resolve_callback; (void)reject_callback; - (void)context; + (void)ctx; return NULL; } diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 0221b4a5ea..b08444d2cc 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -36,7 +36,7 @@ #include -#include +#include #include #include @@ -457,7 +457,7 @@ int loader_impl_dependencies(loader_impl impl, detour d) return 1; } - if (portability_dependendency_iterate(&loader_impl_dependencies_self_list, (void *)dependencies_self) != 0) + if (portability_library_path_list(&loader_impl_dependencies_self_list, (void *)dependencies_self) != 0) { vector_destroy(dependencies_self); return 1; diff --git a/source/loaders/node_loader/CMakeLists.txt b/source/loaders/node_loader/CMakeLists.txt index 746b684ada..e76ed66f5e 100644 --- a/source/loaders/node_loader/CMakeLists.txt +++ b/source/loaders/node_loader/CMakeLists.txt @@ -178,9 +178,9 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - # Delay load for MSVC - $<$:libnode2> - $<$:delayimp> + # Delay load for MSVC + $<$:${NodeJS_LIBRARY}> # NodeJS library + $<$:delayimp> PUBLIC ${DEFAULT_LIBRARIES} diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 8b3b45ad11..3cdae12adb 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -49,7 +49,7 @@ extern char **environ; #include #if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200) - #include + #include /* Required for the DelayLoad hook interposition, solves bug of NodeJS extensions requiring node.exe instead of node.dll*/ #include @@ -3701,7 +3701,7 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi /* As the library handle is correctly resolved here, either to executable, library of the executable, or the loader dependency we can directly obtain the handle of this dependency from a function pointer, use any function that is contained in node runtime, in this case we are using napi_create_array */ - if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, &napi_create_array, &node_loader_node_dll_handle)) + if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)&napi_create_array, &node_loader_node_dll_handle)) { napi_throw_type_error(env, nullptr, "Failed to initialize the hooking against node extensions load mechanism"); } diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index d0f92a36a7..8f7f615a04 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -105,9 +105,9 @@ int plugin_manager_initialize(plugin_manager manager, const char *name, const ch /* Initialize the library path */ if (manager->library_path == NULL) { - const char name[] = "metacall" + const char library_name[] = "metacall" #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - "d" + "d" #endif ; @@ -119,7 +119,7 @@ int plugin_manager_initialize(plugin_manager manager, const char *name, const ch * 2) Dynamic link library path of the host library * 3) Default compile time path */ - if (dynlink_library_path(name, path, &length) == 0) + if (dynlink_library_path(library_name, path, &length) == 0) { default_library_path = path; } diff --git a/source/portability/CMakeLists.txt b/source/portability/CMakeLists.txt index b6baba4a89..1855258d28 100644 --- a/source/portability/CMakeLists.txt +++ b/source/portability/CMakeLists.txt @@ -41,7 +41,6 @@ set(headers ${include_path}/portability_working_path.h ${include_path}/portability_path.h ${include_path}/portability_atexit.h - ${include_path}/portability_dependency.h ) set(sources @@ -51,7 +50,6 @@ set(sources ${source_path}/portability_working_path.c ${source_path}/portability_path.c ${source_path}/portability_atexit.c - ${source_path}/portability_dependency.c ) # Group source files diff --git a/source/portability/include/portability/portability_dependency.h b/source/portability/include/portability/portability_dependency.h deleted file mode 100644 index 2fbf4cce2d..0000000000 --- a/source/portability/include/portability/portability_dependency.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Portability Library by Parra Studios - * A generic cross-platform portability utility. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef PORTABILITY_DEPENDENCY_H -#define PORTABILITY_DEPENDENCY_H 1 - -/* -- Headers -- */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Type Definitions -- */ - -typedef int (*portability_dependendency_iterate_cb)(const char *library, void *data); - -/* -- Methods -- */ - -int portability_dependendency_iterate(portability_dependendency_iterate_cb callback, void *data); - -#ifdef __cplusplus -} -#endif - -#endif /* PORTABILITY_DEPENDENCY_H */ diff --git a/source/portability/include/portability/portability_library_path.h b/source/portability/include/portability/portability_library_path.h index 5e266a5a3a..5daee5b8d0 100644 --- a/source/portability/include/portability/portability_library_path.h +++ b/source/portability/include/portability/portability_library_path.h @@ -27,13 +27,15 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* -- Type Definitions -- */ typedef char portability_library_path_str[PORTABILITY_PATH_SIZE]; -#ifdef __cplusplus -extern "C" { -#endif +typedef int (*portability_library_path_list_cb)(const char *library, void *data); /* -- Methods -- */ @@ -53,7 +55,22 @@ extern "C" { * @return * Returns zero if it could find the path, different from zero if not found */ -PORTABILITY_API int portability_library_path(const char name[], portability_library_path_str path, size_t *length); +PORTABILITY_API int portability_library_path_find(const char name[], portability_library_path_str path, size_t *length); + +/** +* @brief +* List all the libraries loaded in the current process +* +* @param[in] callback +* Function pointer that will be called for each library loaded in the process +* +* @param[inout] data +* User defined data to pass to the callback +* +* @return +* Returns zero if it there is no error, different from zero on error +*/ +PORTABILITY_API int portability_library_path_list(portability_library_path_list_cb callback, void *data); #ifdef __cplusplus } diff --git a/source/portability/source/portability_dependency.c b/source/portability/source/portability_dependency.c deleted file mode 100644 index 55e633de40..0000000000 --- a/source/portability/source/portability_dependency.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * MetaCall Library by Parra Studios - * A library for providing a foreign function interface calls. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* -- Headers -- */ - -#include - -#include - -#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ - defined(__FreeBSD__) - - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #endif - #include - -#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - - #include - -#elif defined(WIN32) || defined(_WIN32) - - #include - #include - -#else - #error "Unsupported platform for portability_dependendency_iterate" -#endif - -#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ - defined(__FreeBSD__) - -/* -- Type Definitions -- */ - -typedef struct portability_dependendency_iterate_phdr_type *portability_dependendency_iterate_phdr; - -/* -- Member Data -- */ - -struct portability_dependendency_iterate_phdr_type -{ - portability_dependendency_iterate_cb callback; - void *data; -}; - -/* -- Private Methods -- */ - -static int portability_dependendency_iterate_phdr_callback(struct dl_phdr_info *info, size_t size, void *data) -{ - portability_dependendency_iterate_phdr phdr = (portability_dependendency_iterate_phdr)data; - - (void)size; - - return phdr->callback(info->dlpi_name, phdr->data); -} - -#endif - -int portability_dependendency_iterate(portability_dependendency_iterate_cb callback, void *data) -{ - if (callback == NULL) - { - return 1; - } - -#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ - defined(__FreeBSD__) - { - struct portability_dependendency_iterate_phdr_type phdr = { - callback, - data - }; - - return dl_iterate_phdr(&portability_dependendency_iterate_phdr_callback, (void *)&phdr); - } -#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - { - uint32_t iterator, size = _dyld_image_count(); - - for (iterator = 0; iterator < size; ++iterator) - { - const char *image_name = _dyld_get_image_name(iterator); - - if (callback(image_name, data) != 0) - { - return 1; - } - } - - return 0; - } -#elif defined(WIN32) || defined(_WIN32) - { - HANDLE process = GetCurrentProcess(); - HMODULE modules[1024]; - DWORD modules_size; - - if (EnumProcessModules(process, modules, sizeof(modules), &modules_size)) - { - size_t iterator, size = modules_size / sizeof(HMODULE); - char module_name[MAX_PATH]; - - for (iterator = 0; i < size; ++iterator) - { - if (GetModuleFileNameExA(process, modules[iterator], module_name, sizeof(module_name) / sizeof(char))) - { - if (callback(module_name, data) != 0) - { - return 1; - } - } - } - } - - return 0; - } -#endif -} diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 8bf167036d..10e3ad64bd 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -20,14 +20,14 @@ #include +#include #include -#define PORTABILITY_LIBRARY_PATH_SIZE (sizeof(portability_library_path_str) / sizeof(char)) - static int portability_library_path_ends_with(const char path[], const char name[]); #if defined(unix) || defined(__unix__) || defined(__unix) || \ - defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) + defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -38,48 +38,20 @@ static int portability_library_path_ends_with(const char path[], const char name #include -struct phdr_callback_type -{ - const char *name; - char *path; - size_t length; -}; - -static int portability_library_path_phdr_callback(struct dl_phdr_info *info, size_t size, void *data) -{ - struct phdr_callback_type *cb = (struct phdr_callback_type *)data; - - (void)size; - - if (portability_library_path_ends_with(info->dlpi_name, cb->name) == 0) - { - cb->length = strnlen(info->dlpi_name, PORTABILITY_LIBRARY_PATH_SIZE); - - if (cb->length >= PORTABILITY_LIBRARY_PATH_SIZE) - { - return 2; - } - - memcpy(cb->path, info->dlpi_name, sizeof(char) * (cb->length + 1)); - - return 1; - } +#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - return 0; -} + #include #elif defined(WIN32) || defined(_WIN32) || \ defined(__CYGWIN__) || defined(__CYGWIN32__) || \ defined(__MINGW32__) || defined(__MINGW64__) #define WIN32_LEAN_AND_MEAN - #include #include + #include -#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - - #include - +#else + #error "Unsupported platform for portability_library_path" #endif int portability_library_path_ends_with(const char path[], const char name[]) @@ -95,18 +67,74 @@ int portability_library_path_ends_with(const char path[], const char name[]) return !(name_length <= path_length && strncmp(path + path_length - name_length, name, name_length) == 0); } -int portability_library_path(const char name[], portability_library_path_str path, size_t *length) +#if defined(unix) || defined(__unix__) || defined(__unix) || \ + defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) + +/* -- Type Definitions -- */ + +typedef struct portability_library_path_find_phdr_type *portability_library_path_find_phdr; +typedef struct portability_library_path_list_phdr_type *portability_library_path_list_phdr; + +/* -- Member Data -- */ + +struct portability_library_path_find_phdr_type +{ + const char *name; + char *path; + size_t length; +}; + +struct portability_library_path_list_phdr_type +{ + portability_library_path_list_cb callback; + void *data; +}; + +/* -- Private Methods -- */ + +static int portability_library_path_find_phdr_callback(struct dl_phdr_info *info, size_t size, void *data) +{ + portability_library_path_find_phdr find_phdr = (portability_library_path_find_phdr)data; + + (void)size; + + if (portability_library_path_ends_with(info->dlpi_name, find_phdr->name) == 0) + { + find_phdr->length = strnlen(info->dlpi_name, PORTABILITY_PATH_SIZE); + + memcpy(find_phdr->path, info->dlpi_name, sizeof(char) * (find_phdr->length + 1)); + + return 1; + } + + return 0; +} + +static int portability_library_path_list_phdr_callback(struct dl_phdr_info *info, size_t size, void *data) +{ + portability_library_path_list_phdr list_phdr = (portability_library_path_list_phdr)data; + + (void)size; + + return list_phdr->callback(info->dlpi_name, list_phdr->data); +} + +#endif + +int portability_library_path_find(const char name[], portability_library_path_str path, size_t *length) { #if defined(unix) || defined(__unix__) || defined(__unix) || \ - defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) + defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) - struct phdr_callback_type data = { + struct portability_library_path_find_phdr_type data = { name, path, 0 }; - if (dl_iterate_phdr(&portability_library_path_phdr_callback, (void *)&data) != 1) + if (dl_iterate_phdr(&portability_library_path_find_phdr_callback, (void *)&data) != 1) { return 1; } @@ -124,21 +152,21 @@ int portability_library_path(const char name[], portability_library_path_str pat HMODULE handle_modules[1024]; HANDLE handle_process = GetCurrentProcess(); - DWORD cb_needed; + DWORD modules_size; - if (EnumProcessModules(handle_process, handle_modules, sizeof(handle_modules), &cb_needed)) + if (EnumProcessModules(handle_process, handle_modules, sizeof(handle_modules), &modules_size)) { - size_t iterator; + size_t iterator, size = modules_size / sizeof(HMODULE); - for (iterator = 0; iterator < (cb_needed / sizeof(HMODULE)); ++iterator) + for (iterator = 0; iterator < size; ++iterator) { - if (GetModuleFileNameEx(handle_process, handle_modules[iterator], path, PORTABILITY_LIBRARY_PATH_SIZE)) + if (GetModuleFileNameEx(handle_process, handle_modules[iterator], path, PORTABILITY_PATH_SIZE)) { if (portability_library_path_ends_with(path, name) == 0) { if (length != NULL) { - *length = strnlen(path, PORTABILITY_LIBRARY_PATH_SIZE); + *length = strnlen(path, PORTABILITY_PATH_SIZE); } return 0; @@ -153,10 +181,10 @@ int portability_library_path(const char name[], portability_library_path_str pat static const char dylib_suffix[] = "dylib"; uint32_t image_index, size = _dyld_image_count(); - size_t name_length = strnlen(name, PORTABILITY_LIBRARY_PATH_SIZE); + size_t name_length = strnlen(name, PORTABILITY_PATH_SIZE); size_t name_dylib_length = name_length + 3; - if (portability_library_path_ends_with(name, "so") == 0 && name_dylib_length < PORTABILITY_LIBRARY_PATH_SIZE) + if (portability_library_path_ends_with(name, "so") == 0 && name_dylib_length < PORTABILITY_PATH_SIZE) { memcpy(path, name, sizeof(char) * (name_length - 2)); memcpy(path, dylib_suffix, sizeof(dylib_suffix)); @@ -168,9 +196,9 @@ int portability_library_path(const char name[], portability_library_path_str pat if (portability_library_path_ends_with(image_name, path) == 0) { - size_t image_length = strnlen(image_name, PORTABILITY_LIBRARY_PATH_SIZE); + size_t image_length = strnlen(image_name, PORTABILITY_PATH_SIZE); - if (image_length >= PORTABILITY_LIBRARY_PATH_SIZE) + if (image_length >= PORTABILITY_PATH_SIZE) { return 1; } @@ -189,7 +217,69 @@ int portability_library_path(const char name[], portability_library_path_str pat return 1; #else - /* Not supported */ - return 1; + #error "Unsupported platform for portability_library_path" +#endif +} + +int portability_library_path_list(portability_library_path_list_cb callback, void *data) +{ + if (callback == NULL) + { + return 1; + } + +#if defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux) || \ + defined(__FreeBSD__) + { + struct portability_library_path_list_phdr_type list_phdr = { + callback, + data + }; + + return dl_iterate_phdr(&portability_library_path_list_phdr_callback, (void *)&list_phdr); + } +#elif (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) + { + uint32_t iterator, size = _dyld_image_count(); + + for (iterator = 0; iterator < size; ++iterator) + { + const char *image_name = _dyld_get_image_name(iterator); + + if (callback(image_name, data) != 0) + { + return 1; + } + } + + return 0; + } +#elif defined(WIN32) || defined(_WIN32) + { + HANDLE process = GetCurrentProcess(); + HMODULE modules[1024]; + DWORD modules_size; + + if (EnumProcessModules(process, modules, sizeof(modules), &modules_size)) + { + size_t iterator, size = modules_size / sizeof(HMODULE); + char module_name[MAX_PATH]; + + for (iterator = 0; iterator < size; ++iterator) + { + if (GetModuleFileNameExA(process, modules[iterator], module_name, sizeof(module_name) / sizeof(char))) + { + if (callback(module_name, data) != 0) + { + return 1; + } + } + } + } + + return 0; + } +#else + #error "Unsupported platform for portability_library_path" #endif } diff --git a/source/reflect/source/reflect_scope.c b/source/reflect/source/reflect_scope.c index a8fbe49444..3942bb8eed 100644 --- a/source/reflect/source/reflect_scope.c +++ b/source/reflect/source/reflect_scope.c @@ -200,17 +200,17 @@ int scope_metadata_array_cb_iterate(set s, set_key key, set_value val, set_cb_it (void)s; (void)key; - int type_id = value_type_id(val); + type_id id = value_type_id(val); - if (type_id == TYPE_FUNCTION) + if (id == TYPE_FUNCTION) { metadata_iterator->functions[metadata_iterator->functions_size++] = function_metadata(value_to_function(val)); } - else if (type_id == TYPE_CLASS) + else if (id == TYPE_CLASS) { metadata_iterator->classes[metadata_iterator->classes_size++] = class_metadata(value_to_class(val)); } - else if (type_id == TYPE_OBJECT) + else if (id == TYPE_OBJECT) { metadata_iterator->objects[metadata_iterator->objects_size++] = object_metadata(value_to_object(val)); } From 94d33827a623f699191466a942873e1174bf0c80 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 5 May 2025 22:35:24 +0200 Subject: [PATCH 141/364] Solve issues in detours and node loader for windows. --- source/detour/include/detour/detour.h | 4 ++-- source/loaders/node_loader/source/node_loader_impl.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/detour/include/detour/detour.h b/source/detour/include/detour/detour.h index fd0cc20a10..9eb8d50fc6 100644 --- a/source/detour/include/detour/detour.h +++ b/source/detour/include/detour/detour.h @@ -158,7 +158,7 @@ DETOUR_API int detour_enumerate(detour d, detour_handle handle, unsigned int *po * Return zero if success, different from zero otherwise * */ -int detour_replace(detour d, detour_handle handle, const char *function_name, void (*function_addr)(void), void (**function_trampoline)(void)); +DETOUR_API int detour_replace(detour d, detour_handle handle, const char *function_name, void (*function_addr)(void), void (**function_trampoline)(void)); /** * @brief @@ -171,7 +171,7 @@ int detour_replace(detour d, detour_handle handle, const char *function_name, vo * Reference to the detour handle * */ -void detour_unload(detour d, detour_handle handle); +DETOUR_API void detour_unload(detour d, detour_handle handle); /** * @brief diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 3cdae12adb..1192a4b658 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -4069,7 +4069,7 @@ napi_value node_loader_impl_register_bootstrap_startup(loader_impl_node node_imp argv[3] = node_loader_trampoline_initialize_object(env); /* Set the values */ - for (size_t iterator = 0; iterator < 4; ++iterator) + for (uint32_t iterator = 0; iterator < 4; ++iterator) { status = napi_set_element(env, v, iterator, argv[iterator]); node_loader_impl_exception(env, status); From 1a6066586454b090f07bd41cb282cc5c0265fe6c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 5 May 2025 23:16:50 +0200 Subject: [PATCH 142/364] Solve issues of gtest in windows. --- cmake/InstallGTest.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmake/InstallGTest.cmake b/cmake/InstallGTest.cmake index 6f03ef2fcb..fa555b16bf 100644 --- a/cmake/InstallGTest.cmake +++ b/cmake/InstallGTest.cmake @@ -65,17 +65,11 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) set(GTEST_LIB_SUFFIX "lib") set(GTEST_LIBS_DIR "${binary_dir}/lib/${CMAKE_BUILD_TYPE}") set(GMOCK_LIBS_DIR "${binary_dir}/lib/${CMAKE_BUILD_TYPE}") - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(GTEST_LIB_DEBUG "d") - else() - set(GTEST_LIB_DEBUG "") - endif() else() set(GTEST_LIB_PREFIX "lib") set(GTEST_LIB_SUFFIX "a") set(GTEST_LIBS_DIR "${binary_dir}/lib") set(GMOCK_LIBS_DIR "${binary_dir}/lib") - set(GTEST_LIB_DEBUG "") endif() # Define Paths @@ -85,11 +79,11 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) ) set(GTEST_LIBRARY - "${GTEST_LIBS_DIR}/${GTEST_LIB_PREFIX}gtest${GTEST_LIB_DEBUG}.${GTEST_LIB_SUFFIX}" + "${GTEST_LIBS_DIR}/${GTEST_LIB_PREFIX}gtest.${GTEST_LIB_SUFFIX}" ) set(GMOCK_LIBRARY - "${GMOCK_LIBS_DIR}/${GTEST_LIB_PREFIX}gmock${GTEST_LIB_DEBUG}.${GTEST_LIB_SUFFIX}" + "${GMOCK_LIBS_DIR}/${GTEST_LIB_PREFIX}gmock.${GTEST_LIB_SUFFIX}" ) set(GTEST_LIBRARIES From 9c894ecbb9f6750b00e0c3c9c81b6b9776000c23 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 6 May 2025 00:23:55 +0200 Subject: [PATCH 143/364] Trying to solve issue of windows dlls. --- source/loader/include/loader/loader_impl.h | 2 ++ source/loader/source/loader_impl.c | 7 +++++++ .../node_loader/source/node_loader_impl.cpp | 14 +++++++++----- source/metacall/include/metacall/metacall_link.h | 2 +- source/metacall/source/metacall_link.c | 2 +- .../node_extension_test_win32_delay_load.cpp | 4 +++- 6 files changed, 23 insertions(+), 8 deletions(-) diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index 44b2429286..e116a001e5 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -49,6 +49,8 @@ LOADER_API int loader_impl_dependencies(loader_impl impl, detour d); LOADER_API int loader_impl_link(plugin p, loader_impl impl); +LOADER_API dynlink loader_impl_dependency(loader_impl impl, const char *library); + LOADER_API detour_handle loader_impl_detour(loader_impl impl, const char *library, int (*load_cb)(detour, detour_handle)); LOADER_API void loader_impl_attach(loader_impl impl, plugin p); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index b08444d2cc..dc1cabe9b6 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -559,6 +559,13 @@ int loader_impl_link(plugin p, loader_impl impl) return 0; } +dynlink loader_impl_dependency(loader_impl impl, const char *library) +{ + dynlink library_handle = set_get(impl->library_map, (const set_key)library); + + return library_handle; +} + detour_handle loader_impl_detour(loader_impl impl, const char *library, int (*load_cb)(detour, detour_handle)) { detour_handle handle = set_get(impl->detour_map, (const set_key)library); diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 1192a4b658..42593db021 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -3699,11 +3699,15 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi #if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200) { /* As the library handle is correctly resolved here, either to executable, library of the executable, - or the loader dependency we can directly obtain the handle of this dependency from a function pointer, - use any function that is contained in node runtime, in this case we are using napi_create_array */ - if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)&napi_create_array, &node_loader_node_dll_handle)) + or the loader dependency we can directly get the handle of this dependency */ + dynlink node_library = loader_impl_dependency(node_impl->impl, "node"); + + node_loader_node_dll_handle = dynlink_get_impl(node_library); + + if (node_loader_node_dll_handle == NULL) { - napi_throw_type_error(env, nullptr, "Failed to initialize the hooking against node extensions load mechanism"); + napi_throw_error(env, nullptr, "Failed to initialize the hooking against node extensions load mechanism"); + return NULL; } detour d = detour_create(metacall_detour()); @@ -4032,7 +4036,7 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con /* Result will never be defined properly */ node_impl->result = 0; - if (metacall_link_register_impl(impl, "node", "napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) + if (metacall_link_register_loader(impl, "node", "napi_register_module_v1", (void (*)(void))(&node_loader_port_initialize)) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Node Loader failed to hook napi_register_module_v1"); } diff --git a/source/metacall/include/metacall/metacall_link.h b/source/metacall/include/metacall/metacall_link.h index 5012810fec..4e023d090d 100644 --- a/source/metacall/include/metacall/metacall_link.h +++ b/source/metacall/include/metacall/metacall_link.h @@ -92,7 +92,7 @@ METACALL_API int metacall_link_register(const char *tag, const char *library, co * @return * Zero if success, different from zero otherwise */ -METACALL_API int metacall_link_register_impl(void *loader, const char *library, const char *symbol, void (*fn)(void)); +METACALL_API int metacall_link_register_loader(void *loader, const char *library, const char *symbol, void (*fn)(void)); /** * @brief diff --git a/source/metacall/source/metacall_link.c b/source/metacall/source/metacall_link.c index f9be116964..cc261644e7 100644 --- a/source/metacall/source/metacall_link.c +++ b/source/metacall/source/metacall_link.c @@ -187,7 +187,7 @@ int metacall_link_register(const char *tag, const char *library, const char *sym return set_insert(metacall_link_table, (set_key)symbol, ptr); } -int metacall_link_register_impl(void *loader, const char *library, const char *symbol, void (*fn)(void)) +int metacall_link_register_loader(void *loader, const char *library, const char *symbol, void (*fn)(void)) { void *ptr; diff --git a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp index a19afc5639..fc968f846a 100644 --- a/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp +++ b/source/tests/metacall_node_extension_test/node_extension_test/source/node_extension_test_win32_delay_load.cpp @@ -29,6 +29,8 @@ #include #include +static const char node_library_name[] = NODEJS_LIBRARY_NAME; + static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo *info) { HMODULE m; @@ -38,7 +40,7 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo *info) return NULL; } - if (_stricmp(info->szDll, NODEJS_LIBRARY_NAME) != 0) + if (_stricmp(info->szDll, node_library_name) != 0) { return NULL; } From aed631e9cedd676b1c410a1d0764a515fbaf11ee Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 6 May 2025 00:46:31 +0200 Subject: [PATCH 144/364] Solve issue in windows. --- source/loaders/node_loader/source/node_loader_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 42593db021..77e66b08a3 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -3702,7 +3702,7 @@ void *node_loader_impl_register(void *node_impl_ptr, void *env_ptr, void *functi or the loader dependency we can directly get the handle of this dependency */ dynlink node_library = loader_impl_dependency(node_impl->impl, "node"); - node_loader_node_dll_handle = dynlink_get_impl(node_library); + node_loader_node_dll_handle = static_cast(dynlink_get_impl(node_library)); if (node_loader_node_dll_handle == NULL) { From 28bae5b8d4a2ce21252057cae445f0b03b505bfe Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 7 May 2025 17:35:18 +0200 Subject: [PATCH 145/364] Solved bugs. --- source/loader/include/loader/loader.h | 6 +- source/loader/include/loader/loader_impl.h | 2 +- source/loader/source/loader.c | 65 +++++----- source/loader/source/loader_impl.c | 19 +-- source/metacall/source/metacall.c | 18 +-- source/portability/source/portability_path.c | 6 +- .../source/portability_path_test.cpp | 114 +++++++++++------- 7 files changed, 119 insertions(+), 111 deletions(-) diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index 8fe36fd1e4..441cc938ed 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -51,8 +51,6 @@ LOADER_API void loader_initialization_register(loader_impl impl); LOADER_API int loader_initialize(void); -LOADER_NO_EXPORT int loader_initialize_host(const loader_tag tag); - LOADER_API int loader_is_initialized(const loader_tag tag); LOADER_API int loader_register(const char *name, loader_register_invoke invoke, function *func, type_id return_type, size_t arg_size, type_id args_type_id[]); @@ -83,14 +81,12 @@ LOADER_API loader_data loader_get(const char *name); LOADER_API void *loader_get_handle(const loader_tag tag, const char *name); -LOADER_API void loader_set_options(const loader_tag tag, void *options); +LOADER_API int loader_set_options(const loader_tag tag, value options); LOADER_API value loader_get_options(const loader_tag tag); LOADER_API value loader_get_option(const loader_tag tag, const char *field); -LOADER_API int loader_get_option_host(const loader_tag tag); - LOADER_API int loader_handle_initialize(loader_impl impl, const loader_path name, void **handle_ptr); LOADER_API const char *loader_handle_id(void *handle); diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index e116a001e5..6f3691d8fb 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -77,7 +77,7 @@ LOADER_API int loader_impl_load_from_package(plugin_manager manager, plugin p, l LOADER_API void *loader_impl_get_handle(loader_impl impl, const char *name); -LOADER_API void loader_impl_set_options(loader_impl impl, void *options); +LOADER_API void loader_impl_set_options(loader_impl impl, value options); LOADER_API value loader_impl_get_options(loader_impl impl); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index b4b13e5df9..0c055b01cb 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -74,6 +74,8 @@ static void loader_initialization_register_plugin(plugin p); static plugin loader_get_impl_plugin(const loader_tag tag); +static plugin loader_get_impl_plugin_options(const loader_tag tag, value options); + static int loader_get_cb_iterate(plugin_manager manager, plugin p, void *data); static int loader_metadata_cb_iterate(plugin_manager manager, plugin p, void *data); @@ -202,29 +204,6 @@ void loader_initialization_register_plugin(plugin p) } } -int loader_initialize_host(const loader_tag tag) -{ - plugin p = plugin_manager_get(&loader_manager, tag); - - if (p == NULL) - { - return 1; - } - - if (loader_impl_initialize(&loader_manager, p, plugin_impl_type(p, loader_impl)) != 0) - { - return 1; - } - else - { - loader_manager_impl manager_impl = plugin_manager_impl_type(&loader_manager, loader_manager_impl); - - manager_impl->host = p; - - return 0; - } -} - int loader_is_initialized(const loader_tag tag) { plugin p = plugin_manager_get(&loader_manager, tag); @@ -267,21 +246,31 @@ detour_handle loader_hook_impl(void *impl, const char *library, int (*load_cb)(d } plugin loader_get_impl_plugin(const loader_tag tag) +{ + return loader_get_impl_plugin_options(tag, NULL); +} + +plugin loader_get_impl_plugin_options(const loader_tag tag, value options) { plugin p = plugin_manager_get(&loader_manager, tag); + loader_impl impl; + if (p != NULL) { return p; } - loader_impl impl = loader_impl_create(tag); + impl = loader_impl_create(tag); if (impl == NULL) { goto loader_create_error; } + /* Define the options */ + loader_impl_set_options(impl, options); + /* Dynamic link loader dependencies if it is not host */ if (loader_impl_dependencies(impl, plugin_manager_impl_type(&loader_manager, loader_manager_impl)->d) != 0) { @@ -305,6 +294,21 @@ plugin loader_get_impl_plugin(const loader_tag tag) /* Store in the loader implementation the reference to the plugin which belongs to */ loader_impl_attach(impl, p); + /* Check if it is host, initialize it and set it as host */ + if (options != NULL && loader_impl_get_option_host(impl) == 1) + { + loader_manager_impl manager_impl; + + if (loader_impl_initialize(&loader_manager, p, plugin_impl_type(p, loader_impl)) != 0) + { + goto plugin_manager_create_error; + } + + manager_impl = plugin_manager_impl_type(&loader_manager, loader_manager_impl); + + manager_impl->host = p; + } + /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* log_write("metacall", LOG_LEVEL_DEBUG, "Created loader (%s) implementation <%p>", tag, (void *)impl); */ @@ -594,11 +598,11 @@ void *loader_get_handle(const loader_tag tag, const char *name) return loader_impl_get_handle(plugin_impl_type(p, loader_impl), name); } -void loader_set_options(const loader_tag tag, void *options) +int loader_set_options(const loader_tag tag, value options) { - plugin p = loader_get_impl_plugin(tag); + plugin p = loader_get_impl_plugin_options(tag, options); - loader_impl_set_options(plugin_impl_type(p, loader_impl), options); + return (p == NULL); } value loader_get_options(const loader_tag tag) @@ -615,13 +619,6 @@ value loader_get_option(const loader_tag tag, const char *field) return loader_impl_get_option(plugin_impl_type(p, loader_impl), field); } -int loader_get_option_host(const loader_tag tag) -{ - plugin p = loader_get_impl_plugin(tag); - - return loader_impl_get_option_host(plugin_impl_type(p, loader_impl)); -} - int loader_handle_initialize(loader_impl impl, const loader_path name, void **handle_ptr) { if (loader_initialize() == 1) diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index dc1cabe9b6..5eef781406 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -326,7 +326,7 @@ int loader_impl_dependencies_self_list(const char *library, void *data) vector_push_back_empty(dependencies_self); - strncpy(vector_back(dependencies_self), library, strnlen(library, PORTABILITY_PATH_SIZE)); + strncpy(vector_back(dependencies_self), library, strnlen(library, PORTABILITY_PATH_SIZE) + 1); return 0; } @@ -1457,7 +1457,7 @@ void *loader_impl_get_handle(loader_impl impl, const char *name) return NULL; } -void loader_impl_set_options(loader_impl impl, void *options) +void loader_impl_set_options(loader_impl impl, value options) { if (impl != NULL && options != NULL) { @@ -1923,14 +1923,15 @@ void loader_impl_destroy_deallocate(loader_impl impl) set_destroy(impl->detour_map); - /* TODO: I am not sure this will work. - This must be done when the plugin handle (aka the loader) gets unloaded, - at this point it is not unloaded yet, because the plugin destructor is called before doing: - dynlink_unload(p->descriptor->handle); - In theory it should work because normally those handles are reference counted but "I don't trust like that". + /* Unload all the dependencies. + This must be done when the plugin dynlink handle (aka the loader) gets unloaded, + at this point it is not unloaded yet, because the plugin destructor is called before doing: + dynlink_unload(p->descriptor->handle); + As the destroy mechanism requires the loaders to be unloaded at the end after all the destroy methods of all + loaders have been called, this generates an ourobros that cannot be solved easily. In any case, + this method still should work because normally those handles are reference counted and we increment + the reference counter at the beginning, so they will be properly unloaded when the dynlink handle gets unloaded. */ - - /* Unload all the dependencies when everything has been destroyed and the loader is unloaded */ set_iterate(impl->library_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); set_destroy(impl->library_map); diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index c865e1ccda..fcba2931ac 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -346,26 +346,12 @@ int metacall_initialize_ex(struct metacall_initialize_configuration_type initial while (!(initialize_config[index].tag == NULL && initialize_config[index].options == NULL)) { - loader_impl impl = loader_get_impl(initialize_config[index].tag); - - if (impl == NULL) + if (loader_set_options(initialize_config[index].tag, initialize_config[index].options) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to find '%s_loader'", initialize_config[index].tag); + log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to set options of '%s_loader'", initialize_config[index].tag); return 1; } - loader_set_options(initialize_config[index].tag, initialize_config[index].options); - - /* If we are initializing a loader as a host, we must initialize it */ - if (loader_get_option_host(initialize_config[index].tag)) - { - if (loader_initialize_host(initialize_config[index].tag) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "MetaCall failed to initialize '%s_loader' as host", initialize_config[index].tag); - return 1; - } - } - ++index; } diff --git a/source/portability/source/portability_path.c b/source/portability/source/portability_path.c index ea96ca764d..9606a7d690 100644 --- a/source/portability/source/portability_path.c +++ b/source/portability/source/portability_path.c @@ -27,13 +27,13 @@ size_t portability_path_get_name(const char *path, size_t path_size, char *name, size_t name_size) { + size_t i, count, last; + if (path == NULL || name == NULL) { return 0; } - size_t i, count, last; - for (i = 0, count = 0, last = 0; path[i] != '\0' && i < path_size && count < name_size; ++i) { name[count++] = path[i]; @@ -63,7 +63,7 @@ size_t portability_path_get_name(const char *path, size_t path_size, char *name, } } - if (last == 0 && count > 1) + if ((last == 0 && count > 1) || last > count) { last = count; } diff --git a/source/tests/portability_path_test/source/portability_path_test.cpp b/source/tests/portability_path_test/source/portability_path_test.cpp index c8b4dccc52..15534b235d 100644 --- a/source/tests/portability_path_test/source/portability_path_test.cpp +++ b/source/tests/portability_path_test/source/portability_path_test.cpp @@ -33,7 +33,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_module_name) size_t size = portability_path_get_module_name(base, sizeof(base), extension, sizeof(extension), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -48,7 +48,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_module_name_without size_t size = portability_path_get_module_name(base, sizeof(base), extension, sizeof(extension), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -63,7 +63,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_module_name_with_ra size_t size = portability_path_get_module_name(base, sizeof(base), extension, sizeof(extension), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -77,7 +77,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -91,7 +91,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_end_dot) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -105,7 +105,21 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_without_dot) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + +TEST_F(portability_path_test, portability_path_test_path_get_name_only_separator_dot) +{ + static const char base[] = "/."; + static const char result[] = ""; + + string_name name; + + size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); + + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -119,7 +133,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_only_dot) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -133,7 +147,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_two_dots) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -147,7 +161,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_three_dots) size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -161,7 +175,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_only_extension size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -175,7 +189,7 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_double_extensi size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -189,7 +203,21 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_triple_extensi size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); - EXPECT_EQ((int)0, (int)strcmp(name, result)); + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + +TEST_F(portability_path_test, portability_path_test_path_get_name_nullchar) +{ + static const char base[] = "/home/yeet/.nvm/versions/node/v18.20.3/bin/node"; + static const char result[] = "node"; + + string_name name; + + size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); + + EXPECT_STREQ(name, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -203,7 +231,7 @@ TEST_F(portability_path_test, portability_path_test_get_path_of_path) size_t size = portability_path_get_directory(base, sizeof(base), path, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(path, result)); + EXPECT_STREQ(path, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -217,7 +245,7 @@ TEST_F(portability_path_test, portability_path_test_get_path_of_filepath) size_t size = portability_path_get_directory(base, sizeof(base), path, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(path, result)); + EXPECT_STREQ(path, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -232,7 +260,7 @@ TEST_F(portability_path_test, portability_path_test_get_relative) size_t size = portability_path_get_relative(base, sizeof(base), path, sizeof(path), relative, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(relative, result)); + EXPECT_STREQ(relative, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -247,7 +275,7 @@ TEST_F(portability_path_test, portability_path_test_get_relative_fail) size_t size = portability_path_get_relative(base, sizeof(base), path, sizeof(path), relative, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(relative, result)); + EXPECT_STREQ(relative, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -262,7 +290,7 @@ TEST_F(portability_path_test, portability_path_test_join_none_slash) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -277,7 +305,7 @@ TEST_F(portability_path_test, portability_path_test_join_left_slash) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -292,7 +320,7 @@ TEST_F(portability_path_test, portability_path_test_join_right_slash) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -307,7 +335,7 @@ TEST_F(portability_path_test, portability_path_test_join_both_slash) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -322,7 +350,7 @@ TEST_F(portability_path_test, portability_path_test_join_left_empty) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -337,7 +365,7 @@ TEST_F(portability_path_test, portability_path_test_join_right_empty) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -352,7 +380,7 @@ TEST_F(portability_path_test, portability_path_test_join_right_empty_non_slash) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -367,7 +395,7 @@ TEST_F(portability_path_test, portability_path_test_join_both_empty) size_t size = portability_path_join(left, sizeof(left), right, sizeof(right), join, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(join, result)); + EXPECT_STREQ(join, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -381,7 +409,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -395,7 +423,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_double_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -409,7 +437,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_many_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -423,7 +451,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_many_double_ size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -437,7 +465,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_dot_non_slas size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -451,7 +479,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_many_dot_non size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -465,7 +493,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_begin_invalid) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -479,7 +507,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_middle_double_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -493,7 +521,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_middle_double_dot_ size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -507,7 +535,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_middle_double_dot_ size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -521,7 +549,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_middle_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -535,7 +563,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_middle_mixed_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -549,7 +577,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_end_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -563,7 +591,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_end_double_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -577,7 +605,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_end_mixed_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -591,7 +619,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_absolute_end_mixed size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -605,7 +633,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_absolute_end_dot) size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -619,7 +647,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_relative_begin_end size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } @@ -633,7 +661,7 @@ TEST_F(portability_path_test, portability_path_test_canonical_absolute_end_many_ size_t size = portability_path_canonical(path, sizeof(path), canonical, PATH_SIZE); - EXPECT_EQ((int)0, (int)strcmp(canonical, result)); + EXPECT_STREQ(canonical, result); EXPECT_EQ((size_t)size, (size_t)sizeof(result)); EXPECT_EQ((char)'\0', (char)result[size - 1]); } From db92d1e9e0af5f9ad2b6e5f83cf728edca9acb69 Mon Sep 17 00:00:00 2001 From: Jose Antonio Dominguez Date: Wed, 7 May 2025 20:08:11 -0300 Subject: [PATCH 146/364] Refactor Windows loader implementation to improve symbol replacement logic and ensure proper unloading of handles. --- source/loader/source/loader_impl.c | 53 +++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 5eef781406..33c232af60 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -523,30 +523,53 @@ int loader_impl_link(plugin p, loader_impl impl) #if defined(WIN32) || defined(_WIN32) if (loader_impl_get_option_host(impl) == 1) { - /* TODO: Replace loader symbols by the dependency (aka the already loaded + /* Replace loader symbols by the dependency (aka the already loaded library if the host is linked dynamically, or the executable if it is - linked statically): - - loader_handle = detour_load_handle(d, desc->handle); - - while (detour_enumerate(d, loader_handle, position, name, addr)) + linked statically) */ + detour_handle loader_handle; + void *position = NULL; + char name[DETOUR_SYMBOL_SIZE]; + void *addr = NULL; + + loader_handle = detour_load_handle(impl->d, desc->handle); + + if (loader_handle != NULL) + { + set_iterator it; + size_t iterator; + + while (detour_enumerate(impl->d, loader_handle, &position, name, &addr)) { - foreach(library_handle in impl->library_map) + /* Iterate through all library handles in the library map */ + it = set_iterator_begin(impl->library_map); + + for (iterator = 0; iterator < set_size(impl->library_map); ++iterator) { - symbol = dynlink_symbol(library_handle, name); - - if (symbol != NULL) + dynlink library_handle = set_iterator_value(it); + void *symbol = NULL; + + if (library_handle != NULL) { - if (detour_replace(d, loader_handle, name, symbol, ...) == 0) + if (dynlink_symbol(library_handle, name, &symbol) == 0) { - break; + if (symbol != NULL) + { + if (detour_replace(impl->d, loader_handle, name, symbol, NULL) == 0) + { + /* Symbol successfully replaced */ + + break; + } + } } } + + it = set_iterator_next(it); } } - - detour_unload(d, loader_handle); - */ + + detour_unload(impl->d, loader_handle); + } } #endif From 5c0b9dbfda06ccaa922c399f6d30a206b68bb09b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 8 May 2025 17:23:08 +0200 Subject: [PATCH 147/364] Improve hash map and add set benchmarks. --- source/adt/source/adt_map.c | 114 ++++++++------ source/adt/source/adt_set.c | 2 + source/benchmarks/CMakeLists.txt | 1 + .../benchmarks/log_bench/source/log_bench.cpp | 1 - source/benchmarks/set_bench/CMakeLists.txt | 147 ++++++++++++++++++ .../benchmarks/set_bench/source/set_bench.cpp | 147 ++++++++++++++++++ source/loader/source/loader_impl.c | 4 +- source/reflect/source/reflect_class.c | 50 +++--- .../adt_map_test/source/adt_map_test.cpp | 25 +++ .../adt_set_test/source/adt_set_test.cpp | 23 +++ 10 files changed, 429 insertions(+), 85 deletions(-) create mode 100644 source/benchmarks/set_bench/CMakeLists.txt create mode 100644 source/benchmarks/set_bench/source/set_bench.cpp diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 4f28a10cbd..53febfa788 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -49,14 +49,6 @@ struct map_iterator_type size_t current_pair; }; -struct map_contains_any_cb_iterator_type -{ - map m; - int result; -}; - -typedef struct map_contains_any_cb_iterator_type *map_contains_any_cb_iterator; - /* -- Methods -- */ map map_create(map_cb_hash hash_cb, map_cb_compare compare_cb) @@ -104,30 +96,38 @@ size_t map_size(map m) return 0; } -static int map_bucket_realloc_iterator(map m, map_key key, map_value value, map_cb_iterate_args args) +static int map_bucket_rehash(map m, map new_map) { - map new_map = (map)args; + size_t bucket_iterator, pair_iterator; - if (new_map != m && key != NULL && args != NULL) + for (bucket_iterator = 0; bucket_iterator < m->capacity; ++bucket_iterator) { - map_hash h = new_map->hash_cb(key); + bucket b = &m->buckets[bucket_iterator]; - size_t index = h % new_map->capacity; + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - bucket b = &new_map->buckets[index]; + map_hash h = new_map->hash_cb(p->key); - if (bucket_insert(b, key, value) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid map bucket realloc insertion"); - return 1; - } + size_t index = h % new_map->capacity; - ++new_map->count; + bucket b = &new_map->buckets[index]; - return 0; + if (bucket_insert(b, p->key, p->value) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid map bucket realloc insertion"); + return 1; + } + + ++new_map->count; + } + } } - return 1; + return 0; } static int map_bucket_realloc(map m) @@ -160,8 +160,10 @@ static int map_bucket_realloc(map m) { size_t iterator; - map_iterate(m, &map_bucket_realloc_iterator, &new_map); + /* Rehash all the elements into the new map */ + map_bucket_rehash(m, &new_map); + /* Destroy all pairs from old map */ for (iterator = 0; iterator < m->capacity; ++iterator) { bucket b = &m->buckets[iterator]; @@ -172,6 +174,7 @@ static int map_bucket_realloc(map m) } } + /* Destroy all buckets from old map */ free(m->buckets); m->capacity = new_map.capacity; @@ -272,29 +275,29 @@ int map_contains(map m, map_key key) return 1; } -static int map_contains_any_cb_iterate(map m, map_key key, map_value value, map_cb_iterate_args args) -{ - map_contains_any_cb_iterator iterator = (map_contains_any_cb_iterator)args; - - (void)m; - (void)value; - - iterator->result = map_contains(iterator->m, key); - - /* Stop iteration if we found an element */ - return !iterator->result; -} - int map_contains_any(map dest, map src) { - struct map_contains_any_cb_iterator_type args; + size_t bucket_iterator, pair_iterator; - args.m = dest; - args.result = 1; + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; - map_iterate(src, &map_contains_any_cb_iterate, (map_cb_iterate_args)&args); + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; + + if (map_contains(dest, p->key) == 0) + { + return 0; + } + } + } + } - return args.result; + return 1; } map_value map_remove(map m, map_key key) @@ -413,20 +416,27 @@ void map_iterate(map m, map_cb_iterate iterate_cb, map_cb_iterate_args args) } } -static int map_append_cb_iterate(map m, map_key key, map_value value, map_cb_iterate_args args) +int map_append(map dest, map src) { - map dest = (map)args; - - (void)m; + size_t bucket_iterator, pair_iterator; - return map_insert(dest, key, value); -} + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; -int map_append(map dest, map src) -{ - map_cb_iterate_args args = (map_cb_iterate_args)dest; + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - map_iterate(src, &map_append_cb_iterate, args); + if (map_insert(dest, p->key, p->value) != 0) + { + return 1; + } + } + } + } return 0; } @@ -559,6 +569,8 @@ void map_iterator_next(map_iterator it) } } } + + it->current_pair = 0; } } } diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index e54b8faee7..4ea3dd86d0 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -582,6 +582,8 @@ void set_iterator_next(set_iterator it) return; } } + + it->current_pair = 0; } } } diff --git a/source/benchmarks/CMakeLists.txt b/source/benchmarks/CMakeLists.txt index 8bf6ce15e8..107a348e81 100644 --- a/source/benchmarks/CMakeLists.txt +++ b/source/benchmarks/CMakeLists.txt @@ -58,6 +58,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/b include(CTest) +add_subdirectory(set_bench) add_subdirectory(log_bench) add_subdirectory(metacall_py_c_api_bench) add_subdirectory(metacall_py_call_bench) diff --git a/source/benchmarks/log_bench/source/log_bench.cpp b/source/benchmarks/log_bench/source/log_bench.cpp index 73bb489fe9..75bdb547bd 100644 --- a/source/benchmarks/log_bench/source/log_bench.cpp +++ b/source/benchmarks/log_bench/source/log_bench.cpp @@ -21,7 +21,6 @@ #include #include -#include static int stream_write(void *, const char *, const size_t) { diff --git a/source/benchmarks/set_bench/CMakeLists.txt b/source/benchmarks/set_bench/CMakeLists.txt new file mode 100644 index 0000000000..69630fada5 --- /dev/null +++ b/source/benchmarks/set_bench/CMakeLists.txt @@ -0,0 +1,147 @@ +# +# Executable name and options +# + +# Target name +set(target set-bench) +message(STATUS "Benchmark ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/set_bench.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GBench + + ${META_PROJECT_NAME}::version + ${META_PROJECT_NAME}::preprocessor + ${META_PROJECT_NAME}::format + ${META_PROJECT_NAME}::threading + ${META_PROJECT_NAME}::log + ${META_PROJECT_NAME}::adt +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Linker options +# + +target_link_options(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $ + --benchmark_out=${CMAKE_BINARY_DIR}/benchmarks/${target}.json +) + +# +# Define dependencies +# + +add_dependencies(${target} + adt +) + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} +) diff --git a/source/benchmarks/set_bench/source/set_bench.cpp b/source/benchmarks/set_bench/source/set_bench.cpp new file mode 100644 index 0000000000..3b233cfd00 --- /dev/null +++ b/source/benchmarks/set_bench/source/set_bench.cpp @@ -0,0 +1,147 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include + +#include +#include + +#define SET_SIZE 1000 +#define ITERATIONS 1000 + +class set_bench : public benchmark::Fixture +{ +public: + void SetUp(benchmark::State &) + { + s = set_create(&hash_callback_ptr, &comparable_callback_ptr); + + keys.reserve(SET_SIZE); + values.reserve(SET_SIZE); + + for (int i = 0; i < SET_SIZE; ++i) + { + keys.push_back(std::to_string(i)); + values.push_back(i); + set_insert(s, (set_key)keys[i].c_str(), &values[i]); + } + } + + void TearDown(benchmark::State &) + { + set_destroy(s); + } + + set s; + std::vector keys; + std::vector values; +}; + +int set_cb_iterate_sum(set s, set_key key, set_value value, set_cb_iterate_args args) +{ + int *i = (int *)value; + uint64_t *sum = (uint64_t *)args; + + (void)s; + (void)key; + + *sum = ((*sum) + (uint64_t)(*i)); + + return 0; +} + +BENCHMARK_DEFINE_F(set_bench, set_iterate) +(benchmark::State &state) +{ + uint64_t sum = 0; + + for (auto _ : state) + { + set_iterate(s, &set_cb_iterate_sum, &sum); + } + + state.SetLabel("Set Benchmark - Iterate Callback"); + state.SetItemsProcessed(SET_SIZE); +} + +BENCHMARK_REGISTER_F(set_bench, set_iterate) + ->Unit(benchmark::kMillisecond) + ->Iterations(ITERATIONS) + ->Repetitions(3); + +BENCHMARK_DEFINE_F(set_bench, set_iterators) +(benchmark::State &state) +{ + uint64_t sum = 0; + + for (auto _ : state) + { + for (set_iterator it = set_iterator_begin(s); set_iterator_end(&it) > 0; set_iterator_next(it)) + { + int *i = (int *)set_iterator_get_value(it); + + sum += ((uint64_t)(*i)); + } + } + + (void)sum; + + state.SetLabel("Set Benchmark - Iterators"); + state.SetItemsProcessed(SET_SIZE); +} + +BENCHMARK_REGISTER_F(set_bench, set_iterators) + ->Unit(benchmark::kMillisecond) + ->Iterations(ITERATIONS) + ->Repetitions(3); + +/* +BENCHMARK_DEFINE_F(set_bench, set_iterators_2) +(benchmark::State &state) +{ + uint64_t sum = 0; + + for (auto _ : state) + { + set_iterator_type it; + + for (set_iterator_begin_2(s, &it); set_iterator_end_2(&it) > 0; set_iterator_next(&it)) + { + int *i = (int *)set_iterator_get_value(&it); + + sum += ((uint64_t)(*i)); + } + } + + (void)sum; + + state.SetLabel("Set Benchmark - Iterators 2"); + state.SetItemsProcessed(SET_SIZE); +} + +BENCHMARK_REGISTER_F(set_bench, set_iterators_2) + ->Unit(benchmark::kMillisecond) + ->Iterations(ITERATIONS) + ->Repetitions(3); +*/ + +BENCHMARK_MAIN(); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 33c232af60..fc87cb0991 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -520,7 +520,8 @@ int loader_impl_link(plugin p, loader_impl impl) we link the dependency with delay load linking. Before we execute anything, we should relink all the symbols to the host. */ -#if defined(WIN32) || defined(_WIN32) +#if 0 // TODO + #if defined(WIN32) || defined(_WIN32) if (loader_impl_get_option_host(impl) == 1) { /* Replace loader symbols by the dependency (aka the already loaded @@ -571,6 +572,7 @@ int loader_impl_link(plugin p, loader_impl impl) detour_unload(impl->d, loader_handle); } } + #endif #endif /* Store itself in the library map along with the dependencies */ diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index 63643a24f9..c0f35f6e02 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -72,7 +72,6 @@ static value class_metadata_attributes(klass cls); static value class_metadata_static_attributes(klass cls); static method class_get_method_type_safe(vector v, type_id ret, type_id args[], size_t size); static int class_attributes_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); -static int class_methods_destroy_cb_iterate(map m, map_key key, map_value val, map_cb_iterate_args args); static void class_constructors_destroy(klass cls); klass class_create(const char *name, enum accessor_type_id accessor, class_impl impl, class_impl_interface_singleton singleton) @@ -262,23 +261,12 @@ value class_metadata_constructors(klass cls) return v; } -int class_metadata_methods_impl_cb_iterate(map m, map_key key, map_value val, map_cb_iterate_args args) -{ - class_metadata_iterator_args iterator = (class_metadata_iterator_args)args; - value *v_array = value_to_array(iterator->v); - - (void)m; - (void)key; - - v_array[iterator->count++] = method_metadata((method)val); - - return 0; -} - value class_metadata_methods_impl(const char name[], size_t size, map methods) { value v = value_create_array(NULL, 2); value *v_array; + map_iterator it; + size_t count = 0; if (v == NULL) { @@ -300,12 +288,12 @@ value class_metadata_methods_impl(const char name[], size_t size, map methods) goto error_value; } - struct class_metadata_iterator_args_type iterator; - - iterator.v = v_array[1]; - iterator.count = 0; + for (it = map_iterator_begin(methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + value *method_array = value_to_array(v_array[1]); - map_iterate(methods, &class_metadata_methods_impl_cb_iterate, &iterator); + method_array[count++] = method_metadata((method)map_iterator_get_value(it)); + } return v; error_value: @@ -807,17 +795,6 @@ int class_attributes_destroy_cb_iterate(set s, set_key key, set_value val, set_c return 0; } -int class_methods_destroy_cb_iterate(map m, map_key key, map_value val, map_cb_iterate_args args) -{ - (void)m; - (void)key; - (void)args; - - method_destroy((method)val); - - return 0; -} - void class_constructors_destroy(klass cls) { size_t iterator, size = vector_size(cls->constructors); @@ -846,6 +823,8 @@ void class_destroy(klass cls) if (threading_atomic_ref_count_load(&cls->ref) == 0) { + map_iterator it; + /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* @@ -864,8 +843,15 @@ void class_destroy(klass cls) set_iterate(cls->attributes, &class_attributes_destroy_cb_iterate, NULL); set_iterate(cls->static_attributes, &class_attributes_destroy_cb_iterate, NULL); - map_iterate(cls->methods, &class_methods_destroy_cb_iterate, NULL); - map_iterate(cls->static_methods, &class_methods_destroy_cb_iterate, NULL); + for (it = map_iterator_begin(cls->methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + method_destroy((method)map_iterator_get_value(it)); + } + + for (it = map_iterator_begin(cls->static_methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + method_destroy((method)map_iterator_get_value(it)); + } if (cls->interface != NULL && cls->interface->destroy != NULL) { diff --git a/source/tests/adt_map_test/source/adt_map_test.cpp b/source/tests/adt_map_test/source/adt_map_test.cpp index 9fb876427b..5e6e76fc76 100644 --- a/source/tests/adt_map_test/source/adt_map_test.cpp +++ b/source/tests/adt_map_test/source/adt_map_test.cpp @@ -24,9 +24,13 @@ #include +#include + typedef char key_str[7]; static size_t iterator_counter = 0; +static std::vector order_iterate; +static std::vector order_iterator; int map_cb_iterate_str_to_int(map m, map_key key, map_value value, map_cb_iterate_args args) { @@ -34,6 +38,8 @@ int map_cb_iterate_str_to_int(map m, map_key key, map_value value, map_cb_iterat { log_write("metacall", LOG_LEVEL_DEBUG, "%s -> %d", (char *)key, *((int *)(value))); + order_iterate.push_back(*((int *)(value))); + ++iterator_counter; return 0; @@ -108,6 +114,25 @@ TEST_F(adt_map_test, map_int) EXPECT_EQ((size_t)iterator_counter, (size_t)value_array_size * 2); + /* Iterators */ + iterator_counter = 0; + + for (map_iterator it = map_iterator_begin(m); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + char *key = (char *)map_iterator_get_key(it); + int *value = (int *)map_iterator_get_value(it); + + log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); + + order_iterator.push_back(*((int *)(value))); + + iterator_counter++; + } + + EXPECT_EQ((size_t)iterator_counter, (size_t)value_array_size * 2); + + EXPECT_EQ((bool)true, (bool)(order_iterator == order_iterate)); + /* Get value */ for (size_t i = 0; i < key_array_size; ++i) { diff --git a/source/tests/adt_set_test/source/adt_set_test.cpp b/source/tests/adt_set_test/source/adt_set_test.cpp index b148b7a2ea..4290739990 100644 --- a/source/tests/adt_set_test/source/adt_set_test.cpp +++ b/source/tests/adt_set_test/source/adt_set_test.cpp @@ -27,6 +27,8 @@ typedef char key_str[7]; static size_t iterator_counter = 0; +static std::vector order_iterate; +static std::vector order_iterator; int set_cb_iterate_str_to_int(set s, set_key key, set_value value, set_cb_iterate_args args) { @@ -34,6 +36,8 @@ int set_cb_iterate_str_to_int(set s, set_key key, set_value value, set_cb_iterat { log_write("metacall", LOG_LEVEL_DEBUG, "%s -> %d", (char *)key, *((int *)(value))); + order_iterate.push_back(*((int *)(value))); + ++iterator_counter; return 0; @@ -120,6 +124,25 @@ TEST_F(adt_set_test, DefaultConstructor) EXPECT_EQ((size_t)iterator_counter, (size_t)value_array_size); + /* Iterators */ + iterator_counter = 0; + + for (set_iterator it = set_iterator_begin(s); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + char *key = (char *)set_iterator_get_key(it); + int *value = (int *)set_iterator_get_value(it); + + log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); + + order_iterator.push_back(*((int *)(value))); + + iterator_counter++; + } + + EXPECT_EQ((size_t)iterator_counter, (size_t)value_array_size); + + EXPECT_EQ((bool)true, (bool)(order_iterator == order_iterate)); + /* Get value */ for (size_t i = 0; i < key_array_size; ++i) { From d82578a94d789b9f913be7375a55751163109aad Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 9 May 2025 08:34:33 +0200 Subject: [PATCH 148/364] Refactor set_iterate into iterator inside adt_set.c --- source/adt/source/adt_set.c | 189 ++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index 4ea3dd86d0..c559ae22a2 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -49,22 +49,6 @@ struct set_iterator_type size_t current_pair; }; -struct set_contains_any_cb_iterator_type -{ - set s; - int result; -}; - -struct set_contains_which_cb_iterator_type -{ - set s; - int result; - set_key *key; -}; - -typedef struct set_contains_any_cb_iterator_type *set_contains_any_cb_iterator; -typedef struct set_contains_which_cb_iterator_type *set_contains_which_cb_iterator; - /* -- Methods -- */ set set_create(set_cb_hash hash_cb, set_cb_compare compare_cb) @@ -112,30 +96,38 @@ size_t set_size(set s) return 0; } -static int set_bucket_realloc_iterator(set s, set_key key, set_value value, set_cb_iterate_args args) +static int set_bucket_rehash(set s, set new_set) { - set new_set = (set)args; + size_t bucket_iterator, pair_iterator; - if (new_set != s && key != NULL && args != NULL) + for (bucket_iterator = 0; bucket_iterator < s->capacity; ++bucket_iterator) { - set_hash h = new_set->hash_cb(key); + bucket b = &s->buckets[bucket_iterator]; + + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - size_t index = h % new_set->capacity; + set_hash h = new_set->hash_cb(p->key); - bucket b = &new_set->buckets[index]; + size_t index = h % new_set->capacity; - if (bucket_insert(b, key, value) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid set bucket realloc insertion"); - return 1; - } + bucket b = &new_set->buckets[index]; - ++new_set->count; + if (bucket_insert(b, p->key, p->value) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid set bucket realloc insertion"); + return 1; + } - return 0; + ++new_set->count; + } + } } - return 1; + return 0; } static int set_bucket_realloc(set s) @@ -168,8 +160,10 @@ static int set_bucket_realloc(set s) { size_t iterator; - set_iterate(s, &set_bucket_realloc_iterator, &new_set); + /* Rehash all the elements into the new set */ + set_bucket_rehash(s, &new_set); + /* Destroy all pairs from old set */ for (iterator = 0; iterator < s->capacity; ++iterator) { bucket b = &s->buckets[iterator]; @@ -180,6 +174,7 @@ static int set_bucket_realloc(set s) } } + /* Destroy all buckets from old set */ free(s->buckets); s->capacity = new_set.capacity; @@ -294,63 +289,55 @@ int set_contains(set s, set_key key) return 1; } -static int set_contains_any_cb_iterate(set s, set_key key, set_value value, set_cb_iterate_args args) -{ - set_contains_any_cb_iterator iterator = (set_contains_any_cb_iterator)args; - - (void)s; - (void)value; - - iterator->result = set_contains(iterator->s, key); - - /* Stop iteration if we found an element */ - return !iterator->result; -} - int set_contains_any(set dest, set src) { - struct set_contains_any_cb_iterator_type args; - - args.s = dest; - args.result = 1; - - set_iterate(src, &set_contains_any_cb_iterate, (set_cb_iterate_args)&args); + size_t bucket_iterator, pair_iterator; - return args.result; -} - -static int set_contains_which_cb_iterate(set s, set_key key, set_value value, set_cb_iterate_args args) -{ - set_contains_which_cb_iterator iterator = (set_contains_which_cb_iterator)args; - - (void)s; - (void)value; + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; - iterator->result = set_contains(iterator->s, key); + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - if (iterator->result == 0) - { - iterator->key = key; + if (set_contains(dest, p->key) == 0) + { + return 0; + } + } + } } - /* Stop iteration if we found an element */ - return !iterator->result; + return 1; } int set_contains_which(set dest, set src, set_key *key) { - struct set_contains_which_cb_iterator_type args; + size_t bucket_iterator, pair_iterator; - args.s = dest; - args.result = 1; - args.key = NULL; + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; - set_iterate(src, &set_contains_which_cb_iterate, (set_cb_iterate_args)&args); + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - /* Return which is the duplicated key if any */ - *key = args.key; + if (set_contains(dest, p->key) == 0) + { + *key = p->key; + return 0; + } + } + } + } - return args.result; + return 1; } set_value set_remove(set s, set_key key) @@ -417,40 +404,54 @@ void set_iterate(set s, set_cb_iterate iterate_cb, set_cb_iterate_args args) } } -static int set_append_cb_iterate(set s, set_key key, set_value value, set_cb_iterate_args args) +int set_append(set dest, set src) { - set dest = (set)args; - - (void)s; + size_t bucket_iterator, pair_iterator; - return set_insert(dest, key, value); -} + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; -int set_append(set dest, set src) -{ - set_cb_iterate_args args = (set_cb_iterate_args)dest; + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; - set_iterate(src, &set_append_cb_iterate, args); + if (set_insert(dest, p->key, p->value) != 0) + { + return 1; + } + } + } + } return 0; } -static int set_disjoint_cb_iterate(set s, set_key key, set_value value, set_cb_iterate_args args) +int set_disjoint(set dest, set src) { - set dest = (set)args; - - set_value deleted = set_remove(dest, key); + size_t bucket_iterator, pair_iterator; - (void)s; + for (bucket_iterator = 0; bucket_iterator < src->capacity; ++bucket_iterator) + { + bucket b = &src->buckets[bucket_iterator]; - return !(deleted == value); -} + if (b->pairs != NULL && b->count > 0) + { + for (pair_iterator = 0; pair_iterator < b->count; ++pair_iterator) + { + pair p = &b->pairs[pair_iterator]; -int set_disjoint(set dest, set src) -{ - set_cb_iterate_args args = (set_cb_iterate_args)dest; + set_value deleted = set_remove(dest, p->key); - set_iterate(src, &set_disjoint_cb_iterate, args); + if (deleted != p->value) + { + return 1; + } + } + } + } return 0; } From 3ec329a9ce5626e864b789c2aa9d77bbd70fc794 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 9 May 2025 17:16:39 +0200 Subject: [PATCH 149/364] Convert set_iterate to set_iterator, implemented loader link. --- source/adt/include/adt/adt_map.h | 4 +- source/adt/include/adt/adt_set.h | 4 +- source/adt/source/adt_map.c | 4 +- source/adt/source/adt_set.c | 4 +- source/adt/source/adt_trie.c | 7 +- .../benchmarks/set_bench/source/set_bench.cpp | 4 +- .../source/configuration_object.c | 87 ++---- .../source/configuration_singleton.c | 29 +- source/loader/include/loader/loader.h | 6 +- source/loader/source/loader.c | 99 ++----- source/loader/source/loader_impl.c | 257 ++++++------------ .../rb_loader/source/rb_loader_impl_parser.c | 59 ++-- source/plugin/include/plugin/plugin_manager.h | 4 +- source/plugin/source/plugin_manager.c | 86 +----- source/reflect/source/reflect_class.c | 91 +++---- source/reflect/source/reflect_scope.c | 236 +++++++--------- .../adt_map_test/source/adt_map_test.cpp | 4 +- .../adt_set_test/source/adt_set_test.cpp | 4 +- 18 files changed, 326 insertions(+), 663 deletions(-) diff --git a/source/adt/include/adt/adt_map.h b/source/adt/include/adt/adt_map.h index 8fe9e1c5eb..e0236c8b6c 100644 --- a/source/adt/include/adt/adt_map.h +++ b/source/adt/include/adt/adt_map.h @@ -81,9 +81,9 @@ ADT_API void map_destroy(map m); ADT_API map_iterator map_iterator_begin(map m); -ADT_API map_key map_iterator_get_key(map_iterator it); +ADT_API map_key map_iterator_key(map_iterator it); -ADT_API map_value map_iterator_get_value(map_iterator it); +ADT_API map_value map_iterator_value(map_iterator it); ADT_API void map_iterator_next(map_iterator it); diff --git a/source/adt/include/adt/adt_set.h b/source/adt/include/adt/adt_set.h index 64af951760..2515d052fc 100644 --- a/source/adt/include/adt/adt_set.h +++ b/source/adt/include/adt/adt_set.h @@ -82,9 +82,9 @@ ADT_API void set_destroy(set s); ADT_API set_iterator set_iterator_begin(set s); -ADT_API set_key set_iterator_get_key(set_iterator it); +ADT_API set_key set_iterator_key(set_iterator it); -ADT_API set_value set_iterator_get_value(set_iterator it); +ADT_API set_value set_iterator_value(set_iterator it); ADT_API void set_iterator_next(set_iterator it); diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 53febfa788..949a211b6f 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -527,7 +527,7 @@ map_iterator map_iterator_begin(map m) return NULL; } -map_key map_iterator_get_key(map_iterator it) +map_key map_iterator_key(map_iterator it) { if (it != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) { @@ -537,7 +537,7 @@ map_key map_iterator_get_key(map_iterator it) return NULL; } -map_value map_iterator_get_value(map_iterator it) +map_value map_iterator_value(map_iterator it) { if (it != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) { diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index c559ae22a2..e6d79c36a2 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -542,7 +542,7 @@ set_iterator set_iterator_begin(set s) return NULL; } -set_key set_iterator_get_key(set_iterator it) +set_key set_iterator_key(set_iterator it) { if (it != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) { @@ -552,7 +552,7 @@ set_key set_iterator_get_key(set_iterator it) return NULL; } -set_value set_iterator_get_value(set_iterator it) +set_value set_iterator_value(set_iterator it) { if (it != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) { diff --git a/source/adt/source/adt_trie.c b/source/adt/source/adt_trie.c index 12b934243f..68e3d5d288 100644 --- a/source/adt/source/adt_trie.c +++ b/source/adt/source/adt_trie.c @@ -525,9 +525,10 @@ void trie_node_iterate(trie t, trie_node n, trie_cb_iterate iterate_cb, trie_cb_ if (back->childs != NULL) { set_iterator it; + for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) { - trie_node_ref ref_node = set_iterator_get_value(it); + trie_node_ref ref_node = set_iterator_value(it); trie_node current_node = &t->node_list[ref_node->index]; @@ -613,7 +614,7 @@ int trie_node_clear(trie t, trie_node n) for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) { - trie_node_ref ref_node = set_iterator_get_value(it); + trie_node_ref ref_node = set_iterator_value(it); trie_node current_node = &t->node_list[ref_node->index]; @@ -688,7 +689,7 @@ trie_node trie_node_find(trie t, trie_key key) { for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) { - trie_node_ref ref_node = set_iterator_get_value(it); + trie_node_ref ref_node = set_iterator_value(it); trie_node current_node = &t->node_list[ref_node->index]; diff --git a/source/benchmarks/set_bench/source/set_bench.cpp b/source/benchmarks/set_bench/source/set_bench.cpp index 3b233cfd00..2e998b0d7a 100644 --- a/source/benchmarks/set_bench/source/set_bench.cpp +++ b/source/benchmarks/set_bench/source/set_bench.cpp @@ -97,7 +97,7 @@ BENCHMARK_DEFINE_F(set_bench, set_iterators) { for (set_iterator it = set_iterator_begin(s); set_iterator_end(&it) > 0; set_iterator_next(it)) { - int *i = (int *)set_iterator_get_value(it); + int *i = (int *)set_iterator_value(it); sum += ((uint64_t)(*i)); } @@ -126,7 +126,7 @@ BENCHMARK_DEFINE_F(set_bench, set_iterators_2) for (set_iterator_begin_2(s, &it); set_iterator_end_2(&it) > 0; set_iterator_next(&it)) { - int *i = (int *)set_iterator_get_value(&it); + int *i = (int *)set_iterator_value(&it); sum += ((uint64_t)(*i)); } diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index 2509992bf5..cf3aaa85f4 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -15,24 +15,8 @@ #include -/* -- Forward Declarations -- */ - -struct configuration_childs_cb_iterator_type; - -/* -- Type Definitions -- */ - -typedef struct configuration_childs_cb_iterator_type *configuration_childs_cb_iterator; - /* -- Member Data -- */ -struct configuration_childs_cb_iterator_type -{ - int result; - configuration parent; - vector childs; - set storage; -}; - struct configuration_type { char *name; @@ -45,28 +29,10 @@ struct configuration_type /* -- Private Methods -- */ -static int configuration_object_initialize_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - static char *configuration_object_read(const char *path); -static int configuration_object_childs_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - /* -- Methods -- */ -int configuration_object_initialize_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - set map = args; - - (void)s; - - if (key != NULL && val != NULL) - { - return set_insert(map, key, val); - } - - return 0; -} - char *configuration_object_read(const char *path) { FILE *file = fopen(path, "rb"); @@ -190,7 +156,12 @@ configuration configuration_object_initialize(const char *name, const char *path if (config->parent != NULL) { - set_iterate(config->parent->map, &configuration_object_initialize_cb_iterate, config->map); + set_iterator it; + + for (it = set_iterator_begin(config->parent->map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + set_insert(config->map, set_iterator_key(it), set_iterator_value(it)); + } } config->v = NULL; @@ -198,7 +169,7 @@ configuration configuration_object_initialize(const char *name, const char *path return config; } -int configuration_object_childs_cb_iterate_valid(set_key key, set_value val) +int configuration_object_childs_valid(set_key key, set_value val) { value v = val; @@ -243,50 +214,38 @@ int configuration_object_childs_cb_iterate_valid(set_key key, set_value val) return 1; } -int configuration_object_childs_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) +int configuration_object_childs(configuration config, vector childs, set storage) { - (void)s; + set_iterator it; - if (configuration_object_childs_cb_iterate_valid(key, val) == 0) + for (it = set_iterator_begin(config->map); set_iterator_end(&it) != 0; set_iterator_next(it)) { - configuration_childs_cb_iterator iterator = args; + set_key key = set_iterator_key(it); + set_value val = set_iterator_value(it); - if (set_get(iterator->storage, key) == NULL) + if (configuration_object_childs_valid(key, val) == 0) { - value v = val; + if (set_get(storage, key) == NULL) + { + value v = val; - const char *path = value_to_string(v); + const char *path = value_to_string(v); - configuration child = configuration_object_initialize(key, path, iterator->parent); + configuration child = configuration_object_initialize(key, path, config); - if (child == NULL) - { - iterator->result = 1; + if (child == NULL) + { + return 1; + } - return 1; + vector_push_back(childs, &child); } - - vector_push_back(iterator->childs, &child); } } return 0; } -int configuration_object_childs(configuration config, vector childs, set storage) -{ - struct configuration_childs_cb_iterator_type iterator; - - iterator.result = 0; - iterator.parent = config; - iterator.childs = childs; - iterator.storage = storage; - - set_iterate(config->map, &configuration_object_childs_cb_iterate, &iterator); - - return iterator.result; -} - void configuration_object_instantiate(configuration config, value v) { size_t index, size = value_type_count(v); diff --git a/source/configuration/source/configuration_singleton.c b/source/configuration/source/configuration_singleton.c index ea440cc7cd..8fdd0aeead 100644 --- a/source/configuration/source/configuration_singleton.c +++ b/source/configuration/source/configuration_singleton.c @@ -25,10 +25,6 @@ struct configuration_singleton_type configuration global; }; -/* -- Private Methods -- */ - -static int configuration_singleton_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - /* -- Member Data -- */ static struct configuration_singleton_type configuration_singleton_default = { @@ -115,22 +111,6 @@ int configuration_singleton_clear(configuration config) return 0; } -int configuration_singleton_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - configuration config = val; - - configuration_object_destroy(config); - } - - return 0; -} - void configuration_singleton_destroy(void) { configuration_singleton singleton = configuration_singleton_instance(); @@ -139,7 +119,14 @@ void configuration_singleton_destroy(void) if (singleton->scopes != NULL) { - set_iterate(singleton->scopes, &configuration_singleton_destroy_cb_iterate, NULL); + set_iterator it; + + for (it = set_iterator_begin(singleton->scopes); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + configuration config = set_iterator_value(it); + + configuration_object_destroy(config); + } set_destroy(singleton->scopes); diff --git a/source/loader/include/loader/loader.h b/source/loader/include/loader/loader.h index 441cc938ed..d209315391 100644 --- a/source/loader/include/loader/loader.h +++ b/source/loader/include/loader/loader.h @@ -41,8 +41,6 @@ struct loader_type; typedef value (*loader_register_invoke)(size_t, void *[], void *); -typedef void *loader_data; - typedef struct loader_type *loader; /* -- Methods -- */ @@ -77,7 +75,7 @@ LOADER_API int loader_load_from_configuration(const loader_path path, void **han LOADER_API loader_impl loader_get_impl(const loader_tag tag); -LOADER_API loader_data loader_get(const char *name); +LOADER_API value loader_get(const char *name); LOADER_API void *loader_get_handle(const loader_tag tag, const char *name); @@ -93,7 +91,7 @@ LOADER_API const char *loader_handle_id(void *handle); LOADER_API void *loader_handle_export(void *handle); -LOADER_API loader_data loader_handle_get(void *handle, const char *name); +LOADER_API value loader_handle_get(void *handle, const char *name); LOADER_API int loader_handle_populate(void *handle_dest, void *handle_src); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 0c055b01cb..156017d24e 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -46,26 +46,6 @@ #define LOADER_LIBRARY_PATH "LOADER_LIBRARY_PATH" #define LOADER_LIBRARY_DEFAULT_PATH "loaders" -/* -- Member Data -- */ - -struct loader_metadata_cb_iterator_type -{ - size_t iterator; - value *values; -}; - -struct loader_get_cb_iterator_type -{ - const char *name; - value obj; /* scope_object */ -}; - -/* -- Type Definitions -- */ - -typedef struct loader_get_cb_iterator_type *loader_get_cb_iterator; - -typedef struct loader_metadata_cb_iterator_type *loader_metadata_cb_iterator; - /* -- Private Methods -- */ static void loader_initialization_debug(void); @@ -76,10 +56,6 @@ static plugin loader_get_impl_plugin(const loader_tag tag); static plugin loader_get_impl_plugin_options(const loader_tag tag, value options); -static int loader_get_cb_iterate(plugin_manager manager, plugin p, void *data); - -static int loader_metadata_cb_iterate(plugin_manager manager, plugin p, void *data); - /* -- Member Data -- */ static plugin_manager_declare(loader_manager); @@ -560,35 +536,25 @@ int loader_load_from_configuration(const loader_path path, void **handle, void * return 0; } -int loader_get_cb_iterate(plugin_manager manager, plugin p, void *data) +value loader_get(const char *name) { - loader_impl impl = plugin_impl_type(p, loader_impl); - loader_get_cb_iterator get_iterator = data; + set_iterator it; - (void)manager; - - get_iterator->obj = loader_impl_get_value(impl, get_iterator->name); - - if (get_iterator->obj != NULL) + for (it = set_iterator_begin(loader_manager.plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) { - /* TODO: Disable logs here until log is completely thread safe and async signal safe */ - /* log_write("metacall", LOG_LEVEL_DEBUG, "Loader (%s) get value: %s <%p>", plugin_name(p), get_iterator->name, (void *)get_iterator->obj); */ - return 1; - } + plugin p = set_iterator_value(it); - return 0; -} + loader_impl impl = plugin_impl_type(p, loader_impl); -loader_data loader_get(const char *name) -{ - struct loader_get_cb_iterator_type get_iterator; + value scope_object = loader_impl_get_value(impl, name); - get_iterator.name = name; - get_iterator.obj = NULL; - - plugin_manager_iterate(&loader_manager, &loader_get_cb_iterate, (void *)&get_iterator); + if (scope_object != NULL) + { + return scope_object; + } + } - return (loader_data)get_iterator.obj; + return NULL; } void *loader_get_handle(const loader_tag tag, const char *name) @@ -662,7 +628,7 @@ value loader_handle_export(void *handle) return loader_impl_handle_export(handle); } -loader_data loader_handle_get(void *handle, const char *name) +value loader_handle_get(void *handle, const char *name) { if (handle != NULL) { @@ -710,37 +676,32 @@ value loader_metadata_impl(plugin p, loader_impl impl) return v; } -int loader_metadata_cb_iterate(plugin_manager manager, plugin p, void *data) -{ - loader_impl impl = plugin_impl_type(p, loader_impl); - loader_metadata_cb_iterator metadata_iterator = data; - - (void)manager; - - metadata_iterator->values[metadata_iterator->iterator] = loader_metadata_impl(p, impl); - - if (metadata_iterator->values[metadata_iterator->iterator] != NULL) - { - ++metadata_iterator->iterator; - } - - return 0; -} - value loader_metadata(void) { - struct loader_metadata_cb_iterator_type metadata_iterator; - value v = value_create_map(NULL, plugin_manager_size(&loader_manager)); + value *values, v = value_create_map(NULL, plugin_manager_size(&loader_manager)); + set_iterator it; + size_t values_it; if (v == NULL) { return NULL; } - metadata_iterator.iterator = 0; - metadata_iterator.values = value_to_map(v); + values = value_to_map(v); + + for (it = set_iterator_begin(loader_manager.plugins), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + { + plugin p = set_iterator_value(it); + + loader_impl impl = plugin_impl_type(p, loader_impl); + + values[values_it] = loader_metadata_impl(p, impl); - plugin_manager_iterate(&loader_manager, &loader_metadata_cb_iterate, (void *)&metadata_iterator); + if (values[values_it] != NULL) + { + ++values_it; + } + } return v; } diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index fc87cb0991..f069f3a587 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -65,18 +65,10 @@ struct loader_handle_impl_type; -struct loader_impl_metadata_cb_iterator_type; - -struct loader_impl_handle_register_cb_iterator_type; - /* -- Type Definitions -- */ typedef struct loader_handle_impl_type *loader_handle_impl; -typedef struct loader_impl_metadata_cb_iterator_type *loader_impl_metadata_cb_iterator; - -typedef struct loader_impl_handle_register_cb_iterator_type *loader_impl_handle_register_cb_iterator; - /* -- Member Data -- */ struct loader_impl_type @@ -109,18 +101,6 @@ struct loader_handle_impl_type vector populated_handles; /* Vector containing all the references to which this handle has been populated into, it is necessary for detach the symbols when destroying (used in load_from_* when passing an input parameter) */ }; -struct loader_impl_handle_register_cb_iterator_type -{ - context handle_ctx; - char *duplicated_key; -}; - -struct loader_impl_metadata_cb_iterator_type -{ - size_t iterator; - value *values; -}; - /* -- Private Methods -- */ static loader_impl loader_impl_allocate(const loader_tag tag); @@ -141,8 +121,6 @@ static loader_handle_impl loader_impl_load_handle(loader_impl impl, loader_impl_ static int loader_impl_handle_init(loader_impl impl, const char *path, loader_handle_impl handle_impl, void **handle_ptr, int populated); -static int loader_impl_handle_register_cb_iterate(plugin_manager manager, plugin p, void *data); - static int loader_impl_handle_register(plugin_manager manager, loader_impl impl, const char *path, loader_handle_impl handle_impl, void **handle_ptr); static size_t loader_impl_handle_name(plugin_manager manager, const loader_path path, loader_path result); @@ -155,12 +133,8 @@ static value loader_impl_metadata_handle_context(loader_handle_impl handle_impl) static value loader_impl_metadata_handle(loader_handle_impl handle_impl); -static int loader_impl_metadata_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - static void loader_impl_destroy_handle(loader_handle_impl handle_impl); -static int loader_impl_destroy_type_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - /* -- Private Member Data -- */ static const char loader_handle_impl_magic_alloc[] = "loader_handle_impl_magic_alloc"; @@ -520,59 +494,50 @@ int loader_impl_link(plugin p, loader_impl impl) we link the dependency with delay load linking. Before we execute anything, we should relink all the symbols to the host. */ -#if 0 // TODO - #if defined(WIN32) || defined(_WIN32) +#if defined(WIN32) || defined(_WIN32) || 1 // TODO: Remove this if (loader_impl_get_option_host(impl) == 1) { /* Replace loader symbols by the dependency (aka the already loaded library if the host is linked dynamically, or the executable if it is linked statically) */ - detour_handle loader_handle; - void *position = NULL; - char name[DETOUR_SYMBOL_SIZE]; - void *addr = NULL; - - loader_handle = detour_load_handle(impl->d, desc->handle); - + detour_handle loader_handle = detour_load_handle(impl->d, desc->handle); + if (loader_handle != NULL) { - set_iterator it; - size_t iterator; - - while (detour_enumerate(impl->d, loader_handle, &position, name, &addr)) + unsigned int position = 0; + const char *name = NULL; + void (**addr)(void) = NULL; + + while (detour_enumerate(impl->d, loader_handle, &position, &name, &addr) == 0) { /* Iterate through all library handles in the library map */ - it = set_iterator_begin(impl->library_map); - - for (iterator = 0; iterator < set_size(impl->library_map); ++iterator) + set_iterator it; + + for (it = set_iterator_begin(impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(it)) { dynlink library_handle = set_iterator_value(it); - void *symbol = NULL; - - if (library_handle != NULL) + + /* Try to find the symbols in the dependencies, do not use the + loader dynlink handle for this, it is included in the library map */ + if (library_handle != NULL && library_handle != desc->handle) { - if (dynlink_symbol(library_handle, name, &symbol) == 0) + dynlink_symbol_addr symbol = NULL; + + if (dynlink_symbol(library_handle, name, &symbol) == 0 && symbol != NULL) { - if (symbol != NULL) + if (detour_replace(impl->d, loader_handle, name, symbol, NULL) == 0) { - if (detour_replace(impl->d, loader_handle, name, symbol, NULL) == 0) - { - /* Symbol successfully replaced */ - - break; - } + /* Symbol successfully replaced */ + break; } } } - - it = set_iterator_next(it); } } - + detour_unload(impl->d, loader_handle); } } - #endif #endif /* Store itself in the library map along with the dependencies */ @@ -1040,36 +1005,29 @@ int loader_impl_handle_init(loader_impl impl, const char *path, loader_handle_im return result; } -int loader_impl_handle_register_cb_iterate(plugin_manager manager, plugin p, void *data) -{ - loader_impl impl = plugin_impl_type(p, loader_impl); - loader_impl_handle_register_cb_iterator iterator = (loader_impl_handle_register_cb_iterator)data; - - (void)manager; - - return (context_contains(impl->ctx, iterator->handle_ctx, &iterator->duplicated_key) == 0); -} - int loader_impl_handle_register(plugin_manager manager, loader_impl impl, const char *path, loader_handle_impl handle_impl, void **handle_ptr) { /* If there's no handle input/output pointer passed as input parameter, then propagate the handle symbols to the loader context */ if (handle_ptr == NULL) { - /* This case handles the global scope (shared scope between all loaders, there is no out reference to a handle) */ - struct loader_impl_handle_register_cb_iterator_type iterator; + set_iterator it; - iterator.handle_ctx = handle_impl->ctx; - iterator.duplicated_key = NULL; - - /* This checks if there are duplicated keys between all loaders and the current handle context */ - plugin_manager_iterate(manager, &loader_impl_handle_register_cb_iterate, &iterator); - - if (iterator.duplicated_key != NULL) + /* This case handles the global scope (shared scope between all loaders, there is no out reference to a handle) */ + for (it = set_iterator_begin(manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) { - log_write("metacall", LOG_LEVEL_ERROR, "Duplicated symbol found named '%s' already defined in the global scope by handle: %s", iterator.duplicated_key, path); - return 1; + plugin p = set_iterator_value(it); + loader_impl other_impl = plugin_impl_type(p, loader_impl); + char *duplicated_key = NULL; + + /* This checks if there are duplicated keys between all loaders and the current handle context */ + if (context_contains(other_impl->ctx, handle_impl->ctx, &duplicated_key) == 0 && duplicated_key != NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "Duplicated symbol found named '%s' already defined in the global scope by handle: %s", duplicated_key, path); + return 1; + } } - else if (context_append(impl->ctx, handle_impl->ctx) == 0) + + if (context_append(impl->ctx, handle_impl->ctx) == 0) { return loader_impl_handle_init(impl, path, handle_impl, handle_ptr, 0); } @@ -1748,38 +1706,30 @@ value loader_impl_metadata_handle(loader_handle_impl handle_impl) return v; } -int loader_impl_metadata_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - loader_impl_metadata_cb_iterator metadata_iterator = (loader_impl_metadata_cb_iterator)args; - - (void)s; - (void)key; - - metadata_iterator->values[metadata_iterator->iterator] = loader_impl_metadata_handle((loader_handle_impl)val); - - if (metadata_iterator->values[metadata_iterator->iterator] != NULL) - { - ++metadata_iterator->iterator; - } - - return 0; -} - value loader_impl_metadata(loader_impl impl) { - struct loader_impl_metadata_cb_iterator_type metadata_iterator; - - value v = value_create_array(NULL, set_size(impl->handle_impl_path_map)); + value *values, v = value_create_array(NULL, set_size(impl->handle_impl_path_map)); + set_iterator it; + size_t values_it; if (v == NULL) { return NULL; } - metadata_iterator.iterator = 0; - metadata_iterator.values = value_to_array(v); + values = value_to_map(v); + + for (it = set_iterator_begin(impl->handle_impl_path_map), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + { + loader_handle_impl handle_impl = set_iterator_value(it); + + values[values_it] = loader_impl_metadata_handle(handle_impl); - set_iterate(impl->handle_impl_path_map, &loader_impl_metadata_cb_iterate, (set_cb_iterate_args)&metadata_iterator); + if (values[values_it] != NULL) + { + ++values_it; + } + } return v; } @@ -1820,72 +1770,6 @@ int loader_impl_clear(void *handle) return 1; } -int loader_impl_destroy_type_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - type t = val; - - type_destroy(t); - - return 0; - } - - return 1; -} - -int loader_impl_destroy_exec_path_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - vector paths = val; - - vector_destroy(paths); - } - - return 0; -} - -int loader_impl_destroy_detour_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - - if (val != NULL && args != NULL) - { - detour d = args; - detour_handle handle = val; - - detour_unload(d, handle); - } - - return 0; -} - -int loader_impl_destroy_dependencies_map_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - dynlink dependency = val; - - dynlink_unload(dependency); - } - - return 0; -} - void loader_impl_destroy_objects(loader_impl impl) { /* This iterates through all functions, classes objects and types, @@ -1924,7 +1808,16 @@ void loader_impl_destroy_objects(loader_impl impl) set_destroy(impl->handle_impl_map); /* Destroy all the types */ - set_iterate(impl->type_info_map, &loader_impl_destroy_type_map_cb_iterate, NULL); + { + set_iterator it; + + for (it = set_iterator_begin(impl->type_info_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + type t = set_iterator_value(it); + + type_destroy(t); + } + } set_destroy(impl->type_info_map); } @@ -1932,19 +1825,34 @@ void loader_impl_destroy_objects(loader_impl impl) void loader_impl_destroy_deallocate(loader_impl impl) { - set_iterate(impl->exec_path_map, &loader_impl_destroy_exec_path_map_cb_iterate, NULL); + set_iterator it; + + /* Destroy execution path map */ + for (it = set_iterator_begin(impl->exec_path_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + vector paths = set_iterator_value(it); + + vector_destroy(paths); + } set_destroy(impl->exec_path_map); + /* Destroy context */ context_destroy(impl->ctx); + /* Destroy options */ if (impl->options != NULL) { value_type_destroy(impl->options); } /* Destroy detour map */ - set_iterate(impl->detour_map, &loader_impl_destroy_detour_map_cb_iterate, impl->d); + for (it = set_iterator_begin(impl->detour_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + detour_handle handle = set_iterator_value(it); + + detour_unload(impl->d, handle); + } set_destroy(impl->detour_map); @@ -1957,7 +1865,12 @@ void loader_impl_destroy_deallocate(loader_impl impl) this method still should work because normally those handles are reference counted and we increment the reference counter at the beginning, so they will be properly unloaded when the dynlink handle gets unloaded. */ - set_iterate(impl->library_map, &loader_impl_destroy_dependencies_map_cb_iterate, NULL); + for (it = set_iterator_begin(impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + dynlink dependency = set_iterator_value(it); + + dynlink_unload(dependency); + } set_destroy(impl->library_map); diff --git a/source/loaders/rb_loader/source/rb_loader_impl_parser.c b/source/loaders/rb_loader/source/rb_loader_impl_parser.c index 3f3759d01f..c8d9a3835e 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl_parser.c +++ b/source/loaders/rb_loader/source/rb_loader_impl_parser.c @@ -42,12 +42,6 @@ enum rb_loader_impl_comment_state rb_loader_impl_comment_state_multi_line_end }; -/* -- Private Methods -- */ - -static int rb_loader_impl_key_print_cb_iterate(set s, set_key key, set_value v, set_cb_iterate_args args); - -static int rb_loader_impl_key_clear_cb_iterate(set s, set_key key, set_value v, set_cb_iterate_args args); - /* -- Methods -- */ int rb_loader_impl_key_parse(const char *source, set function_map) @@ -396,53 +390,38 @@ int rb_loader_impl_key_parse(const char *source, set function_map) return 0; } -int rb_loader_impl_key_print_cb_iterate(set s, set_key key, set_value v, set_cb_iterate_args args) +void rb_loader_impl_key_print(set function_map) { - size_t parameter; + set_iterator it; - rb_function_parser function = v; + for (it = set_iterator_begin(function_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + size_t parameter; - (void)s; - (void)key; - (void)args; + rb_function_parser function = set_iterator_value(it); - log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader key parse function (%s)", function->name); + log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader key parse function (%s)", function->name); - for (parameter = 0; parameter < function->params_size; ++parameter) - { - log_write("metacall", LOG_LEVEL_DEBUG, " Ruby loader key parse parameter [%d] (%s : %s)", - function->params[parameter].index, - function->params[parameter].name, - function->params[parameter].type); + for (parameter = 0; parameter < function->params_size; ++parameter) + { + log_write("metacall", LOG_LEVEL_DEBUG, " Ruby loader key parse parameter [%d] (%s : %s)", + function->params[parameter].index, + function->params[parameter].name, + function->params[parameter].type); + } } - - return 0; } -void rb_loader_impl_key_print(set function_map) -{ - set_iterate(function_map, &rb_loader_impl_key_print_cb_iterate, NULL); -} - -int rb_loader_impl_key_clear_cb_iterate(set s, set_key key, set_value v, set_cb_iterate_args args) +void rb_loader_impl_key_clear(set function_map) { - rb_function_parser function = v; + set_iterator it; - (void)s; - (void)key; - (void)args; - - if (function != NULL) + for (it = set_iterator_begin(function_map); set_iterator_end(&it) != 0; set_iterator_next(it)) { + rb_function_parser function = set_iterator_value(it); + free(function); } - return 0; -} - -void rb_loader_impl_key_clear(set function_map) -{ - set_iterate(function_map, &rb_loader_impl_key_clear_cb_iterate, NULL); - set_destroy(function_map); } diff --git a/source/plugin/include/plugin/plugin_manager.h b/source/plugin/include/plugin/plugin_manager.h index 724db1c30a..a4340bb597 100644 --- a/source/plugin/include/plugin/plugin_manager.h +++ b/source/plugin/include/plugin/plugin_manager.h @@ -64,7 +64,7 @@ struct plugin_manager_type struct plugin_manager_interface_type { - int (*clear)(plugin_manager, plugin); /* Hook for clearing the plugin implementation */ + void (*clear)(plugin_manager, plugin); /* Hook for clearing the plugin implementation */ void (*destroy)(plugin_manager, void *); /* Hook for destroying the plugin manager implementation */ }; @@ -86,8 +86,6 @@ PLUGIN_API plugin plugin_manager_create(plugin_manager manager, const char *name PLUGIN_API plugin plugin_manager_get(plugin_manager manager, const char *name); -PLUGIN_API void plugin_manager_iterate(plugin_manager manager, int (*iterator)(plugin_manager, plugin, void *), void *data); - PLUGIN_API int plugin_manager_clear(plugin_manager manager, plugin p); PLUGIN_API void plugin_manager_destroy(plugin_manager manager); diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index 8f7f615a04..c222375430 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -34,20 +34,9 @@ #include /* SetDllDirectoryA */ #endif -/* -- Declarations -- */ - -struct plugin_manager_iterate_cb_type -{ - plugin_manager manager; - int (*iterator)(plugin_manager, plugin, void *); - void *data; -}; - /* -- Private Methods -- */ static int plugin_manager_unregister(plugin_manager manager, plugin p); -static int plugin_manager_iterate_cb(set s, set_key key, set_value val, set_cb_iterate_args args); -static int plugin_manager_destroy_cb(set s, set_key key, set_value val, set_cb_iterate_args args); /* -- Methods -- */ @@ -234,36 +223,6 @@ plugin plugin_manager_get(plugin_manager manager, const char *name) return set_get(manager->plugins, (set_key)name); } -int plugin_manager_iterate_cb(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - - if (val != NULL && args != NULL) - { - struct plugin_manager_iterate_cb_type *args_ptr = (struct plugin_manager_iterate_cb_type *)args; - return args_ptr->iterator(args_ptr->manager, (plugin)val, args_ptr->data); - } - - return 0; -} - -void plugin_manager_iterate(plugin_manager manager, int (*iterator)(plugin_manager, plugin, void *), void *data) -{ - if (iterator == NULL) - { - return; - } - - struct plugin_manager_iterate_cb_type args = { - manager, - iterator, - data - }; - - set_iterate(manager->plugins, &plugin_manager_iterate_cb, (void *)&args); -} - int plugin_manager_unregister(plugin_manager manager, plugin p) { const char *name = plugin_name(p); @@ -299,35 +258,6 @@ int plugin_manager_clear(plugin_manager manager, plugin p) return result; } -int plugin_manager_destroy_cb(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - int result = 0; - - (void)s; - (void)key; - - if (val != NULL) - { - plugin p = (plugin)val; - - if (args != NULL) - { - plugin_manager manager = (plugin_manager)args; - - if (manager->iface != NULL && manager->iface->clear != NULL) - { - /* Call to the clear method of the manager */ - result = manager->iface->clear(manager, p); - } - } - - /* Unload the dynamic link library and destroy the plugin */ - plugin_destroy(p); - } - - return result; -} - void plugin_manager_destroy(plugin_manager manager) { /* If there's a destroy callback, probably the plugin manager needs a complex destroy algorithm */ @@ -340,7 +270,21 @@ void plugin_manager_destroy(plugin_manager manager) * plugin set and this will do nothing if the set has been emptied before with plugin_manager_clear */ if (manager->plugins != NULL) { - set_iterate(manager->plugins, &plugin_manager_destroy_cb, NULL); + set_iterator it; + + for (it = set_iterator_begin(manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + plugin p = set_iterator_value(it); + + if (manager->iface != NULL && manager->iface->clear != NULL) + { + /* Call to the clear method of the manager */ + manager->iface->clear(manager, p); + } + + /* Unload the dynamic link library and destroy the plugin */ + plugin_destroy(p); + } } /* Clear the name */ diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index c0f35f6e02..e54239a020 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -50,28 +50,17 @@ struct class_type set static_attributes; }; -struct class_metadata_iterator_args_type -{ - value v; - size_t count; -}; - -typedef struct class_metadata_iterator_args_type *class_metadata_iterator_args; - reflect_memory_tracker(class_stats); static value class_metadata_name(klass cls); static value class_metadata_constructors(klass cls); -static int class_metadata_methods_impl_cb_iterate(map m, map_key key, map_value val, map_cb_iterate_args args); static value class_metadata_methods_impl(const char name[], size_t size, map methods); static value class_metadata_methods(klass cls); static value class_metadata_static_methods(klass cls); -static int class_metadata_attributes_impl_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); static value class_metadata_attributes_impl(const char name[], size_t size, set attributes); static value class_metadata_attributes(klass cls); static value class_metadata_static_attributes(klass cls); static method class_get_method_type_safe(vector v, type_id ret, type_id args[], size_t size); -static int class_attributes_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); static void class_constructors_destroy(klass cls); klass class_create(const char *name, enum accessor_type_id accessor, class_impl impl, class_impl_interface_singleton singleton) @@ -266,7 +255,7 @@ value class_metadata_methods_impl(const char name[], size_t size, map methods) value v = value_create_array(NULL, 2); value *v_array; map_iterator it; - size_t count = 0; + size_t count; if (v == NULL) { @@ -288,11 +277,11 @@ value class_metadata_methods_impl(const char name[], size_t size, map methods) goto error_value; } - for (it = map_iterator_begin(methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + for (it = map_iterator_begin(methods), count = 0; map_iterator_end(&it) != 0; map_iterator_next(it)) { value *method_array = value_to_array(v_array[1]); - method_array[count++] = method_metadata((method)map_iterator_get_value(it)); + method_array[count++] = method_metadata((method)map_iterator_value(it)); } return v; @@ -313,23 +302,12 @@ value class_metadata_static_methods(klass cls) return class_metadata_methods_impl(name, sizeof(name), cls->static_methods); } -int class_metadata_attributes_impl_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - class_metadata_iterator_args iterator = (class_metadata_iterator_args)args; - value *v_array = value_to_array(iterator->v); - - (void)s; - (void)key; - - v_array[iterator->count++] = attribute_metadata((attribute)val); - - return 0; -} - value class_metadata_attributes_impl(const char name[], size_t size, set attributes) { value v = value_create_array(NULL, 2); value *v_array; + set_iterator it; + size_t count; if (v == NULL) { @@ -351,12 +329,12 @@ value class_metadata_attributes_impl(const char name[], size_t size, set attribu goto error_value; } - struct class_metadata_iterator_args_type iterator; - - iterator.v = v_array[1]; - iterator.count = 0; + for (it = set_iterator_begin(attributes), count = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + { + value *attribute_array = value_to_array(v_array[1]); - set_iterate(attributes, &class_metadata_attributes_impl_cb_iterate, &iterator); + attribute_array[count++] = attribute_metadata(set_iterator_value(it)); + } return v; error_value: @@ -779,22 +757,6 @@ value class_static_await(klass cls, method m, class_args args, size_t size, clas return NULL; } -int class_attributes_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - attribute attr = val; - - attribute_destroy(attr); - } - - return 0; -} - void class_constructors_destroy(klass cls) { size_t iterator, size = vector_size(cls->constructors); @@ -823,8 +785,6 @@ void class_destroy(klass cls) if (threading_atomic_ref_count_load(&cls->ref) == 0) { - map_iterator it; - /* TODO: Disable logs here until log is completely thread safe and async signal safe */ /* @@ -840,17 +800,34 @@ void class_destroy(klass cls) class_constructors_destroy(cls); - set_iterate(cls->attributes, &class_attributes_destroy_cb_iterate, NULL); - set_iterate(cls->static_attributes, &class_attributes_destroy_cb_iterate, NULL); - - for (it = map_iterator_begin(cls->methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + /* Destroy attributes */ { - method_destroy((method)map_iterator_get_value(it)); + set_iterator it; + + for (it = set_iterator_begin(cls->attributes); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + attribute_destroy(set_iterator_value(it)); + } + + for (it = set_iterator_begin(cls->static_attributes); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + attribute_destroy(set_iterator_value(it)); + } } - for (it = map_iterator_begin(cls->static_methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + /* Destroy methods */ { - method_destroy((method)map_iterator_get_value(it)); + map_iterator it; + + for (it = map_iterator_begin(cls->methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + method_destroy(map_iterator_value(it)); + } + + for (it = map_iterator_begin(cls->static_methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + { + method_destroy(map_iterator_value(it)); + } } if (cls->interface != NULL && cls->interface->destroy != NULL) diff --git a/source/reflect/source/reflect_scope.c b/source/reflect/source/reflect_scope.c index 3942bb8eed..c030c3e37f 100644 --- a/source/reflect/source/reflect_scope.c +++ b/source/reflect/source/reflect_scope.c @@ -30,14 +30,6 @@ #include #include -struct scope_metadata_array_cb_iterator_type; - -struct scope_export_cb_iterator_type; - -typedef struct scope_metadata_array_cb_iterator_type *scope_metadata_array_cb_iterator; - -typedef struct scope_export_cb_iterator_type *scope_export_cb_iterator; - struct scope_type { char *name; /**< Scope name */ @@ -45,32 +37,11 @@ struct scope_type vector call_stack; /**< Scope call stack */ }; -struct scope_metadata_array_cb_iterator_type -{ - value *functions; - value *classes; - value *objects; - - size_t functions_size; - size_t classes_size; - size_t objects_size; -}; - -struct scope_export_cb_iterator_type -{ - size_t iterator; - value *values; -}; - -static int scope_metadata_array_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - -static int scope_export_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); - static int scope_metadata_array(scope sp, value v_array[3]); static value scope_metadata_name(scope sp); -static int scope_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args); +static value scope_export_value(const char *key, value val); scope scope_create(const char *name) { @@ -193,106 +164,94 @@ int scope_define(scope sp, const char *key, value val) return 1; } -int scope_metadata_array_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) +int scope_metadata_array(scope sp, value v_array[3]) { - scope_metadata_array_cb_iterator metadata_iterator = (scope_metadata_array_cb_iterator)args; + size_t functions_size = 0, classes_size = 0, objects_size = 0; + value functions_value, classes_value, objects_value; + value *functions, *classes, *objects; + set_iterator it; - (void)s; - (void)key; - - type_id id = value_type_id(val); - - if (id == TYPE_FUNCTION) + for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) { - metadata_iterator->functions[metadata_iterator->functions_size++] = function_metadata(value_to_function(val)); - } - else if (id == TYPE_CLASS) - { - metadata_iterator->classes[metadata_iterator->classes_size++] = class_metadata(value_to_class(val)); - } - else if (id == TYPE_OBJECT) - { - metadata_iterator->objects[metadata_iterator->objects_size++] = object_metadata(value_to_object(val)); - } - - return 0; -} - -int scope_metadata_array_cb_iterate_counter(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - scope_metadata_array_cb_iterator metadata_iterator = (scope_metadata_array_cb_iterator)args; - - (void)s; - (void)key; - - type_id id = value_type_id(val); + type_id id = value_type_id(set_iterator_value(it)); - if (id == TYPE_FUNCTION) - { - metadata_iterator->functions_size++; - } - else if (id == TYPE_CLASS) - { - metadata_iterator->classes_size++; - } - else if (id == TYPE_OBJECT) - { - metadata_iterator->objects_size++; + if (id == TYPE_FUNCTION) + { + functions_size++; + } + else if (id == TYPE_CLASS) + { + classes_size++; + } + else if (id == TYPE_OBJECT) + { + objects_size++; + } } - return 0; -} - -int scope_metadata_array(scope sp, value v_array[3]) -{ - struct scope_metadata_array_cb_iterator_type metadata_iterator = { - NULL, NULL, NULL, 0, 0, 0 - }; + functions_value = value_create_array(NULL, functions_size); - set_iterate(sp->objects, &scope_metadata_array_cb_iterate_counter, (set_cb_iterate_args)&metadata_iterator); - - value functions_val = value_create_array(NULL, metadata_iterator.functions_size); - - if (functions_val == NULL) + if (functions_value == NULL) { - return 1; + goto functions_error; } - metadata_iterator.functions = value_to_array(functions_val); + functions = value_to_array(functions_value); - value classes_val = value_create_array(NULL, metadata_iterator.classes_size); + classes_value = value_create_array(NULL, classes_size); - if (classes_val == NULL) + if (classes_value == NULL) { - value_destroy(functions_val); - return 1; + goto classes_error; } - metadata_iterator.classes = value_to_array(classes_val); + classes = value_to_array(classes_value); - value objects_val = value_create_array(NULL, metadata_iterator.objects_size); + objects_value = value_create_array(NULL, objects_size); - if (objects_val == NULL) + if (objects_value == NULL) { - value_destroy(functions_val); - value_destroy(classes_val); - return 1; + goto objects_error; } - metadata_iterator.objects = value_to_array(objects_val); + objects = value_to_array(objects_value); /* Reuse counters to fill the arrays */ - metadata_iterator.classes_size = 0; - metadata_iterator.functions_size = 0; - metadata_iterator.objects_size = 0; + classes_size = 0; + functions_size = 0; + objects_size = 0; + + for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + value v = set_iterator_value(it); + type_id id = value_type_id(v); - set_iterate(sp->objects, &scope_metadata_array_cb_iterate, (set_cb_iterate_args)&metadata_iterator); + if (id == TYPE_FUNCTION) + { + functions[functions_size++] = function_metadata(value_to_function(v)); + } + else if (id == TYPE_CLASS) + { + classes[classes_size++] = class_metadata(value_to_class(v)); + } + else if (id == TYPE_OBJECT) + { + objects[objects_size++] = object_metadata(value_to_object(v)); + } + } - v_array[0] = functions_val; - v_array[1] = classes_val; - v_array[2] = objects_val; + v_array[0] = functions_value; + v_array[1] = classes_value; + v_array[2] = objects_value; return 0; + +objects_error: + value_destroy(classes_value); +classes_error: + value_destroy(functions_value); +functions_error: + return 1; } value scope_metadata_name(scope sp) @@ -379,62 +338,60 @@ value scope_metadata(scope sp) return v; } -int scope_export_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) +value scope_export_value(const char *key, value val) { - scope_export_cb_iterator export_iterator = (scope_export_cb_iterator)args; - - const char *key_str = (const char *)key; - value *v_array, v = value_create_array(NULL, 2); - (void)s; - if (v == NULL) { - return 0; + goto array_create_error; } v_array = value_to_array(v); - v_array[0] = value_create_string(key_str, strlen(key_str)); + v_array[0] = value_create_string(key, strlen(key)); if (v_array[0] == NULL) { - value_type_destroy(v); - - return 0; + goto string_create_error; } v_array[1] = value_type_copy(val); if (v_array[1] == NULL) { - value_type_destroy(v); - - return 0; + goto value_copy_error; } - export_iterator->values[export_iterator->iterator] = v; - ++export_iterator->iterator; + return v; - return 0; +value_copy_error: + value_type_destroy(v_array[0]); +string_create_error: + value_type_destroy(v); +array_create_error: + return NULL; } value scope_export(scope sp) { - struct scope_export_cb_iterator_type export_iterator; - - value export = value_create_map(NULL, scope_size(sp)); + value *values, export = value_create_map(NULL, scope_size(sp)); + size_t values_it; + set_iterator it; if (export == NULL) { return NULL; } - export_iterator.iterator = 0; - export_iterator.values = value_to_map(export); + values = value_to_map(export); - set_iterate(sp->objects, &scope_export_cb_iterate, (set_cb_iterate_args)&export_iterator); + for (it = set_iterator_begin(sp->objects), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + { + value v = scope_export_value(set_iterator_key(it), set_iterator_value(it)); + + values[values_it++] = v; + } return export; } @@ -592,27 +549,16 @@ int scope_stack_pop(scope sp) return 1; } -int scope_destroy_cb_iterate(set s, set_key key, set_value val, set_cb_iterate_args args) -{ - (void)s; - (void)key; - (void)args; - - if (val != NULL) - { - value_type_destroy(val); - - return 0; - } - - return 1; -} - void scope_destroy(scope sp) { if (sp != NULL) { - set_iterate(sp->objects, &scope_destroy_cb_iterate, NULL); + set_iterator it; + + for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) + { + value_type_destroy(set_iterator_value(it)); + } set_destroy(sp->objects); diff --git a/source/tests/adt_map_test/source/adt_map_test.cpp b/source/tests/adt_map_test/source/adt_map_test.cpp index 5e6e76fc76..74498fe4c7 100644 --- a/source/tests/adt_map_test/source/adt_map_test.cpp +++ b/source/tests/adt_map_test/source/adt_map_test.cpp @@ -119,8 +119,8 @@ TEST_F(adt_map_test, map_int) for (map_iterator it = map_iterator_begin(m); map_iterator_end(&it) != 0; map_iterator_next(it)) { - char *key = (char *)map_iterator_get_key(it); - int *value = (int *)map_iterator_get_value(it); + char *key = (char *)map_iterator_key(it); + int *value = (int *)map_iterator_value(it); log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); diff --git a/source/tests/adt_set_test/source/adt_set_test.cpp b/source/tests/adt_set_test/source/adt_set_test.cpp index 4290739990..3747f5165d 100644 --- a/source/tests/adt_set_test/source/adt_set_test.cpp +++ b/source/tests/adt_set_test/source/adt_set_test.cpp @@ -129,8 +129,8 @@ TEST_F(adt_set_test, DefaultConstructor) for (set_iterator it = set_iterator_begin(s); set_iterator_end(&it) != 0; set_iterator_next(it)) { - char *key = (char *)set_iterator_get_key(it); - int *value = (int *)set_iterator_get_value(it); + char *key = (char *)set_iterator_key(it); + int *value = (int *)set_iterator_value(it); log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); From 35aea2b47ea1193ce6fb0a99c0d58749197c4645 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 9 May 2025 17:51:37 +0200 Subject: [PATCH 150/364] Added loongarch64, windows working well, add doc for architectures. --- .github/workflows/docker-hub.yml | 4 ++-- docs/README.md | 24 ++++++++++++------------ source/loader/source/loader_impl.c | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 2cbe1634d1..fbb8790143 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -24,7 +24,6 @@ env: # TODO: Not tested or no hooking support # - linux/mips64le # - linux/mips64 - # - linux/loong64 PLATFORM_LIST: > [ "linux/amd64", @@ -35,7 +34,8 @@ env: "linux/riscv64", "linux/ppc64le", "linux/arm/v7", - "linux/arm/v6" + "linux/arm/v6", + "linux/loong64" ] jobs: diff --git a/docs/README.md b/docs/README.md index 3c348b9f8a..c93a231880 100644 --- a/docs/README.md +++ b/docs/README.md @@ -116,7 +116,7 @@ This section describes all programming languages that **METACALL** allows to loa | [Java](https://www.java.com) | [JVM](https://en.wikipedia.org/wiki/Java_virtual_machine) | **>=11** | java | | [WebAssembly](https://webassembly.org/) | [Wasmtime](https://github.com/bytecodealliance/wasmtime) | **>= 0.27 <= 8.0.1** | wasm | | [C]() | [libclang](https://clang.llvm.org/doxygen/group__CINDEX.html) - [Tiny C Compiler](https://bellard.org/tcc/) - [libffi](http://sourceware.org/libffi/) | **>=12** - **>=2021-10-30** - **>=3.2** | c | -| [Rust](https://www.rust-lang.org/) | [rustc](https://doc.rust-lang.org/rustc/what-is-rustc.html) - [libffi](http://sourceware.org/libffi/) | **nightly-2021-12-04** | rs | +| [Rust](https://www.rust-lang.org/) | [rustc](https://doc.rust-lang.org/rustc/what-is-rustc.html) - [libffi](http://sourceware.org/libffi/) | **nightly-2021-12-04** | rs | - Languages and run-times under construction: @@ -663,11 +663,11 @@ It is possible to enable or disable concrete loaders, script, ports, serials or | Build Option Prefix | Build Option Suffix | | :-----------------------: | --------------------------------------------------------------------- | -| **OPTION*BUILD_LOADERS*** | `C` `JS` `CS` `MOCK` `PY` `JSM` `NODE` `RB` `FILE` | -| **OPTION*BUILD_SCRIPTS*** | `C` `CS` `JS` `NODE` `PY` `RB` `JAVA` | -| **OPTION*BUILD_SERIALS*** | `METACALL` `RAPID_JSON` | -| **OPTION*BUILD_DETOURS*** | `PLTHOOK` | -| **OPTION*BUILD_PORTS*** | `CS` `CXX` `D` `GO` `JAVA` `JS` `LUA` `NODE` `PHP` `PL` `PY` `R` `RB` | +| **OPTION_BUILD_LOADERS_*** | `C` `JS` `CS` `MOCK` `PY` `JSM` `NODE` `RB` `FILE` | +| **OPTION_BUILD_SCRIPTS_*** | `C` `CS` `JS` `NODE` `PY` `RB` `JAVA` | +| **OPTION_BUILD_SERIALS_*** | `METACALL` `RAPID_JSON` | +| **OPTION_BUILD_DETOURS_*** | `PLTHOOK` | +| **OPTION_BUILD_PORTS_*** | `CS` `CXX` `D` `GO` `JAVA` `JS` `LUA` `NODE` `PHP` `PL` `PY` `R` `RB` | To format the entire C/C++ codebase use: @@ -740,12 +740,12 @@ Click the button below. A workspace with all required environments will be creat The following platforms and architectures have been tested and are known to work correctly with all plugins of **METACALL**. -| Operative System | Architecture | Compiler | -| :--------------: | :-----------------: | :---------: | -| **`ubuntu`** | **`amd64`** | **`gcc`** | -| **`debian`** | **`amd64`** | **`gcc`** | -| **`debian`** | **`amd64`** | **`clang`** | -| **`windows`** | **`x86`** **`x64`** | **`msvc`** | +| Operative System | Architecture | Compiler | +| :--------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :---------: | +| **`ubuntu`** | **`amd64`** | **`gcc`** | +| **`debian`** | **`amd64`** **`amd64/v2`** **`amd64/v3`** **`386`** **`arm64`** **`riscv64`** **`ppc64le`** **`arm/v7`** **`arm/v6`** **`loong64`** | **`gcc`** | +| **`macos`** | **`amd64`** **`arm64`** | **`clang`** | +| **`windows`** | **`x86`** **`x64`** | **`msvc`** | ### 7.1 Docker Support diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index f069f3a587..c47db9e273 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -494,7 +494,7 @@ int loader_impl_link(plugin p, loader_impl impl) we link the dependency with delay load linking. Before we execute anything, we should relink all the symbols to the host. */ -#if defined(WIN32) || defined(_WIN32) || 1 // TODO: Remove this +#if defined(WIN32) || defined(_WIN32) if (loader_impl_get_option_host(impl) == 1) { /* Replace loader symbols by the dependency (aka the already loaded From 93aa42db905995fb4549dcd122302d5efbefac51 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 14 May 2025 17:56:24 +0200 Subject: [PATCH 151/364] Trying to solve issues with loongarch64. --- .github/workflows/docker-hub.yml | 2 +- docker-compose.sh | 6 ++++++ .../source/metacall_node_python_ruby_test.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index fbb8790143..c4952c9c4e 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -21,7 +21,7 @@ env: # TODO: Tests failing # - linux/s390x - # TODO: Not tested or no hooking support + # TODO: Not tested or detour not supported # - linux/mips64le # - linux/mips64 PLATFORM_LIST: > diff --git a/docker-compose.sh b/docker-compose.sh index f2f134230d..b10ebaa4c4 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -206,6 +206,12 @@ sub_platform() { exit 1 fi + # Debian in Docker Hub does not support LoongArch64 yet, let's use official LoongArch repository instead + if [ "$METACALL_PLATFORM" = "linux/loong64" ]; then + source .env + export METACALL_BASE_IMAGE="ghcr.io/loong64/${METACALL_BASE_IMAGE}" + fi + ln -sf tools/deps/.dockerignore .dockerignore $DOCKER_COMPOSE -f docker-compose.yml -f docker-compose.platform.yml build deps diff --git a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp index 0ba5f3ba36..0cf822240f 100644 --- a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp +++ b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp @@ -86,7 +86,7 @@ TEST_F(metacall_node_python_ruby_test, DefaultConstructor) "module.exports = {\n" " test: async function () {\n" " try {\n" - " const result = fetch('http://github.com/service/https://www.google.com/');\n" + " const result = fetch('http://github.com/service/https://www.google.com/', { signal: AbortSignal.timeout(30000) });\n" " console.log(result);\n" " return true;\n" " } catch (e) {\n" From 2b3651136f64d914ef5525ff19f19d5700ec9c6a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 15 May 2025 19:32:58 +0200 Subject: [PATCH 152/364] Solve issues in macos node port executable. --- source/portability/source/portability_library_path.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 10e3ad64bd..25cad4a328 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -190,7 +190,8 @@ int portability_library_path_find(const char name[], portability_library_path_st memcpy(path, dylib_suffix, sizeof(dylib_suffix)); } - for (image_index = 0; image_index < size; ++image_index) + /* Start from 1 so we avoid the executable itself */ + for (image_index = 1; image_index < size; ++image_index) { const char *image_name = _dyld_get_image_name(image_index); @@ -242,7 +243,8 @@ int portability_library_path_list(portability_library_path_list_cb callback, voi { uint32_t iterator, size = _dyld_image_count(); - for (iterator = 0; iterator < size; ++iterator) + /* Start from 1 so we avoid the executable itself */ + for (iterator = 1; iterator < size; ++iterator) { const char *image_name = _dyld_get_image_name(iterator); From 5a4adc530134343ab00ad13c1c876b580d51bd55 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 16 May 2025 17:16:43 +0200 Subject: [PATCH 153/364] Trying to solve issues of dockerhub multi arch builds. --- .github/workflows/docker-hub.yml | 8 ++++---- docker-compose.sh | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index c4952c9c4e..907dc9ba32 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -21,7 +21,7 @@ env: # TODO: Tests failing # - linux/s390x - # TODO: Not tested or detour not supported + # TODO: Detour not supported, needs to patch GOT instead of PLT # - linux/mips64le # - linux/mips64 PLATFORM_LIST: > @@ -98,9 +98,9 @@ jobs: DOCKER_BUILDKIT: 1 run: | set -exuo pipefail - docker image inspect ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli --format='{{.Os}}/{{.Architecture}}' + docker image inspect ${DOCKER_USERNAME}/${IMAGE_NAME}:cli --format='{{.Os}}/{{.Architecture}}' cat < Dockerfile.test - FROM ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:cli + FROM ${DOCKER_USERNAME}/${IMAGE_NAME}:cli RUN apt-get update && apt-get install -y file RUN file /usr/local/bin/metacallcli && ldd /usr/local/bin/metacallcli RUN echo "console.log('0123456789abcdef')" > script.js @@ -117,7 +117,7 @@ jobs: platform_tag=$(echo "${{ matrix.platform }}" | tr '/' '-') for tag in "deps" "dev" "runtime" "cli"; do docker tag \ - ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} \ + ${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} \ ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag} echo "Pushing image for tag: ${tag} with platform: ${platform_tag}" diff --git a/docker-compose.sh b/docker-compose.sh index b10ebaa4c4..4759e59c1f 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -206,23 +206,33 @@ sub_platform() { exit 1 fi + # Initialize QEMU for Buildkit + docker run --rm --privileged tonistiigi/binfmt --install all + # Debian in Docker Hub does not support LoongArch64 yet, let's use official LoongArch repository instead if [ "$METACALL_PLATFORM" = "linux/loong64" ]; then source .env export METACALL_BASE_IMAGE="ghcr.io/loong64/${METACALL_BASE_IMAGE}" fi + # Generate the docker compose file with all .env variables substituted (bake seems not to support this) + $DOCKER_COMPOSE config &> docker-compose.bake.yml + + # Build with Bake, so the image can be loaded into local docker context ln -sf tools/deps/.dockerignore .dockerignore - $DOCKER_COMPOSE -f docker-compose.yml -f docker-compose.platform.yml build deps + docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load deps ln -sf tools/dev/.dockerignore .dockerignore - $DOCKER_COMPOSE -f docker-compose.yml -f docker-compose.platform.yml build dev + docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load dev ln -sf tools/runtime/.dockerignore .dockerignore - $DOCKER_COMPOSE -f docker-compose.yml -f docker-compose.platform.yml build runtime + docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load runtime ln -sf tools/cli/.dockerignore .dockerignore - $DOCKER_COMPOSE -f docker-compose.yml -f docker-compose.platform.yml build cli + docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load cli + + # Delete temporal docker compose file + rm -rf docker-compose.bake.yml } # Push MetaCall Docker Compose From 4d67638ddfc1c60cccbc1f8f85d0df21d41a7f81 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 16 May 2025 18:00:16 +0200 Subject: [PATCH 154/364] Add base for python.exe support in python loader and port. --- source/configuration/CMakeLists.txt | 4 + source/loaders/py_loader/CMakeLists.txt | 44 +++- .../include/py_loader/py_loader_port.h | 6 +- .../loaders/py_loader/source/py_loader_impl.c | 38 +-- .../loaders/py_loader/source/py_loader_port.c | 43 +-- source/ports/py_port/helper.py | 240 ----------------- source/ports/py_port/helper/__init__.py | 245 ------------------ source/ports/py_port/metacall/api.py | 103 ++++++-- source/ports/py_port/metacall/module_linux.py | 54 ---- source/ports/py_port/metacall/module_win32.py | 82 ------ source/ports/py_port/setup.py | 79 ------ .../CMakeLists.txt | 43 +++ .../data/configurations/py_loader.json.in | 5 +- .../metacall_python_port_test/CMakeLists.txt | 10 +- 14 files changed, 220 insertions(+), 776 deletions(-) delete mode 100644 source/ports/py_port/helper.py delete mode 100644 source/ports/py_port/helper/__init__.py delete mode 100644 source/ports/py_port/metacall/module_linux.py delete mode 100644 source/ports/py_port/metacall/module_win32.py diff --git a/source/configuration/CMakeLists.txt b/source/configuration/CMakeLists.txt index 4097b1d549..4e3405db3a 100644 --- a/source/configuration/CMakeLists.txt +++ b/source/configuration/CMakeLists.txt @@ -191,6 +191,10 @@ function(configurations_write config_dir config_path) set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"node_loader\":\"${config_dir}/node_loader.json\",") endif() + if(OPTION_BUILD_LOADERS_PY) + set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"py_loader\":\"${config_dir}/py_loader.json\",") + endif() + #if(OPTION_BUILD_LOADERS_JS) # set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"js_loader\":\"${config_dir}/js_loader.json\",") #endif() diff --git a/source/loaders/py_loader/CMakeLists.txt b/source/loaders/py_loader/CMakeLists.txt index b2957ff0fe..90c6504904 100644 --- a/source/loaders/py_loader/CMakeLists.txt +++ b/source/loaders/py_loader/CMakeLists.txt @@ -33,20 +33,22 @@ if(PROJECT_OS_FAMILY STREQUAL win32 AND Python3_LIBRARIES AND Python3_ROOT_DIR A # Get the library name get_filename_component(LIB_NAME "${LIB_PATH}" NAME) # Find the library in the Python3 root path - find_file(Python3_LIBRARY_NAME ${LIB_NAME} + find_file(Python3_LIBRARY_NAME_PATH ${LIB_NAME} PATHS ${Python3_ROOT_DIR} NO_DEFAULT_PATH ) - if(Python3_LIBRARY_NAME) + if(Python3_LIBRARY_NAME_PATH) break() endif() endif() endforeach() endif() -if(Python3_LIBRARY_NAME) +if(Python3_LIBRARY_NAME_PATH) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}) - file(COPY "${Python3_LIBRARY_NAME}" DESTINATION ${PROJECT_OUTPUT_DIR}) + file(COPY "${Python3_LIBRARY_NAME_PATH}" DESTINATION ${PROJECT_OUTPUT_DIR}) +else() + set(Python3_LIBRARY_NAME_PATH "${Python3_LIBRARIES}") endif() # @@ -169,7 +171,10 @@ target_include_directories(${target} target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - ${Python3_LIBRARIES} # Python libraries + + # Delay load for MSVC + $<$:${Python3_LIBRARIES}> # Python library + $<$:delayimp> PUBLIC ${DEFAULT_LIBRARIES} @@ -183,7 +188,6 @@ target_link_libraries(${target} target_compile_definitions(${target} PRIVATE - PY_LOADER_PORT_NAME=$<$>:lib>py_loader$<$:d> PUBLIC $<$>:${target_upper}_STATIC_DEFINE> @@ -209,8 +213,12 @@ target_compile_options(${target} # Linker options # +get_filename_component(Python3_LIBRARY_NAME "${Python3_LIBRARY_NAME_PATH}" NAME) + target_link_options(${target} PRIVATE + $<$,$>:-Wl,-undefined,dynamic_lookup> + $<$:/DELAYLOAD:${Python3_LIBRARY_NAME}> PUBLIC ${DEFAULT_LINKER_OPTIONS} @@ -233,10 +241,30 @@ install(TARGETS ${target} # Runtime (pack Python DLL in windows) # TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies # TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da -if(Python3_LIBRARY_NAME) +set(Python3_LIBRARY_DEVELOPMENT "${Python3_LIBRARY_NAME_PATH}") + +if(Python3_LIBRARY_NAME_PATH AND PROJECT_OS_FAMILY STREQUAL win32) install(FILES - "${Python3_LIBRARY_NAME}" + "${Python3_LIBRARY_NAME_PATH}" DESTINATION ${INSTALL_LIB} COMPONENT runtime ) + + set(Python3_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${Python3_LIBRARY_NAME}") +else() + set(Python3_LIBRARY_INSTALL "${Python3_LIBRARY_NAME_PATH}") endif() + +# +# Configuration +# + +# Development +loader_configuration_begin(py_loader) +loader_configuration_deps(python "${Python3_LIBRARY_DEVELOPMENT}") +loader_configuartion_end_development() + +# Install +loader_configuration_begin(py_loader) +loader_configuration_deps(python "${Python3_LIBRARY_INSTALL}") +loader_configuartion_end_install() diff --git a/source/loaders/py_loader/include/py_loader/py_loader_port.h b/source/loaders/py_loader/include/py_loader/py_loader_port.h index 07dd6589f4..9cc66ed42a 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_port.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_port.h @@ -27,11 +27,7 @@ extern "C" { #endif -#define PY_LOADER_PORT_NAME_FUNC_IMPL_EXPAND(x) PyInit_##x -#define PY_LOADER_PORT_NAME_FUNC_IMPL(x) PY_LOADER_PORT_NAME_FUNC_IMPL_EXPAND(x) -#define PY_LOADER_PORT_NAME_FUNC PY_LOADER_PORT_NAME_FUNC_IMPL(PY_LOADER_PORT_NAME) - -PyMODINIT_FUNC PY_LOADER_PORT_NAME_FUNC(void); +int py_port_initialize(void); #ifdef __cplusplus } diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 32fedc6924..f73dbe9c3d 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -192,7 +192,7 @@ static void py_loader_impl_value_invoke_state_finalize(value v, void *data); static void py_loader_impl_value_ptr_finalize(value v, void *data); -static int py_loader_impl_finalize(loader_impl_py py_impl); +static int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl); static PyObject *py_loader_impl_load_from_memory_compile(loader_impl_py py_impl, const loader_name name, const char *buffer); @@ -2620,19 +2620,22 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi goto error_alloc_py_impl; } - Py_InitializeEx(0); - - if (Py_IsInitialized() == 0) + if (loader_impl_get_option_host(impl) == 0) { - goto error_init_py; - } + Py_InitializeEx(0); + + if (Py_IsInitialized() == 0) + { + goto error_init_py; + } #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 6 - if (PyEval_ThreadsInitialized() == 0) - { - PyEval_InitThreads(); - } + if (PyEval_ThreadsInitialized() == 0) + { + PyEval_InitThreads(); + } #endif + } /* Hook the deallocation of PyCFunction */ py_loader_impl_pycfunction_dealloc = PyCFunction_Type.tp_dealloc; @@ -2695,7 +2698,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi goto error_after_inspect; } - if (PY_LOADER_PORT_NAME_FUNC() == NULL) + if (py_port_initialize() != 0) { goto error_after_import; } @@ -2759,7 +2762,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #endif error_after_argv: error_after_sys_executable: - (void)py_loader_impl_finalize(py_impl); + (void)py_loader_impl_finalize(impl, py_impl); error_init_py: free(py_impl); error_alloc_py_impl: @@ -4140,7 +4143,7 @@ void py_loader_impl_sys_path_print(PyObject *sys_path_list) } #endif -int py_loader_impl_finalize(loader_impl_py py_impl) +int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl) { if (Py_IsInitialized() != 0) { @@ -4149,19 +4152,18 @@ int py_loader_impl_finalize(loader_impl_py py_impl) py_loader_impl_error_print(py_impl); } -#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 6 + if (loader_impl_get_option_host(impl) == 0) { +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 6 if (Py_FinalizeEx() != 0) { log_write("metacall", LOG_LEVEL_DEBUG, "Error when executing Py_FinalizeEx"); return 1; } - } #else - { Py_Finalize(); - } #endif + } } return 0; @@ -4225,7 +4227,7 @@ int py_loader_impl_destroy(loader_impl impl) } #endif - int result = py_loader_impl_finalize(py_impl); + int result = py_loader_impl_finalize(impl, py_impl); /* Unhook the deallocation of PyCFunction */ PyCFunction_Type.tp_dealloc = py_loader_impl_pycfunction_dealloc; diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index 3bece75cd4..fbf3b457cc 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -27,10 +27,6 @@ #include -#ifndef PY_LOADER_PORT_NAME - #error "The Python Loader Port must be defined" -#endif - static const loader_tag py_loader_tag = "py"; static PyObject *py_loader_port_none(void) @@ -955,26 +951,33 @@ static PyMethodDef metacall_methods[] = { { NULL, NULL, 0, NULL } }; -static struct PyModuleDef metacall_definition = { - PyModuleDef_HEAD_INIT, - "metacall", - "A library for providing inter-language foreign function interface calls.", - -1, - metacall_methods, - NULL, - NULL, - NULL, - NULL -}; - -PyMODINIT_FUNC PY_LOADER_PORT_NAME_FUNC(void) +int py_port_initialize(void) { - static PyObject *module = NULL; + static struct PyModuleDef metacall_definition = { + PyModuleDef_HEAD_INIT, + "py_port_impl_module", + "A library for providing inter-language foreign function interface calls.", + -1, + metacall_methods, + NULL, + NULL, + NULL, + NULL + }; + + PyObject *module = PyModule_Create(&metacall_definition); if (module == NULL) { - module = PyModule_Create(&metacall_definition); + return 1; + } + + PyObject *sys_modules = PyImport_GetModuleDict(); + + if (PyDict_SetItemString(sys_modules, metacall_definition.m_name, module) < 0) + { + return 1; } - return module; + return 0; } diff --git a/source/ports/py_port/helper.py b/source/ports/py_port/helper.py deleted file mode 100644 index 1a0a77df86..0000000000 --- a/source/ports/py_port/helper.py +++ /dev/null @@ -1,240 +0,0 @@ -import sys -import os -import re -import shutil -import tarfile -import subprocess - -import requests - - -def file_size(num, suffix='B'): - for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']: - if abs(num) < 1024.0: - return "%3.1f%s%s" % (num, unit, suffix) - num /= 1024.0 - return "%.1f%s%s" % (num, 'Yi', suffix) - - -def find_assets(patterns): - api_url = 'https://api.github.com/repos/metacall/core/releases/latest' - urls = [] - res = requests.get(api_url) - data = res.json() - data = [li['browser_download_url'] for li in data['assets']] - for p in patterns: - regex = re.compile(p) - urls.append(list(filter(regex.search, data))[0]) - return urls - - -def download(urls): - for url in urls: - filename = '/tmp/{}'.format(url.split("/")[-1]) - - if os.path.isfile(filename + '.tmp'): - os.remove(filename + '.tmp') - - with open(filename + '.tmp', 'wb') as file: - res = requests.get(url, stream=True) - total_length = res.headers.get('content-length') - - if total_length is None or int(total_length) < 4096: - print('Downloading {} from {}\n'.format(url.split("/")[-1], url)) - file.write(res.content) - else: - dl = 0 - total_length = int(total_length) - print('Downloading {} (total: {}) from {}\n'.format(url.split("/")[-1], total_length, url)) - for data in res.iter_content(chunk_size=4096): - dl += len(data) - file.write(data) - done = int(50 * dl / total_length) - sys.stdout.write("\r[%s%s]" % ('=' * done, ' ' * (50 - done))) - sys.stdout.write( - '\r[{}{}] - {}/{}'.format('=' * done, ' ' * (50 - done), - file_size(dl), file_size(total_length)) - ) - sys.stdout.flush() - print('\n') - - os.rename(filename + '.tmp', filename) - - -def unpack(files): - for filename in files: - filename = filename.split("/")[-1] - print('Extracting {} ...'.format(filename)) - with tarfile.open(filename) as file: - file.extractall() - - -def write_install_log(content): - with open('/tmp/mc-install.tmp', 'w') as logger: - logger.write('\n'.join(content)) - - shutil.move('/tmp/mc-install.tmp', '/usr/local/share/metacall/install') - - -def read_install_log(): - with open('/usr/local/share/metacall/install', 'r') as logger: - lines = logger.read().splitlines() - return lines - - -def overwrite(src, dest): - if os.path.isdir(src): - if not os.path.isdir(dest): - os.makedirs(dest) - files = os.listdir(src) - for file in files: - yield from overwrite(os.path.join(src, file), os.path.join(dest, file)) - else: - print('copying {} to {}'.format(src, dest)) - shutil.copyfile(src, dest) - yield str(dest) - - -def spawn(args): - process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output, error = process.communicate() - - return output, error, process.returncode - - -def pre_install(components): - download(['https://raw.githubusercontent.com/metacall/core/develop/tools/metacall-runtime.sh']) - args = ['bash', '/tmp/metacall-runtime.sh'] - args = args + components - subprocess.call(args) - - -def pre_install_prompt(): - - answers = {'yes': True, 'y': True, 'no': False, 'n': False} - components = ['python', 'ruby', 'netcore8', 'v8', 'nodejs', 'ports'] - args = [] - - try: - while True: - for component in components: - message = '''do you want to install {} (y/n)? '''.format(component) - sys.stdout.write(message) - choice = input().lower() - if choice in answers and answers[choice]: - args.append(component) - elif choice not in answers: - sys.stdout.write("Please respond with 'yes' or 'no' (or 'y' or 'n').\n") - exit(0) - if len(args) == 0: - exit(0) - pre_install(args) - break - - except KeyboardInterrupt: - exit(1) - - -def install(ignore=False): - if ignore is False: - if os.path.isfile('/usr/local/bin/metacallcli'): - print('MetaCall CLI is already installed') - exit(0) - pre_install_prompt() - - if os.getuid() != 0: - print('You need to have root privileges to run this script.') - exit(-1) - - os.chdir('/tmp/') - - docs = '' # link to documentation if this script failed to download the cli - - try: - - print('Searching for files ...') - - assets = find_assets([r'metacall-[0-9].[0-9].[0.9]-runtime.tar.gz', - r'metacall-[0-9].[0-9].[0.9]-examples.tar.gz']) - - missing_files = [file for file in assets if not os.path.isfile(file.split('/')[-1])] - - if len(missing_files) != 0: - download(missing_files) - - unpack(assets) - - write_install_log(list(overwrite('/tmp/usr/local/', '/usr/local/'))) - - print('\n') - - output, error, code = spawn(['ldconfig', '-n', '-v', '/usr/local/lib/']) - if code != 0: - print('Failed to install MetaCall\n{}\n' - 'please proceed with the manual installation. {}'.format(error.decode('utf-8'), docs)) - exit(1) - else: - print(output.decode('utf-8')) - - spawn(['chmod', '+x', '/usr/local/bin/metacallcli']) - - print('\nCleaning things up ...') - - shutil.rmtree('/tmp/usr') - for file in assets: - path = '/tmp/' + file.split('/')[-1] - if os.path.isfile(path): - os.remove(path) - - print('MetaCall CLI is successfully installed.') - - except ConnectionError: - print('Downloading process failed, please proceed with the manual installation. {}'.format(docs)) - except tarfile.ExtractError: - print('Extraction process failed, please proceed with the manual installation. {}'.format(docs)) - except KeyboardInterrupt: - print('\nCanceled by user.') - - -def update(): - install(ignore=True) - - -def uninstall(paths): - - for fp in paths: - if os.path.isfile(fp): - os.remove(fp) - - if os.path.isdir('/usr/local/share/metacall'): - shutil.rmtree('/usr/local/share/metacall') - - spawn(['ldconfig']) - - exit(0) - - -def uninstall_prompt(): - paths = read_install_log() - message = '''This action would remove:\n {} -* this action DOES NOT uninstall the python package, only MetaCall CLI and MetaCall libs -* for a complete uninstall you have to run metacall-uninstall && pip uninstall metacall -* (the order of execution is important) - -Proceed (y/n)? '''.format(''.join('''{}\n '''.format(l) for l in paths)) - - answers = {'yes': True, 'y': True, 'no': False, 'n': False} - - try: - while True: - sys.stdout.write(message) - choice = input().lower() - if choice in answers: - if answers[choice]: - uninstall(paths) - else: - exit(0) - else: - sys.stdout.write("Please respond with 'yes' or 'no' (or 'y' or 'n').\n") - except KeyboardInterrupt: - exit(1) \ No newline at end of file diff --git a/source/ports/py_port/helper/__init__.py b/source/ports/py_port/helper/__init__.py deleted file mode 100644 index 3534e2a450..0000000000 --- a/source/ports/py_port/helper/__init__.py +++ /dev/null @@ -1,245 +0,0 @@ -#!/usr/bin/env python3 - -# MetaCall Python Port by Parra Studios -# A frontend for Python language bindings in MetaCall. -# -# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# TODO: Update to the new install / distributable tarballs - -import sys -import os -import re -import shutil -import tarfile -import subprocess -import requests - -def file_size(num, suffix='B'): - for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']: - if abs(num) < 1024.0: - return "%3.1f%s%s" % (num, unit, suffix) - num /= 1024.0 - return "%.1f%s%s" % (num, 'Yi', suffix) - -def find_assets(patterns): - api_url = 'https://api.github.com/repos/metacall/core/releases/latest' - urls = [] - res = requests.get(api_url) - data = res.json() - data = [li['browser_download_url'] for li in data['assets']] - for p in patterns: - regex = re.compile(p) - urls.append(list(filter(regex.search, data))[0]) - return urls - -def download(urls): - for url in urls: - filename = '/tmp/{}'.format(url.split("/")[-1]) - - if os.path.isfile(filename + '.tmp'): - os.remove(filename + '.tmp') - - with open(filename + '.tmp', 'wb') as file: - res = requests.get(url, stream=True) - total_length = res.headers.get('content-length') - - if total_length is None or int(total_length) < 4096: - print('Downloading {} from {}\n'.format(url.split("/")[-1], url)) - file.write(res.content) - else: - dl = 0 - total_length = int(total_length) - print('Downloading {} (total: {}) from {}\n'.format(url.split("/")[-1], total_length, url)) - for data in res.iter_content(chunk_size=4096): - dl += len(data) - file.write(data) - done = int(50 * dl / total_length) - sys.stdout.write("\r[%s%s]" % ('=' * done, ' ' * (50 - done))) - sys.stdout.write( - '\r[{}{}] - {}/{}'.format('=' * done, ' ' * (50 - done), - file_size(dl), file_size(total_length)) - ) - sys.stdout.flush() - print('\n') - - os.rename(filename + '.tmp', filename) - -def unpack(files): - for filename in files: - filename = filename.split("/")[-1] - print('Extracting {} ...'.format(filename)) - with tarfile.open(filename) as file: - file.extractall() - -def write_install_log(content): - with open('/tmp/mc-install.tmp', 'w') as logger: - logger.write('\n'.join(content)) - - shutil.move('/tmp/mc-install.tmp', '/usr/local/share/metacall/install') - -def read_install_log(): - with open('/usr/local/share/metacall/install', 'r') as logger: - lines = logger.read().splitlines() - return lines - -def overwrite(src, dest): - if os.path.isdir(src): - if not os.path.isdir(dest): - os.makedirs(dest) - files = os.listdir(src) - for file in files: - yield from overwrite(os.path.join(src, file), os.path.join(dest, file)) - else: - print('copying {} to {}'.format(src, dest)) - shutil.copyfile(src, dest) - yield str(dest) - -def spawn(args): - process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output, error = process.communicate() - - return output, error, process.returncode - -def pre_install(components): - download(['https://raw.githubusercontent.com/metacall/core/develop/tools/metacall-runtime.sh']) - args = ['bash', '/tmp/metacall-runtime.sh'] - args = args + components - subprocess.call(args) - -def pre_install_prompt(): - answers = {'yes': True, 'y': True, 'no': False, 'n': False} - components = ['python', 'ruby', 'netcore', 'v8', 'nodejs', 'ports'] - args = [] - - try: - while True: - for component in components: - message = '''do you want to install {} (y/n)? '''.format(component) - sys.stdout.write(message) - choice = input().lower() - if choice in answers and answers[choice]: - args.append(component) - elif choice not in answers: - sys.stdout.write("Please respond with 'yes' or 'no' (or 'y' or 'n').\n") - exit(0) - if len(args) == 0: - exit(0) - pre_install(args) - break - - except KeyboardInterrupt: - exit(1) - -def install(ignore=False): - if ignore is False: - if os.path.isfile('/usr/local/bin/metacallcli'): - print('MetaCall CLI is already installed') - exit(0) - pre_install_prompt() - - if os.getuid() != 0: - print('You need to have root privileges to run this script.') - exit(-1) - - os.chdir('/tmp/') - - docs = '' # link to documentation if this script failed to download the cli - - try: - - print('Searching for files ...') - - assets = find_assets([r'metacall-[0-9].[0-9].[0.9]-runtime.tar.gz', - r'metacall-[0-9].[0-9].[0.9]-examples.tar.gz']) - - missing_files = [file for file in assets if not os.path.isfile(file.split('/')[-1])] - - if len(missing_files) != 0: - download(missing_files) - - unpack(assets) - - write_install_log(list(overwrite('/tmp/usr/local/', '/usr/local/'))) - - print('\n') - - output, error, code = spawn(['ldconfig', '-n', '-v', '/usr/local/lib/']) - if code != 0: - print('Failed to install MetaCall\n{}\n' - 'please proceed with the manual installation. {}'.format(error.decode('utf-8'), docs)) - exit(1) - else: - print(output.decode('utf-8')) - - spawn(['chmod', '+x', '/usr/local/bin/metacallcli']) - - print('\nCleaning things up ...') - - shutil.rmtree('/tmp/usr') - for file in assets: - path = '/tmp/' + file.split('/')[-1] - if os.path.isfile(path): - os.remove(path) - - print('MetaCall CLI is successfully installed.') - - except ConnectionError: - print('Downloading process failed, please proceed with the manual installation. {}'.format(docs)) - except tarfile.ExtractError: - print('Extraction process failed, please proceed with the manual installation. {}'.format(docs)) - except KeyboardInterrupt: - print('\nCanceled by user.') - -def update(): - install(ignore=True) - -def uninstall(paths): - - for fp in paths: - if os.path.isfile(fp): - os.remove(fp) - - if os.path.isdir('/usr/local/share/metacall'): - shutil.rmtree('/usr/local/share/metacall') - - spawn(['ldconfig']) - - exit(0) - -def uninstall_prompt(): - paths = read_install_log() - message = '''This action would remove:\n {} -* this action DOES NOT uninstall the python package, only MetaCall CLI and MetaCall libs -* for a complete uninstall you have to run metacall-uninstall && pip uninstall metacall -* (the order of execution is important) - -Proceed (y/n)? '''.format(''.join('''{}\n '''.format(l) for l in paths)) - - answers = {'yes': True, 'y': True, 'no': False, 'n': False} - - try: - while True: - sys.stdout.write(message) - choice = input().lower() - if choice in answers: - if answers[choice]: - uninstall(paths) - else: - exit(0) - else: - sys.stdout.write("Please respond with 'yes' or 'no' (or 'y' or 'n').\n") - except KeyboardInterrupt: - exit(1) diff --git a/source/ports/py_port/metacall/api.py b/source/ports/py_port/metacall/api.py index 1c1d328b86..80586c86ed 100644 --- a/source/ports/py_port/metacall/api.py +++ b/source/ports/py_port/metacall/api.py @@ -18,35 +18,92 @@ # limitations under the License. import os +import re import sys import json -import inspect # TODO: Remove this, check the monkey patching - -if sys.platform == 'win32': - from metacall.module_win32 import metacall_module_load -elif sys.platform == 'linux': - from metacall.module_linux import metacall_module_load -elif sys.platform == 'darwin' or sys.platform == 'cygwin': - print('\x1b[31m\x1b[1m', 'The platform', sys.platform, 'has not been not tested, but we are using linux module as a fallback.', '\x1b[0m') - # TODO: Probably it won't work, but we use it as a fallback, implement other platforms - from metacall.module_linux import metacall_module_load -else: - raise ImportError('MetaCall Python Port is not implemented under this platform.') +import ctypes + +def find_files_recursively(root_dir, pattern): + regex = re.compile(pattern) + matches = [] + for dirpath, dirnames, filenames in os.walk(root_dir): + for filename in filenames: + if regex.search(filename): + matches.append(os.path.join(dirpath, filename)) + return matches + +def platform_install_paths(): + if sys.platform == 'win32': + return { + 'paths': [ os.path.join(os.environ.get('LOCALAPPDATA', ''), 'MetaCall', 'metacall') ], + 'name': r'metacall\.dll' + } + elif sys.platform == 'darwin': + return { + 'paths': [ '/opt/homebrew/lib/', '/usr/local/lib/' ], + 'name': r'libmetacall\.dylib' + } + elif sys.platform == 'linux': + return { + 'paths': [ '/usr/local/lib/', '/gnu/lib/' ], + 'name': r'libmetacall\.so' + } + else: + raise RuntimeError(f"Platform {sys.platform} not supported") + +def search_paths(): + custom_path = os.environ.get('METACALL_INSTALL_PATH') + if custom_path: + return { + 'paths': [ custom_path ], + 'name': r'^(lib)?metacall(d)?\.(so|dylib|dll)$' + } + + return platform_install_paths() + +def find_library(): + search_data = search_paths() + + for path in search_data['paths']: + files = find_files_recursively(path, search_data['name']) + if files: + return files[0] + + raise ImportError(""" + MetaCall library not found, if you have it in a special folder, define it through METACALL_INSTALL_PATH'. + """ + + "Looking for it in the following paths: " + ', '.join(search_data['paths']) + """ + If you do not have it installed, you have three options: + 1) Go to https://github.com/metacall/install and install it. + 2) Contribute to https://github.com/metacall/distributable by providing support for your platform and architecture. + 3) Be a x10 programmer and compile it by yourself, then define the install folder if it is different from the default in os.environ['METACALL_INSTALL_PATH']. + """) + +def metacall_module_load(): + # Check if it is loaded from MetaCall or from Python + if 'py_port_impl_module' in sys.modules: + return sys.modules['py_port_impl_module'] + + # Define the Python host + os.environ['METACALL_HOST'] = 'py' + + # Find the shared library + library_path = find_library() + + # Load MetaCall + lib = ctypes.CDLL(library_path, mode=ctypes.RTLD_GLOBAL) + + # Python Port must have been loaded at this point + if 'py_port_impl_module' in sys.modules: + return sys.modules['py_port_impl_module'] + else: + raise ImportError( + 'MetaCall was found but failed to load' + ) # Load metacall extension depending on the platform module = metacall_module_load() -# Check if library was found and print error message otherwhise -if module == None: - print('\x1b[31m\x1b[1m', 'You do not have MetaCall installed or we cannot find it.', '\x1b[0m') - print('\x1b[1m', 'Looking for it in the following paths:', sys.path, '\x1b[0m') - print('\x1b[33m\x1b[1m', 'If you do not have it installed, you have three options:', '\x1b[0m') - print('\x1b[1m', ' 1) Go to https://github.com/metacall/install and install it.', '\x1b[0m') - print('\x1b[1m', ' 2) Contribute to https://github.com/metacall/distributable by providing support for your platform and architecture.', '\033[0m') - print('\x1b[1m', ' 3) Be a x10 programmer and compile it by yourself, then define the install folder (if it is different from the default /usr/local/lib) in os.environ[\'LOADER_LIBRARY_PATH\'].', '\x1b[0m') - print('\x1b[33m\x1b[1m', 'If you have it installed in an non-standard folder, please define os.environ[\'LOADER_LIBRARY_PATH\'].', '\x1b[0m') - raise ImportError('MetaCall Python Port was not found') - # Load from file def metacall_load_from_file(tag, paths): return module.metacall_load_from_file(tag, paths) diff --git a/source/ports/py_port/metacall/module_linux.py b/source/ports/py_port/metacall/module_linux.py deleted file mode 100644 index cf9fdd6342..0000000000 --- a/source/ports/py_port/metacall/module_linux.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python3 - -# MetaCall Python Port by Parra Studios -# A frontend for Python language bindings in MetaCall. -# -# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import sys -import re - -def metacall_module_load(): - # Append environment variable or default install path when building manually - sys.path.append(os.environ.get('LOADER_LIBRARY_PATH', os.path.join(os.path.sep, 'usr', 'local', 'lib'))) - - # Find is MetaCall is installed as a distributable tarball - rootdir = os.path.join(os.path.sep, 'gnu', 'store') - regex = re.compile('.*-metacall-.*') - - for root, dirs, _ in os.walk(rootdir): - for folder in dirs: - if regex.match(folder) and not folder.endswith('R'): - sys.path.append(os.path.join(rootdir, folder, 'lib')) - - # Try to load the extension - library_names = ['libpy_loaderd', 'libpy_loader'] - library_found = '' - module = None - - # Find the library - for name in library_names: - try: - module = __import__(name, globals(), locals()) - library_found = name - break - except ImportError as e: - pass - except: - print("Unexpected error while loading the MetaCall Python Port", name, ":", sys.exc_info()[0]) - raise - - return module diff --git a/source/ports/py_port/metacall/module_win32.py b/source/ports/py_port/metacall/module_win32.py deleted file mode 100644 index 4c5c8e4e85..0000000000 --- a/source/ports/py_port/metacall/module_win32.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python3 - -# MetaCall Python Port by Parra Studios -# A frontend for Python language bindings in MetaCall. -# -# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import ctypes -from ctypes import wintypes, windll - -def metacall_module_load(): - def enum_process_modules(): - # Get handle of current process - kernel32 = windll.kernel32 - kernel32.GetCurrentProcess.restype = ctypes.c_void_p - hProcess = kernel32.GetCurrentProcess() - - # Load EnumProcessModules either from kernel32.dll or psapi.dll - try: - EnumProcessModulesProc = windll.psapi.EnumProcessModules - except AttributeError: - EnumProcessModulesProc = windll.kernel32.EnumProcessModules - EnumProcessModulesProc.restype = ctypes.c_bool - EnumProcessModulesProc.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p), ctypes.c_ulong, ctypes.POINTER(ctypes.c_ulong)] - - hProcess = kernel32.GetCurrentProcess() - hMods = (ctypes.c_void_p * 1024)() - cbNeeded = ctypes.c_ulong() - if EnumProcessModulesProc(hProcess, hMods, ctypes.sizeof(hMods), ctypes.byref(cbNeeded)): - return hMods - return None - - def get_loaded_module(modules, module_name): - kernel32 = windll.kernel32 - kernel32.GetModuleFileNameA.restype = ctypes.c_ulong - kernel32.GetModuleFileNameA.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_ulong] - - if modules is None: - return None - for module in modules: - cPath = ctypes.c_char_p(b'\0' * 1024) - kernel32.GetModuleFileNameA(module, cPath, ctypes.c_ulong(1024)) - path = cPath.value - if os.path.normpath(path.decode('utf-8')) == os.path.normpath(module_name): - return module - return None - - # Retrieve all loaded modules in the process - modules = enum_process_modules() - - # Get environment variable or default install path when building manually - base_path = os.environ.get('LOADER_LIBRARY_PATH', os.path.join(os.path.sep, 'C:', 'Program Files', 'MetaCall')) - library_names = ['py_loaderd', 'py_loader'] - - for name in library_names: - runtime_module_handle = get_loaded_module(modules, os.path.join(os.path.sep, base_path, name + '.dll')) - if runtime_module_handle is None: - continue - runtime_module = ctypes.CDLL('', handle = runtime_module_handle) # cdecl calling convention - - if runtime_module != None: - func_name = 'PyInit_' + name - if runtime_module[func_name]: - init = runtime_module[func_name] - init.restype = ctypes.py_object - init.argtypes = None - return init() - - return None diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index d34742d73d..4841636e96 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -124,85 +124,6 @@ # Exclude base packages exclude_packages = ['contrib', 'docs', 'test', 'test.py' 'CMakeLists.txt', '.gitignore', 'upload.sh'] -# TODO: Review helper -# # Detect if metacall port is already installed -# port_installed = False - -# # Append environment variable or default install path when building manually (TODO: Cross-platform paths) -# sys.path.append(os.environ.get('PORT_LIBRARY_PATH', os.path.join(os.path.sep, 'usr', 'local', 'lib'))); - -# # Find is MetaCall is installed as a distributable tarball (TODO: Cross-platform paths) -# rootdir = os.path.join(os.path.sep, 'gnu', 'store') -# regex = re.compile('.*-metacall-.*') - -# for root, dirs, _ in os.walk(rootdir): -# for folder in dirs: -# if regex.match(folder) and not folder.endswith('R'): -# sys.path.append(os.path.join(rootdir, folder, 'lib')) - -# TODO: Review helper -# # Find if module is installed -# if sys.version_info[0] < 3: -# # Python 2.7 -# import imp -# try: -# imp.find_module('_py_port') -# port_installed = True -# except ImportError: -# try: -# imp.find_module('_py_portd') -# port_installed = True -# except ImportError: -# pass -# elif sys.version_info[0] >= 3 and sys.version_info[1] <= 3: -# # Python <= 3.3 -# import importlib -# py_port = importlib.find_loader('_py_port') -# port_installed = py_port is not None -# if port_installed == False: -# py_port = importlib.find_loader('_py_portd') -# port_installed = py_port is not None -# elif sys.version_info[0] >= 3 and sys.version_info[1] > 3: -# # Python >= 3.4 -# import importlib -# py_port = importlib.util.find_spec("_py_port") -# port_installed = py_port is not None -# if port_installed == False: -# py_port = importlib.util.find_spec("_py_portd") -# port_installed = py_port is not None - -# TODO: This code is very interesting for providing commands to the end user. -# pip cannot execute arbitrary code as pre/post install hook when the package is being installed. -# So it is impossible to install the binaries unless we add extra commands after install. -# At this moment there is a common solution for installing binaries depending on Bash/PowerShell -# that is OS dependant and not language dependant. By the moment we will use the new way of install -# instead of the old one, but we keep the ./helper folder in order to provide future support for -# extra commands, although the main idea is to keep the OS dependant install, this can be useful -# for updating or doing Python related things. Meanwhile, it will be avoided. -exclude_packages.extend(['helper', 'helper.py']) - -# TODO: Review helper -# if port_installed == True: -# # Exclude helper package if port is already installed -# exclude_packages.append('helper') -# else: -# # List run-time dependencies here. These will be installed by pip when -# # your project is installed. For an analysis of "install_requires" vs pip's -# # requirements files see: -# # https://packaging.python.org/en/latest/requirements.html -# options['install_requires'] = ['peppercorn', 'requests'] - -# # To provide executable scripts, use entry points in preference to the -# # "scripts" keyword. Entry points provide cross-platform support and allow -# # pip to create the appropriate form of executable for the target platform. -# options['entry_points'] = { -# 'console_scripts': [ -# 'metacall-install=helper:install', -# 'metacall-uninstall=helper:uninstall_prompt', -# 'metacall-update=helper:update' -# ], -# } - # Define required packages options['packages'] = find_packages(exclude=exclude_packages) diff --git a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt index ff845b77b7..04c9d805e4 100644 --- a/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt +++ b/source/tests/metacall_configuration_exec_path_test/CMakeLists.txt @@ -204,6 +204,49 @@ test_environment_variables(${target} "${TESTS_SANITIZER_ENVIRONMENT_VARIABLES}" ) +# +# External dependencies +# + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(Python3_FIND_ABI "ON" "ANY" "ANY") + find_package(Python3 COMPONENTS Development) + + # Fallback to release if not found + if(NOT Python3_Development_FOUND) + set(Python3_FIND_ABI) + find_package(Python3 COMPONENTS Development REQUIRED) + endif() +else() + find_package(Python3 COMPONENTS Development REQUIRED) +endif() + +# Find Python DLL +include(Portability) + +if(PROJECT_OS_FAMILY STREQUAL win32 AND Python3_LIBRARIES AND Python3_ROOT_DIR AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + foreach(library ${Python3_LIBRARIES}) + if(${library} MATCHES "[^_d][.]lib$") + # Get the library path with dll suffix + string(REGEX REPLACE "[.]lib$" ".dll" LIB_PATH ${library}) + # Get the library name + get_filename_component(LIB_NAME "${LIB_PATH}" NAME) + # Find the library in the Python3 root path + find_file(Python3_LIBRARY_NAME_PATH ${LIB_NAME} + PATHS ${Python3_ROOT_DIR} + NO_DEFAULT_PATH + ) + if(Python3_LIBRARY_NAME_PATH) + break() + endif() + endif() + endforeach() +endif() + +if(NOT Python3_LIBRARY_NAME_PATH) + set(Python3_LIBRARY_NAME_PATH "${Python3_LIBRARIES}") +endif() + # # Configure test data # diff --git a/source/tests/metacall_configuration_exec_path_test/data/configurations/py_loader.json.in b/source/tests/metacall_configuration_exec_path_test/data/configurations/py_loader.json.in index 4978ee0b2b..02a8e81f9c 100644 --- a/source/tests/metacall_configuration_exec_path_test/data/configurations/py_loader.json.in +++ b/source/tests/metacall_configuration_exec_path_test/data/configurations/py_loader.json.in @@ -1,5 +1,8 @@ { "execution_paths": [ "@PY_EXECUTION_PATH@" - ] + ], + "dependencies": { + "python": ["@Python3_LIBRARY_NAME_PATH@"] + } } diff --git a/source/tests/metacall_python_port_test/CMakeLists.txt b/source/tests/metacall_python_port_test/CMakeLists.txt index a4179b7f20..124502f07b 100644 --- a/source/tests/metacall_python_port_test/CMakeLists.txt +++ b/source/tests/metacall_python_port_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if loaders are enabled -if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_LOADERS_RS OR NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_PY OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB OR NOT OPTION_BUILD_SCRIPTS_RS OR NOT OPTION_BUILD_SCRIPTS_NODE) +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_PY OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB OR NOT OPTION_BUILD_SCRIPTS_NODE) return() endif() @@ -135,6 +135,12 @@ add_test(NAME ${target} COMMAND $ ) +# Enable rust test if it is built +if(OPTION_BUILD_LOADERS_RS) + set(RS_DEPENDENCY rs_loader) + set(TESTS_ENVIRONMENT_VARIABLES_RS "OPTION_BUILD_LOADERS_RS=1") +endif() + # # Define dependencies # @@ -144,6 +150,7 @@ add_dependencies(${target} py_loader rb_loader node_loader + ${RS_DEPENDENCY} ) # @@ -159,4 +166,5 @@ include(TestEnvironmentVariables) test_environment_variables(${target} "" ${TESTS_ENVIRONMENT_VARIABLES} + ${TESTS_ENVIRONMENT_VARIABLES_RS} ) From dcbdd4fad80ad3ffe5842182d161be98b14b65fe Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 17 May 2025 07:08:58 +0200 Subject: [PATCH 155/364] Trying compose with bake. --- docker-compose.platform.yml | 37 ------------------------------------- docker-compose.sh | 9 +++++---- 2 files changed, 5 insertions(+), 41 deletions(-) delete mode 100644 docker-compose.platform.yml diff --git a/docker-compose.platform.yml b/docker-compose.platform.yml deleted file mode 100644 index b22964bf5c..0000000000 --- a/docker-compose.platform.yml +++ /dev/null @@ -1,37 +0,0 @@ -# -# MetaCall Library by Parra Studios -# Docker compose infrastructure for MetaCall. -# -# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -version: "3.7" - -services: - deps: - image: metacall/core:deps - platform: ${METACALL_PLATFORM} - - dev: - image: metacall/core:dev - platform: ${METACALL_PLATFORM} - - runtime: - image: metacall/core:runtime - platform: ${METACALL_PLATFORM} - - cli: - image: metacall/core:cli - platform: ${METACALL_PLATFORM} diff --git a/docker-compose.sh b/docker-compose.sh index 4759e59c1f..12186b391d 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -217,19 +217,20 @@ sub_platform() { # Generate the docker compose file with all .env variables substituted (bake seems not to support this) $DOCKER_COMPOSE config &> docker-compose.bake.yml + cat docker-compose.bake.yml # Build with Bake, so the image can be loaded into local docker context ln -sf tools/deps/.dockerignore .dockerignore - docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load deps + docker buildx bake -f docker-compose.bake.yml --set *.platform="${METACALL_PLATFORM}" --load deps ln -sf tools/dev/.dockerignore .dockerignore - docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load dev + docker buildx bake -f docker-compose.bake.yml --set *.platform="${METACALL_PLATFORM}" --load dev ln -sf tools/runtime/.dockerignore .dockerignore - docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load runtime + docker buildx bake -f docker-compose.bake.yml --set *.platform="${METACALL_PLATFORM}" --load runtime ln -sf tools/cli/.dockerignore .dockerignore - docker buildx bake -f docker-compose.bake.yml -f docker-compose.platform.yml --load cli + docker buildx bake -f docker-compose.bake.yml --set *.platform="${METACALL_PLATFORM}" --load cli # Delete temporal docker compose file rm -rf docker-compose.bake.yml From ee87dd145ce491155f88a4163a31410f4210d895 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 17 May 2025 07:17:10 +0200 Subject: [PATCH 156/364] Trying to solve issues. --- docker-compose.sh | 2 +- docker-compose.yml | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/docker-compose.sh b/docker-compose.sh index 12186b391d..669e6fc842 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -216,7 +216,7 @@ sub_platform() { fi # Generate the docker compose file with all .env variables substituted (bake seems not to support this) - $DOCKER_COMPOSE config &> docker-compose.bake.yml + $DOCKER_COMPOSE -f docker-compose.yml config &> docker-compose.bake.yml cat docker-compose.bake.yml # Build with Bake, so the image can be loaded into local docker context diff --git a/docker-compose.yml b/docker-compose.yml index ff548ba2a3..bba15a4c47 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,8 +17,6 @@ # limitations under the License. # -version: "3.7" - services: deps: image: metacall/core:deps @@ -66,8 +64,6 @@ services: DETOUR_LIBRARY_PATH: $METACALL_PATH/build PORT_LIBRARY_PATH: $METACALL_PATH/build NODE_PATH: /usr/lib/node_modules - depends_on: - - deps runtime: image: metacall/core:runtime @@ -91,8 +87,6 @@ services: DETOUR_LIBRARY_PATH: /usr/local/lib PORT_LIBRARY_PATH: /usr/local/lib NODE_PATH: /usr/local/lib/node_modules - depends_on: - - dev cli: image: metacall/core:cli @@ -112,6 +106,3 @@ services: DETOUR_LIBRARY_PATH: /usr/local/lib PORT_LIBRARY_PATH: /usr/local/lib NODE_PATH: /usr/local/lib/node_modules - depends_on: - - dev - - runtime From 12e190ae1702d32976026459130eb688317ec282 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 17 May 2025 11:50:58 +0200 Subject: [PATCH 157/364] Update rust port. --- source/ports/rs_port/CMakeLists.txt | 2 +- source/ports/rs_port/config.toml | 3 -- source/ports/rs_port/src/bindings.rs | 42 ++++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 6 deletions(-) delete mode 100644 source/ports/rs_port/config.toml diff --git a/source/ports/rs_port/CMakeLists.txt b/source/ports/rs_port/CMakeLists.txt index 54fbcbca14..548d583b93 100644 --- a/source/ports/rs_port/CMakeLists.txt +++ b/source/ports/rs_port/CMakeLists.txt @@ -233,7 +233,7 @@ set(RS_PORT_BUILD_ENVIRONMENT_VARIABLES "PROJECT_OUTPUT_DIR = { value = \"${PROJECT_OUTPUT_DIR}\", force = true }" ) -set(RS_PORT_CONFIG_ENV_FILE "${CMAKE_CURRENT_SOURCE_DIR}/config.toml") +set(RS_PORT_CONFIG_ENV_FILE "${CMAKE_CURRENT_SOURCE_DIR}/.cargo/config.toml") file(WRITE ${RS_PORT_CONFIG_ENV_FILE} "[env]\n") diff --git a/source/ports/rs_port/config.toml b/source/ports/rs_port/config.toml deleted file mode 100644 index f0d75af73f..0000000000 --- a/source/ports/rs_port/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[env] -CMAKE_BUILD_TYPE = { value = "Debug", force = true } -PROJECT_OUTPUT_DIR = { value = "/media/sf_koyanisqaatsi/metacall-core-rs-port-improved/build", force = true } diff --git a/source/ports/rs_port/src/bindings.rs b/source/ports/rs_port/src/bindings.rs index 26a41b7bd2..8f6385d5bf 100644 --- a/source/ports/rs_port/src/bindings.rs +++ b/source/ports/rs_port/src/bindings.rs @@ -80,6 +80,40 @@ unsafe extern "C" { #[doc = " @brief\n Clear last error that has happened after a call to any API from MetaCall"] pub fn metacall_error_clear(); } +unsafe extern "C" { + #[doc = " @brief\n Initialize link detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_initialize() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_register( + tag: *const ::std::os::raw::c_char, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + fn_: ::std::option::Option, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] loader\n Pointer to the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_register_loader( + loader: *mut ::std::os::raw::c_void, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + fn_: ::std::option::Option, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Remove the hook previously registered\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_unregister( + tag: *const ::std::os::raw::c_char, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Unregister link detours and destroy shared memory"] + pub fn metacall_link_destroy(); +} #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum metacall_log_id { @@ -633,7 +667,7 @@ unsafe extern "C" { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct metacall_initialize_configuration_type { - pub tag: *mut ::std::os::raw::c_char, + pub tag: *const ::std::os::raw::c_char, pub options: *mut ::std::os::raw::c_void, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] @@ -703,6 +737,10 @@ unsafe extern "C" { #[doc = " @brief\n Returns default serializer used by MetaCall\n\n @return\n Name of the serializer to be used with serialization methods"] pub fn metacall_serial() -> *const ::std::os::raw::c_char; } +unsafe extern "C" { + #[doc = " @brief\n Returns default detour used by MetaCall\n\n @return\n Name of the detour to be used with detouring methods"] + pub fn metacall_detour() -> *const ::std::os::raw::c_char; +} unsafe extern "C" { #[doc = " @brief\n Disables MetaCall logs, must be called before @metacall_initialize.\n\n When initializing MetaCall, it initializes a default logs to stdout\n if none was defined. If you want to benchmark or simply disable this\n default logs, you can call to this function before @metacall_initialize."] pub fn metacall_log_null(); @@ -1355,7 +1393,7 @@ unsafe extern "C" { pub fn metacall_plugin_path() -> *const ::std::os::raw::c_char; } unsafe extern "C" { - #[doc = " @brief\n Destroy MetaCall library\n"] + #[doc = " @brief\n Destroy MetaCall library"] pub fn metacall_destroy(); } unsafe extern "C" { From 7890c7847f6c1956f2725ffd4970511617966900 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 17 May 2025 12:10:39 +0200 Subject: [PATCH 158/364] Remove debug info. --- docker-compose.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.sh b/docker-compose.sh index 669e6fc842..e254cb103e 100755 --- a/docker-compose.sh +++ b/docker-compose.sh @@ -217,7 +217,6 @@ sub_platform() { # Generate the docker compose file with all .env variables substituted (bake seems not to support this) $DOCKER_COMPOSE -f docker-compose.yml config &> docker-compose.bake.yml - cat docker-compose.bake.yml # Build with Bake, so the image can be loaded into local docker context ln -sf tools/deps/.dockerignore .dockerignore From 43833f8311c13694856a2060648e0a41a8f884c8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 21 May 2025 19:36:14 +0200 Subject: [PATCH 159/364] Almost working version for py_port with python.exe. --- source/loader/source/loader.c | 2 + source/loaders/py_loader/CMakeLists.txt | 1 + .../include/py_loader/py_loader_port.h | 4 +- .../include/py_loader/py_loader_threading.h | 2 +- .../loaders/py_loader/source/py_loader_impl.c | 139 +++++++++++++----- .../loaders/py_loader/source/py_loader_port.c | 42 +++--- .../source/py_loader_symbol_fallback.c | 28 ++++ .../py_loader/source/py_loader_threading.cpp | 8 +- source/metacall/source/metacall.c | 1 - source/ports/node_port/CMakeLists.txt | 10 +- source/ports/node_port/test.js | 22 ++- .../node_port/test/commands/node_port.txt | 3 - source/ports/py_port/CMakeLists.txt | 70 +++++---- source/ports/py_port/test.py | 5 +- .../py_port/test/commands/py_port.txt.in | 3 - 15 files changed, 225 insertions(+), 115 deletions(-) create mode 100644 source/loaders/py_loader/source/py_loader_symbol_fallback.c delete mode 100644 source/ports/node_port/test/commands/node_port.txt delete mode 100644 source/ports/py_port/test/commands/py_port.txt.in diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 156017d24e..1fe457cad6 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -241,6 +241,8 @@ plugin loader_get_impl_plugin_options(const loader_tag tag, value options) if (impl == NULL) { + /* Destroy options on error */ + value_type_destroy(options); goto loader_create_error; } diff --git a/source/loaders/py_loader/CMakeLists.txt b/source/loaders/py_loader/CMakeLists.txt index 90c6504904..c764d17b1e 100644 --- a/source/loaders/py_loader/CMakeLists.txt +++ b/source/loaders/py_loader/CMakeLists.txt @@ -99,6 +99,7 @@ set(sources ${source_path}/py_loader_port.c ${source_path}/py_loader_threading.cpp ${source_path}/py_loader_dict.c + ${source_path}/py_loader_symbol_fallback.c ) # Group source files diff --git a/source/loaders/py_loader/include/py_loader/py_loader_port.h b/source/loaders/py_loader/include/py_loader/py_loader_port.h index 9cc66ed42a..eea4cd7844 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_port.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_port.h @@ -21,13 +21,15 @@ #ifndef PY_LOADER_PORT_H #define PY_LOADER_PORT_H 1 +#include + #include #ifdef __cplusplus extern "C" { #endif -int py_port_initialize(void); +PY_LOADER_NO_EXPORT int py_port_initialize(void); #ifdef __cplusplus } diff --git a/source/loaders/py_loader/include/py_loader/py_loader_threading.h b/source/loaders/py_loader/include/py_loader/py_loader_threading.h index b4f0fb4999..82b7ece7c8 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_threading.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_threading.h @@ -27,7 +27,7 @@ extern "C" { #endif -PY_LOADER_NO_EXPORT void py_loader_thread_initialize(void); +PY_LOADER_NO_EXPORT void py_loader_thread_initialize(const int host); PY_LOADER_NO_EXPORT int py_loader_thread_is_main(void); diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index f73dbe9c3d..7c5f558230 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -120,6 +120,7 @@ struct loader_impl_py_type PyObject *thread_background_start; PyObject *thread_background_send; PyObject *thread_background_stop; + PyObject *thread_background_register_atexit; PyObject *py_task_callback_handler; /* End asyncio required modules */ @@ -192,7 +193,7 @@ static void py_loader_impl_value_invoke_state_finalize(value v, void *data); static void py_loader_impl_value_ptr_finalize(value v, void *data); -static int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl); +static int py_loader_impl_finalize(loader_impl_py py_impl, const int host); static PyObject *py_loader_impl_load_from_memory_compile(loader_impl_py py_impl, const loader_name name, const char *buffer); @@ -2001,14 +2002,21 @@ int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, ty return 1; } -int py_loader_impl_import_module(loader_impl_py py_impl, PyObject **loc, const char *name) +int py_loader_impl_import_module(loader_impl_py py_impl, PyObject **module, const char *name) { - PyObject *module_name = PyUnicode_DecodeFSDefault(name); - *loc = PyImport_Import(module_name); + PyObject *module_name, *sys_modules = PyImport_GetModuleDict(); + *module = PyDict_GetItemString(sys_modules, name); + if (*module != NULL) + { + return 0; + } + + module_name = PyUnicode_DecodeFSDefault(name); + *module = PyImport_Import(module_name); Py_DECREF(module_name); - if (*loc == NULL) + if (*module == NULL) { py_loader_impl_error_print(py_impl); return 1; @@ -2134,7 +2142,7 @@ int py_loader_impl_initialize_inspect(loader_impl impl, loader_impl_py py_impl) return 1; } -int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl) +int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int host) { PyObject *module_name = PyUnicode_DecodeFSDefault("asyncio"); py_impl->asyncio_module = PyImport_Import(module_name); @@ -2188,6 +2196,17 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl) goto error_after_py_task_callback_handler; } + /* When running in host, we must register a thread atexit for finalizing the background threads + before Python_AtExit, just before when all threads are join (except by daemon threads) */ + if (host == 1) + { + PyObject *args_tuple = PyTuple_New(1); + Py_INCREF(py_impl->asyncio_loop); + PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); + PyObject_Call(py_impl->thread_background_register_atexit, args_tuple, NULL); + Py_XDECREF(args_tuple); + } + return 0; error_after_py_task_callback_handler: @@ -2377,8 +2396,8 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) { static const char thread_background_module_str[] = "import asyncio\n" - "from threading import Thread\n" - "from threading import Event\n" + "import threading\n" + "import sys\n" "class ThreadLoop:\n" " def __init__(self, loop, t):\n" " self.loop = loop\n" @@ -2399,7 +2418,7 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) " loop.close()\n" "def start_background_loop():\n" " loop = asyncio.new_event_loop()\n" - " t = Thread(target=background_loop, name='MetaCall asyncio event loop', args=(loop,), daemon=False)\n" + " t = threading.Thread(target=background_loop, name='MetaCall asyncio event loop', args=(loop,), daemon=False)\n" " t.start()\n" " return ThreadLoop(loop, t)\n" "def send_background_loop(tl, coro, callback, capsule):\n" @@ -2407,9 +2426,18 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) " task.__metacall_capsule = capsule\n" " task.add_done_callback(callback)\n" " return asyncio.wrap_future(task, loop=tl.loop)\n" - "def stop_background_loop(tl):\n" + /* Stop background loop enqueues at the end of the event loop + the task to be finished, so effectively it waits until the event loop finishes */ + "def stop_background_loop(tl, join):\n" " tl.loop.call_soon_threadsafe(tl.loop.stop)\n" - " tl.t.join()\n"; + " if join:\n" + " tl.t.join()\n" + "def atexit_background_loop(tl):\n" + /* This checks if py_port_impl_module contains py_loader_port_atexit */ + " py_loader_port_atexit = getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)\n" + " tl.loop.call_soon_threadsafe(py_loader_port_atexit)\n" + "def register_atexit_background_loop(tl):\n" + " threading._register_atexit(atexit_background_loop, tl)\n"; /* How to use the module: */ /* @@ -2478,8 +2506,18 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) goto error_thread_background_stop; } + py_impl->thread_background_register_atexit = PyObject_GetAttrString(py_impl->thread_background_module, "register_atexit_background_loop"); + + if (py_impl->thread_background_register_atexit == NULL || !PyCallable_Check(py_impl->thread_background_register_atexit)) + { + log_write("metacall", LOG_LEVEL_ERROR, "Error getting register_atexit_background_loop function"); + goto error_thread_background_register_atexit; + } + return 0; +error_thread_background_register_atexit: + Py_XDECREF(py_impl->thread_background_register_atexit); error_thread_background_stop: Py_XDECREF(py_impl->thread_background_stop); error_thread_background_send: @@ -2606,6 +2644,8 @@ static void PyCFunction_dealloc(PyObject *obj) loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration config) { + const int host = loader_impl_get_option_host(impl); + (void)impl; (void)config; @@ -2620,7 +2660,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi goto error_alloc_py_impl; } - if (loader_impl_get_option_host(impl) == 0) + if (host == 0) { Py_InitializeEx(0); @@ -2637,20 +2677,16 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #endif } - /* Hook the deallocation of PyCFunction */ - py_loader_impl_pycfunction_dealloc = PyCFunction_Type.tp_dealloc; - PyCFunction_Type.tp_dealloc = PyCFunction_dealloc; - - /* TODO: This does not work after 3.13, is it really needed for this hook? */ -#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 13 - PyType_Modified(&PyCFunction_Type); -#endif + /* Initialize threading */ + py_loader_thread_initialize(host); + /* Initialize executable */ if (py_loader_impl_initialize_sys_executable(py_impl) != 0) { goto error_after_sys_executable; } + /* Initialize main arguments */ char **argv = metacall_argv(); int argc = metacall_argc(); @@ -2665,6 +2701,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi py_loader_impl_run_main = 0; } + /* Initialize stack trace module */ if (py_loader_impl_initialize_traceback(impl, py_impl) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid traceback module creation"); @@ -2675,6 +2712,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi } #if DEBUG_ENABLED + /* Initialize GC module */ { if (py_loader_impl_initialize_gc(py_impl) != 0) { @@ -2688,37 +2726,50 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi } #endif + /* Initialize inspect module */ if (py_loader_impl_initialize_inspect(impl, py_impl) != 0) { goto error_after_traceback_and_gc; } + /* Initialize import module */ if (py_loader_impl_initialize_import(py_impl) != 0) { goto error_after_inspect; } + /* Initialize port module */ if (py_port_initialize() != 0) { goto error_after_import; } + /* Initialize thread module for supporting threaded async */ if (py_loader_impl_initialize_thread_background_module(py_impl) != 0) { goto error_after_import; } - if (py_loader_impl_initialize_asyncio_module(py_impl) != 0) + /* Initialize asyncio module for supporting async */ + if (py_loader_impl_initialize_asyncio_module(py_impl, host) != 0) { goto error_after_thread_background_module; } + /* Initialize custom dict type */ if (py_loader_impl_dict_type_init() < 0) { goto error_after_asyncio_module; } - py_loader_thread_initialize(); + /* Hook the deallocation of PyCFunction */ + py_loader_impl_pycfunction_dealloc = PyCFunction_Type.tp_dealloc; + PyCFunction_Type.tp_dealloc = PyCFunction_dealloc; + + /* TODO: This does not work after 3.13, is it really needed for this hook? */ +#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 13 + PyType_Modified(&PyCFunction_Type); +#endif /* Register initialization */ loader_initialization_register(impl); @@ -2737,6 +2788,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi Py_DECREF(py_impl->thread_background_start); Py_DECREF(py_impl->thread_background_send); Py_DECREF(py_impl->thread_background_stop); + Py_DECREF(py_impl->thread_background_register_atexit); Py_DECREF(py_impl->thread_background_future_check); error_after_import: Py_DECREF(py_impl->import_module); @@ -2762,7 +2814,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #endif error_after_argv: error_after_sys_executable: - (void)py_loader_impl_finalize(impl, py_impl); + (void)py_loader_impl_finalize(py_impl, host); error_init_py: free(py_impl); error_alloc_py_impl: @@ -4143,7 +4195,7 @@ void py_loader_impl_sys_path_print(PyObject *sys_path_list) } #endif -int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl) +int py_loader_impl_finalize(loader_impl_py py_impl, const int host) { if (Py_IsInitialized() != 0) { @@ -4152,7 +4204,7 @@ int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl) py_loader_impl_error_print(py_impl); } - if (loader_impl_get_option_host(impl) == 0) + if (host == 0) { #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 6 if (Py_FinalizeEx() != 0) @@ -4171,7 +4223,9 @@ int py_loader_impl_finalize(loader_impl impl, loader_impl_py py_impl) int py_loader_impl_destroy(loader_impl impl) { + const int host = loader_impl_get_option_host(impl); loader_impl_py py_impl = loader_impl_get(impl); + int result = 0; if (py_impl == NULL) { @@ -4184,15 +4238,19 @@ int py_loader_impl_destroy(loader_impl impl) py_loader_thread_acquire(); /* Stop event loop for async calls */ - PyObject *args_tuple = PyTuple_New(1); - Py_INCREF(py_impl->asyncio_loop); - PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); - PyObject_Call(py_impl->thread_background_stop, args_tuple, NULL); - Py_XDECREF(args_tuple); - - if (PyErr_Occurred() != NULL) { - py_loader_impl_error_print(py_impl); + PyObject *args_tuple = PyTuple_New(2); + Py_INCREF(py_impl->asyncio_loop); + PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); + /* If it is host, do not join the thread */ + PyTuple_SetItem(args_tuple, 1, PyBool_FromLong(!host)); + PyObject_Call(py_impl->thread_background_stop, args_tuple, NULL); + Py_XDECREF(args_tuple); + + if (PyErr_Occurred() != NULL) + { + py_loader_impl_error_print(py_impl); + } } Py_DECREF(py_impl->inspect_signature); @@ -4216,6 +4274,7 @@ int py_loader_impl_destroy(loader_impl impl) Py_XDECREF(py_impl->thread_background_start); Py_XDECREF(py_impl->thread_background_send); Py_XDECREF(py_impl->thread_background_stop); + Py_XDECREF(py_impl->thread_background_register_atexit); #if DEBUG_ENABLED { @@ -4227,10 +4286,18 @@ int py_loader_impl_destroy(loader_impl impl) } #endif - int result = py_loader_impl_finalize(impl, py_impl); + result = py_loader_impl_finalize(py_impl, host); - /* Unhook the deallocation of PyCFunction */ - PyCFunction_Type.tp_dealloc = py_loader_impl_pycfunction_dealloc; + if (host == 0) + { + /* Unhook the deallocation of PyCFunction */ + PyCFunction_Type.tp_dealloc = py_loader_impl_pycfunction_dealloc; + } + else + { + /* On host, release the GIL and let Python continue until it calls Py_Finalize by itself */ + py_loader_thread_release(); + } free(py_impl); diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index fbf3b457cc..9edb8277e4 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -489,13 +489,6 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) /* Obtain Python loader implementation */ impl = loader_get_impl(py_loader_tag); - /* TODO: Remove this check when we implement this: https://github.com/metacall/core/issues/231 */ - if (impl == NULL) - { - PyErr_SetString(PyExc_ValueError, "Invalid Python loader instance, MetaCall Port must be used from MetaCall CLI"); - return py_loader_port_none(); - } - var_args_size = PyTuple_Size(var_args); if (var_args_size == 0) @@ -619,13 +612,6 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) /* Obtain Python loader implementation */ impl = loader_get_impl(py_loader_tag); - /* TODO: Remove this check when we implement this: https://github.com/metacall/core/issues/231 */ - if (impl == NULL) - { - PyErr_SetString(PyExc_ValueError, "Invalid Python loader instance, MetaCall Port must be used from MetaCall CLI"); - return py_loader_port_none(); - } - var_args_size = PyTuple_Size(var_args); if (var_args_size == 0) @@ -840,10 +826,6 @@ static PyObject *py_loader_port_value_reference(PyObject *self, PyObject *args) /* Obtain Python loader implementation */ impl = loader_get_impl(py_loader_tag); - /* TODO: When using the port outside MetaCall this is going to segfault for functions and similar - * structures that require py loader internal structure to be initialized. For those cases, we - * must implement this: https://github.com/metacall/core/issues/231 - */ v = py_loader_impl_capi_to_value(impl, obj, py_loader_impl_capi_to_value_type(impl, obj)); if (v == NULL) @@ -912,10 +894,6 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args /* Obtain Python loader implementation */ impl = loader_get_impl(py_loader_tag); - /* TODO: When using the port outside MetaCall this is going to segfault for functions and similar - * structures that require py loader internal structure to be initialized. For those cases, we - * must implement this: https://github.com/metacall/core/issues/231 - */ result = py_loader_impl_value_to_capi(impl, value_type_id(v), v); if (result == NULL) @@ -927,6 +905,24 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args return result; } +static PyObject *py_loader_port_atexit(PyObject *self, PyObject *args) +{ + loader_impl impl = loader_get_impl(py_loader_tag); + + (void)self; + (void)args; + + if (impl != NULL) + { + if (py_loader_impl_destroy(impl) != 0) + { + PyErr_SetString(PyExc_RuntimeError, "Failed to destroy Python Loader on MetaCall."); + } + } + + return py_loader_port_none(); +} + static PyMethodDef metacall_methods[] = { { "metacall_load_from_file", py_loader_port_load_from_file, METH_VARARGS, "Loads a script from file." }, @@ -948,6 +944,8 @@ static PyMethodDef metacall_methods[] = { "Create a new value of type Pointer." }, { "metacall_value_dereference", py_loader_port_value_dereference, METH_VARARGS, "Get the data which a value of type Pointer is pointing to." }, + { "py_loader_port_atexit", py_loader_port_atexit, METH_NOARGS, + "At exit function that will be executed when Python is host, for internal cleanup purposes." }, { NULL, NULL, 0, NULL } }; diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c new file mode 100644 index 0000000000..6ecfd3582c --- /dev/null +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -0,0 +1,28 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading python code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +/* Required for when linking to Python in debug mode and loading with Python.exe in release mode */ +#if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) + #if defined(__clang__) || defined(__GNUC__) +__attribute__((weak)) void _Py_DECREF_DecRefTotal(void) {} + #endif +#endif diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 5aa5173a92..3a669d0135 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -62,9 +62,15 @@ static uint64_t main_thread_ref_count = 0; thread_local py_thread_state current_thread_state; thread_local uint64_t current_thread_id = thread_id_get_current(); -void py_loader_thread_initialize() +void py_loader_thread_initialize(const int host) { main_thread_id = thread_id_get_current(); + + if (host == 1) + { + main_thread_state = PyThreadState_Get(); + main_thread_ref_count++; + } } int py_loader_thread_is_main() diff --git a/source/metacall/source/metacall.c b/source/metacall/source/metacall.c index fcba2931ac..cd73661845 100644 --- a/source/metacall/source/metacall.c +++ b/source/metacall/source/metacall.c @@ -112,7 +112,6 @@ portability_constructor(metacall_constructor) if (metacall_initialize_ex(config) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "MetaCall host constructor failed to initialize"); - metacall_value_destroy(config[0].options); exit(1); } diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 4fb44685cc..abb6d38f19 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -184,8 +184,7 @@ if(OPTION_BUILD_CLI) message(STATUS "Test ${node_port_test}") add_test(NAME ${target} - COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${CMAKE_CURRENT_SOURCE_DIR}/test/commands/node_port.txt" -P "${CMAKE_SOURCE_DIR}/source/cli/metacallcli/test/commands/command_runner.cmake" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND $ ${CMAKE_CURRENT_SOURCE_DIR}/test.js ) # @@ -196,10 +195,6 @@ if(OPTION_BUILD_CLI) PROPERTY LABELS ${node_port_test} ) - set_tests_properties(${target} PROPERTIES - PASS_REGULAR_EXPRESSION "Tests passed without errors" - ) - # Add dependencies and optional dependencies add_dependencies(${target} node_loader @@ -232,8 +227,7 @@ set(node_port_test_exec "${node_port_test}_executable") message(STATUS "Test ${node_port_test_exec}") add_test(NAME ${node_port_test_exec} - COMMAND ${NodeJS_EXECUTABLE} -e "require('./test.js').main()" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${NodeJS_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.js ) # Define test labels diff --git a/source/ports/node_port/test.js b/source/ports/node_port/test.js index 6dd49fbc32..36cb0f849f 100644 --- a/source/ports/node_port/test.js +++ b/source/ports/node_port/test.js @@ -41,17 +41,15 @@ const waitForMocha = async () => { return new Promise((resolve, reject) => mocha.run(failures => failures ? reject(failures) : resolve())); }; -module.exports = { - main: async () => { - try { - // Run the tests - await waitForMocha(); - } catch (failures) { - if (failures !== 0) { - process.exit(1); - } +void (async () => { + try { + // Run the tests + await waitForMocha(); + } catch (failures) { + if (failures !== 0) { + process.exit(1); } + } - return 'Tests passed without errors'; - }, -}; + console.log('Tests passed without errors'); +})(); diff --git a/source/ports/node_port/test/commands/node_port.txt b/source/ports/node_port/test/commands/node_port.txt deleted file mode 100644 index 7a231f9e18..0000000000 --- a/source/ports/node_port/test/commands/node_port.txt +++ /dev/null @@ -1,3 +0,0 @@ -load node test.js -await main() -exit diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index c6bd6f3303..5f673e83dc 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -7,6 +7,8 @@ endif() # External dependencies # +find_package(Python3 COMPONENTS Interpreter REQUIRED) + # # Port name and options # @@ -18,8 +20,6 @@ set(target py_port) message(STATUS "Port ${target}") if(NOT OPTION_BUILD_GUIX) - find_package(Python3 COMPONENTS Interpreter REQUIRED) - if(Python3_VERSION_MAJOR EQUAL 3 AND Python3_VERSION_MINOR GREATER_EQUAL 11) set(PIP_BREAK_SYSTEM_PACKAGES "--break-system-packages") else() @@ -29,52 +29,70 @@ if(NOT OPTION_BUILD_GUIX) install(CODE "execute_process(COMMAND ${PIP_BACKWARD_COMPATIBILITY} pip3 install ${PIP_BREAK_SYSTEM_PACKAGES} ${CMAKE_CURRENT_SOURCE_DIR})") endif() -# -# Configure test -# - # Check if loaders are enabled if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB OR NOT OPTION_BUILD_SCRIPTS_NODE) return() endif() +# Enable Rust test if the rs_loader is built +if(OPTION_BUILD_LOADERS_RS) + set(TESTS_ENVIRONMENT_VARIABLES_RS "OPTION_BUILD_LOADERS_RS=1") +endif() + +# +# Define test (CLI) +# + set(py_port_test "${target}_test") +if(NOT OPTION_BUILD_CLI) + # Add test (CLI) + add_test(NAME ${target} + COMMAND $ ${CMAKE_CURRENT_SOURCE_DIR}/test.py + ) + + # + # Define test labels + # + + set_property(TEST ${target} + PROPERTY LABELS ${py_port_test} + ) + + include(TestEnvironmentVariables) + + test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + ${TESTS_ENVIRONMENT_VARIABLES_RS} + ) +endif() + # -# Define test +# Define test (Python) # -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/test/commands/py_port.txt.in - ${CMAKE_CURRENT_BINARY_DIR}/py_port.txt -) +set(py_port_test_exec "${py_port_test}_executable") -# Add test (must be run with MetaCall CLI) -add_test(NAME ${target} - COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${CMAKE_CURRENT_BINARY_DIR}/py_port.txt" -P "${CMAKE_SOURCE_DIR}/source/cli/metacallcli/test/commands/command_runner.cmake" +# Add test (Python) +add_test(NAME ${py_port_test_exec} + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.py ) # # Define test labels # -set_property(TEST ${target} - PROPERTY LABELS ${py_port_test} -) - -set_tests_properties(${target} PROPERTIES - PASS_REGULAR_EXPRESSION "Tests passed without errors" +set_property(TEST ${py_port_test_exec} + PROPERTY LABELS ${py_port_test_exec} ) include(TestEnvironmentVariables) -# Enable rust test if it is built -if(OPTION_BUILD_LOADERS_RS) - set(TESTS_ENVIRONMENT_VARIABLES_RS "OPTION_BUILD_LOADERS_RS=1") -endif() - -test_environment_variables(${target} +test_environment_variables(${py_port_test_exec} "" ${TESTS_ENVIRONMENT_VARIABLES} ${TESTS_ENVIRONMENT_VARIABLES_RS} + "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) diff --git a/source/ports/py_port/test.py b/source/ports/py_port/test.py index 034a4ac690..7405b9c3cc 100644 --- a/source/ports/py_port/test.py +++ b/source/ports/py_port/test.py @@ -16,4 +16,7 @@ def main(): if len(result.errors) + len(result.failures) == 0: return 'Tests passed without errors' else: - return '' + exit(1) + +if __name__ == "__main__": + main() diff --git a/source/ports/py_port/test/commands/py_port.txt.in b/source/ports/py_port/test/commands/py_port.txt.in deleted file mode 100644 index 2a9019bbc8..0000000000 --- a/source/ports/py_port/test/commands/py_port.txt.in +++ /dev/null @@ -1,3 +0,0 @@ -load py ${CMAKE_CURRENT_SOURCE_DIR}/test.py -call main() -exit From b880e6180de766a675aa417cfe086fb8b7c747db Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 23 May 2025 18:22:56 +0200 Subject: [PATCH 160/364] Improve python.exe support. --- source/loader/include/loader/loader_host.h | 2 + source/loader/source/loader.c | 10 +- source/loader/source/loader_host.c | 11 ++ .../include/py_loader/py_loader_threading.h | 6 + .../loaders/py_loader/source/py_loader_impl.c | 147 +++++++++--------- .../source/py_loader_symbol_fallback.c | 64 ++++++++ .../py_loader/source/py_loader_threading.cpp | 29 +++- source/plugin/include/plugin/plugin_impl.h | 28 ++++ source/plugin/source/plugin_impl.c | 8 + .../dynlink_test/source/dynlink_test.cpp | 2 +- 10 files changed, 226 insertions(+), 81 deletions(-) diff --git a/source/loader/include/loader/loader_host.h b/source/loader/include/loader/loader_host.h index e5844e1256..cc740a299b 100644 --- a/source/loader/include/loader/loader_host.h +++ b/source/loader/include/loader/loader_host.h @@ -42,6 +42,8 @@ extern "C" { LOADER_API plugin loader_host_initialize(void); +LOADER_API plugin loader_host_get(void); + LOADER_API int loader_host_register(loader_impl host, context ctx, const char *name, loader_register_invoke invoke, function *func, type_id return_type, size_t arg_size, type_id args_type_id[]); #ifdef __cplusplus diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 1fe457cad6..c6786c9595 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -818,15 +818,19 @@ void loader_destroy(void) loader_unload_children(NULL); /* The host is the first loader, it must be destroyed at the end */ - if (manager_impl->host != NULL) + if (manager_impl->host == loader_host_get()) { if (plugin_manager_clear(&loader_manager, manager_impl->host) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Failed to clear host loader"); } - - manager_impl->host = NULL; } + else + { + plugin_destroyed(manager_impl->host); + } + + manager_impl->host = NULL; } plugin_manager_destroy(&loader_manager); diff --git a/source/loader/source/loader_host.c b/source/loader/source/loader_host.c index 7ddfb65a4d..0ac16440f3 100644 --- a/source/loader/source/loader_host.c +++ b/source/loader/source/loader_host.c @@ -52,6 +52,10 @@ static void loader_host_destroy_dtor(plugin p); static void loader_host_destroy(loader_impl host); +/* -- Private Member Data -- */ + +static plugin loader_host_plugin = NULL; + /* -- Methods -- */ function_return function_host_interface_invoke(function func, function_impl func_impl, function_args args, size_t size) @@ -139,12 +143,19 @@ plugin loader_host_initialize(void) goto error; } + loader_host_plugin = p; + return p; error: loader_host_destroy(host); return NULL; } +plugin loader_host_get(void) +{ + return loader_host_plugin; +} + int loader_host_register(loader_impl host, context ctx, const char *name, loader_register_invoke invoke, function *func, type_id return_type, size_t arg_size, type_id args_type_id[]) { void **invoke_ptr = (void *)&invoke; diff --git a/source/loaders/py_loader/include/py_loader/py_loader_threading.h b/source/loaders/py_loader/include/py_loader/py_loader_threading.h index 82b7ece7c8..592dcaa027 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_threading.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_threading.h @@ -23,6 +23,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -35,6 +37,10 @@ PY_LOADER_NO_EXPORT void py_loader_thread_acquire(void); PY_LOADER_NO_EXPORT void py_loader_thread_release(void); +PY_LOADER_NO_EXPORT void py_loader_thread_delayed_destroy(PyObject *obj); + +PY_LOADER_NO_EXPORT void py_loader_thread_destroy(void); + #ifdef __cplusplus } #endif diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 7c5f558230..15acd6ae70 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -292,9 +292,7 @@ void py_loader_impl_value_invoke_state_finalize(value v, void *data) if (loader_is_destroyed(invoke_state->impl) != 0 && capsule != NULL) { - py_loader_thread_acquire(); - Py_DECREF(capsule); - py_loader_thread_release(); + py_loader_thread_delayed_destroy(capsule); } free(invoke_state); @@ -312,10 +310,9 @@ void py_loader_impl_value_ptr_finalize(value v, void *data) if (loader_is_destroyed(impl) != 0) { - py_loader_thread_acquire(); PyObject *obj = (PyObject *)value_to_ptr(v); - Py_XDECREF(obj); - py_loader_thread_release(); + + py_loader_thread_delayed_destroy(obj); } } } @@ -401,9 +398,7 @@ void future_py_interface_destroy(future f, future_impl impl) { if (loader_is_destroyed(py_future->impl) != 0) { - py_loader_thread_acquire(); - Py_DECREF(py_future->future); - py_loader_thread_release(); + py_loader_thread_delayed_destroy(py_future->future); } free(py_future); @@ -555,18 +550,17 @@ void py_object_interface_destroy(object obj, object_impl impl) { if (loader_is_destroyed(py_object->impl) != 0) { - py_loader_thread_acquire(); - - Py_XDECREF(py_object->obj); - - py_loader_thread_release(); - - if (py_object->obj_class != NULL) + if (py_object->obj != NULL) { - value_type_destroy(py_object->obj_class); + py_loader_thread_delayed_destroy(py_object->obj); } } + if (py_object->obj_class != NULL) + { + value_type_destroy(py_object->obj_class); + } + free(py_object); } } @@ -781,9 +775,7 @@ void py_class_interface_destroy(klass cls, class_impl impl) { if (loader_is_destroyed(py_class->impl) != 0) { - py_loader_thread_acquire(); - Py_XDECREF(py_class->cls); - py_loader_thread_release(); + py_loader_thread_delayed_destroy(py_class->cls); } free(py_class); @@ -1862,9 +1854,7 @@ void function_py_interface_destroy(function func, function_impl impl) if (loader_is_destroyed(py_func->impl) != 0) { - py_loader_thread_acquire(); - Py_DECREF(py_func->func); - py_loader_thread_release(); + py_loader_thread_delayed_destroy(py_func->func); } free(py_func); @@ -1958,25 +1948,9 @@ PyObject *py_loader_impl_function_type_invoke(PyObject *self, PyObject *args) Py_RETURN_NONE; } -PyObject *py_loader_impl_get_builtin(loader_impl_py py_impl, const char *builtin_name) -{ - PyObject *builtin = PyObject_GetAttrString(py_impl->builtins_module, builtin_name); - - Py_XINCREF(builtin); - - if (builtin != NULL && PyType_Check(builtin)) - { - return builtin; - } - - Py_XDECREF(builtin); - - return NULL; -} - int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, type_id id, const char *name) { - PyObject *builtin = py_loader_impl_get_builtin(py_impl, name); + PyObject *builtin = PyObject_GetAttrString(py_impl->builtins_module, name); if (builtin == NULL) { @@ -1990,11 +1964,14 @@ int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, ty goto error_create_type; } - if (loader_impl_type_define(impl, type_name(builtin_type), builtin_type) == 0) + if (loader_impl_type_define(impl, type_name(builtin_type), builtin_type) != 0) { - return 0; + goto error_define_type; } + return 0; + +error_define_type: type_destroy(builtin_type); error_create_type: Py_DECREF(builtin); @@ -2004,17 +1981,7 @@ int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, ty int py_loader_impl_import_module(loader_impl_py py_impl, PyObject **module, const char *name) { - PyObject *module_name, *sys_modules = PyImport_GetModuleDict(); - *module = PyDict_GetItemString(sys_modules, name); - - if (*module != NULL) - { - return 0; - } - - module_name = PyUnicode_DecodeFSDefault(name); - *module = PyImport_Import(module_name); - Py_DECREF(module_name); + *module = PyImport_ImportModule(name); if (*module == NULL) { @@ -2247,9 +2214,11 @@ int py_loader_impl_initialize_traceback(loader_impl impl, loader_impl_py py_impl return 1; } +#if DEBUG_ENABLED int py_loader_impl_initialize_gc(loader_impl_py py_impl) { -#if DEBUG_ENABLED + PyObject *flags; + if (py_loader_impl_import_module(py_impl, &py_impl->gc_module, "gc") != 0) { goto error_import_module; @@ -2268,33 +2237,55 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) } py_impl->gc_debug_leak = PyDict_GetItemString(PyModule_GetDict(py_impl->gc_module), "DEBUG_LEAK"); + + if (py_impl->gc_debug_leak == NULL) + { + goto error_callable_check; + } + + Py_INCREF(py_impl->gc_debug_leak); + py_impl->gc_debug_stats = PyDict_GetItemString(PyModule_GetDict(py_impl->gc_module), "DEBUG_STATS"); - if (py_impl->gc_debug_leak != NULL && py_impl->gc_debug_stats != NULL) + if (py_impl->gc_debug_stats == NULL) { - Py_INCREF(py_impl->gc_debug_leak); - Py_INCREF(py_impl->gc_debug_stats); + goto error_debug_leak; + } - return 0; + Py_INCREF(py_impl->gc_debug_stats); + + flags = PyNumber_Or(py_impl->gc_debug_leak, py_impl->gc_debug_stats); + + if (flags == NULL) + { + goto error_debug_stats; } - Py_XDECREF(py_impl->gc_debug_leak); - Py_XDECREF(py_impl->gc_debug_stats); + PyObject_CallFunctionObjArgs(py_impl->gc_set_debug, flags, NULL); + + Py_DECREF(flags); + + if (PyErr_Occurred() != NULL) + { + goto error_call_set_debug; + } + return 0; + +error_call_set_debug: + py_loader_impl_error_print(py_impl); +error_debug_stats: + Py_XDECREF(py_impl->gc_debug_stats); +error_debug_leak: + Py_XDECREF(py_impl->gc_debug_leak); error_callable_check: Py_XDECREF(py_impl->gc_set_debug); error_set_debug: Py_DECREF(py_impl->gc_module); error_import_module: return 1; -#else - { - (void)py_impl; - - return 1; - } -#endif } +#endif int py_loader_impl_initialize_import(loader_impl_py py_impl) { @@ -2398,6 +2389,7 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) "import asyncio\n" "import threading\n" "import sys\n" + // "import atexit; atexit.register(getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None))\n" "class ThreadLoop:\n" " def __init__(self, loop, t):\n" " self.loop = loop\n" @@ -2433,9 +2425,10 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) " if join:\n" " tl.t.join()\n" "def atexit_background_loop(tl):\n" - /* This checks if py_port_impl_module contains py_loader_port_atexit */ - " py_loader_port_atexit = getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)\n" - " tl.loop.call_soon_threadsafe(py_loader_port_atexit)\n" + /* Checks if py_port_impl_module contains py_loader_port_atexit and executes it */ + // " py_loader_port_atexit = getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)\n" + " getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)()\n" + // " tl.loop.call_soon_threadsafe(stop_background_loop, tl, False)\n" "def register_atexit_background_loop(tl):\n" " threading._register_atexit(atexit_background_loop, tl)\n"; @@ -2714,12 +2707,9 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #if DEBUG_ENABLED /* Initialize GC module */ { - if (py_loader_impl_initialize_gc(py_impl) != 0) - { - PyObject_CallMethodObjArgs(py_impl->gc_module, py_impl->gc_set_debug, py_impl->gc_debug_leak /* py_impl->gc_debug_stats */); - gc_initialized = 0; - } - else + gc_initialized = py_loader_impl_initialize_gc(py_impl); + + if (gc_initialized != 0) { log_write("metacall", LOG_LEVEL_WARNING, "Invalid garbage collector module creation"); } @@ -4253,6 +4243,10 @@ int py_loader_impl_destroy(loader_impl impl) } } + /* Delete all the objects from the destructors of the other threads */ + py_loader_thread_destroy(); + + /* Destroy all Python loader objects */ Py_DECREF(py_impl->inspect_signature); Py_DECREF(py_impl->inspect_getattr_static); Py_DECREF(py_impl->inspect_getfullargspec); @@ -4286,6 +4280,7 @@ int py_loader_impl_destroy(loader_impl impl) } #endif + /* Destroy Python runtime itself (only when it is not the host) */ result = py_loader_impl_finalize(py_impl, host); if (host == 0) diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 6ecfd3582c..62ca995138 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -23,6 +23,70 @@ /* Required for when linking to Python in debug mode and loading with Python.exe in release mode */ #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) #if defined(__clang__) || defined(__GNUC__) + + #include + __attribute__((weak)) void _Py_DECREF_DecRefTotal(void) {} +__attribute__((weak)) void _Py_INCREF_IncRefTotal(void) {} + + /* When Python has been compiled with tracing reference counting, +provide fallback symbols for allowing it to compile properly */ + #ifdef Py_TRACE_REFS + + #undef PyModule_Create2 + #undef PyModule_FromDefAndSpec2 + +static dynlink_symbol_addr py_loader_symbol(const char *name) +{ + dynlink proc = dynlink_load_self(DYNLINK_FLAGS_BIND_NOW | DYNLINK_FLAGS_BIND_GLOBAL); + dynlink_symbol_addr addr = NULL; + + if (proc == NULL) + { + return NULL; + } + + dynlink_symbol(proc, name, &addr); + + dynlink_unload(proc); + + return addr; +} + +__attribute__((weak)) PyObject *PyModule_Create2(struct PyModuleDef *module, int module_api_version) +{ + static PyObject *(*py_module_create2)(struct PyModuleDef *, int) = NULL; + + if (py_module_create2 == NULL) + { + py_module_create2 = (PyObject * (*)(struct PyModuleDef *, int)) py_loader_symbol("PyModule_Create2TraceRefs"); + } + + if (py_module_create2 == NULL) + { + return NULL; + } + + return py_module_create2(module, module_api_version); +} +__attribute__((weak)) PyObject *PyModule_FromDefAndSpec2(PyModuleDef *def, PyObject *spec, int module_api_version) +{ + static PyObject *(*py_module_from_def_and_spec2)(struct PyModuleDef *, PyObject *, int) = NULL; + + if (py_module_from_def_and_spec2 == NULL) + { + py_module_from_def_and_spec2 = (PyObject * (*)(struct PyModuleDef *, PyObject *, int)) py_loader_symbol("PyModule_FromDefAndSpec2TraceRefs"); + } + + if (py_module_from_def_and_spec2 == NULL) + { + return NULL; + } + + return py_module_from_def_and_spec2(def, spec, module_api_version); +} + + #endif + #endif #endif diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 3a669d0135..32b2e1c936 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -22,7 +22,7 @@ #include -#include +#include struct py_thread_state { @@ -61,6 +61,7 @@ static uint64_t main_thread_id = 0; static uint64_t main_thread_ref_count = 0; thread_local py_thread_state current_thread_state; thread_local uint64_t current_thread_id = thread_id_get_current(); +static std::vector delayed_destructor; void py_loader_thread_initialize(const int host) { @@ -119,3 +120,29 @@ void py_loader_thread_release() current_thread_state.release(); } } + +void py_loader_thread_delayed_destroy(PyObject *obj) +{ + if (main_thread_id == current_thread_id) + { + py_loader_thread_acquire(); + Py_DECREF(obj); + py_loader_thread_release(); + } + else + { + delayed_destructor.push_back(obj); + } +} + +void py_loader_thread_destroy(void) +{ + py_loader_thread_acquire(); + + for (auto obj : delayed_destructor) + { + Py_DECREF(obj); + } + + py_loader_thread_release(); +} diff --git a/source/plugin/include/plugin/plugin_impl.h b/source/plugin/include/plugin/plugin_impl.h index bc8b51ecf0..1489ca97d6 100644 --- a/source/plugin/include/plugin/plugin_impl.h +++ b/source/plugin/include/plugin/plugin_impl.h @@ -59,8 +59,36 @@ PLUGIN_API void *plugin_iface(plugin p); PLUGIN_API void *plugin_impl(plugin p); +/** +* @brief +* Executes the destructor once and nullifies it, it does not free +* the memory of the plugin but the destructor is removed +* +* @param[in] p +* The plugin that will be used to execute the destructor +*/ PLUGIN_API void plugin_destructor(plugin p); +/** +* @brief +* Marks the plugin as destroyed, nullifies the destructor +* but does not free the memory of the plugin, this is useful +* for when we execute loader plugin manager in host mode, +* because the destructor is called without the control of metacall, +* and it prevents to call it again after it has been called by host +* +* @param[in] p +* The plugin that will be used to clear the destructor +*/ +PLUGIN_API void plugin_destroyed(plugin p); + +/** +* @brief +* Executes the destructor if any and frees all the memory +* +* @param[in] p +* The plugin to be destroyed +*/ PLUGIN_API void plugin_destroy(plugin p); #ifdef __cplusplus diff --git a/source/plugin/source/plugin_impl.c b/source/plugin/source/plugin_impl.c index 5cb9e6f2cc..511897bde7 100644 --- a/source/plugin/source/plugin_impl.c +++ b/source/plugin/source/plugin_impl.c @@ -113,6 +113,14 @@ void plugin_destructor(plugin p) } } +void plugin_destroyed(plugin p) +{ + if (p != NULL) + { + p->dtor = NULL; + } +} + void plugin_destroy(plugin p) { if (p != NULL) diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 1ebd63613a..8bebf45267 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -62,7 +62,7 @@ TEST_F(dynlink_test, DefaultConstructor) /* Test loading symbols from current process */ { - dynlink proc = dynlink_load_self(DYNLINK_FLAGS_BIND_GLOBAL | DYNLINK_FLAGS_BIND_LAZY); + dynlink proc = dynlink_load_self(DYNLINK_FLAGS_BIND_LAZY | DYNLINK_FLAGS_BIND_GLOBAL); ASSERT_NE((dynlink)proc, (dynlink)(NULL)); From 27c005dcf56012f40751ecbbda48ea66f18df64a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 23 May 2025 18:43:51 +0200 Subject: [PATCH 161/364] Change print of gc. --- .../loaders/py_loader/source/py_loader_impl.c | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 15acd6ae70..f5de0f6c67 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -4130,29 +4130,39 @@ value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject void py_loader_impl_gc_print(loader_impl_py py_impl) { static const char garbage_format_str[] = "Python Garbage Collector:\n%s"; - static const char separator_str[] = "\n"; + PyObject *garbage_repr, *garbage_list = PyObject_GetAttrString(py_impl->gc_module, "garbage"); + const char *garbage_str; - PyObject *garbage_list, *separator, *garbage_str_obj; + if (garbage_list == NULL) + { + goto error_garbage_list; + } - garbage_list = PyObject_GetAttrString(py_impl->gc_module, "garbage"); + garbage_repr = PyObject_Repr(garbage_list); - #if PY_MAJOR_VERSION == 2 - separator = PyString_FromString(separator_str); - - garbage_str_obj = PyString_Join(separator, garbage_list); + if (garbage_repr == NULL) + { + goto error_garbage_repr; + } - log_write("metacall", LOG_LEVEL_DEBUG, garbage_format_str, PyString_AsString(garbage_str_obj)); - #elif PY_MAJOR_VERSION == 3 - separator = PyUnicode_FromString(separator_str); + garbage_str = PyUnicode_AsUTF8(garbage_repr); - garbage_str_obj = PyUnicode_Join(separator, garbage_list); + if (garbage_str == NULL) + { + goto error_garbage_str; + } - log_write("metacall", LOG_LEVEL_DEBUG, garbage_format_str, PyUnicode_AsUTF8(garbage_str_obj)); - #endif + log_write("metacall", LOG_LEVEL_DEBUG, garbage_format_str, garbage_str); +error_garbage_str: + Py_DECREF(garbage_repr); +error_garbage_repr: Py_DECREF(garbage_list); - Py_DECREF(separator); - Py_DECREF(garbage_str_obj); +error_garbage_list: + if (PyErr_Occurred() != NULL) + { + py_loader_impl_error_print(py_impl); + } } void py_loader_impl_sys_path_print(PyObject *sys_path_list) From 99fdb5f9b1db118e14f2eeb2a9cd106662729e38 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 28 May 2025 17:18:35 +0200 Subject: [PATCH 162/364] Try to solve issues with python and iterators. --- cmake/CompileOptions.cmake | 49 ++++ source/adt/include/adt/adt_map.h | 13 +- source/adt/include/adt/adt_set.h | 13 +- source/adt/source/adt_map.c | 42 +-- source/adt/source/adt_set.c | 42 +-- source/adt/source/adt_trie.c | 22 +- .../benchmarks/set_bench/source/set_bench.cpp | 6 +- .../source/configuration_object.c | 14 +- .../source/configuration_singleton.c | 6 +- source/loader/source/loader.c | 12 +- source/loader/source/loader_impl.c | 38 +-- .../node_loader/source/node_loader_impl.cpp | 8 +- .../include/py_loader/py_loader_port.h | 2 - .../loaders/py_loader/source/py_loader_dict.c | 2 - .../source/py_loader_symbol_fallback.c | 6 +- .../include/rb_loader/rb_loader_impl_parser.h | 8 +- .../include/rb_loader/rb_loader_port.h | 36 +++ .../rb_loader/source/rb_loader_impl_parser.c | 12 +- .../loaders/rb_loader/source/rb_loader_port.c | 148 ++++++++++ source/plugin/source/plugin_manager.c | 6 +- source/ports/java_port/CMakeLists.txt | 262 ------------------ source/ports/java_port/pom.xml | 84 ------ .../java/metacall/{util.java => Utils.java} | 2 +- .../java_port/test/{run.java.in => main.java} | 0 source/ports/js_port/CMakeLists.txt | 16 ++ source/ports/py_port/CMakeLists.txt | 9 + source/reflect/source/reflect_class.c | 32 +-- source/reflect/source/reflect_scope.c | 22 +- .../scripts/python/garbage/source/garbage.py | 2 +- .../adt_map_test/source/adt_map_test.cpp | 7 +- .../adt_set_test/source/adt_set_test.cpp | 7 +- .../source/metacall_node_python_ruby_test.cpp | 2 +- .../source/metacall_python_gc_test.cpp | 6 +- 33 files changed, 423 insertions(+), 513 deletions(-) create mode 100644 source/loaders/rb_loader/include/rb_loader/rb_loader_port.h create mode 100644 source/loaders/rb_loader/source/rb_loader_port.c delete mode 100644 source/ports/java_port/pom.xml rename source/ports/java_port/src/main/java/metacall/{util.java => Utils.java} (98%) rename source/ports/java_port/test/{run.java.in => main.java} (100%) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index e72d648a19..1718b84d72 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -427,6 +427,55 @@ if (PROJECT_OS_FAMILY MATCHES "unix" OR PROJECT_OS_FAMILY MATCHES "macos") endif() endif() +macro(check_symbol_executable symbol binary_path result_var) + if(WIN32) + find_program(DUMPBIN_EXECUTABLE dumpbin) + if(NOT DUMPBIN_EXECUTABLE) + message(FATAL_ERROR "Trying to find symbol ${symbol} in ${binary_path} but dumpbin was not found") + endif() + execute_process( + COMMAND ${DUMPBIN_EXECUTABLE} /symbols ${binary_path} + OUTPUT_VARIABLE dumpbin_output + RESULT_VARIABLE dumpbin_result + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(FIND "${dumpbin_output}" symbol SYMBOL_FOUND) + if(NOT SYMBOL_FOUND EQUAL -1) + set(${result_var} TRUE PARENT_SCOPE) + else() + set(${result_var} FALSE PARENT_SCOPE) + endif() + else() + find_program(NM_EXECUTABLE nm) + if(NM_EXECUTABLE) + execute_process( + COMMAND ${NM_EXECUTABLE} -D ${binary_path} + OUTPUT_VARIABLE nm_output + RESULT_VARIABLE nm_result + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(FIND "${nm_output}" symbol SYMBOL_FOUND) + if(NOT SYMBOL_FOUND EQUAL -1) + set(${result_var} TRUE PARENT_SCOPE) + else() + set(${result_var} FALSE PARENT_SCOPE) + endif() + else() + message(FATAL_ERROR "Trying to find symbol ${symbol} in ${binary_path} but nm was not found") + endif() + endif() +endmacro() + +function(check_asan_executable binary_path result_var) + check_symbol_executable("__asan_init" "${binary_path}" ${result_var}) +endfunction() + +function(check_tsan_executable binary_path result_var) + check_symbol_executable("__tsan_init" "${binary_path}" ${result_var}) +endfunction() + # # Linker options # diff --git a/source/adt/include/adt/adt_map.h b/source/adt/include/adt/adt_map.h index e0236c8b6c..2a256463ed 100644 --- a/source/adt/include/adt/adt_map.h +++ b/source/adt/include/adt/adt_map.h @@ -51,6 +51,15 @@ typedef int (*map_cb_iterate)(map, map_key, map_value, map_cb_iterate_args); typedef struct map_iterator_type *map_iterator; +/* -- Member Data -- */ + +struct map_iterator_type +{ + map m; + size_t current_bucket; + size_t current_pair; +}; + /* -- Methods -- */ ADT_API map map_create(map_cb_hash hash_cb, map_cb_compare compare_cb); @@ -79,7 +88,7 @@ ADT_API int map_clear(map m); ADT_API void map_destroy(map m); -ADT_API map_iterator map_iterator_begin(map m); +ADT_API void map_iterator_begin(map_iterator it, map m); ADT_API map_key map_iterator_key(map_iterator it); @@ -87,7 +96,7 @@ ADT_API map_value map_iterator_value(map_iterator it); ADT_API void map_iterator_next(map_iterator it); -ADT_API int map_iterator_end(map_iterator *it); +ADT_API int map_iterator_end(map_iterator it); #ifdef __cplusplus } diff --git a/source/adt/include/adt/adt_set.h b/source/adt/include/adt/adt_set.h index 2515d052fc..a662a90b8b 100644 --- a/source/adt/include/adt/adt_set.h +++ b/source/adt/include/adt/adt_set.h @@ -50,6 +50,15 @@ typedef int (*set_cb_iterate)(set, set_key, set_value, set_cb_iterate_args); typedef struct set_iterator_type *set_iterator; +/* -- Member Data -- */ + +struct set_iterator_type +{ + set s; + size_t current_bucket; + size_t current_pair; +}; + /* -- Methods -- */ ADT_API set set_create(set_cb_hash hash_cb, set_cb_compare compare_cb); @@ -80,7 +89,7 @@ ADT_API int set_clear(set s); ADT_API void set_destroy(set s); -ADT_API set_iterator set_iterator_begin(set s); +ADT_API void set_iterator_begin(set_iterator it, set s); ADT_API set_key set_iterator_key(set_iterator it); @@ -88,7 +97,7 @@ ADT_API set_value set_iterator_value(set_iterator it); ADT_API void set_iterator_next(set_iterator it); -ADT_API int set_iterator_end(set_iterator *it); +ADT_API int set_iterator_end(set_iterator it); #ifdef __cplusplus } diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 949a211b6f..2f1faaf5ce 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -42,13 +42,6 @@ struct map_type map_cb_compare compare_cb; }; -struct map_iterator_type -{ - map m; - size_t current_bucket; - size_t current_pair; -}; - /* -- Methods -- */ map map_create(map_cb_hash hash_cb, map_cb_compare compare_cb) @@ -506,30 +499,29 @@ void map_destroy(map m) free(m); } -map_iterator map_iterator_begin(map m) +void map_iterator_begin(map_iterator it, map m) { - if (m != NULL && m->buckets != NULL && map_size(m) > 0) + if (it != NULL) { - map_iterator it = malloc(sizeof(struct map_iterator_type)); + it->current_bucket = 0; + it->current_pair = 0; - if (it != NULL) + if (m != NULL && m->buckets != NULL && map_size(m) > 0) { it->m = m; - it->current_bucket = 0; - it->current_pair = 0; map_iterator_next(it); - - return it; + } + else + { + it->m = NULL; } } - - return NULL; } map_key map_iterator_key(map_iterator it) { - if (it != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) + if (it != NULL && it->m != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) { return it->m->buckets[it->current_bucket].pairs[it->current_pair - 1].key; } @@ -539,7 +531,7 @@ map_key map_iterator_key(map_iterator it) map_value map_iterator_value(map_iterator it) { - if (it != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) + if (it != NULL && it->m != NULL && it->current_bucket < it->m->capacity && it->current_pair > 0) { return it->m->buckets[it->current_bucket].pairs[it->current_pair - 1].value; } @@ -549,7 +541,7 @@ map_value map_iterator_value(map_iterator it) void map_iterator_next(map_iterator it) { - if (it != NULL) + if (it != NULL && it->m != NULL) { for (; it->current_bucket < it->m->capacity; ++it->current_bucket) { @@ -575,16 +567,12 @@ void map_iterator_next(map_iterator it) } } -int map_iterator_end(map_iterator *it) +int map_iterator_end(map_iterator it) { - if (it != NULL && *it != NULL) + if (it != NULL && it->m != NULL) { - if ((*it)->current_bucket >= (*it)->m->capacity) + if (it->current_bucket >= it->m->capacity) { - free(*it); - - *it = NULL; - return 0; } diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index e6d79c36a2..94816c032d 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -42,13 +42,6 @@ struct set_type set_cb_compare compare_cb; }; -struct set_iterator_type -{ - set s; - size_t current_bucket; - size_t current_pair; -}; - /* -- Methods -- */ set set_create(set_cb_hash hash_cb, set_cb_compare compare_cb) @@ -521,30 +514,29 @@ void set_destroy(set s) free(s); } -set_iterator set_iterator_begin(set s) +void set_iterator_begin(set_iterator it, set s) { - if (s != NULL && s->buckets != NULL && set_size(s) > 0) + if (it != NULL) { - set_iterator it = malloc(sizeof(struct set_iterator_type)); + it->current_bucket = 0; + it->current_pair = 0; - if (it != NULL) + if (s != NULL && s->buckets != NULL && set_size(s) > 0) { it->s = s; - it->current_bucket = 0; - it->current_pair = 0; set_iterator_next(it); - - return it; + } + else + { + it->s = NULL; } } - - return NULL; } set_key set_iterator_key(set_iterator it) { - if (it != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) + if (it != NULL && it->s != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) { return it->s->buckets[it->current_bucket].pairs[it->current_pair - 1].key; } @@ -554,7 +546,7 @@ set_key set_iterator_key(set_iterator it) set_value set_iterator_value(set_iterator it) { - if (it != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) + if (it != NULL && it->s != NULL && it->current_bucket < it->s->capacity && it->current_pair > 0) { return it->s->buckets[it->current_bucket].pairs[it->current_pair - 1].value; } @@ -564,7 +556,7 @@ set_value set_iterator_value(set_iterator it) void set_iterator_next(set_iterator it) { - if (it != NULL) + if (it != NULL && it->s != NULL) { for (; it->current_bucket < it->s->capacity; ++it->current_bucket) { @@ -590,16 +582,12 @@ void set_iterator_next(set_iterator it) } } -int set_iterator_end(set_iterator *it) +int set_iterator_end(set_iterator it) { - if (it != NULL && *it != NULL) + if (it != NULL && it->s != NULL) { - if ((*it)->current_bucket >= (*it)->s->capacity) + if (it->current_bucket >= it->s->capacity) { - free(*it); - - *it = NULL; - return 0; } diff --git a/source/adt/source/adt_trie.c b/source/adt/source/adt_trie.c index 68e3d5d288..047c20a698 100644 --- a/source/adt/source/adt_trie.c +++ b/source/adt/source/adt_trie.c @@ -524,11 +524,11 @@ void trie_node_iterate(trie t, trie_node n, trie_cb_iterate iterate_cb, trie_cb_ if (back->childs != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) + for (set_iterator_begin(&it, back->childs); set_iterator_end(&it) > 0; set_iterator_next(&it)) { - trie_node_ref ref_node = set_iterator_value(it); + trie_node_ref ref_node = set_iterator_value(&it); trie_node current_node = &t->node_list[ref_node->index]; @@ -610,11 +610,11 @@ int trie_node_clear(trie t, trie_node n) if (back->childs != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) + for (set_iterator_begin(&it, back->childs); set_iterator_end(&it) > 0; set_iterator_next(&it)) { - trie_node_ref ref_node = set_iterator_value(it); + trie_node_ref ref_node = set_iterator_value(&it); trie_node current_node = &t->node_list[ref_node->index]; @@ -682,14 +682,13 @@ trie_node trie_node_find(trie t, trie_key key) if (back_ptr != NULL && *back_ptr != NULL) { trie_node back = *back_ptr; - - set_iterator it = NULL; + struct set_iterator_type it; if (back->childs != NULL) { - for (it = set_iterator_begin(back->childs); set_iterator_end(&it) > 0; set_iterator_next(it)) + for (set_iterator_begin(&it, back->childs); set_iterator_end(&it) > 0; set_iterator_next(&it)) { - trie_node_ref ref_node = set_iterator_value(it); + trie_node_ref ref_node = set_iterator_value(&it); trie_node current_node = &t->node_list[ref_node->index]; @@ -699,9 +698,10 @@ trie_node trie_node_find(trie t, trie_key key) if (back->key != NULL && t->compare_cb(back->key, key) == 0) { + /* TODO: it may be un-initialized here */ while (set_iterator_end(&it) > 0) { - set_iterator_next(it); + set_iterator_next(&it); } vector_destroy(node_stack); diff --git a/source/benchmarks/set_bench/source/set_bench.cpp b/source/benchmarks/set_bench/source/set_bench.cpp index 2e998b0d7a..2129c98b54 100644 --- a/source/benchmarks/set_bench/source/set_bench.cpp +++ b/source/benchmarks/set_bench/source/set_bench.cpp @@ -88,6 +88,7 @@ BENCHMARK_REGISTER_F(set_bench, set_iterate) ->Iterations(ITERATIONS) ->Repetitions(3); +/* BENCHMARK_DEFINE_F(set_bench, set_iterators) (benchmark::State &state) { @@ -113,8 +114,8 @@ BENCHMARK_REGISTER_F(set_bench, set_iterators) ->Unit(benchmark::kMillisecond) ->Iterations(ITERATIONS) ->Repetitions(3); +*/ -/* BENCHMARK_DEFINE_F(set_bench, set_iterators_2) (benchmark::State &state) { @@ -124,7 +125,7 @@ BENCHMARK_DEFINE_F(set_bench, set_iterators_2) { set_iterator_type it; - for (set_iterator_begin_2(s, &it); set_iterator_end_2(&it) > 0; set_iterator_next(&it)) + for (set_iterator_begin(&it, s); set_iterator_end(&it) > 0; set_iterator_next(&it)) { int *i = (int *)set_iterator_value(&it); @@ -142,6 +143,5 @@ BENCHMARK_REGISTER_F(set_bench, set_iterators_2) ->Unit(benchmark::kMillisecond) ->Iterations(ITERATIONS) ->Repetitions(3); -*/ BENCHMARK_MAIN(); diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index cf3aaa85f4..f38298023c 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -156,11 +156,11 @@ configuration configuration_object_initialize(const char *name, const char *path if (config->parent != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(config->parent->map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, config->parent->map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - set_insert(config->map, set_iterator_key(it), set_iterator_value(it)); + set_insert(config->map, set_iterator_key(&it), set_iterator_value(&it)); } } @@ -216,12 +216,12 @@ int configuration_object_childs_valid(set_key key, set_value val) int configuration_object_childs(configuration config, vector childs, set storage) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(config->map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, config->map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - set_key key = set_iterator_key(it); - set_value val = set_iterator_value(it); + set_key key = set_iterator_key(&it); + set_value val = set_iterator_value(&it); if (configuration_object_childs_valid(key, val) == 0) { diff --git a/source/configuration/source/configuration_singleton.c b/source/configuration/source/configuration_singleton.c index 8fdd0aeead..7d8d094b4c 100644 --- a/source/configuration/source/configuration_singleton.c +++ b/source/configuration/source/configuration_singleton.c @@ -119,11 +119,11 @@ void configuration_singleton_destroy(void) if (singleton->scopes != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(singleton->scopes); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, singleton->scopes); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - configuration config = set_iterator_value(it); + configuration config = set_iterator_value(&it); configuration_object_destroy(config); } diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index c6786c9595..5a440a1e15 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -540,11 +540,11 @@ int loader_load_from_configuration(const loader_path path, void **handle, void * value loader_get(const char *name) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(loader_manager.plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, loader_manager.plugins); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - plugin p = set_iterator_value(it); + plugin p = set_iterator_value(&it); loader_impl impl = plugin_impl_type(p, loader_impl); @@ -681,7 +681,7 @@ value loader_metadata_impl(plugin p, loader_impl impl) value loader_metadata(void) { value *values, v = value_create_map(NULL, plugin_manager_size(&loader_manager)); - set_iterator it; + struct set_iterator_type it; size_t values_it; if (v == NULL) @@ -691,9 +691,9 @@ value loader_metadata(void) values = value_to_map(v); - for (it = set_iterator_begin(loader_manager.plugins), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, loader_manager.plugins), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(&it)) { - plugin p = set_iterator_value(it); + plugin p = set_iterator_value(&it); loader_impl impl = plugin_impl_type(p, loader_impl); diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index c47db9e273..531199fd1c 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -511,11 +511,11 @@ int loader_impl_link(plugin p, loader_impl impl) while (detour_enumerate(impl->d, loader_handle, &position, &name, &addr) == 0) { /* Iterate through all library handles in the library map */ - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - dynlink library_handle = set_iterator_value(it); + dynlink library_handle = set_iterator_value(&it); /* Try to find the symbols in the dependencies, do not use the loader dynlink handle for this, it is included in the library map */ @@ -1010,12 +1010,12 @@ int loader_impl_handle_register(plugin_manager manager, loader_impl impl, const /* If there's no handle input/output pointer passed as input parameter, then propagate the handle symbols to the loader context */ if (handle_ptr == NULL) { - set_iterator it; + struct set_iterator_type it; /* This case handles the global scope (shared scope between all loaders, there is no out reference to a handle) */ - for (it = set_iterator_begin(manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - plugin p = set_iterator_value(it); + plugin p = set_iterator_value(&it); loader_impl other_impl = plugin_impl_type(p, loader_impl); char *duplicated_key = NULL; @@ -1709,7 +1709,7 @@ value loader_impl_metadata_handle(loader_handle_impl handle_impl) value loader_impl_metadata(loader_impl impl) { value *values, v = value_create_array(NULL, set_size(impl->handle_impl_path_map)); - set_iterator it; + struct set_iterator_type it; size_t values_it; if (v == NULL) @@ -1719,9 +1719,9 @@ value loader_impl_metadata(loader_impl impl) values = value_to_map(v); - for (it = set_iterator_begin(impl->handle_impl_path_map), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->handle_impl_path_map), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(&it)) { - loader_handle_impl handle_impl = set_iterator_value(it); + loader_handle_impl handle_impl = set_iterator_value(&it); values[values_it] = loader_impl_metadata_handle(handle_impl); @@ -1809,11 +1809,11 @@ void loader_impl_destroy_objects(loader_impl impl) /* Destroy all the types */ { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(impl->type_info_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->type_info_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - type t = set_iterator_value(it); + type t = set_iterator_value(&it); type_destroy(t); } @@ -1825,12 +1825,12 @@ void loader_impl_destroy_objects(loader_impl impl) void loader_impl_destroy_deallocate(loader_impl impl) { - set_iterator it; + struct set_iterator_type it; /* Destroy execution path map */ - for (it = set_iterator_begin(impl->exec_path_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->exec_path_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - vector paths = set_iterator_value(it); + vector paths = set_iterator_value(&it); vector_destroy(paths); } @@ -1847,9 +1847,9 @@ void loader_impl_destroy_deallocate(loader_impl impl) } /* Destroy detour map */ - for (it = set_iterator_begin(impl->detour_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->detour_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - detour_handle handle = set_iterator_value(it); + detour_handle handle = set_iterator_value(&it); detour_unload(impl->d, handle); } @@ -1865,9 +1865,9 @@ void loader_impl_destroy_deallocate(loader_impl impl) this method still should work because normally those handles are reference counted and we increment the reference counter at the beginning, so they will be properly unloaded when the dynlink handle gets unloaded. */ - for (it = set_iterator_begin(impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, impl->library_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - dynlink dependency = set_iterator_value(it); + dynlink dependency = set_iterator_value(&it); dynlink_unload(dependency); } diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index 77e66b08a3..e12594884a 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -178,8 +178,8 @@ union loader_impl_handle_safe_cast typedef struct loader_impl_node_function_type { - loader_impl_node node_impl; loader_impl impl; + loader_impl_node node_impl; napi_ref func_ref; napi_value *argv; @@ -187,6 +187,7 @@ typedef struct loader_impl_node_function_type typedef struct loader_impl_node_future_type { + loader_impl impl; loader_impl_node node_impl; napi_ref promise_ref; @@ -1357,6 +1358,7 @@ value node_loader_impl_napi_to_value(loader_impl_node node_impl, napi_env env, n /* Create reference to promise */ node_future->node_impl = node_impl; + node_future->impl = node_impl->impl; status = napi_create_reference(env, v, 1, &node_future->promise_ref); @@ -1843,7 +1845,7 @@ void function_node_interface_destroy(function func, function_impl impl) return; } - if (loader_is_destroyed(node_func->node_impl->impl) != 0) + if (loader_is_destroyed(node_func->impl) != 0) { loader_impl_node node_impl = node_func->node_impl; loader_impl_async_func_destroy_safe_type func_destroy_safe(node_impl, node_func); @@ -1924,7 +1926,7 @@ void future_node_interface_destroy(future f, future_impl impl) return; } - if (loader_is_destroyed(node_future->node_impl->impl) != 0) + if (loader_is_destroyed(node_future->impl) != 0) { loader_impl_node node_impl = node_future->node_impl; loader_impl_async_future_delete_safe_type future_delete_safe(node_impl, f, node_future); diff --git a/source/loaders/py_loader/include/py_loader/py_loader_port.h b/source/loaders/py_loader/include/py_loader/py_loader_port.h index eea4cd7844..617ba0d5d2 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_port.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_port.h @@ -23,8 +23,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index 48c1bdee61..2fc9bd1c7c 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -23,8 +23,6 @@ #include -#include - #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 13 /* Disable warnings from Python */ #if defined(__clang__) diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 62ca995138..837b88338c 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -24,15 +24,15 @@ #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) #if defined(__clang__) || defined(__GNUC__) - #include - __attribute__((weak)) void _Py_DECREF_DecRefTotal(void) {} __attribute__((weak)) void _Py_INCREF_IncRefTotal(void) {} /* When Python has been compiled with tracing reference counting, -provide fallback symbols for allowing it to compile properly */ + * provide fallback symbols for allowing it to compile properly */ #ifdef Py_TRACE_REFS + #include + #undef PyModule_Create2 #undef PyModule_FromDefAndSpec2 diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h index 6a854d079a..8c739f706a 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl_parser.h @@ -21,6 +21,8 @@ #ifndef RB_LOADER_IMPL_PARSER_H #define RB_LOADER_IMPL_PARSER_H 1 +#include + #include #ifdef __cplusplus @@ -48,11 +50,11 @@ typedef struct rb_function_parser_type } * rb_function_parser; -int rb_loader_impl_key_parse(const char *source, set function_map); +RB_LOADER_NO_EXPORT int rb_loader_impl_key_parse(const char *source, set function_map); -void rb_loader_impl_key_print(set function_map); +RB_LOADER_NO_EXPORT void rb_loader_impl_key_print(set function_map); -void rb_loader_impl_key_clear(set function_map); +RB_LOADER_NO_EXPORT void rb_loader_impl_key_clear(set function_map); #ifdef __cplusplus } diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h new file mode 100644 index 0000000000..20598f2803 --- /dev/null +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h @@ -0,0 +1,36 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef RB_LOADER_PORT_H +#define RB_LOADER_PORT_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +RB_LOADER_NO_EXPORT int rb_loader_port_initialize(void); + +#ifdef __cplusplus +} +#endif + +#endif /* RB_LOADER_PORT_H */ diff --git a/source/loaders/rb_loader/source/rb_loader_impl_parser.c b/source/loaders/rb_loader/source/rb_loader_impl_parser.c index c8d9a3835e..c2780bc209 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl_parser.c +++ b/source/loaders/rb_loader/source/rb_loader_impl_parser.c @@ -392,13 +392,13 @@ int rb_loader_impl_key_parse(const char *source, set function_map) void rb_loader_impl_key_print(set function_map) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(function_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, function_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { size_t parameter; - rb_function_parser function = set_iterator_value(it); + rb_function_parser function = set_iterator_value(&it); log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader key parse function (%s)", function->name); @@ -414,11 +414,11 @@ void rb_loader_impl_key_print(set function_map) void rb_loader_impl_key_clear(set function_map) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(function_map); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, function_map); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - rb_function_parser function = set_iterator_value(it); + rb_function_parser function = set_iterator_value(&it); free(function); } diff --git a/source/loaders/rb_loader/source/rb_loader_port.c b/source/loaders/rb_loader/source/rb_loader_port.c new file mode 100644 index 0000000000..f3f52d8079 --- /dev/null +++ b/source/loaders/rb_loader/source/rb_loader_port.c @@ -0,0 +1,148 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include + +#include + +#include + +VALUE rb_loader_port_load_from_file(int argc, VALUE *argv, VALUE self) +{ + const char *tag; + const char **paths; + size_t size; + int result; + + (void)self; + + if (argc != 2) + { + rb_raise(rb_eArgError, "Wrong # of arguments (expected 2, received %d)", argc); + return Qnil; + } + + if (TYPE(argv[0]) != T_STRING) + { + rb_raise(rb_eArgError, "First parameter expected to be a string indicating the tag of the loader (py, node, c, ...)"); + return Qnil; + } + + tag = StringValuePtr(argv[0]); + + if (TYPE(argv[1]) != T_ARRAY) + { + rb_raise(rb_eArgError, "Second parameter expected to be an array of strings with the desired files to be loaded"); + return Qnil; + } + + /* Get array size */ + size = RARRAY_LEN(argv[1]); + + if (size == 0) + { + rb_raise(rb_eArgError, "Second parameter cannot be an empty file path list"); + return Qnil; + } + + /* Parse the array */ + { + size_t iterator; + VALUE *array_ptr = RARRAY_PTR(argv[1]); + + paths = (const char **)malloc(sizeof(const char *) * size); + + if (paths == NULL) + { + rb_raise(rb_eArgError, "Invalid file argument allocation"); + return Qnil; + } + + for (iterator = 0; iterator < size; ++iterator) + { + if (TYPE(array_ptr[iterator]) != T_STRING) + { + rb_raise(rb_eArgError, "Second parameter expected to be an array of strings, but the element %" PRIuS " of the array is not a string", iterator); + free(paths); + return Qnil; + } + + paths[iterator] = StringValuePtr(array_ptr[iterator]); + } + } + + /* Execute load from file */ + result = metacall_load_from_file(tag, (const char **)paths, size, NULL); + + free(paths); + + return LONG2NUM(result); +} + +VALUE rb_loader_port_load_from_memory(int argc, VALUE *argv, VALUE self) +{ + const char *tag; + const char *buffer; + size_t size; + int result; + + (void)self; + + if (argc != 2) + { + rb_raise(rb_eArgError, "Wrong # of arguments (expected 2, received %d)", argc); + return Qnil; + } + + if (TYPE(argv[0]) != T_STRING) + { + rb_raise(rb_eArgError, "First parameter expected to be a string indicating the tag of the loader (py, node, c, ...)"); + return Qnil; + } + + tag = StringValuePtr(argv[0]); + + if (TYPE(argv[1]) != T_STRING) + { + rb_raise(rb_eArgError, "Second parameter expected to be an string with the code to be loaded"); + return Qnil; + } + + /* Get buffer size */ + size = RSTRING_LEN(argv[1]) + 1; + + if (size == 1) + { + rb_raise(rb_eArgError, "Second parameter cannot be an empty string"); + return Qnil; + } + + /* Execute load from memory */ + result = metacall_load_from_memory(tag, buffer, size, NULL); + + return LONG2NUM(result); +} + +int rb_loader_port_initialize(void) +{ + return 0; +} diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index c222375430..cf6f2dc83c 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -270,11 +270,11 @@ void plugin_manager_destroy(plugin_manager manager) * plugin set and this will do nothing if the set has been emptied before with plugin_manager_clear */ if (manager->plugins != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, manager->plugins); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - plugin p = set_iterator_value(it); + plugin p = set_iterator_value(&it); if (manager->iface != NULL && manager->iface->clear != NULL) { diff --git a/source/ports/java_port/CMakeLists.txt b/source/ports/java_port/CMakeLists.txt index 86a5862ae0..6f14b448b4 100644 --- a/source/ports/java_port/CMakeLists.txt +++ b/source/ports/java_port/CMakeLists.txt @@ -44,265 +44,3 @@ message(STATUS "Port ${target}") # https://cmake.org/cmake/help/latest/module/UseJava.html # https://searchcode.com/codesearch/view/7927641/ # https://github.com/Kurento/kms-core/blob/master/CMake/FindMaven.cmake - -# # Set API export file and macro -# string(TOUPPER ${target} target_upper) -# set(export_file "include/${target}/${target}_api.h") -# set(export_macro "${target_upper}_API") - -# # -# # Sources -# # - -# set(interface_path "${CMAKE_CURRENT_SOURCE_DIR}/interface/${target}") -# set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") -# set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") - -# set(interfaces -# ${interface_path}/java_port.i -# ) - -# set(headers -# ${include_path}/java_port.h -# ) - -# set(sources -# ${source_path}/java_port.c -# ) - -# # Group source files -# set(interface_group "Interface Files (SWIG)") -# set(header_group "Header Files (API)") -# set(source_group "Source Files") -# source_group_by_path(${interface_path} "\\\\.i$" -# ${interface_group} ${interfaces}) -# source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" -# ${header_group} ${headers}) -# source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" -# ${source_group} ${sources}) - -# # -# # SWIG Configuration -# # - -# # Set SWIG flags -# if(CMAKE_BUILD_TYPE STREQUAL "Debug") -# list(APPEND CMAKE_SWIG_FLAGS "-DDEBUG") -# else() -# list(APPEND CMAKE_SWIG_FLAGS "-DNDEBUG") -# endif() - -# # Set SWIG include path -# include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") -# include_directories("${CMAKE_CURRENT_SOURCE_DIR}/interface") - -# # -# # Create library -# # - -# foreach(file ${interfaces} ${headers} ${sources}) -# set_source_files_properties( -# ${file} -# PROPERTY SWIG_FLAGS "-java" "-includeall" -# ) - -# set_source_files_properties( -# ${file} -# PROPERTIES CPLUSPLUS OFF -# ) -# endforeach() - -# if(${CMAKE_VERSION} VERSION_LESS "3.8.0") -# swig_add_module(${target} -# java -# ${interfaces} -# ${headers} -# ${sources} -# ) -# else() -# swig_add_library(${target} -# LANGUAGE java -# SOURCES ${interfaces} ${headers} ${sources} -# ) -# endif() - -# # -# # Dependecies -# # - -# add_dependencies(${SWIG_MODULE_${target}_REAL_NAME} -# ${META_PROJECT_NAME}::metacall -# ) - -# # Create namespaced alias -# add_library(${META_PROJECT_NAME}::${target} ALIAS ${SWIG_MODULE_${target}_REAL_NAME}) - -# # Export library for downstream projects -# export(TARGETS ${SWIG_MODULE_${target}_REAL_NAME} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) - -# # Create API export header -# generate_export_header(${SWIG_MODULE_${target}_REAL_NAME} -# EXPORT_FILE_NAME ${export_file} -# EXPORT_MACRO_NAME ${export_macro} -# ) - -# # -# # Project options -# # - -# set_target_properties(${SWIG_MODULE_${target}_REAL_NAME} -# PROPERTIES -# ${DEFAULT_PROJECT_OPTIONS} -# FOLDER "${IDE_FOLDER}" -# ) - -# # -# # Include directories -# # -# target_include_directories(${SWIG_MODULE_${target}_REAL_NAME} -# PRIVATE -# ${PROJECT_BINARY_DIR}/source/include -# ${CMAKE_CURRENT_SOURCE_DIR}/include -# ${CMAKE_CURRENT_BINARY_DIR}/include - -# $ # MetaCall includes -# ${JAVA_INCLUDE_DIRS} # Java includes -# ${JNI_INCLUDE_DIRS} # JNI includes - -# PUBLIC -# ${DEFAULT_INCLUDE_DIRECTORIES} - -# INTERFACE -# $ -# $ -# $ -# ) - -# # -# # Libraries -# # - -# swig_link_libraries(${target} -# PRIVATE -# ${JAVA_LIBRARY} # Java libraries -# ${JNI_LIBRARIES} # JNI libraries - -# ${META_PROJECT_NAME}::metacall - -# PUBLIC -# ${DEFAULT_LIBRARIES} - -# INTERFACE -# ) - -# # -# # Compile definitions -# # - -# target_compile_definitions(${SWIG_MODULE_${target}_REAL_NAME} -# PRIVATE - -# PUBLIC -# $<$>:${target_upper}_STATIC_DEFINE> -# ${DEFAULT_COMPILE_DEFINITIONS} - -# INTERFACE -# ) - -# # -# # Compile options -# # - -# target_compile_options(${SWIG_MODULE_${target}_REAL_NAME} -# PRIVATE - -# PUBLIC -# ${DEFAULT_COMPILE_OPTIONS} - -# INTERFACE -# ) - -# # -# # Linker options -# # - -# target_link_libraries(${SWIG_MODULE_${target}_REAL_NAME} -# PRIVATE -# ${META_PROJECT_NAME}::metacall - -# PUBLIC -# ${DEFAULT_LINKER_OPTIONS} - -# INTERFACE -# ) - -# # -# # Deployment -# # - -# # Library -# install(TARGETS ${SWIG_MODULE_${target}_REAL_NAME} -# EXPORT "${target}-export" COMPONENT dev -# RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime -# LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime -# ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev -# ) - -# # Header files -# install(DIRECTORY -# ${CMAKE_CURRENT_SOURCE_DIR}/include/${target} DESTINATION ${INSTALL_INCLUDE} -# COMPONENT dev -# ) - -# # Generated header files -# install(DIRECTORY -# ${CMAKE_CURRENT_BINARY_DIR}/include/${target} DESTINATION ${INSTALL_INCLUDE} -# COMPONENT dev -# ) - -# # CMake config -# install(EXPORT ${target}-export -# NAMESPACE ${META_PROJECT_NAME}:: -# DESTINATION ${INSTALL_CMAKE}/${target} -# COMPONENT dev -# ) - -# # -# # Configure test -# # - -# set(java_port_test "${target}_test") -# set(java_port_test_path "${PROJECT_OUTPUT_DIR}/${java_port_test}.java") - -# # Require module name -# if(CMAKE_BUILD_TYPE STREQUAL "Debug") -# get_target_property(DEBUG_POSTFIX ${SWIG_MODULE_${target}_REAL_NAME} "DEBUG_POSTFIX") -# set(JAVA_PORT_NAME "${SWIG_MODULE_${target}_REAL_NAME}${DEBUG_POSTFIX}") -# else() -# set(JAVA_PORT_NAME "${SWIG_MODULE_${target}_REAL_NAME}") -# endif() - -# configure_file(test/run.java.in ${java_port_test_path}) - -# # -# # Define test -# # - -# add_test(NAME ${target} -# COMMAND ${JAVA_EXECUTABLE} ${java_port_test_path} -# ) - -# # -# # Define test labels -# # - -# set_property(TEST ${target} -# PROPERTY LABELS ${java_port_test} -# ) - -# include(TestEnvironmentVariables) - -# test_environment_variables(${target} -# "" -# ${TESTS_ENVIRONMENT_VARIABLES} -# ) diff --git a/source/ports/java_port/pom.xml b/source/ports/java_port/pom.xml deleted file mode 100644 index 71519cfdf2..0000000000 --- a/source/ports/java_port/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - 4.0.0 - - metacall - metacall-jna-java-port - 1.0-SNAPSHOT - - jnajavaport - - - UTF-8 - 1.7 - 1.7 - - - -Onkar Dahale -dahaleonkar@gmail.com - - - - - - junit - junit - 4.13.1 - test - - - net.java.dev.jna - jna - 5.9.0 - - - - - - - - - maven-clean-plugin - 3.1.0 - - - - maven-resources-plugin - 3.0.2 - - - maven-compiler-plugin - 3.8.0 - - - maven-surefire-plugin - 2.22.1 - - - maven-jar-plugin - 3.0.2 - - - maven-install-plugin - 2.5.2 - - - maven-deploy-plugin - 2.8.2 - - - - maven-site-plugin - 3.7.1 - - - maven-project-info-reports-plugin - 3.0.0 - - - - - diff --git a/source/ports/java_port/src/main/java/metacall/util.java b/source/ports/java_port/src/main/java/metacall/Utils.java similarity index 98% rename from source/ports/java_port/src/main/java/metacall/util.java rename to source/ports/java_port/src/main/java/metacall/Utils.java index 93a8cf55f0..70c1f2cadb 100644 --- a/source/ports/java_port/src/main/java/metacall/util.java +++ b/source/ports/java_port/src/main/java/metacall/Utils.java @@ -2,7 +2,7 @@ import com.sun.jna.*; -class util +class Utils { public static class SizeT extends IntegerType diff --git a/source/ports/java_port/test/run.java.in b/source/ports/java_port/test/main.java similarity index 100% rename from source/ports/java_port/test/run.java.in rename to source/ports/java_port/test/main.java diff --git a/source/ports/js_port/CMakeLists.txt b/source/ports/js_port/CMakeLists.txt index 8613fc33b1..7b2146e47f 100644 --- a/source/ports/js_port/CMakeLists.txt +++ b/source/ports/js_port/CMakeLists.txt @@ -7,6 +7,7 @@ endif() # External dependencies # +# V8 find_package(V8 5.1) if(NOT V8_FOUND) @@ -14,6 +15,21 @@ if(NOT V8_FOUND) return() endif() +# SWIG +find_package(SWIG) + +if(NOT SWIG_FOUND) + message(WARNING "Swig not found: disabling ports depending on swig") + return() +endif() + +include(${SWIG_USE_FILE}) + +list(APPEND CMAKE_SWIG_FLAGS + "-I${CMAKE_SOURCE_DIR}/source/metacall/include" + "-I${CMAKE_BINARY_DIR}/source/metacall/include" +) + # # Port name and options # diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index 5f673e83dc..201511dd3e 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -74,6 +74,15 @@ endif() set(py_port_test_exec "${py_port_test}_executable") +# Check if Python is compiled with Address Sanitizer +if(OPTION_BUILD_ADDRESS_SANITIZER) + check_asan_executable("${Python3_EXECUTABLE}" Python3_ASAN) + if(NOT Python3_ASAN) + # Skip this test because it gives false positives if Python is not compiled with ASan + return() + endif() +endif() + # Add test (Python) add_test(NAME ${py_port_test_exec} COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.py diff --git a/source/reflect/source/reflect_class.c b/source/reflect/source/reflect_class.c index e54239a020..8830cf55bf 100644 --- a/source/reflect/source/reflect_class.c +++ b/source/reflect/source/reflect_class.c @@ -254,7 +254,7 @@ value class_metadata_methods_impl(const char name[], size_t size, map methods) { value v = value_create_array(NULL, 2); value *v_array; - map_iterator it; + struct map_iterator_type it; size_t count; if (v == NULL) @@ -277,11 +277,11 @@ value class_metadata_methods_impl(const char name[], size_t size, map methods) goto error_value; } - for (it = map_iterator_begin(methods), count = 0; map_iterator_end(&it) != 0; map_iterator_next(it)) + for (map_iterator_begin(&it, methods), count = 0; map_iterator_end(&it) != 0; map_iterator_next(&it)) { value *method_array = value_to_array(v_array[1]); - method_array[count++] = method_metadata((method)map_iterator_value(it)); + method_array[count++] = method_metadata((method)map_iterator_value(&it)); } return v; @@ -306,7 +306,7 @@ value class_metadata_attributes_impl(const char name[], size_t size, set attribu { value v = value_create_array(NULL, 2); value *v_array; - set_iterator it; + struct set_iterator_type it; size_t count; if (v == NULL) @@ -329,11 +329,11 @@ value class_metadata_attributes_impl(const char name[], size_t size, set attribu goto error_value; } - for (it = set_iterator_begin(attributes), count = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, attributes), count = 0; set_iterator_end(&it) != 0; set_iterator_next(&it)) { value *attribute_array = value_to_array(v_array[1]); - attribute_array[count++] = attribute_metadata(set_iterator_value(it)); + attribute_array[count++] = attribute_metadata(set_iterator_value(&it)); } return v; @@ -802,31 +802,31 @@ void class_destroy(klass cls) /* Destroy attributes */ { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(cls->attributes); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, cls->attributes); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - attribute_destroy(set_iterator_value(it)); + attribute_destroy(set_iterator_value(&it)); } - for (it = set_iterator_begin(cls->static_attributes); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, cls->static_attributes); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - attribute_destroy(set_iterator_value(it)); + attribute_destroy(set_iterator_value(&it)); } } /* Destroy methods */ { - map_iterator it; + struct map_iterator_type it; - for (it = map_iterator_begin(cls->methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + for (map_iterator_begin(&it, cls->methods); map_iterator_end(&it) != 0; map_iterator_next(&it)) { - method_destroy(map_iterator_value(it)); + method_destroy(map_iterator_value(&it)); } - for (it = map_iterator_begin(cls->static_methods); map_iterator_end(&it) != 0; map_iterator_next(it)) + for (map_iterator_begin(&it, cls->static_methods); map_iterator_end(&it) != 0; map_iterator_next(&it)) { - method_destroy(map_iterator_value(it)); + method_destroy(map_iterator_value(&it)); } } diff --git a/source/reflect/source/reflect_scope.c b/source/reflect/source/reflect_scope.c index c030c3e37f..1da2285bfc 100644 --- a/source/reflect/source/reflect_scope.c +++ b/source/reflect/source/reflect_scope.c @@ -169,11 +169,11 @@ int scope_metadata_array(scope sp, value v_array[3]) size_t functions_size = 0, classes_size = 0, objects_size = 0; value functions_value, classes_value, objects_value; value *functions, *classes, *objects; - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, sp->objects); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - type_id id = value_type_id(set_iterator_value(it)); + type_id id = value_type_id(set_iterator_value(&it)); if (id == TYPE_FUNCTION) { @@ -221,9 +221,9 @@ int scope_metadata_array(scope sp, value v_array[3]) functions_size = 0; objects_size = 0; - for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, sp->objects); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - value v = set_iterator_value(it); + value v = set_iterator_value(&it); type_id id = value_type_id(v); if (id == TYPE_FUNCTION) @@ -377,7 +377,7 @@ value scope_export(scope sp) { value *values, export = value_create_map(NULL, scope_size(sp)); size_t values_it; - set_iterator it; + struct set_iterator_type it; if (export == NULL) { @@ -386,9 +386,9 @@ value scope_export(scope sp) values = value_to_map(export); - for (it = set_iterator_begin(sp->objects), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, sp->objects), values_it = 0; set_iterator_end(&it) != 0; set_iterator_next(&it)) { - value v = scope_export_value(set_iterator_key(it), set_iterator_value(it)); + value v = scope_export_value(set_iterator_key(&it), set_iterator_value(&it)); values[values_it++] = v; } @@ -553,11 +553,11 @@ void scope_destroy(scope sp) { if (sp != NULL) { - set_iterator it; + struct set_iterator_type it; - for (it = set_iterator_begin(sp->objects); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, sp->objects); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - value_type_destroy(set_iterator_value(it)); + value_type_destroy(set_iterator_value(&it)); } set_destroy(sp->objects); diff --git a/source/scripts/python/garbage/source/garbage.py b/source/scripts/python/garbage/source/garbage.py index 93c5e97c67..82dfcd1136 100644 --- a/source/scripts/python/garbage/source/garbage.py +++ b/source/scripts/python/garbage/source/garbage.py @@ -6,4 +6,4 @@ def set_debug(): gc.set_debug(gc.DEBUG_LEAK | gc.DEBUG_STATS) def garbage(): - return ''.join(gc.garbage) + return repr(gc.garbage) diff --git a/source/tests/adt_map_test/source/adt_map_test.cpp b/source/tests/adt_map_test/source/adt_map_test.cpp index 74498fe4c7..24217e3834 100644 --- a/source/tests/adt_map_test/source/adt_map_test.cpp +++ b/source/tests/adt_map_test/source/adt_map_test.cpp @@ -116,11 +116,12 @@ TEST_F(adt_map_test, map_int) /* Iterators */ iterator_counter = 0; + struct map_iterator_type it; - for (map_iterator it = map_iterator_begin(m); map_iterator_end(&it) != 0; map_iterator_next(it)) + for (map_iterator_begin(&it, m); map_iterator_end(&it) != 0; map_iterator_next(&it)) { - char *key = (char *)map_iterator_key(it); - int *value = (int *)map_iterator_value(it); + char *key = (char *)map_iterator_key(&it); + int *value = (int *)map_iterator_value(&it); log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); diff --git a/source/tests/adt_set_test/source/adt_set_test.cpp b/source/tests/adt_set_test/source/adt_set_test.cpp index 3747f5165d..85c087b9ce 100644 --- a/source/tests/adt_set_test/source/adt_set_test.cpp +++ b/source/tests/adt_set_test/source/adt_set_test.cpp @@ -126,11 +126,12 @@ TEST_F(adt_set_test, DefaultConstructor) /* Iterators */ iterator_counter = 0; + struct set_iterator_type it; - for (set_iterator it = set_iterator_begin(s); set_iterator_end(&it) != 0; set_iterator_next(it)) + for (set_iterator_begin(&it, s); set_iterator_end(&it) != 0; set_iterator_next(&it)) { - char *key = (char *)set_iterator_key(it); - int *value = (int *)set_iterator_value(it); + char *key = (char *)set_iterator_key(&it); + int *value = (int *)set_iterator_value(&it); log_write("metacall", LOG_LEVEL_DEBUG, "[%s -> %d]", (char *)key, *((int *)(value))); diff --git a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp index 0cf822240f..6253dffc4c 100644 --- a/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp +++ b/source/tests/metacall_node_python_ruby_test/source/metacall_node_python_ruby_test.cpp @@ -86,7 +86,7 @@ TEST_F(metacall_node_python_ruby_test, DefaultConstructor) "module.exports = {\n" " test: async function () {\n" " try {\n" - " const result = fetch('http://github.com/service/https://www.google.com/', { signal: AbortSignal.timeout(30000) });\n" + " const result = fetch('http://github.com/service/https://www.google.com/', { signal: AbortSignal.timeout(60000) });\n" " console.log(result);\n" " return true;\n" " } catch (e) {\n" diff --git a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp index 3e21db1ab3..8bdea252fb 100644 --- a/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp +++ b/source/tests/metacall_python_gc_test/source/metacall_python_gc_test.cpp @@ -45,9 +45,9 @@ TEST_F(metacall_python_gc_test, DefaultConstructor) void *ret = metacall("set_debug"); - EXPECT_NE((void *)NULL, (void *)ret); + ASSERT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((enum metacall_value_id)METACALL_NULL, (enum metacall_value_id)metacall_value_id(ret)); + ASSERT_EQ((enum metacall_value_id)METACALL_NULL, (enum metacall_value_id)metacall_value_id(ret)); EXPECT_EQ((void *)NULL, (void *)metacall_value_to_null(ret)); @@ -57,6 +57,8 @@ TEST_F(metacall_python_gc_test, DefaultConstructor) ASSERT_NE((void *)NULL, (void *)ret); + ASSERT_EQ((enum metacall_value_id)METACALL_STRING, (enum metacall_value_id)metacall_value_id(ret)); + std::cout << metacall_value_to_string(ret) << std::endl; metacall_value_destroy(ret); From 707430544a9717fd8fa6519da2ab9269fed3c96b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 28 May 2025 17:34:30 +0200 Subject: [PATCH 163/364] Remove Swig, start to reimplement ruby port. --- .github/workflows/macos-test.yml | 2 +- .github/workflows/windows-test.yml | 2 +- NOTICE | 15 - docker-compose.test.yml | 2 +- docker-compose.yml | 2 +- source/loaders/rb_loader/CMakeLists.txt | 2 + .../loaders/rb_loader/source/rb_loader_port.c | 5 + source/ports/CMakeLists.txt | 50 +-- source/ports/rb_port/.gitignore | 2 + source/ports/rb_port/CMakeLists.txt | 267 +----------- .../ports/rb_port/include/rb_port/rb_port.h | 29 -- .../ports/rb_port/interface/rb_port/rb_port.i | 67 --- .../rb_port/interface/rb_port/rb_port_impl.i | 408 ------------------ .../ports/rb_port/package/metacall-0.0.1.gem | Bin 4096 -> 0 bytes source/ports/rb_port/source/rb_port.c | 23 - .../ports/rb_port/test/{run.rb.in => run.rb} | 0 tools/metacall-environment.ps1 | 4 - tools/metacall-environment.sh | 31 -- tools/metacall-sanitizer.sh | 2 +- 19 files changed, 26 insertions(+), 887 deletions(-) create mode 100644 source/ports/rb_port/.gitignore delete mode 100644 source/ports/rb_port/include/rb_port/rb_port.h delete mode 100644 source/ports/rb_port/interface/rb_port/rb_port.i delete mode 100644 source/ports/rb_port/interface/rb_port/rb_port_impl.i delete mode 100644 source/ports/rb_port/package/metacall-0.0.1.gem delete mode 100644 source/ports/rb_port/source/rb_port.c rename source/ports/rb_port/test/{run.rb.in => run.rb} (100%) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index c98f66f098..504486f545 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -77,7 +77,7 @@ jobs: - name: Set up the environment run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS env: - METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson pack # clangformat v8rep51 coverage - name: Configure run: | diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index c1a423616e..69a4ecc5be 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -48,7 +48,7 @@ jobs: - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" env: - METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson swig pack # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: python nodejs java ruby typescript wasm rpc file # netcore5 java c cobol rust rapidjson pack # clangformat v8rep51 coverage - name: Configure run: | diff --git a/NOTICE b/NOTICE index f513291693..687413ccf2 100644 --- a/NOTICE +++ b/NOTICE @@ -21,7 +21,6 @@ All external code and licenses used by **METACALL** are always wrapped into plug - [3. Detours](#3-detours) - [3.1 PLTHook](#31-plthook) - [4. Ports](#4-ports) - - [4.1 Swig](#41-swig) @@ -87,17 +86,3 @@ All external code and licenses used by **METACALL** are always wrapped into plug | **PLTHook** | [2-clause BSD-style license](https://github.com/metacall/plthook?tab=readme-ov-file#license) | ## 4. Ports - -### 4.1 Swig - -| Software | License | -| :------: | :-----: | -| **SWIG** | **∅** | - ->When SWIG is used as it is distributed by the SWIG developers, its output is not governed by SWIG's license (including the GPL). SWIG's output contains code from three sources: -> -> - code generated by SWIG, which is not governed by copyright; -> - code copied from the SWIG library which is permissively licensed to be redistributed without restriction; -> - code derived from the user's input, which may be governed by the license of the code supplied by the user. -> ->So, while the input supplied to SWIG may affect the license of SWIG's output (e.g. if the input code is licensed under a copyleft or proprietary license), SWIG's license does not affect the license of the output. This is consistent with the FSF's FAQ entries on this subject ([GPLOutput](http://www.gnu.org/licenses/gpl-faq.html#GPLOutput) and [WhatCaseIsOutputGPL](http://www.gnu.org/licenses/gpl-faq.html#WhatCaseIsOutputGPL)), because the SWIG code copied into the output by SWIG is not GPL-licensed. diff --git a/docker-compose.test.yml b/docker-compose.test.yml index a6946f3a55..5802aeef51 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -25,7 +25,7 @@ services: build: args: METACALL_BUILD_TYPE: ${METACALL_BUILD_TYPE} - METACALL_INSTALL_OPTIONS: base python ruby netcore8 nodejs typescript file rpc wasm java c cobol go rust rapidjson swig pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 + METACALL_INSTALL_OPTIONS: base python ruby netcore8 nodejs typescript file rpc wasm java c cobol go rust rapidjson pack backtrace sandbox ${METACALL_BUILD_COVERAGE} # clangformat v8rep51 dev: image: metacall/core:dev build: diff --git a/docker-compose.yml b/docker-compose.yml index bba15a4c47..6ba78b1ccf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: METACALL_PATH: $METACALL_PATH METACALL_TOOLS_PATH: $METACALL_PATH/tools METACALL_BUILD_TYPE: $METACALL_BUILD_TYPE - METACALL_INSTALL_OPTIONS: base python ruby nodejs typescript file rpc rapidjson swig pack backtrace # clangformat v8rep51 coverage + METACALL_INSTALL_OPTIONS: base python ruby nodejs typescript file rpc rapidjson pack backtrace # clangformat v8rep51 coverage environment: DEBIAN_FRONTEND: noninteractive # Work around https://github.com/dotnet/cli/issues/1582 until Docker releases a diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index e74b895401..bd756385d9 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -60,12 +60,14 @@ set(headers ${include_path}/rb_loader.h ${include_path}/rb_loader_impl.h ${include_path}/rb_loader_impl_parser.h + # ${include_path}/rb_loader_port.h ) set(sources ${source_path}/rb_loader.c ${source_path}/rb_loader_impl.c ${source_path}/rb_loader_impl_parser.c + # ${source_path}/rb_loader_port.c ) # Group source files diff --git a/source/loaders/rb_loader/source/rb_loader_port.c b/source/loaders/rb_loader/source/rb_loader_port.c index f3f52d8079..92e928e54f 100644 --- a/source/loaders/rb_loader/source/rb_loader_port.c +++ b/source/loaders/rb_loader/source/rb_loader_port.c @@ -142,7 +142,12 @@ VALUE rb_loader_port_load_from_memory(int argc, VALUE *argv, VALUE self) return LONG2NUM(result); } +// TODO: Implement metacall function + int rb_loader_port_initialize(void) { + VALUE rb_loader_port = rb_define_module("metacall_rb_loader_port"); + rb_define_module_function(mRb_portd, "metacall_detour", _wrap_metacall_detour, -1); + return 0; } diff --git a/source/ports/CMakeLists.txt b/source/ports/CMakeLists.txt index 056f9e97a5..cc73de928d 100644 --- a/source/ports/CMakeLists.txt +++ b/source/ports/CMakeLists.txt @@ -45,57 +45,21 @@ option(OPTION_BUILD_PORTS_TS "Build TypeScript port." OFF) option(OPTION_BUILD_PORTS_ZIG "Build Zig port." OFF) # -# Port languages (Standalone) +# Port languages # -add_subdirectory(cxx_port) -add_subdirectory(node_port) -add_subdirectory(py_port) -add_subdirectory(go_port) -add_subdirectory(rs_port) -add_subdirectory(zig_port) - -# -# External dependencies -# - -# SWIG (TODO: Remove SWIG) -find_package(SWIG) - -if(NOT SWIG_FOUND) - message(WARNING "Swig not found: disabling ports depending on swig") - return() -endif() - -include(${SWIG_USE_FILE}) - -# -# Set MetaCall inlcude directories for SWIG -# - -get_filename_component(CMAKE_PARENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) -get_filename_component(CMAKE_PARENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY) - -list(APPEND CMAKE_SWIG_FLAGS - "-I${CMAKE_PARENT_SOURCE_DIR}/metacall/include" - "-I${CMAKE_PARENT_BINARY_DIR}/metacall/include" -) - -# -# Port languages (Swig) -# - -# TODO: Swig must be completely removed eventually, -# new architecture needs ports and loaders unified so -# Swig is not needed anymore - add_subdirectory(cs_port) +add_subdirectory(cxx_port) add_subdirectory(d_port) -# add_subdirectory(go_port) # TODO: Integrate it with CMake properly and with Docker +add_subdirectory(go_port) add_subdirectory(java_port) add_subdirectory(js_port) add_subdirectory(lua_port) +add_subdirectory(node_port) add_subdirectory(php_port) add_subdirectory(pl_port) +add_subdirectory(py_port) add_subdirectory(r_port) add_subdirectory(rb_port) +add_subdirectory(rs_port) +add_subdirectory(zig_port) diff --git a/source/ports/rb_port/.gitignore b/source/ports/rb_port/.gitignore new file mode 100644 index 0000000000..16e37a4076 --- /dev/null +++ b/source/ports/rb_port/.gitignore @@ -0,0 +1,2 @@ +*.gem +*.rbc diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index d227788187..4459bbdd8e 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -3,16 +3,6 @@ if(NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_RB OR NOT OPTION_BUILD_LOADE return() endif() -# TODO: This port is not passing tests properly in MacOS and Windows. -# In any case this implementation will be deleted eventually (once SWIG gets removed), -# so there is no need to make it work anyway. In any case this project should be reviewed. -include(Portability) - -if(PROJECT_OS_FAMILY STREQUAL win32 OR PROJECT_OS_FAMILY STREQUAL macos) - message(WARNING "Port rb_port does not work on Windows neither MacOS") - return() -endif() - # # External dependencies # @@ -34,257 +24,7 @@ set(target rb_port) # Exit here if required dependencies are not met message(STATUS "Port ${target}") -# Set API export file and macro -string(TOUPPER ${target} target_upper) -set(export_file "include/${target}/${target}_api.h") -set(export_macro "${target_upper}_API") - -# -# Sources -# - -set(interface_path "${CMAKE_CURRENT_SOURCE_DIR}/interface/${target}") -set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") -set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") - -set(interfaces - ${interface_path}/rb_port.i -) - -set(headers - ${include_path}/rb_port.h -) - -set(sources - ${source_path}/rb_port.c -) - -# Group source files -set(interface_group "Interface Files (SWIG)") -set(header_group "Header Files (API)") -set(source_group "Source Files") -source_group_by_path(${interface_path} "\\\\.i$" - ${interface_group} ${interfaces}) -source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" - ${header_group} ${headers}) -source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" - ${source_group} ${sources}) - -# -# SWIG Configuration -# - -# Set SWIG flags -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - list(APPEND CMAKE_SWIG_FLAGS "-DDEBUG") -else() - list(APPEND CMAKE_SWIG_FLAGS "-DNDEBUG") -endif() - -# Set SWIG include path -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/interface") - -# -# Create library -# - -foreach(file ${interfaces} ${headers} ${sources}) - set_source_files_properties( - ${file} - PROPERTY SWIG_FLAGS "-ruby" "-includeall" - ) - - set_source_files_properties( - ${file} - PROPERTIES CPLUSPLUS OFF - ) -endforeach() - -if(${CMAKE_VERSION} VERSION_LESS "3.8.0") - swig_add_module(${target} - ruby - ${interfaces} - ${headers} - ${sources} - ) -else() - swig_add_library(${target} - LANGUAGE ruby - SOURCES ${interfaces} ${headers} ${sources} - OUTPUT_DIR "${PROJECT_OUTPUT_DIR}" - ) -endif() - -# -# Dependecies -# - -add_dependencies(${SWIG_MODULE_${target}_REAL_NAME} - ${META_PROJECT_NAME}::metacall -) - -# Create namespaced alias -add_library(${META_PROJECT_NAME}::${target} ALIAS ${SWIG_MODULE_${target}_REAL_NAME}) - -# Export library for downstream projects -export(TARGETS ${SWIG_MODULE_${target}_REAL_NAME} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) - -# Create API export header -generate_export_header(${SWIG_MODULE_${target}_REAL_NAME} - EXPORT_FILE_NAME ${export_file} - EXPORT_MACRO_NAME ${export_macro} -) - -# -# Project options -# - -set_target_properties(${SWIG_MODULE_${target}_REAL_NAME} - PROPERTIES - ${DEFAULT_PROJECT_OPTIONS} - FOLDER "${IDE_FOLDER}" - - # Set Ruby extension properies - SUFFIX ".so" -) - -# -# Include directories -# -target_include_directories(${SWIG_MODULE_${target}_REAL_NAME} - PRIVATE - ${PROJECT_BINARY_DIR}/source/include - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR}/include - - $ # MetaCall includes - ${Ruby_INCLUDE_DIRS} # Ruby includes - - PUBLIC - ${DEFAULT_INCLUDE_DIRECTORIES} - - INTERFACE - $ - $ - $ -) - -# -# Libraries -# - -swig_link_libraries(${target} - PRIVATE - ${Ruby_LIBRARY} # Ruby libraries - - ${META_PROJECT_NAME}::metacall - - PUBLIC - ${DEFAULT_LIBRARIES} - - INTERFACE -) - -# -# Compile definitions -# - -target_compile_definitions(${SWIG_MODULE_${target}_REAL_NAME} - PRIVATE - - PUBLIC - $<$>:${target_upper}_STATIC_DEFINE> - ${DEFAULT_COMPILE_DEFINITIONS} - $<$:RB_PORT_USINGSWIG_EXPORTS> - - INTERFACE -) - -# -# Compile options -# - -target_compile_options(${SWIG_MODULE_${target}_REAL_NAME} - PRIVATE - - PUBLIC - ${DEFAULT_COMPILE_OPTIONS} - - INTERFACE -) - -include(Portability) - -target_compile_options(${target} - PRIVATE - - # Fix Ruby MacOSX LLVM bug - # '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes - $<$,$,$>>:-fdeclspec> - - # Disable warnings (Clang, GCC) for unused parameters and variables generated by Swig - $<$,$,$>:-Wno-unused-parameter> - $<$,$,$>:-Wno-unused-variable> - - PUBLIC - ${DEFAULT_COMPILE_OPTIONS} - - INTERFACE -) - -# -# Linker options -# - -target_link_options(${SWIG_MODULE_${target}_REAL_NAME} - PRIVATE - - PUBLIC - ${DEFAULT_LINKER_OPTIONS} - - INTERFACE -) - -# -# Deployment -# - -# Library -install(TARGETS ${SWIG_MODULE_${target}_REAL_NAME} - EXPORT "${target}-export" COMPONENT dev - RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime - LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime - ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev -) - -# -# Configure test -# - -# Check if port is enabled -if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_RB OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_RB) - return() -endif() - -set(rb_port_test "${target}_test") -set(rb_port_test_path "${PROJECT_OUTPUT_DIR}/${rb_port_test}.rb") - -# Require module name -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - get_target_property(DEBUG_POSTFIX ${SWIG_MODULE_${target}_REAL_NAME} "DEBUG_POSTFIX") - set(RB_PORT_NAME "${SWIG_MODULE_${target}_REAL_NAME}${DEBUG_POSTFIX}") -else() - set(RB_PORT_NAME "${SWIG_MODULE_${target}_REAL_NAME}") -endif() - -# Module object instance (capitalized) -string(SUBSTRING "${RB_PORT_NAME}" 0 1 RB_PORT_FIRST) -string(TOUPPER "${RB_PORT_FIRST}" RB_PORT_FIRST_UPPER) -string(SUBSTRING "${RB_PORT_NAME}" 1 -1 RB_PORT_LAST) -set(RB_PORT_OBJ "${RB_PORT_FIRST_UPPER}${RB_PORT_LAST}") - -configure_file(test/run.rb.in ${rb_port_test_path}) +# TODO # # Define test @@ -303,8 +43,11 @@ if(OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) return() endif() +set(rb_port_test "rb_port_test") +set(rb_port_test_path "${CMAKE_CURRENT_SOURCE_DIR}/test/run.rb") + add_test(NAME ${target} - COMMAND ${Ruby_EXECUTABLE} ${rb_port_test_path} + COMMAND ${Ruby_EXECUTABLE} "${rb_port_test_path}" ) # diff --git a/source/ports/rb_port/include/rb_port/rb_port.h b/source/ports/rb_port/include/rb_port/rb_port.h deleted file mode 100644 index 8e88024dd4..0000000000 --- a/source/ports/rb_port/include/rb_port/rb_port.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * MetaCall SWIG Wrapper by Parra Studios - * A complete infrastructure for supporting multiple language bindings in MetaCall. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef METACALL_SWIG_WRAPPER_RB_PORT_H -#define METACALL_SWIG_WRAPPER_RB_PORT_H 1 - -/* TODO: Review https://github.com/SketchUp/testup-2/blob/e32a68c5c02e2cbc3a924f40d4987faa05dbcc89/ruby-c-extension/sketchup-taskbarlist/TaskbarProgress/src/RubyUtils/RubyLib.h */ -/* TODO: Unify rb_port with rb_loader */ - -/* ... */ - -#endif /* METACALL_SWIG_WRAPPER_RB_PORT_H */ diff --git a/source/ports/rb_port/interface/rb_port/rb_port.i b/source/ports/rb_port/interface/rb_port/rb_port.i deleted file mode 100644 index 6968ab129f..0000000000 --- a/source/ports/rb_port/interface/rb_port/rb_port.i +++ /dev/null @@ -1,67 +0,0 @@ -/* - * MetaCall SWIG Wrapper by Parra Studios - * A complete infrastructure for supporting multiple language bindings in MetaCall. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef METACALL_SWIG_WRAPPER_RB_PORT_I -#define METACALL_SWIG_WRAPPER_RB_PORT_I 1 - -/* -- Headers -- */ - -#if defined(SWIG) && defined(SWIGRUBY) - - #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - %module rb_portd - #else - %module rb_port - #endif - - %{ - #include - - #include - #include - #include - - #include - %} - - %include - - /* Note: This should not be necessary because we do not allow to use ports outside MetaCall */ - /* - %init - %{ - metacall_initialize(); - %} - */ - - %import - - %include - - #ifdef METACALL_API - # undef METACALL_API - # define METACALL_API - #endif - - %include - -#endif /* SWIG && SWIGRUBY */ - -#endif /* METACALL_SWIG_WRAPPER_RB_PORT_I */ diff --git a/source/ports/rb_port/interface/rb_port/rb_port_impl.i b/source/ports/rb_port/interface/rb_port/rb_port_impl.i deleted file mode 100644 index ddbd3e7055..0000000000 --- a/source/ports/rb_port/interface/rb_port/rb_port_impl.i +++ /dev/null @@ -1,408 +0,0 @@ -/* - * MetaCall SWIG Wrapper by Parra Studios - * A complete infrastructure for supporting multiple language bindings in MetaCall. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef METACALL_SWIG_WRAPPER_RB_PORT_IMPL_I -#define METACALL_SWIG_WRAPPER_RB_PORT_IMPL_I 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -- Ignores -- */ - -%ignore metacall_null_args; - -%ignore metacallv; - -%ignore metacallvf; - -%ignore metacall_serial; /* TODO */ - -%ignore metacall_register; /* TODO */ - -%ignore metacall_load_from_package; /* TODO */ - -/* -- Type Maps -- */ - -/** -* @brief -* Transform load mechanism from Ruby string into -* a valid load from memory format (buffer and size) -*/ -%typemap(in) (const char * buffer, size_t size, void ** handle) -{ - char * buffer_str = StringValuePtr($input); - - size_t length = RSTRING_LEN($input); - - $1 = buffer_str; - - $2 = (length + 1); -} - -/** -* @brief -* Transform load mechanism from Ruby array into -* a valid load from file format (array of strings) -*/ -%typemap(in) (const char * paths[], size_t size, void ** handle) -{ - size_t iterator, size = RARRAY_LEN($input); - - VALUE * array_ptr = RARRAY_PTR($input); - - if (size == 0) - { - rb_raise(rb_eArgError, "Empty script path list"); - - return Qnil; - } - - $1 = (char **)malloc(sizeof(char *) * size); - - if ($1 == NULL) - { - rb_raise(rb_eArgError, "Invalid argument allocation"); - - SWIG_fail; - } - - $2 = size; - - for (iterator = 0; iterator < size; ++iterator, ++array_ptr) - { - size_t length = RSTRING_LEN(*array_ptr); - - $1[iterator] = malloc(sizeof(char) * (length + 1)); - - if ($1[iterator] == NULL) - { - size_t alloc_iterator; - - for (alloc_iterator = 0; alloc_iterator < iterator; ++alloc_iterator) - { - free($1[alloc_iterator]); - } - - free($1); - - rb_raise(rb_eArgError, "Invalid string path allocation"); - - SWIG_fail; - } - - memcpy($1[iterator], StringValuePtr(*array_ptr), length); - - $1[iterator][length] = '\0'; - } -} - -/** -* @brief -* Transform variadic arguments from Ruby into -* a valid metacallv format with values -*/ -%typemap(in) (const char * name, ...) -{ - void ** args; - size_t args_size, args_count; - - /* Format string */ - $1 = RSTRING_PTR($input); - - /* Variable length arguments */ - if (argc >= 1) - { - args_size = argc - 1; - } - else - { - rb_raise(rb_eArgError, "Invalid number of arguments"); - - return Qnil; - } - - if (args_size > 0) - { - /* TODO: Remove this by a local array? */ - args = (void **) malloc(args_size * sizeof(void *)); - - if (args == NULL) - { - rb_raise(rb_eArgError, "Invalid argument allocation"); - - SWIG_fail; - } - - for (args_count = 0; args_count < args_size; ++args_count) - { - VALUE rb_arg = argv[args_count + 1]; - - int rb_arg_type = TYPE(rb_arg); - - if (rb_arg_type == T_TRUE) - { - boolean b = 1L; - - args[args_count] = metacall_value_create_bool(b); - } - else if (rb_arg_type == T_FALSE) - { - boolean b = 0L; - - args[args_count] = metacall_value_create_bool(b); - } - else if (rb_arg_type == T_FIXNUM) - { - int i = FIX2INT(rb_arg); - - args[args_count] = metacall_value_create_int(i); - } - else if (rb_arg_type == T_BIGNUM) - { - long l = NUM2LONG(rb_arg); - - args[args_count] = metacall_value_create_long(l); - } - else if (rb_arg_type == T_FLOAT) - { - double d = NUM2DBL(rb_arg); - - args[args_count] = metacall_value_create_double(d); - } - else if (rb_arg_type == T_STRING) - { - long length = RSTRING_LEN(rb_arg); - - char * str = StringValuePtr(rb_arg); - - if (length > 0 && str != NULL) - { - args[args_count] = metacall_value_create_string(str, (size_t)length); - } - } - else if (rb_arg_type == T_NIL) - { - args[args_count] = metacall_value_create_null(); - } - else - { - size_t alloc_iterator; - - for (alloc_iterator = 0; alloc_iterator < args_count; ++alloc_iterator) - { - metacall_value_destroy(args[alloc_iterator]); - } - - /* TODO: Remove this by a local array? */ - free(args); - - rb_raise(rb_eArgError, "Invalid argument allocation"); - - SWIG_fail; - - return Qnil; - } - } - } - else - { - args = NULL; - } - - $2 = (void *) args; -} - -/* -- Features -- */ - -/** -* @brief -* Execute the load from memory -* -* @return -* Zero if success, different from zero otherwise -*/ -%feature("action") metacall_load_from_memory -{ - const char * tag = (const char *)arg1; - - char * buffer = (char *)arg2; - - size_t size = (size_t)arg3; - - result = metacall_load_from_memory(tag, (const char *)buffer, size, NULL); -} - -/** -* @brief -* Execute the load from file -* -* @return -* Zero if success, different from zero otherwise -*/ -%feature("action") metacall_load_from_file -{ - const char * tag = (const char *)arg1; - - char ** paths = (char **)arg2; - - size_t iterator, size = arg3; - - result = metacall_load_from_file(tag, (const char **)paths, size, NULL); - - for (iterator = 0; iterator < size; ++iterator) - { - free(paths[iterator]); - } - - free(paths); -} - -/** -* @brief -* Execute the call and transform return -* value into a valid Ruby format -* -* @return -* A value converted into Ruby format -*/ -%feature("action") metacall -{ - size_t args_count, args_size; - void ** args; - void * ret; - - args_size = argc - 1; - args = (void **) arg2; - - if (args != NULL) - { - /* Execute call */ - ret = metacallv(arg1, args); - - /* Clear args */ - for (args_count = 0; args_count < args_size; ++args_count) - { - metacall_value_destroy(args[args_count]); - } - - /* TODO: Remove this by a local array? */ - free(args); - } - else - { - /* Execute call */ - ret = metacallv(arg1, metacall_null_args); - } - - /* Return value */ - if (ret != NULL) - { - switch (metacall_value_id(ret)) - { - - case METACALL_BOOL : - { - boolean b = metacall_value_to_bool(ret); - - /*$result*/ vresult = (b == 0L) ? Qfalse : Qtrue; - - break; - } - - case METACALL_CHAR : - { - /*$result*/ vresult = INT2FIX((char)metacall_value_to_char(ret)); - - break; - } - - case METACALL_SHORT : - { - /*$result*/ vresult = INT2FIX((int)metacall_value_to_short(ret)); - - break; - } - - case METACALL_INT : - { - /*$result*/ vresult = INT2FIX(metacall_value_to_int(ret)); - - break; - } - - case METACALL_LONG : - { - /*$result*/ vresult = LONG2NUM(metacall_value_to_long(ret)); - - break; - } - - case METACALL_FLOAT : - { - /*$result*/ vresult = DBL2NUM((double)metacall_value_to_float(ret)); - - break; - } - - case METACALL_DOUBLE : - { - /*$result*/ vresult = DBL2NUM(metacall_value_to_double(ret)); - - break; - } - - case METACALL_STRING : - { - /*$result*/ vresult = rb_str_new_cstr(metacall_value_to_string(ret)); - - break; - } - - case METACALL_NULL : - { - /*$result*/ vresult = Qnil; - - break; - } - - default : - { - rb_raise(rb_eArgError, "Unsupported return type"); - - /*$result*/ vresult = Qnil; - } - } - - metacall_value_destroy(ret); - } - else - { - /*$result*/ vresult = Qnil; - } - - return /*$result*/ vresult; -} - -#ifdef __cplusplus -} -#endif - -#endif /* METACALL_SWIG_WRAPPER_RB_PORT_IMPL_I */ diff --git a/source/ports/rb_port/package/metacall-0.0.1.gem b/source/ports/rb_port/package/metacall-0.0.1.gem deleted file mode 100644 index 851e7ef987c30aa6f0a165b07065f53abd8e2d70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmc~zElEsCEJ@T$uVSDTFaQD*6B7my4Fu@4fti^ZgQ2m3p^2%fiHU(JgMp#3iHSLb zf&r}@glukUaY8f@({lvJcp)zuyW&Ypbxfi_>wGOhGXD*+g zHYZhb-@}df@}2(9^$FVkWXdm_2^+1mOEw*BzTPKd<#p@DzIOFT8rNU3?rwKw?Qjp6 zC|=3wy#BJ@hG2`E4RXQa7Fs7h9F+Rh`C*r&sX1eQ$4rTQQ|Z;}2?4%#_157st*_ju_lJp>_lfkUV?i-zG^DmU&kEiv z+%~^O@t${|1&iN}Nz6sJzH!Z8Q(6D2vA4udb($- zihD;c+?n8bu%VG}!Im8=8#!J~`P6geij2)Gj+2Y4^Ew)y%sKKXi8VfftAK48gWkF; zdqniw0u8v_4r)lS9+m^S=l_3Z2KV!`PBC!ca^0vntwSI=BQ-g@xHPv|uQD+=hc=}E zsA|Ml|C<<^qvd}SGlS9kpVm{GOvE&XMeS?fAkIbBte^k)!>9KBH8uCwpY5<+CVf!j`NrE9B5$wuxN>me z!m>{v|5nNU`}(?hl46GUoivvTOLQb&H61Y0$WGS3@zW>uK>bd>HibV|*4_xS^fH%N zKJ$vg`?aE02cyKvF%5vWqnsGoYS_`!!Ygkt!~d77ah(C zf8Tj^rr&ydn>|Lk#-_WMTDLrjJnX4_F0t>KOvI!$`$XAU!&fajWb;CpGyHg5^R2eI zX+0ua%bu9@wzQaD$eQam(=Mq)F6!Haz24`iRs3X}yJ24PB1XD|_^2hLAut*OqaiRj GLI41w-Prp8 diff --git a/source/ports/rb_port/source/rb_port.c b/source/ports/rb_port/source/rb_port.c deleted file mode 100644 index b9a5fc4d3c..0000000000 --- a/source/ports/rb_port/source/rb_port.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * MetaCall SWIG Wrapper by Parra Studios - * A complete infrastructure for supporting multiple language bindings in MetaCall. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -/* ... */ diff --git a/source/ports/rb_port/test/run.rb.in b/source/ports/rb_port/test/run.rb similarity index 100% rename from source/ports/rb_port/test/run.rb.in rename to source/ports/rb_port/test/run.rb diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 72ce3659bc..35bd794675 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -359,9 +359,6 @@ function Configure { if ("$var" -eq 'rust') { Write-Output "rust selected" } - if ("$var" -eq 'swig') { - Write-Output "swig selected" - } if ("$var" -eq 'metacall') { Write-Output "metacall selected" } @@ -398,7 +395,6 @@ function Help { Write-Output " c" Write-Output " cobol" Write-Output " go" - Write-Output " swig" Write-Output " metacall" Write-Output " pack" Write-Output " clangformat" diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index b244764438..7c2c03a9e6 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -52,7 +52,6 @@ INSTALL_C=0 INSTALL_COBOL=0 INSTALL_GO=0 INSTALL_RUST=0 -INSTALL_SWIG=0 INSTALL_PACK=0 INSTALL_COVERAGE=0 INSTALL_CLANGFORMAT=0 @@ -114,28 +113,6 @@ sub_base(){ fi } -# Swig -sub_swig(){ - echo "configure swig" - cd $ROOT_DIR - - if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then - if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then - $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends swig - - # Install Python Port Dependencies (TODO: This must be transformed into pip3 install metacall) - $SUDO_CMD apt-get $APT_CACHE_CMD install -y --no-install-recommends python3-setuptools - elif [ "${LINUX_DISTRO}" = "alpine" ]; then - $SUDO_CMD apk add --no-cache swig - - # Install Python Port Dependencies (TODO: This must be transformed into pip3 install metacall) - $SUDO_CMD apk add --no-cache py3-setuptools - fi - elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then - brew install swig - fi -} - # Python sub_python(){ echo "configure python" @@ -976,9 +953,6 @@ sub_install(){ if [ $INSTALL_RUST = 1 ]; then sub_rust fi - if [ $INSTALL_SWIG = 1 ]; then - sub_swig - fi if [ $INSTALL_PACK = 1 ]; then sub_pack fi @@ -1116,10 +1090,6 @@ sub_options(){ echo "rust selected" INSTALL_RUST=1 fi - if [ "$option" = 'swig' ]; then - echo "swig selected" - INSTALL_SWIG=1 - fi if [ "$option" = 'pack' ]; then echo "pack selected" INSTALL_PACK=1 @@ -1172,7 +1142,6 @@ sub_help() { echo " c" echo " cobol" echo " go" - echo " swig" echo " pack" echo " coverage" echo " clangformat" diff --git a/tools/metacall-sanitizer.sh b/tools/metacall-sanitizer.sh index 9e0856a502..6605ac112c 100755 --- a/tools/metacall-sanitizer.sh +++ b/tools/metacall-sanitizer.sh @@ -35,7 +35,7 @@ if [ "${BUILD_SANITIZER}" != "address-sanitizer" ] && [ "${BUILD_SANITIZER}" != fi # Install -"${SCRIPT_DIR}/metacall-environment.sh" base ${BUILD_LANGUAGES[@]} rapidjson swig pack backtrace +"${SCRIPT_DIR}/metacall-environment.sh" base ${BUILD_LANGUAGES[@]} rapidjson pack backtrace # Configure and Build export NODE_PATH="/usr/lib/node_modules" From 1828b05e7e3516197ee71082d9517a7098f1ed28 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 30 May 2025 17:28:03 +0200 Subject: [PATCH 164/364] Ruby port and ruby.exe support in progress. --- .../loaders/py_loader/source/py_loader_impl.c | 10 +- source/loaders/rb_loader/CMakeLists.txt | 5 +- .../include/rb_loader/rb_loader_impl.h | 8 + .../include/rb_loader/rb_loader_include.h | 82 +++++ .../include/rb_loader/rb_loader_port.h | 4 +- .../loaders/rb_loader/source/rb_loader_impl.c | 341 ++++++++---------- .../loaders/rb_loader/source/rb_loader_port.c | 131 +++++-- source/ports/py_port/CMakeLists.txt | 5 +- source/ports/rb_port/CMakeLists.txt | 92 +++-- source/ports/rb_port/package/lib/metacall.rb | 115 +++++- source/ports/rb_port/test/run.rb | 62 ++-- .../rb_loader_parser_test/CMakeLists.txt | 1 + 12 files changed, 575 insertions(+), 281 deletions(-) create mode 100644 source/loaders/rb_loader/include/rb_loader/rb_loader_include.h diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index f5de0f6c67..590e997e5c 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2691,7 +2691,15 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi } py_loader_impl_main_module = argv[1]; - py_loader_impl_run_main = 0; + + /* If we are running on host, this means the main is already executed by the host, so we can skip it, + * otherwise if we are not in host and we run it for the first time, we can prepare the loader + * for running the main the first time + */ + if (host == 0) + { + py_loader_impl_run_main = 0; + } } /* Initialize stack trace module */ diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index bd756385d9..a142dce09c 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -58,16 +58,17 @@ set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") set(headers ${include_path}/rb_loader.h + ${include_path}/rb_loader_include.h ${include_path}/rb_loader_impl.h ${include_path}/rb_loader_impl_parser.h - # ${include_path}/rb_loader_port.h + ${include_path}/rb_loader_port.h ) set(sources ${source_path}/rb_loader.c ${source_path}/rb_loader_impl.c ${source_path}/rb_loader_impl_parser.c - # ${source_path}/rb_loader_port.c + ${source_path}/rb_loader_port.c ) # Group source files diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h index 3a86aaaa96..f5a6e3b85e 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_impl.h @@ -27,6 +27,10 @@ #include +#include + +#include + #ifdef __cplusplus extern "C" { #endif @@ -47,6 +51,10 @@ RB_LOADER_API int rb_loader_impl_discover(loader_impl impl, loader_handle handle RB_LOADER_API int rb_loader_impl_destroy(loader_impl impl); +RB_LOADER_NO_EXPORT const char *rb_type_deserialize(loader_impl impl, VALUE v, value *result); + +RB_LOADER_NO_EXPORT VALUE rb_type_serialize(value v); + #ifdef __cplusplus } #endif diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_include.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_include.h new file mode 100644 index 0000000000..a8874b1b2c --- /dev/null +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_include.h @@ -0,0 +1,82 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef RB_LOADER_INCLUDE_H +#define RB_LOADER_INCLUDE_H 1 + +#if (defined(_WIN32) || defined(_WIN64)) && !defined(_MSC_VER) && defined(boolean) + #undef boolean +#endif + +/* Disable warnings from Ruby */ +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-parameter" +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wredundant-decls" + #pragma GCC diagnostic ignored "-Wpedantic" + #pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +#include + +/* Disable warnings from Ruby */ +#if defined(__clang__) + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic pop +#endif + +/* Backward compatible macros for Ruby < 2.7 */ +#ifndef RB_PASS_KEYWORDS + #define rb_funcallv_kw(o, m, c, v, kw) rb_funcallv(o, m, c, v) + #define rb_funcallv_public_kw(o, m, c, v, kw) rb_funcallv_public(o, m, c, v) + #define rb_funcall_passing_block_kw(o, m, c, v, kw) rb_funcall_passing_block(o, m, c, v) + #define rb_funcall_with_block_kw(o, m, c, v, b, kw) rb_funcall_with_block(o, m, c, v, b) + #define rb_scan_args_kw(kw, c, v, s, ...) rb_scan_args(c, v, s, __VA_ARGS__) + #define rb_call_super_kw(c, v, kw) rb_call_super(c, v) + #define rb_yield_values_kw(c, v, kw) rb_yield_values2(c, v) + #define rb_yield_splat_kw(a, kw) rb_yield_splat(a) + #define rb_block_call_kw(o, m, c, v, f, p, kw) rb_block_call(o, m, c, v, f, p) + #define rb_fiber_resume_kw(o, c, v, kw) rb_fiber_resume(o, c, v) + #define rb_fiber_yield_kw(c, v, kw) rb_fiber_yield(c, v) + #define rb_enumeratorize_with_size_kw(o, m, c, v, f, kw) rb_enumeratorize_with_size(o, m, c, v, f) + #define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ + rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \ + (argc), (argv), (size_fn)) + #define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ + do \ + { \ + if (!rb_block_given_p()) \ + return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \ + } while (0) + #define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) + #define rb_check_funcall_kw(o, m, c, v, kw) rb_check_funcall(o, m, c, v) + #define rb_obj_call_init_kw(o, c, v, kw) rb_obj_call_init(o, c, v) + #define rb_class_new_instance_kw(c, v, k, kw) rb_class_new_instance(c, v, k) + #define rb_proc_call_kw(p, a, kw) rb_proc_call(p, a) + #define rb_proc_call_with_block_kw(p, c, v, b, kw) rb_proc_call_with_block(p, c, v, b) + #define rb_method_call_kw(c, v, m, kw) rb_method_call(c, v, m) + #define rb_method_call_with_block_kw(c, v, m, b, kw) rb_method_call_with_block(c, v, m, b) + #define rb_eval_cmd_kwd(c, a, kw) rb_eval_cmd(c, a, 0) +#endif + +#endif /* RB_LOADER_INCLUDE_H */ diff --git a/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h b/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h index 20598f2803..0ccc7a4977 100644 --- a/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h +++ b/source/loaders/rb_loader/include/rb_loader/rb_loader_port.h @@ -23,11 +23,13 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif -RB_LOADER_NO_EXPORT int rb_loader_port_initialize(void); +RB_LOADER_NO_EXPORT int rb_loader_port_initialize(loader_impl impl); #ifdef __cplusplus } diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 3451dec8fa..2eb931f7ba 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -25,69 +26,9 @@ #include -#include - #include #include -#if (defined(_WIN32) || defined(_WIN64)) && !defined(_MSC_VER) && defined(boolean) - #undef boolean -#endif - -/* Disable warnings from Ruby */ -#if defined(__clang__) - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wunused-parameter" -#elif defined(__GNUC__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wredundant-decls" - #pragma GCC diagnostic ignored "-Wpedantic" - #pragma GCC diagnostic ignored "-Wunused-parameter" -#endif - -#include - -/* Disable warnings from Ruby */ -#if defined(__clang__) - #pragma clang diagnostic pop -#elif defined(__GNUC__) - #pragma GCC diagnostic pop -#endif - -/* Backward compatible macros for Ruby < 2.7 */ -#ifndef RB_PASS_KEYWORDS - #define rb_funcallv_kw(o, m, c, v, kw) rb_funcallv(o, m, c, v) - #define rb_funcallv_public_kw(o, m, c, v, kw) rb_funcallv_public(o, m, c, v) - #define rb_funcall_passing_block_kw(o, m, c, v, kw) rb_funcall_passing_block(o, m, c, v) - #define rb_funcall_with_block_kw(o, m, c, v, b, kw) rb_funcall_with_block(o, m, c, v, b) - #define rb_scan_args_kw(kw, c, v, s, ...) rb_scan_args(c, v, s, __VA_ARGS__) - #define rb_call_super_kw(c, v, kw) rb_call_super(c, v) - #define rb_yield_values_kw(c, v, kw) rb_yield_values2(c, v) - #define rb_yield_splat_kw(a, kw) rb_yield_splat(a) - #define rb_block_call_kw(o, m, c, v, f, p, kw) rb_block_call(o, m, c, v, f, p) - #define rb_fiber_resume_kw(o, c, v, kw) rb_fiber_resume(o, c, v) - #define rb_fiber_yield_kw(c, v, kw) rb_fiber_yield(c, v) - #define rb_enumeratorize_with_size_kw(o, m, c, v, f, kw) rb_enumeratorize_with_size(o, m, c, v, f) - #define SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ - rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), \ - (argc), (argv), (size_fn)) - #define RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) \ - do \ - { \ - if (!rb_block_given_p()) \ - return SIZED_ENUMERATOR(obj, argc, argv, size_fn); \ - } while (0) - #define RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) - #define rb_check_funcall_kw(o, m, c, v, kw) rb_check_funcall(o, m, c, v) - #define rb_obj_call_init_kw(o, c, v, kw) rb_obj_call_init(o, c, v) - #define rb_class_new_instance_kw(c, v, k, kw) rb_class_new_instance(c, v, k) - #define rb_proc_call_kw(p, a, kw) rb_proc_call(p, a) - #define rb_proc_call_with_block_kw(p, c, v, b, kw) rb_proc_call_with_block(p, c, v, b) - #define rb_method_call_kw(c, v, m, kw) rb_method_call(c, v, m) - #define rb_method_call_with_block_kw(c, v, m, b, kw) rb_method_call_with_block(c, v, m, b) - #define rb_eval_cmd_kwd(c, a, kw) rb_eval_cmd(c, a, 0) -#endif - #define LOADER_IMPL_RB_FUNCTION_ARGS_SIZE 0x10 #define LOADER_IMPL_RB_PROTECT_ARGS_SIZE 0x10 @@ -152,6 +93,10 @@ static class_interface rb_class_interface_singleton(void); static object_interface rb_object_interface_singleton(void); static void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_str, enum class_visibility_id visibility, const char *method_type_str, VALUE methods, int (*register_method)(klass, method)); +/* Implements executing the file as main instead of a module */ +static int rb_loader_impl_run_main = 1; +static char *rb_loader_impl_main_module = NULL; + int function_rb_interface_create(function func, function_impl impl) { signature s = function_signature(func); @@ -985,6 +930,8 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi NULL }; + const int host = loader_impl_get_option_host(impl); + /* Initialize Ruby */ char **argv = metacall_argv(); int argc = metacall_argc(); @@ -993,6 +940,21 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi (void)config; ruby_sysinit(&argc, &argv); + + if (argv != NULL && argc > 1) + { + rb_loader_impl_main_module = argv[1]; + + /* If we are running on host, this means the main is already executed by the host, so we can skip it, + * otherwise if we are not in host and we run it for the first time, we can prepare the loader + * for running the file as script instead of like a module + */ + if (host == 0) + { + rb_loader_impl_run_main = 0; + } + } + { RUBY_INIT_STACK; @@ -1002,17 +964,15 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi if (rb_loader_impl_initialize_types(impl) != 0) { - ruby_cleanup(0); - - return NULL; + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the types"); + goto error_initialize; } #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) if (rb_gv_set("$VERBOSE", Qtrue) != Qtrue) { - ruby_cleanup(0); - - return NULL; + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the $VERBOSE variable"); + goto error_initialize; } #endif @@ -1031,6 +991,12 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi } */ + if (rb_loader_port_initialize(impl) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the port"); + goto error_initialize; + } + log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader initialized correctly"); } @@ -1038,6 +1004,10 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi loader_initialization_register(impl); return (loader_impl_data)&rb_loader_impl_unused; + +error_initialize: + ruby_cleanup(0); + return NULL; } int rb_loader_impl_execution_path(loader_impl impl, const loader_path path) @@ -1117,47 +1087,93 @@ VALUE rb_loader_impl_module_eval_protect(VALUE args) return rb_mod_module_eval(protect->argc, protect->argv, protect->module); } +void rb_loader_impl_print_exception(void) +{ + VALUE exception = rb_gv_get("$!"); + + if (RTEST(exception)) + { + VALUE inspect, backtrace; + + inspect = rb_inspect(exception); + + rb_io_puts(1, &inspect, rb_stderr); + + backtrace = rb_funcallv(exception, rb_intern("backtrace"), 0, NULL); + + rb_io_puts(1, &backtrace, rb_stderr); + } + else + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby module backtrace not available"); + } +} + int rb_loader_impl_module_eval(VALUE module, VALUE module_data, VALUE *result) { - VALUE argv[1]; struct loader_impl_rb_module_eval_protect_type protect; int state; - argv[0] = module_data; - protect.argc = 1; - protect.argv = argv; + protect.argv = &module_data; protect.module = module; *result = rb_protect(rb_loader_impl_module_eval_protect, (VALUE)&protect, &state); if (state != 0) { - VALUE exception; - log_write("metacall", LOG_LEVEL_ERROR, "Ruby module evaluation failed"); + rb_loader_impl_print_exception(); + } - exception = rb_gv_get("$!"); + return state; +} - if (RTEST(exception)) - { - VALUE inspect, backtrace; +loader_impl_rb_module rb_loader_impl_create_module(VALUE name_capitalized, VALUE module, VALUE module_data, VALUE result) +{ + loader_impl_rb_module rb_module = malloc(sizeof(struct loader_impl_rb_module_type)); - inspect = rb_inspect(exception); + if (rb_module == NULL) + { + return NULL; + } - rb_io_puts(1, &inspect, rb_stderr); + if (result != Qnil) + { + rb_module->empty = 1; + rb_module->id = rb_to_id(name_capitalized); + rb_module->module = module; + rb_module->instance = rb_funcall(rb_cClass, rb_intern("new"), 1, rb_cObject); - backtrace = rb_funcallv(exception, rb_intern("backtrace"), 0, NULL); + rb_extend_object(rb_module->instance, rb_module->module); - rb_io_puts(1, &backtrace, rb_stderr); - } - else + rb_include_module(rb_module->instance, rb_module->module); + + rb_module->function_map = set_create(&hash_callback_str, &comparable_callback_str); + + if (!(rb_module->function_map != NULL && rb_loader_impl_key_parse(RSTRING_PTR(module_data), rb_module->function_map) == 0)) { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby module backtrace not available"); + rb_loader_impl_key_clear(rb_module->function_map); + + free(rb_module); + + return NULL; } + + log_write("metacall", LOG_LEVEL_DEBUG, "Ruby module %s loaded", StringValuePtr(name_capitalized)); + + rb_loader_impl_key_print(rb_module->function_map); + } + else + { + rb_module->empty = 0; + rb_module->id = (ID)NULL; + rb_module->module = Qnil; + rb_module->instance = Qnil; + rb_module->function_map = NULL; } - return state; + return rb_module; } loader_impl_rb_module rb_loader_impl_load_from_file_module(loader_impl impl, const loader_path path, const loader_name name) @@ -1178,47 +1194,7 @@ loader_impl_rb_module rb_loader_impl_load_from_file_module(loader_impl impl, con if (rb_loader_impl_module_eval(module, module_data, &result) == 0) { - loader_impl_rb_module rb_module = malloc(sizeof(struct loader_impl_rb_module_type)); - - if (rb_module != NULL) - { - if (result != Qnil) - { - rb_module->empty = 1; - rb_module->id = rb_to_id(name_capitalized); - rb_module->module = module; - rb_module->instance = rb_funcall(rb_cClass, rb_intern("new"), 1, rb_cObject); - - rb_extend_object(rb_module->instance, rb_module->module); - - rb_include_module(rb_module->instance, rb_module->module); - - rb_module->function_map = set_create(&hash_callback_str, &comparable_callback_str); - - if (!(rb_module->function_map != NULL && rb_loader_impl_key_parse(RSTRING_PTR(module_data), rb_module->function_map) == 0)) - { - rb_loader_impl_key_clear(rb_module->function_map); - - free(rb_module); - - return NULL; - } - - log_write("metacall", LOG_LEVEL_DEBUG, "Ruby module %s loaded", path); - - rb_loader_impl_key_print(rb_module->function_map); - } - else - { - rb_module->empty = 0; - rb_module->id = (ID)NULL; - rb_module->module = Qnil; - rb_module->instance = Qnil; - rb_module->function_map = NULL; - } - - return rb_module; - } + return rb_loader_impl_create_module(name_capitalized, module, module_data, result); } } } @@ -1230,12 +1206,9 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path { loader_impl_rb_handle handle = malloc(sizeof(struct loader_impl_rb_handle_type)); - size_t iterator; - if (handle == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid ruby handle allocation"); - return NULL; } @@ -1244,45 +1217,83 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path if (handle->modules == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid ruby modules vector allocation"); - - free(handle); - - return NULL; + goto vector_error; } - for (iterator = 0; iterator < size; ++iterator) + /* If we loaded one script and this script is the same as the one we passed to argv, + then we should set up this as a main script, only if only we set up the argv in MetaCall. + This should run only once, the first time after the initialization */ + if (rb_loader_impl_run_main == 0 && size == 1 && strcmp(paths[0], rb_loader_impl_main_module) == 0) { - static const char extension[] = "rb"; + VALUE module_data, result, module_name; + int state; loader_impl_rb_module rb_module; - loader_name module_name; - (void)portability_path_get_module_name(paths[iterator], strnlen(paths[iterator], LOADER_PATH_SIZE) + 1, extension, sizeof(extension), module_name, LOADER_NAME_SIZE); + rb_loader_impl_run_main = 1; - rb_module = rb_loader_impl_load_from_file_module(impl, paths[iterator], module_name); + module_data = rb_loader_impl_load_data(impl, paths[0]); + + result = rb_eval_string_protect(StringValuePtr(module_data), &state); + + if (state != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby evaluation failed"); + rb_loader_impl_print_exception(); + goto load_error; + } + + module_name = rb_funcall(result, rb_intern("name"), 0); + + rb_module = rb_loader_impl_create_module(module_name, result, module_data, result); if (rb_module == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid ruby module loading %s", paths[iterator]); + log_write("metacall", LOG_LEVEL_ERROR, "Invalid ruby module loading %s", paths[0]); } else { vector_push_back(handle->modules, &rb_module); } } + else + { + size_t iterator; + + for (iterator = 0; iterator < size; ++iterator) + { + static const char extension[] = "rb"; + loader_impl_rb_module rb_module; + loader_name module_name; + + (void)portability_path_get_module_name(paths[iterator], strnlen(paths[iterator], LOADER_PATH_SIZE) + 1, extension, sizeof(extension), module_name, LOADER_NAME_SIZE); + + rb_module = rb_loader_impl_load_from_file_module(impl, paths[iterator], module_name); + + if (rb_module == NULL) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid ruby module loading %s", paths[iterator]); + } + else + { + vector_push_back(handle->modules, &rb_module); + } + } + } // Do not load the handle in case there isn't modules if (vector_size(handle->modules) == 0) { log_write("metacall", LOG_LEVEL_ERROR, "No module could be loaded"); - - vector_destroy(handle->modules); - - free(handle); - - return NULL; + goto load_error; } return (loader_handle)handle; + +load_error: + vector_destroy(handle->modules); +vector_error: + free(handle); + return NULL; } loader_impl_rb_module rb_loader_impl_load_from_memory_module(loader_impl impl, const loader_name name, const char *buffer, size_t size) @@ -1306,47 +1317,7 @@ loader_impl_rb_module rb_loader_impl_load_from_memory_module(loader_impl impl, c if (rb_loader_impl_module_eval(module, module_data, &result) == 0) { - loader_impl_rb_module rb_module = malloc(sizeof(struct loader_impl_rb_module_type)); - - if (rb_module != NULL) - { - if (result != Qnil) - { - rb_module->empty = 1; - rb_module->id = rb_to_id(name_capitalized); - rb_module->module = module; - rb_module->instance = rb_funcall(rb_cClass, rb_intern("new"), 1, rb_cObject); - - rb_extend_object(rb_module->instance, rb_module->module); - - rb_include_module(rb_module->instance, rb_module->module); - - rb_module->function_map = set_create(&hash_callback_str, &comparable_callback_str); - - if (!(rb_module->function_map != NULL && rb_loader_impl_key_parse(RSTRING_PTR(module_data), rb_module->function_map) == 0)) - { - set_destroy(rb_module->function_map); - - free(rb_module); - - return NULL; - } - - log_write("metacall", LOG_LEVEL_DEBUG, "Ruby module %s loaded", name); - - rb_loader_impl_key_print(rb_module->function_map); - } - else - { - rb_module->empty = 0; - rb_module->id = (ID)NULL; - rb_module->module = Qnil; - rb_module->instance = Qnil; - rb_module->function_map = NULL; - } - - return rb_module; - } + return rb_loader_impl_create_module(name_capitalized, module, module_data, result); } } } diff --git a/source/loaders/rb_loader/source/rb_loader_port.c b/source/loaders/rb_loader/source/rb_loader_port.c index 92e928e54f..eef87b5639 100644 --- a/source/loaders/rb_loader/source/rb_loader_port.c +++ b/source/loaders/rb_loader/source/rb_loader_port.c @@ -18,15 +18,18 @@ * */ +#include #include -#include +#include #include -#include +#include -VALUE rb_loader_port_load_from_file(int argc, VALUE *argv, VALUE self) +static loader_impl rb_loader_impl = NULL; + +VALUE rb_loader_port_load_from_file(VALUE self, VALUE tag_value, VALUE paths_value) { const char *tag; const char **paths; @@ -35,28 +38,23 @@ VALUE rb_loader_port_load_from_file(int argc, VALUE *argv, VALUE self) (void)self; - if (argc != 2) - { - rb_raise(rb_eArgError, "Wrong # of arguments (expected 2, received %d)", argc); - return Qnil; - } - - if (TYPE(argv[0]) != T_STRING) + /* Get tag */ + if (TYPE(tag_value) != T_STRING) { rb_raise(rb_eArgError, "First parameter expected to be a string indicating the tag of the loader (py, node, c, ...)"); return Qnil; } - tag = StringValuePtr(argv[0]); + tag = StringValuePtr(tag_value); - if (TYPE(argv[1]) != T_ARRAY) + /* Get array size */ + if (TYPE(paths_value) != T_ARRAY) { rb_raise(rb_eArgError, "Second parameter expected to be an array of strings with the desired files to be loaded"); return Qnil; } - /* Get array size */ - size = RARRAY_LEN(argv[1]); + size = RARRAY_LEN(paths_value); if (size == 0) { @@ -67,13 +65,13 @@ VALUE rb_loader_port_load_from_file(int argc, VALUE *argv, VALUE self) /* Parse the array */ { size_t iterator; - VALUE *array_ptr = RARRAY_PTR(argv[1]); + VALUE *array_ptr = RARRAY_PTR(paths_value); paths = (const char **)malloc(sizeof(const char *) * size); if (paths == NULL) { - rb_raise(rb_eArgError, "Invalid file argument allocation"); + rb_raise(rb_eArgError, "Invalid paths argument allocation"); return Qnil; } @@ -98,7 +96,7 @@ VALUE rb_loader_port_load_from_file(int argc, VALUE *argv, VALUE self) return LONG2NUM(result); } -VALUE rb_loader_port_load_from_memory(int argc, VALUE *argv, VALUE self) +VALUE rb_loader_port_load_from_memory(VALUE self, VALUE tag_value, VALUE buffer_value) { const char *tag; const char *buffer; @@ -107,28 +105,23 @@ VALUE rb_loader_port_load_from_memory(int argc, VALUE *argv, VALUE self) (void)self; - if (argc != 2) - { - rb_raise(rb_eArgError, "Wrong # of arguments (expected 2, received %d)", argc); - return Qnil; - } - - if (TYPE(argv[0]) != T_STRING) + /* Get tag */ + if (TYPE(tag_value) != T_STRING) { rb_raise(rb_eArgError, "First parameter expected to be a string indicating the tag of the loader (py, node, c, ...)"); return Qnil; } - tag = StringValuePtr(argv[0]); + tag = StringValuePtr(tag_value); - if (TYPE(argv[1]) != T_STRING) + /* Get buffer size */ + if (TYPE(buffer_value) != T_STRING) { rb_raise(rb_eArgError, "Second parameter expected to be an string with the code to be loaded"); return Qnil; } - /* Get buffer size */ - size = RSTRING_LEN(argv[1]) + 1; + size = RSTRING_LEN(buffer_value) + 1; if (size == 1) { @@ -136,18 +129,92 @@ VALUE rb_loader_port_load_from_memory(int argc, VALUE *argv, VALUE self) return Qnil; } + /* Get buffer */ + buffer = StringValuePtr(buffer_value); + /* Execute load from memory */ result = metacall_load_from_memory(tag, buffer, size, NULL); return LONG2NUM(result); } -// TODO: Implement metacall function +VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) +{ + const char *function_name; + size_t args_size, iterator; + value *args, result; + + (void)self; + + if (argc <= 0) + { + rb_raise(rb_eArgError, "Wrong # of arguments (expected at least 1 argument, received 0)"); + return Qnil; + } -int rb_loader_port_initialize(void) + /* Get function name */ + if (TYPE(argv[0]) != T_STRING) + { + rb_raise(rb_eArgError, "First parameter expected to be a string indicating the function name to be called"); + return Qnil; + } + + function_name = StringValuePtr(argv[0]); + + /* Allocate arguments */ + args_size = argc - 1; + + args = args_size > 0 ? (value *)malloc(sizeof(value) * args_size) : metacall_null_args; + + if (args_size > 0 && args == NULL) + { + rb_raise(rb_eArgError, "Invalid arguments allocation"); + return Qnil; + } + + /* Convert the arguments into MetaCall values */ + for (iterator = 0; iterator < args_size; ++iterator) + { + (void)rb_type_deserialize(rb_loader_impl, argv[iterator], &args[iterator]); + } + + /* Execute the call */ + result = metacallv_s(function_name, args, args_size); + + /* Clear the arguments */ + if (args_size > 0) + { + for (iterator = 0; iterator < args_size; ++iterator) + { + value_type_destroy(args[iterator]); + } + + free(args); + } + + return rb_type_serialize(result); +} + +int rb_loader_port_initialize(loader_impl impl) { - VALUE rb_loader_port = rb_define_module("metacall_rb_loader_port"); - rb_define_module_function(mRb_portd, "metacall_detour", _wrap_metacall_detour, -1); + VALUE rb_loader_port; + + if (impl == NULL) + { + return 1; + } + + if (rb_loader_impl != NULL) + { + return 0; + } + + rb_loader_port = rb_define_module("MetaCallRbLoaderPort"); + rb_define_module_function(rb_loader_port, "metacall_load_from_file", rb_loader_port_load_from_file, 2); + rb_define_module_function(rb_loader_port, "metacall_load_from_memory", rb_loader_port_load_from_memory, 2); + rb_define_module_function(rb_loader_port, "metacall", rb_loader_port_metacall, -1); + + rb_loader_impl = impl; return 0; } diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index 201511dd3e..c41504c73f 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -45,8 +45,9 @@ endif() set(py_port_test "${target}_test") -if(NOT OPTION_BUILD_CLI) - # Add test (CLI) +if(OPTION_BUILD_CLI) + message(STATUS "Test ${py_port_test}") + add_test(NAME ${target} COMMAND $ ${CMAKE_CURRENT_SOURCE_DIR}/test.py ) diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index 4459bbdd8e..200bde4896 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -24,43 +24,81 @@ set(target rb_port) # Exit here if required dependencies are not met message(STATUS "Port ${target}") -# TODO + + + # -# Define test +# Define test (CLI) # -if(OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) - # TODO: This test fails when run with sanitizers: +set(rb_port_test "${target}_test") +set(rb_port_test_path "${CMAKE_CURRENT_SOURCE_DIR}/test/run.rb") + +if(OPTION_BUILD_CLI) + message(STATUS "Test ${rb_port_test}") + + add_test(NAME ${rb_port_test} + COMMAND $ "${rb_port_test_path}" + ) + # - # Sanitizer: - # ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. - # For solving the issue compile the test with sanitizers when enabled or preload asan + # Define test labels # - # Thread Sanitizer: - # /usr/local/metacall/build/rb_port_test.rb:4:in `require_relative': /usr/lib/x86_64-linux-gnu/libtsan.so.2: cannot allocate memory in static TLS block - /usr/local/metacall/build/rb_portd.so (LoadError) - # from /usr/local/metacall/build/rb_port_test.rb:4:in `
' - return() + + set_property(TEST ${rb_port_test} + PROPERTY LABELS ${rb_port_test} + ) + + include(TestEnvironmentVariables) + + test_environment_variables(${rb_port_test} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + ) endif() -set(rb_port_test "rb_port_test") -set(rb_port_test_path "${CMAKE_CURRENT_SOURCE_DIR}/test/run.rb") -add_test(NAME ${target} - COMMAND ${Ruby_EXECUTABLE} "${rb_port_test_path}" -) -# -# Define test labels -# -set_property(TEST ${target} - PROPERTY LABELS ${rb_port_test} -) -include(TestEnvironmentVariables) +# TODO + +# # +# # Define test +# # + +# if(OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) +# # TODO: This test fails when run with sanitizers: +# # +# # Sanitizer: +# # ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. +# # For solving the issue compile the test with sanitizers when enabled or preload asan +# # +# # Thread Sanitizer: +# # /usr/local/metacall/build/rb_port_test.rb:4:in `require_relative': /usr/lib/x86_64-linux-gnu/libtsan.so.2: cannot allocate memory in static TLS block - /usr/local/metacall/build/rb_portd.so (LoadError) +# # from /usr/local/metacall/build/rb_port_test.rb:4:in `
' +# return() +# endif() + +# set(rb_port_test "rb_port_test") +# set(rb_port_test_path "${CMAKE_CURRENT_SOURCE_DIR}/test/run.rb") + +# add_test(NAME ${target} +# COMMAND ${Ruby_EXECUTABLE} "${rb_port_test_path}" +# ) + +# # +# # Define test labels +# # + +# set_property(TEST ${target} +# PROPERTY LABELS ${rb_port_test} +# ) + +# include(TestEnvironmentVariables) -test_environment_variables(${target} - "" - ${TESTS_ENVIRONMENT_VARIABLES} -) +# test_environment_variables(${target} +# "" +# ${TESTS_ENVIRONMENT_VARIABLES} +# ) diff --git a/source/ports/rb_port/package/lib/metacall.rb b/source/ports/rb_port/package/lib/metacall.rb index 29d1ce90d6..0e7fe7a6c9 100644 --- a/source/ports/rb_port/package/lib/metacall.rb +++ b/source/ports/rb_port/package/lib/metacall.rb @@ -1,3 +1,116 @@ -class MetaCall +#!/usr/bin/ruby + +require 'find' +require 'rbconfig' +require 'fiddle' + +module MetaCall + private + + def find_files_recursively(root_dir, pattern) + regex = Regexp.new(pattern) + matches = [] + + if Dir.exist?(root_dir) + Find.find(root_dir) do |path| + matches << path if File.file?(path) && regex.match?(File.basename(path)) + end + end + + matches + end + + def platform_install_paths + host_os = RbConfig::CONFIG['host_os'] + + case host_os + when /mswin|mingw|cygwin/ + { + paths: [ File.join(ENV['LOCALAPPDATA'].to_s, 'MetaCall', 'metacall') ], + name: 'metacall\.dll' + } + when /darwin/ + { + paths: [ '/opt/homebrew/lib/', '/usr/local/lib/' ], + name: 'libmetacall\.dylib' + } + when /linux/ + { + paths: [ '/usr/local/lib/', '/gnu/lib/' ], + name: 'libmetacall\.so' + } + else + raise "Platform #{host_os} not supported" + end + end + + def search_paths + custom_path = ENV['METACALL_INSTALL_PATH'] + + if custom_path + { + paths: [ custom_path ], + name: '^(lib)?metacall(d)?\.(so|dylib|dll)$' + } + else + platform_install_paths + end + end + + def find_library + search_data = search_paths + + search_data[:paths].each do |path| + files = find_files_recursively(path, search_data[:name]) + return files.first unless files.empty? + end + + raise LoadError, <<~ERROR + MetaCall library not found. If you have it in a special folder, define it using the METACALL_INSTALL_PATH environment variable. + Searched in: #{search_data[:paths].join(', ')} + + If you do not have it installed, you have three options: + 1) Go to https://github.com/metacall/install and install it. + 2) Contribute to https://github.com/metacall/distributable by providing support for your platform and architecture. + 3) Be a x10 programmer and compile it yourself, then define the install folder using METACALL_INSTALL_PATH. + ERROR + end + + def metacall_module_load + # Check if already loaded + if defined?(MetaCallRbLoaderPort) + return MetaCallRbLoaderPort + end + + # Set environment variable for the host + ENV['METACALL_HOST'] = 'rb' + + # Find and load the MetaCall shared library + library_path = find_library + + begin + # Load the shared library globally + Fiddle::Handle.new(library_path, Fiddle::RTLD_GLOBAL | Fiddle::RTLD_NOW) + rescue Fiddle::DLError => e + raise LoadError, "Failed to load MetaCall library at #{library_path}: #{e.message}" + end + + # Check again if the port was loaded + if defined?(MetaCallRbLoaderPort) + return MetaCallRbLoaderPort + else + raise LoadError, 'MetaCall was found but failed to load MetaCallRbLoaderPort' + end + end + + # TODO: Load the port at startup + # port = metacall_module_load() + + public + + # TODO: API + # def method_a + # port.method_a + # end end diff --git a/source/ports/rb_port/test/run.rb b/source/ports/rb_port/test/run.rb index fe0180210d..a6c4077759 100644 --- a/source/ports/rb_port/test/run.rb +++ b/source/ports/rb_port/test/run.rb @@ -1,46 +1,48 @@ #!/usr/bin/ruby -require 'test/unit' -require_relative '@RB_PORT_NAME@' +require File.expand_path("../package/lib/metacall.rb") -class RbPortTest < Test::Unit::TestCase +# require 'test/unit' +# require_relative '@RB_PORT_NAME@' - @@meta = @RB_PORT_OBJ@.method(:metacall) +# class RbPortTest < Test::Unit::TestCase - # MetaCall (Python from memory) - def test_python_memory - script = '#!/usr/bin/env python3\n' \ - 'def inline_multiply_mem(left: int, right: int) -> int:\n' \ - ' return left * right;\n' - 'def inline_hello(left: int, right: int) -> int:\n' \ - ' print(\'Helloo\', left, \' \', right);\n' - ' return;\n' +# @@meta = @RB_PORT_OBJ@.method(:metacall) - assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_memory('py', script)) +# # MetaCall (Python from memory) +# def test_python_memory +# script = '#!/usr/bin/env python3\n' \ +# 'def inline_multiply_mem(left: int, right: int) -> int:\n' \ +# ' return left * right;\n' +# 'def inline_hello(left: int, right: int) -> int:\n' \ +# ' print(\'Helloo\', left, \' \', right);\n' +# ' return;\n' - #assert_equal(4, @@meta.call('inline_multiply_mem', 2, 2)) +# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_memory('py', script)) - assert_equal(nil, @@meta.call('inline_hello', 10, 20)) - end +# #assert_equal(4, @@meta.call('inline_multiply_mem', 2, 2)) - # MetaCall (Python) - def test_python - assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('py', ['example.py'])) +# assert_equal(nil, @@meta.call('inline_hello', 10, 20)) +# end - assert_equal(nil, @@meta.call('hello')) +# # MetaCall (Python) +# def test_python +# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('py', ['example.py'])) - assert_equal(35, @@meta.call('multiply', 5, 7)) - end +# assert_equal(nil, @@meta.call('hello')) - # MetaCall (Ruby) - def test_ruby - assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('rb', ['hello.rb'])) +# assert_equal(35, @@meta.call('multiply', 5, 7)) +# end - assert_equal(nil, @@meta.call('say_null')) +# # MetaCall (Ruby) +# def test_ruby +# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('rb', ['hello.rb'])) - assert_equal(12, @@meta.call('say_multiply', 3, 4)) +# assert_equal(nil, @@meta.call('say_null')) - assert_equal('Hello world!', @@meta.call('say_hello', 'world')) - end +# assert_equal(12, @@meta.call('say_multiply', 3, 4)) -end +# assert_equal('Hello world!', @@meta.call('say_hello', 'world')) +# end + +# end diff --git a/source/tests/rb_loader_parser_test/CMakeLists.txt b/source/tests/rb_loader_parser_test/CMakeLists.txt index dac449a563..af3df47fee 100644 --- a/source/tests/rb_loader_parser_test/CMakeLists.txt +++ b/source/tests/rb_loader_parser_test/CMakeLists.txt @@ -79,6 +79,7 @@ target_include_directories(${target} ${PROJECT_BINARY_DIR}/source/include # Ruby Loader headers + ${CMAKE_BINARY_DIR}/source/loaders/rb_loader/include ${CMAKE_SOURCE_DIR}/source/loaders/rb_loader/include ) From c2fc27389aa57a55fa1c141f5a76f04eed6ac7cc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 30 May 2025 19:05:09 +0200 Subject: [PATCH 165/364] Support for ruby.exe, metacall is not working now. --- .../loaders/rb_loader/source/rb_loader_impl.c | 73 +++++++++++-------- source/ports/rb_port/CMakeLists.txt | 53 +++++++------- source/ports/rb_port/package/lib/metacall.rb | 26 +++++-- source/ports/rb_port/test/run.rb | 64 ++++++++-------- 4 files changed, 120 insertions(+), 96 deletions(-) diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 2eb931f7ba..4ac6f9fc11 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -955,58 +955,62 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi } } + if (host == 0) { RUBY_INIT_STACK; ruby_init(); ruby_init_loadpath(); + } - if (rb_loader_impl_initialize_types(impl) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the types"); - goto error_initialize; - } + if (rb_loader_impl_initialize_types(impl) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the types"); + goto error_initialize; + } #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - if (rb_gv_set("$VERBOSE", Qtrue) != Qtrue) - { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the $VERBOSE variable"); - goto error_initialize; - } + if (rb_gv_set("$VERBOSE", Qtrue) != Qtrue) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the $VERBOSE variable"); + goto error_initialize; + } #endif - /* Gem add home folder if any */ - /* - { - const char * gem_home_env = getenv("GEM_HOME"); + /* Gem add home folder if any */ + /* + { + const char * gem_home_env = getenv("GEM_HOME"); - if (gem_home_env != NULL) + if (gem_home_env != NULL) + { + if (rb_loader_impl_execution_path(impl, gem_home_env) != 0) { - if (rb_loader_impl_execution_path(impl, gem_home_env) != 0) - { - log_write("metacall", LOG_LEVEL_WARNING, "Ruby GEM_HOME could not be added to execution path list"); - } + log_write("metacall", LOG_LEVEL_WARNING, "Ruby GEM_HOME could not be added to execution path list"); } } - */ - - if (rb_loader_port_initialize(impl) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the port"); - goto error_initialize; - } + } + */ - log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader initialized correctly"); + if (rb_loader_port_initialize(impl) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby loader failed to initialize the port"); + goto error_initialize; } - /* Register initialization */ - loader_initialization_register(impl); + log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader initialized correctly"); - return (loader_impl_data)&rb_loader_impl_unused; +/* Register initialization */ +loader_initialization_register(impl); + +return (loader_impl_data)&rb_loader_impl_unused; error_initialize: - ruby_cleanup(0); + if (host == 0) + { + ruby_cleanup(0); + } return NULL; } @@ -1722,10 +1726,15 @@ int rb_loader_impl_discover(loader_impl impl, loader_handle handle, context ctx) int rb_loader_impl_destroy(loader_impl impl) { - (void)impl; + const int host = loader_impl_get_option_host(impl); /* Destroy children loaders */ loader_unload_children(impl); + if (host == 1) + { + return 0; + } + return ruby_cleanup(0); } diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index 200bde4896..ae034bee7c 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -25,8 +25,11 @@ set(target rb_port) message(STATUS "Port ${target}") - - +# Check for test dependencies +if(NOT OPTION_BUILD_LOADERS_PY) + message(WARNING "Enable Python Loader [-DOPTION_BUILD_LOADERS_PY=ON] for enabling tests for Ruby Port") + return() +endif() # # Define test (CLI) @@ -40,6 +43,7 @@ if(OPTION_BUILD_CLI) add_test(NAME ${rb_port_test} COMMAND $ "${rb_port_test_path}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test" ) # @@ -58,16 +62,13 @@ if(OPTION_BUILD_CLI) ) endif() +# +# Define test (Ruby) +# - - +set(rb_port_test_executable "${rb_port_test}_executable") # TODO - -# # -# # Define test -# # - # if(OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) # # TODO: This test fails when run with sanitizers: # # @@ -81,24 +82,26 @@ endif() # return() # endif() -# set(rb_port_test "rb_port_test") -# set(rb_port_test_path "${CMAKE_CURRENT_SOURCE_DIR}/test/run.rb") +message(STATUS "Test ${rb_port_test_executable}") -# add_test(NAME ${target} -# COMMAND ${Ruby_EXECUTABLE} "${rb_port_test_path}" -# ) +add_test(NAME ${rb_port_test_executable} + COMMAND ${Ruby_EXECUTABLE} "${rb_port_test_path}" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test" +) -# # -# # Define test labels -# # +# +# Define test labels +# -# set_property(TEST ${target} -# PROPERTY LABELS ${rb_port_test} -# ) +set_property(TEST ${rb_port_test_executable} + PROPERTY LABELS ${rb_port_test_executable} +) -# include(TestEnvironmentVariables) +include(TestEnvironmentVariables) -# test_environment_variables(${target} -# "" -# ${TESTS_ENVIRONMENT_VARIABLES} -# ) +test_environment_variables(${rb_port_test_executable} + "" + ${TESTS_ENVIRONMENT_VARIABLES} + "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} +) diff --git a/source/ports/rb_port/package/lib/metacall.rb b/source/ports/rb_port/package/lib/metacall.rb index 0e7fe7a6c9..bb21cd623e 100644 --- a/source/ports/rb_port/package/lib/metacall.rb +++ b/source/ports/rb_port/package/lib/metacall.rb @@ -5,6 +5,8 @@ require 'fiddle' module MetaCall + extend self + private def find_files_recursively(root_dir, pattern) @@ -103,14 +105,24 @@ def metacall_module_load end end - # TODO: Load the port at startup - # port = metacall_module_load() - public - # TODO: API - # def method_a - # port.method_a - # end + def metacall_load_from_file(tag, paths) + metacall_module_load + + MetaCallRbLoaderPort.metacall_load_from_file(tag, paths) + end + + def metacall_load_from_memory(tag, script) + metacall_module_load + + MetaCallRbLoaderPort.metacall_load_from_memory(tag, script) + end + + def metacall(function_name, *args) + metacall_module_load + + MetaCallRbLoaderPort.metacall(function_name, *args) + end end diff --git a/source/ports/rb_port/test/run.rb b/source/ports/rb_port/test/run.rb index a6c4077759..69ead17bd6 100644 --- a/source/ports/rb_port/test/run.rb +++ b/source/ports/rb_port/test/run.rb @@ -1,48 +1,48 @@ #!/usr/bin/ruby +require 'test/unit' require File.expand_path("../package/lib/metacall.rb") -# require 'test/unit' -# require_relative '@RB_PORT_NAME@' +class RbPortTest < Test::Unit::TestCase -# class RbPortTest < Test::Unit::TestCase + # MetaCall (Python from memory) + def test_python_memory + script = '#!/usr/bin/env python3\n' \ + 'def inline_multiply_mem(left: int, right: int) -> int:\n' \ + ' return left * right;\n' + 'def inline_hello(left: int, right: int) -> int:\n' \ + ' print(\'Helloo\', left, \' \', right);\n' + ' return;\n' -# @@meta = @RB_PORT_OBJ@.method(:metacall) + assert_equal(0, MetaCall.metacall_load_from_memory('py', script)) -# # MetaCall (Python from memory) -# def test_python_memory -# script = '#!/usr/bin/env python3\n' \ -# 'def inline_multiply_mem(left: int, right: int) -> int:\n' \ -# ' return left * right;\n' -# 'def inline_hello(left: int, right: int) -> int:\n' \ -# ' print(\'Helloo\', left, \' \', right);\n' -# ' return;\n' + # TODO + # assert_equal(4, MetaCall::metacall('inline_multiply_mem', 2, 2)) -# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_memory('py', script)) + assert_equal(nil, MetaCall::metacall('inline_hello', 10, 20)) + end -# #assert_equal(4, @@meta.call('inline_multiply_mem', 2, 2)) + # MetaCall (Python) + def test_python + assert_equal(0, MetaCall::metacall_load_from_file('py', ['example.py'])) -# assert_equal(nil, @@meta.call('inline_hello', 10, 20)) -# end + assert_equal(nil, MetaCall::metacall('hello')) -# # MetaCall (Python) -# def test_python -# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('py', ['example.py'])) + # TODO + # assert_equal(35, MetaCall::metacall('multiply', 5, 7)) + end -# assert_equal(nil, @@meta.call('hello')) + # MetaCall (Ruby) + def test_ruby + assert_equal(0, MetaCall::metacall_load_from_file('rb', ['hello.rb'])) -# assert_equal(35, @@meta.call('multiply', 5, 7)) -# end + assert_equal(nil, MetaCall::metacall('say_null')) -# # MetaCall (Ruby) -# def test_ruby -# assert_equal(0, @RB_PORT_OBJ@.metacall_load_from_file('rb', ['hello.rb'])) + # TODO + # assert_equal(12, MetaCall::metacall('say_multiply', 3, 4)) -# assert_equal(nil, @@meta.call('say_null')) + # TODO + # assert_equal('Hello world!', MetaCall::metacall('say_hello', 'world')) + end -# assert_equal(12, @@meta.call('say_multiply', 3, 4)) - -# assert_equal('Hello world!', @@meta.call('say_hello', 'world')) -# end - -# end +end From 8032b37d1510b7cb3a2bf55c3ada9e44f230849d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 30 May 2025 19:14:41 +0200 Subject: [PATCH 166/364] Solve issue with python. --- source/loaders/py_loader/source/py_loader_symbol_fallback.c | 1 + source/loaders/rb_loader/source/rb_loader_impl.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 837b88338c..2d969ecc3a 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -26,6 +26,7 @@ __attribute__((weak)) void _Py_DECREF_DecRefTotal(void) {} __attribute__((weak)) void _Py_INCREF_IncRefTotal(void) {} +__attribute__((weak)) Py_ssize_t _Py_RefTotal; /* When Python has been compiled with tracing reference counting, * provide fallback symbols for allowing it to compile properly */ diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 4ac6f9fc11..c5139dea94 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1001,10 +1001,10 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader initialized correctly"); -/* Register initialization */ -loader_initialization_register(impl); + /* Register initialization */ + loader_initialization_register(impl); -return (loader_impl_data)&rb_loader_impl_unused; + return (loader_impl_data)&rb_loader_impl_unused; error_initialize: if (host == 0) From 0ff9225c3d90513d46ba1fa8ce74ce2a3f90d49b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 30 May 2025 22:15:31 +0200 Subject: [PATCH 167/364] Solve deadlock in metacall node port test. --- source/ports/node_port/test.js | 19 ++++++++++++++++--- .../metacall_node_port_test/CMakeLists.txt | 1 + .../source/metacall_node_port_test.cpp | 6 +++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/source/ports/node_port/test.js b/source/ports/node_port/test.js index 36cb0f849f..424b8c60c6 100644 --- a/source/ports/node_port/test.js +++ b/source/ports/node_port/test.js @@ -41,7 +41,7 @@ const waitForMocha = async () => { return new Promise((resolve, reject) => mocha.run(failures => failures ? reject(failures) : resolve())); }; -void (async () => { +const main = async () => { try { // Run the tests await waitForMocha(); @@ -51,5 +51,18 @@ void (async () => { } } - console.log('Tests passed without errors'); -})(); + return 'Tests passed without errors'; +}; + +/* Allow to execute the test on demand */ +if (process.env['NODE_PORT_TEST_EXPORTS']) { + /* Export the test as a function */ + module.exports = { + main, + }; +} else { + /* Execute the test and print the result */ + void (async () => { + console.log(await main()); + })(); +} diff --git a/source/tests/metacall_node_port_test/CMakeLists.txt b/source/tests/metacall_node_port_test/CMakeLists.txt index 97aa855b33..5568059519 100644 --- a/source/tests/metacall_node_port_test/CMakeLists.txt +++ b/source/tests/metacall_node_port_test/CMakeLists.txt @@ -240,4 +240,5 @@ test_environment_variables(${target} ${TESTS_ENVIRONMENT_VARIABLES_C} ${TESTS_ENVIRONMENT_VARIABLES_RS} ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} + "NODE_PORT_TEST_EXPORTS=1" ) diff --git a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp index cfe35e8b56..081bf83375 100644 --- a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp +++ b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp @@ -75,11 +75,11 @@ TEST_F(metacall_node_port_test, DefaultConstructor) void *future = metacall_await("main", metacall_null_args, accept, reject, static_cast(&await_data)); - await_data.c.wait(lock); + ASSERT_NE((void *)NULL, (void *)future); - EXPECT_NE((void *)NULL, (void *)future); + ASSERT_EQ((enum metacall_value_id)metacall_value_id(future), (enum metacall_value_id)METACALL_FUTURE); - EXPECT_EQ((enum metacall_value_id)metacall_value_id(future), (enum metacall_value_id)METACALL_FUTURE); + await_data.c.wait(lock); metacall_value_destroy(future); } From 7f1f80001bfeddf7a86cd95e65656bccdee51f11 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 08:02:11 +0200 Subject: [PATCH 168/364] Enable more msvc versions. --- .github/workflows/macos-test.yml | 2 +- .github/workflows/windows-test.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 504486f545..26247e35b1 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13, macos-14] # TODO: macos-15: https://github.com/metacall/core/issues/530 + os: [macos-13, macos-14, macos-15] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 69a4ecc5be..3b0d5dabc9 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -17,11 +17,12 @@ concurrency: jobs: windows-test: name: Windows MSVC Test - runs-on: windows-2019 # TODO: Implement matrix with windows 2019 and 2022 + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [windows-2019, windows-2022, windows-2025] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, From d773471e51ebc5593e350081cf93357284639a16 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 13:14:39 +0200 Subject: [PATCH 169/364] Solve delay load import issues on windows. --- source/dynlink/include/dynlink/dynlink_type.h | 14 ++ source/loaders/py_loader/CMakeLists.txt | 80 ++++--- .../py_loader/py_loader_symbol_fallback.h | 60 ++++++ .../loaders/py_loader/source/py_loader_impl.c | 15 +- .../loaders/py_loader/source/py_loader_port.c | 129 +++++------ .../source/py_loader_symbol_fallback.c | 203 +++++++++++++++++- 6 files changed, 387 insertions(+), 114 deletions(-) create mode 100644 source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h diff --git a/source/dynlink/include/dynlink/dynlink_type.h b/source/dynlink/include/dynlink/dynlink_type.h index d6b737e577..57413cae25 100644 --- a/source/dynlink/include/dynlink/dynlink_type.h +++ b/source/dynlink/include/dynlink/dynlink_type.h @@ -72,6 +72,20 @@ typedef void (*dynlink_symbol_addr)(void); /**< Function pointer referring to \ } while (0) +#define dynlink_symbol_uncast_type(fn, type, result) \ + do \ + { \ + union \ + { \ + type ptr; \ + dynlink_symbol_addr fn; \ + } cast; \ +\ + cast.fn = (fn); \ + (result) = (type)cast.ptr; \ +\ + } while (0) + #ifdef __cplusplus } #endif diff --git a/source/loaders/py_loader/CMakeLists.txt b/source/loaders/py_loader/CMakeLists.txt index c764d17b1e..06d73b1127 100644 --- a/source/loaders/py_loader/CMakeLists.txt +++ b/source/loaders/py_loader/CMakeLists.txt @@ -9,15 +9,45 @@ endif() if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(Python3_FIND_ABI "ON" "ANY" "ANY") - find_package(Python3 COMPONENTS Development) + find_package(Python3 COMPONENTS Interpreter Development) # Fallback to release if not found if(NOT Python3_Development_FOUND) set(Python3_FIND_ABI) - find_package(Python3 COMPONENTS Development REQUIRED) + find_package(Python3 COMPONENTS Interpreter Development REQUIRED) endif() else() - find_package(Python3 COMPONENTS Development REQUIRED) + find_package(Python3 COMPONENTS Interpreter Development REQUIRED) +endif() + +# Select the proper library +if(NOT Python3_LIBRARY AND Python3_LIBRARIES) + # Go through the list and handle keyword-separated structure + set(index 0) + list(LENGTH Python3_LIBRARIES lib_len) + while(index LESS lib_len) + list(GET Python3_LIBRARIES ${index} item) + + # Check if it's a keyword (debug/optimized) + if(item STREQUAL "debug" OR item STREQUAL "optimized" OR item STREQUAL "general") + set(keyword ${item}) + math(EXPR next "${index} + 1") + list(GET Python3_LIBRARIES ${next} lib_path) + + # Match the right keyword + if((CMAKE_BUILD_TYPE STREQUAL "Debug" AND keyword STREQUAL "debug") OR + (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND keyword STREQUAL "optimized") OR + (keyword STREQUAL "general")) # general applies to all configs + set(Python3_LIBRARY ${lib_path}) + endif() + + math(EXPR index "${index} + 2") # Skip keyword and path + else() + # Plain list without keywords (single-config or fallback) + set(Python3_LIBRARY ${item}) + math(EXPR index "${index} + 1") + endif() + endwhile() endif() # Copy Python DLL into project output directory @@ -25,30 +55,27 @@ endif() # TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da include(Portability) -if(PROJECT_OS_FAMILY STREQUAL win32 AND Python3_LIBRARIES AND Python3_ROOT_DIR AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - foreach(library ${Python3_LIBRARIES}) - if(${library} MATCHES "[^_d][.]lib$") - # Get the library path with dll suffix - string(REGEX REPLACE "[.]lib$" ".dll" LIB_PATH ${library}) - # Get the library name - get_filename_component(LIB_NAME "${LIB_PATH}" NAME) - # Find the library in the Python3 root path - find_file(Python3_LIBRARY_NAME_PATH ${LIB_NAME} - PATHS ${Python3_ROOT_DIR} - NO_DEFAULT_PATH - ) - if(Python3_LIBRARY_NAME_PATH) - break() - endif() - endif() - endforeach() +if(PROJECT_OS_FAMILY STREQUAL win32 AND Python3_LIBRARY) + # Get the library path with dll suffix + string(REGEX REPLACE "[.]lib$" ".dll" LIB_PATH "${Python3_LIBRARY}") + # Get the library name + get_filename_component(LIB_NAME "${LIB_PATH}" NAME) + # Get the python root folder + if(NOT Python3_ROOT_DIR) + get_filename_component(Python3_ROOT_DIR "${Python3_EXECUTABLE}" DIRECTORY) + endif() + # Find the library in the Python3 root path + find_file(Python3_LIBRARY_NAME_PATH "${LIB_NAME}" + PATHS "${Python3_ROOT_DIR}" + NO_DEFAULT_PATH + ) + # Copy the DLL to the output directory + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_OUTPUT_DIR}") + file(COPY "${Python3_LIBRARY_NAME_PATH}" DESTINATION "${PROJECT_OUTPUT_DIR}") endif() -if(Python3_LIBRARY_NAME_PATH) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}) - file(COPY "${Python3_LIBRARY_NAME_PATH}" DESTINATION ${PROJECT_OUTPUT_DIR}) -else() - set(Python3_LIBRARY_NAME_PATH "${Python3_LIBRARIES}") +if(NOT Python3_LIBRARY_NAME_PATH) + set(Python3_LIBRARY_NAME_PATH "${Python3_LIBRARY}") endif() # @@ -91,6 +118,7 @@ set(headers ${include_path}/py_loader_port.h ${include_path}/py_loader_threading.h ${include_path}/py_loader_dict.h + ${include_path}/py_loader_symbol_fallback.h ) set(sources @@ -174,7 +202,7 @@ target_link_libraries(${target} ${META_PROJECT_NAME}::metacall # MetaCall library # Delay load for MSVC - $<$:${Python3_LIBRARIES}> # Python library + $<$:${Python3_LIBRARY}> # Python library $<$:delayimp> PUBLIC diff --git a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h new file mode 100644 index 0000000000..4805dabc6a --- /dev/null +++ b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h @@ -0,0 +1,60 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading python code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PY_LOADER_SYMBOL_FALLBACK_H +#define PY_LOADER_SYMBOL_FALLBACK_H 1 + +#include + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +PY_LOADER_NO_EXPORT int py_loader_symbol_fallback_initialize(dynlink py_library); + +#if defined(_WIN32) && defined(_MSC_VER) + #undef PyBool_Check +PY_LOADER_NO_EXPORT int PyBool_Check(const PyObject *ob); + #undef PyFloat_Check +PY_LOADER_NO_EXPORT int PyFloat_Check(const PyObject *ob); + #undef PyCapsule_CheckExact +PY_LOADER_NO_EXPORT int PyCapsule_CheckExact(const PyObject *ob); + #undef PyFunction_Check +PY_LOADER_NO_EXPORT int PyFunction_Check(const PyObject *ob); + #undef PyCFunction_Check +PY_LOADER_NO_EXPORT int PyCFunction_Check(const PyObject *ob); + #undef PyModule_Check +PY_LOADER_NO_EXPORT int PyModule_Check(const PyObject *ob); +#endif + +PY_LOADER_NO_EXPORT PyObject *Py_NonePtr(void); +PY_LOADER_NO_EXPORT PyObject *Py_ReturnNone(void); +PY_LOADER_NO_EXPORT PyObject *Py_ReturnFalse(void); +PY_LOADER_NO_EXPORT PyObject *Py_ReturnTrue(void); + +#ifdef __cplusplus +} +#endif + +#endif /* PY_LOADER_SYMBOL_FALLBACK_H */ diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 590e997e5c..eaeada6ce1 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -280,7 +281,7 @@ PyObject *py_loader_impl_capsule_new_null(void) /* We want to create a new capsule with contents set to NULL, but PyCapsule * does not allow that, instead we are going to identify our NULL capsule with * this configuration (setting the capsule to Py_None) */ - return PyCapsule_New(Py_None, py_loader_capsule_null_id, NULL); + return PyCapsule_New((void *)Py_NonePtr(), py_loader_capsule_null_id, NULL); } void py_loader_impl_value_invoke_state_finalize(value v, void *data) @@ -918,7 +919,7 @@ type_id py_loader_impl_capi_to_value_type(loader_impl impl, PyObject *obj) { return TYPE_FUNCTION; } - else if (obj == Py_None) + else if (obj == Py_NonePtr()) { return TYPE_NULL; } @@ -1146,7 +1147,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) const char *name = PyCapsule_GetName(obj); void *ptr = PyCapsule_GetPointer(obj, name); - if (ptr == Py_None && name == py_loader_capsule_null_id) + if (ptr == Py_NonePtr() && name == py_loader_capsule_null_id) { v = value_create_ptr(NULL); } @@ -1293,7 +1294,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) { PyObject *tb = PyException_GetTraceback(obj); - v = py_loader_impl_error_value_from_exception(loader_impl_get(impl), (PyObject *)Py_TYPE(obj), obj, tb ? tb : Py_None); + v = py_loader_impl_error_value_from_exception(loader_impl_get(impl), (PyObject *)Py_TYPE(obj), obj, tb ? tb : Py_NonePtr()); Py_XDECREF(tb); } @@ -2670,6 +2671,12 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #endif } + /* Initialize symbol fallback */ + if (py_loader_symbol_fallback_initialize(loader_impl_dependency(impl, "python")) != 0) + { + goto error_init_py; + } + /* Initialize threading */ py_loader_thread_initialize(host); diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index 9edb8277e4..0eb98e7564 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -23,46 +23,13 @@ #include #include #include +#include #include #include static const loader_tag py_loader_tag = "py"; -static PyObject *py_loader_port_none(void) -{ - Py_RETURN_NONE; -} - -#if defined(__clang__) - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wstrict-aliasing" -#elif defined(__GNUC__) - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#elif defined(_MSC_VER) - #pragma warning(push) -// TODO -#endif - -static PyObject *py_loader_port_false(void) -{ - Py_RETURN_FALSE; -} - -static PyObject *py_loader_port_true(void) -{ - Py_RETURN_TRUE; -} - -#if defined(__clang__) - #pragma clang diagnostic pop -#elif defined(__GNUC__) - #pragma GCC diagnostic pop -#elif defined(_MSC_VER) - #pragma warning(pop) -#endif - static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *args, void **handle) { static const char format[] = "OO:metacall_load_from_file"; @@ -77,7 +44,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (!PyArg_ParseTuple(args, (char *)format, &tag, &paths)) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_file('node', ['script.js']);"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -87,13 +54,13 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar #endif { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); - return py_loader_port_false(); + return Py_ReturnFalse(); } if (!PyList_Check(paths)) { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a list of strings indicating the paths must be used)"); - return py_loader_port_false(); + return Py_ReturnFalse(); } paths_size = PyList_Size(paths); @@ -101,7 +68,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_size == 0) { PyErr_SetString(PyExc_TypeError, "At least one path must be included in the paths list"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Convert tag from unicode into a string */ @@ -121,7 +88,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (tag_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Convert paths list into an array of strings */ @@ -130,7 +97,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_str == NULL) { PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); - return py_loader_port_false(); + return Py_ReturnFalse(); } for (iterator = 0; iterator < paths_size; ++iterator) @@ -165,7 +132,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid path string conversion"); - result = py_loader_port_false(); + result = Py_ReturnFalse(); goto clear; } @@ -174,7 +141,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_str[iterator] == NULL) { PyErr_SetString(PyExc_ValueError, "Invalid string path allocation"); - result = py_loader_port_false(); + result = Py_ReturnFalse(); goto clear; } @@ -193,7 +160,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (ret != 0) { - result = handle == NULL ? py_loader_port_false() : py_loader_port_none(); + result = handle == NULL ? Py_ReturnFalse() : Py_ReturnNone(); goto clear; } else @@ -211,7 +178,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (wrapper == NULL) { Py_XDECREF(result); - result = py_loader_port_none(); + result = Py_ReturnNone(); } else { @@ -220,7 +187,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar } else { - result = py_loader_port_true(); + result = Py_ReturnTrue(); } } @@ -259,7 +226,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (!PyArg_ParseTuple(args, (char *)format, &tag, &path)) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_package('cs', ['file.dll']);"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -269,7 +236,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject #endif { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -279,7 +246,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject #endif { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a string indicating the path must be used)"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Convert tag from unicode into a string */ @@ -299,7 +266,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (tag_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -325,7 +292,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (path_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid path string conversion"); - return py_loader_port_false(); + return Py_ReturnFalse(); } py_loader_thread_release(); @@ -337,7 +304,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (ret != 0) { - result = handle == NULL ? py_loader_port_false() : py_loader_port_none(); + result = handle == NULL ? Py_ReturnFalse() : Py_ReturnNone(); } else { @@ -354,7 +321,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (wrapper == NULL) { Py_XDECREF(result); - result = py_loader_port_none(); + result = Py_ReturnNone(); } else { @@ -363,7 +330,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject } else { - result = py_loader_port_true(); + result = Py_ReturnTrue(); } } @@ -394,7 +361,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, (char *)format, &tag, &buffer)) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_memory('node', 'console.log(\"hello\")');"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -404,7 +371,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) #endif { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); - return py_loader_port_false(); + return Py_ReturnFalse(); } #if PY_MAJOR_VERSION == 2 @@ -414,7 +381,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) #endif { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a string indicating the tag of the loader must be used: 'console.log(\"hello\")')"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Convert tag from unicode into a string */ @@ -434,7 +401,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (tag_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Convert buffer from unicode into a string */ @@ -454,7 +421,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (buffer_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid buffer string conversion"); - return py_loader_port_false(); + return Py_ReturnFalse(); } /* Execute the load from memory call */ @@ -467,11 +434,11 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (ret != 0) { - return py_loader_port_false(); + return Py_ReturnFalse(); } } - return py_loader_port_true(); + return Py_ReturnTrue(); } static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) @@ -494,7 +461,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (var_args_size == 0) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); - return py_loader_port_none(); + return Py_ReturnNone(); } name = PyTuple_GetItem(var_args, 0); @@ -515,7 +482,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (name_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid function name string conversion, first parameter must be a string"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Get variable arguments length */ @@ -529,7 +496,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (value_args == NULL) { PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Parse variable arguments */ @@ -560,7 +527,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (ret == NULL) { - result = py_loader_port_none(); + result = Py_ReturnNone(); goto clear; } @@ -572,7 +539,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (result == NULL) { - result = py_loader_port_none(); + result = Py_ReturnNone(); goto clear; } } @@ -617,7 +584,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (var_args_size == 0) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); - return py_loader_port_none(); + return Py_ReturnNone(); } name = PyTuple_GetItem(var_args, 0); @@ -638,7 +605,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (name_str == NULL) { PyErr_SetString(PyExc_TypeError, "Invalid function name string conversion, first parameter must be a string"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Get variable arguments length */ @@ -652,7 +619,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (value_args == NULL) { PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Parse variable arguments */ @@ -686,7 +653,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (ret == NULL) { - result = py_loader_port_none(); + result = Py_ReturnNone(); goto clear; } @@ -696,7 +663,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (result == NULL) { - result = py_loader_port_none(); + result = Py_ReturnNone(); goto clear; } } @@ -773,16 +740,16 @@ static PyObject *py_loader_port_value_create_ptr(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, (char *)format, &pointer)) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_value_create_ptr(None); or metacall_value_create_ptr(previous_allocated_ptr);"); - return py_loader_port_none(); + return Py_ReturnNone(); } - if (!PyCapsule_CheckExact(pointer) && pointer != Py_None) + if (!PyCapsule_CheckExact(pointer) && pointer != Py_NonePtr()) { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument must be None or a PyCapsule (i.e a previously allocated pointer)"); - return py_loader_port_none(); + return Py_ReturnNone(); } - if (pointer == Py_None) + if (pointer == Py_NonePtr()) { return py_loader_impl_capsule_new_null(); } @@ -846,7 +813,7 @@ static PyObject *py_loader_port_value_reference(PyObject *self, PyObject *args) error_value: metacall_value_destroy(v); error_none: - return py_loader_port_none(); + return Py_ReturnNone(); } static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args) @@ -864,14 +831,14 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (!PyArg_ParseTuple(args, (char *)format, &capsule)) { PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_value_dereference(ptr);"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Check if it is a valid reference */ if (!PyCapsule_CheckExact(capsule)) { PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument must be a PyCapsule (i.e a previously allocated pointer)"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Check if it is a valid MetaCall reference */ @@ -880,7 +847,7 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (name != py_loader_capsule_reference_id) { PyErr_SetString(PyExc_TypeError, "Invalid reference, argument must be a PyCapsule from MetaCall"); - return py_loader_port_none(); + return Py_ReturnNone(); } /* Get the value */ @@ -888,7 +855,7 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (v == NULL) { - return py_loader_port_none(); + return Py_ReturnNone(); } /* Obtain Python loader implementation */ @@ -899,7 +866,7 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (result == NULL) { PyErr_SetString(PyExc_ValueError, "Failed to convert the MetaCall value to Python object."); - return py_loader_port_none(); + return Py_ReturnNone(); } return result; @@ -920,7 +887,7 @@ static PyObject *py_loader_port_atexit(PyObject *self, PyObject *args) } } - return py_loader_port_none(); + return Py_ReturnNone(); } static PyMethodDef metacall_methods[] = { diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 2d969ecc3a..0041f504e3 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -18,13 +18,210 @@ * */ -#include +#include -/* Required for when linking to Python in debug mode and loading with Python.exe in release mode */ +#include + +/* Required for Windows due to DELAYLOAD not supporting delayed import of data symbols */ + +#if defined(_WIN32) && defined(_MSC_VER) +static PyTypeObject *PyBool_TypePtr = NULL; +static PyTypeObject *PyFloat_TypePtr = NULL; +static PyTypeObject *PyCapsule_TypePtr = NULL; +static PyTypeObject *PyFunction_TypePtr = NULL; +static PyTypeObject *PyCFunction_TypePtr = NULL; +static PyTypeObject *PyModule_TypePtr = NULL; +static PyObject *Py_NoneStructPtr = NULL; +static PyObject *Py_FalseStructPtr = NULL; +static PyObject *Py_TrueStructPtr = NULL; +#endif + +int py_loader_symbol_fallback_initialize(dynlink py_library) +{ +#if defined(_WIN32) && defined(_MSC_VER) + dynlink_symbol_addr address; + + if (py_library == NULL) + { + return 1; + } + + /* PyBool_Type */ + if (dynlink_symbol(py_library, "PyBool_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyBool_TypePtr); + + /* PyFloat_Type */ + if (dynlink_symbol(py_library, "PyFloat_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyFloat_TypePtr); + + /* PyCapsule_Type */ + if (dynlink_symbol(py_library, "PyCapsule_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyCapsule_TypePtr); + + /* PyFunction_Type */ + if (dynlink_symbol(py_library, "PyFunction_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyFunction_TypePtr); + + /* PyCFunction_Type */ + if (dynlink_symbol(py_library, "PyCFunction_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyCFunction_TypePtr); + + /* PyModule_Type */ + if (dynlink_symbol(py_library, "PyModule_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyModule_TypePtr); + + /* Py_None */ + if (dynlink_symbol(py_library, "_Py_NoneStruct", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, Py_NoneStructPtr); + + /* Py_False */ + if (dynlink_symbol(py_library, "_Py_FalseStruct", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, Py_FalseStructPtr); + + /* Py_True */ + if (dynlink_symbol(py_library, "_Py_TrueStruct", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, Py_TrueStructPtr); + + return 0; +#else + (void)py_library; + return 0; +#endif +} + +#if defined(_WIN32) && defined(_MSC_VER) +int PyBool_Check(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyBool_TypePtr); +} + +int PyFloat_Check(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyFloat_TypePtr); +} + +int PyCapsule_CheckExact(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyCapsule_TypePtr); +} + +int PyFunction_Check(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyFunction_TypePtr); +} + +int PyCFunction_Check(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyCFunction_TypePtr); +} + +int PyModule_Check(const PyObject *ob) +{ + return Py_IS_TYPE(ob, PyModule_TypePtr); +} +#endif + +PyObject *Py_NonePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return Py_NoneStructPtr; +#else + return Py_None; +#endif +} + +PyObject *Py_ReturnNone(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + Py_INCREF(Py_NoneStructPtr); + return Py_NoneStructPtr; +#else + Py_RETURN_NONE; +#endif +} + +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wstrict-aliasing" +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#elif defined(_MSC_VER) + #pragma warning(push) +// TODO +#endif + +PyObject *Py_ReturnFalse(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + Py_INCREF(Py_FalseStructPtr); + return Py_FalseStructPtr; +#else + Py_RETURN_FALSE; +#endif +} + +PyObject *Py_ReturnTrue(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + Py_INCREF(Py_TrueStructPtr); + return Py_TrueStructPtr; +#else + Py_RETURN_TRUE; +#endif +} + +#if defined(__clang__) + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic pop +#elif defined(_MSC_VER) + #pragma warning(pop) +#endif + +/* Required on GNU for when linking to Python in debug mode and loading with Python.elf in release mode */ #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) #if defined(__clang__) || defined(__GNUC__) -__attribute__((weak)) void _Py_DECREF_DecRefTotal(void) {} +__attribute__((weak)) void _Py_DECREF_DecRefTotal(void) +{ +} __attribute__((weak)) void _Py_INCREF_IncRefTotal(void) {} __attribute__((weak)) Py_ssize_t _Py_RefTotal; From 27e6342ffb58627c7c8827b9cd2ac2ae9bcf56cd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 13:29:44 +0200 Subject: [PATCH 170/364] Solve more issues on python. --- .../py_loader/py_loader_symbol_fallback.h | 1 + .../loaders/py_loader/source/py_loader_impl.c | 4 ++-- .../source/py_loader_symbol_fallback.c | 20 ++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h index 4805dabc6a..b4394726c2 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h @@ -48,6 +48,7 @@ PY_LOADER_NO_EXPORT int PyCFunction_Check(const PyObject *ob); PY_LOADER_NO_EXPORT int PyModule_Check(const PyObject *ob); #endif +PY_LOADER_NO_EXPORT PyTypeObject *PyTypeTypePtr(void); PY_LOADER_NO_EXPORT PyObject *Py_NonePtr(void); PY_LOADER_NO_EXPORT PyObject *Py_ReturnNone(void); PY_LOADER_NO_EXPORT PyObject *Py_ReturnFalse(void); diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index eaeada6ce1..4fabcffbcd 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -3941,8 +3941,8 @@ int py_loader_impl_discover_module(loader_impl impl, PyObject *module, context c while (PyDict_Next(module_dict, &position, &module_dict_key, &module_dict_val)) { // Class is also PyCallable, so test for class first - if (PyObject_TypeCheck(module_dict_val, &PyType_Type)) - // PyObject_IsSubclass(module_dict_val, (PyObject *)&PyType_Type) == 0 + if (PyObject_TypeCheck(module_dict_val, PyTypeTypePtr())) + // PyObject_IsSubclass(module_dict_val, (PyObject *)PyTypeTypePtr()) == 0 { const char *cls_name = PyUnicode_AsUTF8(module_dict_key); diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 0041f504e3..b0ba0c5f7f 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -31,6 +31,7 @@ static PyTypeObject *PyCapsule_TypePtr = NULL; static PyTypeObject *PyFunction_TypePtr = NULL; static PyTypeObject *PyCFunction_TypePtr = NULL; static PyTypeObject *PyModule_TypePtr = NULL; +static PyTypeObject *PyType_TypePtr = NULL; static PyObject *Py_NoneStructPtr = NULL; static PyObject *Py_FalseStructPtr = NULL; static PyObject *Py_TrueStructPtr = NULL; @@ -92,7 +93,15 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyTypeObject *, PyModule_TypePtr); + dynlink_symbol_uncast_type(address, PyTypeObject *, PyCFunction_TypePtr); + + /* PyType_Type */ + if (dynlink_symbol(py_library, "PyType_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyType_TypePtr); /* Py_None */ if (dynlink_symbol(py_library, "_Py_NoneStruct", &address) != 0) @@ -157,6 +166,15 @@ int PyModule_Check(const PyObject *ob) } #endif +PyTypeObject *PyTypeTypePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyType_TypePtr; +#else + return &PyType_Type; +#endif +} + PyObject *Py_NonePtr(void) { #if defined(_WIN32) && defined(_MSC_VER) From 60838dfeac89cebaa19fc2b67a1c2a88cbfaa32e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:00:07 +0200 Subject: [PATCH 171/364] Solve more issues in windows python. --- .../py_loader/py_loader_symbol_fallback.h | 19 +++ .../loaders/py_loader/source/py_loader_dict.c | 8 +- .../loaders/py_loader/source/py_loader_impl.c | 34 ++-- .../loaders/py_loader/source/py_loader_port.c | 68 ++++---- .../source/py_loader_symbol_fallback.c | 154 +++++++++++++++++- 5 files changed, 228 insertions(+), 55 deletions(-) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h index b4394726c2..cc6d005757 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h @@ -34,6 +34,16 @@ extern "C" { PY_LOADER_NO_EXPORT int py_loader_symbol_fallback_initialize(dynlink py_library); #if defined(_WIN32) && defined(_MSC_VER) + #undef PyCFunction_GET_FUNCTION + #define PyCFunction_GET_FUNCTION(func) \ + (((PyCFunctionObject *)func)->m_ml->ml_meth) + + #undef PyCFunction_GET_SELF + #define PyCFunction_GET_SELF(func) \ + (((PyCFunctionObject *)func)->m_ml->ml_flags & METH_STATIC ? \ + NULL : \ + ((PyCFunctionObject *)func)->m_self) + #undef PyBool_Check PY_LOADER_NO_EXPORT int PyBool_Check(const PyObject *ob); #undef PyFloat_Check @@ -48,8 +58,17 @@ PY_LOADER_NO_EXPORT int PyCFunction_Check(const PyObject *ob); PY_LOADER_NO_EXPORT int PyModule_Check(const PyObject *ob); #endif +PY_LOADER_NO_EXPORT PyTypeObject *PyCFunctionTypePtr(void); +PY_LOADER_NO_EXPORT PyTypeObject *PyStaticMethodTypePtr(void); +PY_LOADER_NO_EXPORT PyTypeObject *PyDictProxyTypePtr(void); +PY_LOADER_NO_EXPORT PyTypeObject *PyDictTypePtr(void); PY_LOADER_NO_EXPORT PyTypeObject *PyTypeTypePtr(void); PY_LOADER_NO_EXPORT PyObject *Py_NonePtr(void); +PY_LOADER_NO_EXPORT PyObject *PyExc_ExceptionPtr(void); +PY_LOADER_NO_EXPORT PyObject *PyExc_FileNotFoundErrorPtr(void); +PY_LOADER_NO_EXPORT PyObject *PyExc_TypeErrorPtr(void); +PY_LOADER_NO_EXPORT PyObject *PyExc_ValueErrorPtr(void); +PY_LOADER_NO_EXPORT PyObject *PyExc_RuntimeErrorPtr(void); PY_LOADER_NO_EXPORT PyObject *Py_ReturnNone(void); PY_LOADER_NO_EXPORT PyObject *Py_ReturnFalse(void); PY_LOADER_NO_EXPORT PyObject *Py_ReturnTrue(void); diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index 2fc9bd1c7c..c68d378aaa 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -52,6 +52,8 @@ #endif #endif +#include + struct py_loader_impl_dict_obj { PyDictObject dict; @@ -144,7 +146,7 @@ PyObject *py_loader_impl_dict_sizeof(struct py_loader_impl_dict_obj *self, void int py_loader_impl_dict_init(struct py_loader_impl_dict_obj *self, PyObject *args, PyObject *kwds) { - if (PyDict_Type.tp_init((PyObject *)self, args, kwds) < 0) + if (PyDictTypePtr()->tp_init((PyObject *)self, args, kwds) < 0) return -1; self->v = NULL; return 0; @@ -155,13 +157,13 @@ void py_loader_impl_dict_dealloc(struct py_loader_impl_dict_obj *self) metacall_value_destroy(self->v); Py_DECREF(self->parent); /* TODO: Review if this is correct or this line is unnecessary */ - PyDict_Type.tp_dealloc((PyObject *)self); + PyDictTypePtr()->tp_dealloc((PyObject *)self); } int py_loader_impl_dict_type_init(void) { /* py_loader_impl_dict_type is derived from PyDict_Type */ - py_loader_impl_dict_type.tp_base = &PyDict_Type; + py_loader_impl_dict_type.tp_base = PyDictTypePtr(); return PyType_Ready(&py_loader_impl_dict_type); } diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 4fabcffbcd..c3012c2a7a 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -231,12 +231,12 @@ PyObject *py_loader_impl_finalizer_object_impl(PyObject *self, PyObject *Py_UNUS if (v == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Fatal error destroying a value, the metacall value attached to the python value is null"); - Py_RETURN_NONE; + return Py_ReturnNone(); } value_type_destroy(v); - Py_RETURN_NONE; + return Py_ReturnNone(); } int py_loader_impl_finalizer_object(loader_impl impl, PyObject *obj, value v) @@ -1453,7 +1453,7 @@ PyObject *py_loader_impl_value_to_capi(loader_impl impl, type_id id, value v) { /* TODO */ log_write("metacall", LOG_LEVEL_ERROR, "TODO: Python future not implemented yet for arguments"); - Py_RETURN_NONE; + return Py_ReturnNone(); } else if (id == TYPE_FUNCTION) { @@ -1481,7 +1481,7 @@ PyObject *py_loader_impl_value_to_capi(loader_impl impl, type_id id, value v) } else if (id == TYPE_NULL) { - Py_RETURN_NONE; + return Py_ReturnNone(); } else if (id == TYPE_CLASS) { @@ -1539,7 +1539,7 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) { py_loader_thread_release(); log_write("metacall", LOG_LEVEL_ERROR, "Invalid python capsule in task_callback_handler"); - Py_RETURN_NONE; + return Py_ReturnNone(); } loader_impl_py_await_invoke_callback_state callback_state = PyCapsule_GetPointer(capsule, NULL); @@ -1610,7 +1610,7 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) if (ret == NULL) { - Py_RETURN_NONE; + return Py_ReturnNone(); } else { @@ -1886,7 +1886,7 @@ PyObject *py_loader_impl_function_type_invoke(PyObject *self, PyObject *args) { log_write("metacall", LOG_LEVEL_ERROR, "Fatal error when invoking a function, state cannot be recovered, avoiding the function call"); py_loader_thread_release(); - Py_RETURN_NONE; + return Py_ReturnNone(); } Py_ssize_t callee_args_size = PyTuple_Size(args); @@ -1897,7 +1897,7 @@ PyObject *py_loader_impl_function_type_invoke(PyObject *self, PyObject *args) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid allocation of arguments for callback"); py_loader_thread_release(); - Py_RETURN_NONE; + return Py_ReturnNone(); } /* Generate metacall values from python values */ @@ -1946,7 +1946,7 @@ PyObject *py_loader_impl_function_type_invoke(PyObject *self, PyObject *args) return py_ret; } - Py_RETURN_NONE; + return Py_ReturnNone(); } int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, type_id id, const char *name) @@ -2768,12 +2768,12 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi } /* Hook the deallocation of PyCFunction */ - py_loader_impl_pycfunction_dealloc = PyCFunction_Type.tp_dealloc; - PyCFunction_Type.tp_dealloc = PyCFunction_dealloc; + py_loader_impl_pycfunction_dealloc = PyCFunctionTypePtr()->tp_dealloc; + PyCFunctionTypePtr()->tp_dealloc = PyCFunction_dealloc; /* TODO: This does not work after 3.13, is it really needed for this hook? */ #if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 13 - PyType_Modified(&PyCFunction_Type); + PyType_Modified(PyCFunctionTypePtr()); #endif /* Register initialization */ @@ -2997,7 +2997,7 @@ int py_loader_impl_load_from_file_path(loader_impl_py py_impl, loader_impl_py_ha if (!(module->instance != NULL && PyModule_Check(module->instance))) { - if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_Exception)) + if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_ExceptionPtr())) { *exception = module->instance; module->instance = NULL; @@ -3054,7 +3054,7 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl if (!(module->instance != NULL && PyModule_Check(module->instance))) { - if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_Exception)) + if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_ExceptionPtr())) { *exception = module->instance; module->instance = NULL; @@ -3079,7 +3079,7 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl int py_loader_impl_import_exception(PyObject *exception) { - return /*PyErr_GivenExceptionMatches(exception, PyExc_ImportError) ||*/ PyErr_GivenExceptionMatches(exception, PyExc_FileNotFoundError); + return /*PyErr_GivenExceptionMatches(exception, PyExc_ImportErrorPtr()) ||*/ PyErr_GivenExceptionMatches(exception, PyExc_FileNotFoundErrorPtr()); } int py_loader_impl_load_from_file_relative(loader_impl_py py_impl, loader_impl_py_handle_module module, const loader_path path, PyObject **exception, int run_main) @@ -3815,7 +3815,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) Py_INCREF(tuple_key); PyObject *method_static = PyObject_CallObject(py_impl->inspect_getattr_static, args); Py_DECREF(args); - bool is_static_method = PyObject_TypeCheck(method_static, &PyStaticMethod_Type); + bool is_static_method = PyObject_TypeCheck(method_static, PyStaticMethodTypePtr()); log_write("metacall", LOG_LEVEL_DEBUG, "Introspection: class member %s, type %s, static method: %d", PyUnicode_AsUTF8(tuple_key), @@ -4311,7 +4311,7 @@ int py_loader_impl_destroy(loader_impl impl) if (host == 0) { /* Unhook the deallocation of PyCFunction */ - PyCFunction_Type.tp_dealloc = py_loader_impl_pycfunction_dealloc; + PyCFunctionTypePtr()->tp_dealloc = py_loader_impl_pycfunction_dealloc; } else { diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index 0eb98e7564..7f1ad92332 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -43,7 +43,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &tag, &paths)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_file('node', ['script.js']);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_load_from_file('node', ['script.js']);"); return Py_ReturnFalse(); } @@ -53,13 +53,13 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (!PyUnicode_Check(tag)) #endif { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); return Py_ReturnFalse(); } if (!PyList_Check(paths)) { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a list of strings indicating the paths must be used)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in second argument (a list of strings indicating the paths must be used)"); return Py_ReturnFalse(); } @@ -67,7 +67,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_size == 0) { - PyErr_SetString(PyExc_TypeError, "At least one path must be included in the paths list"); + PyErr_SetString(PyExc_TypeErrorPtr(), "At least one path must be included in the paths list"); return Py_ReturnFalse(); } @@ -87,7 +87,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (tag_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid tag string conversion"); return Py_ReturnFalse(); } @@ -96,7 +96,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_str == NULL) { - PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); + PyErr_SetString(PyExc_ValueErrorPtr(), "Invalid argument allocation"); return Py_ReturnFalse(); } @@ -131,7 +131,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid path string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid path string conversion"); result = Py_ReturnFalse(); goto clear; } @@ -140,7 +140,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (paths_str[iterator] == NULL) { - PyErr_SetString(PyExc_ValueError, "Invalid string path allocation"); + PyErr_SetString(PyExc_ValueErrorPtr(), "Invalid string path allocation"); result = Py_ReturnFalse(); goto clear; } @@ -225,7 +225,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &tag, &path)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_package('cs', ['file.dll']);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_load_from_package('cs', ['file.dll']);"); return Py_ReturnFalse(); } @@ -235,7 +235,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (!PyUnicode_Check(tag)) #endif { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); return Py_ReturnFalse(); } @@ -245,7 +245,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (!PyUnicode_Check(path)) #endif { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a string indicating the path must be used)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in second argument (a string indicating the path must be used)"); return Py_ReturnFalse(); } @@ -265,7 +265,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (tag_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid tag string conversion"); return Py_ReturnFalse(); } @@ -291,7 +291,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (path_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid path string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid path string conversion"); return Py_ReturnFalse(); } @@ -360,7 +360,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &tag, &buffer)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_load_from_memory('node', 'console.log(\"hello\")');"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_load_from_memory('node', 'console.log(\"hello\")');"); return Py_ReturnFalse(); } @@ -370,7 +370,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (!PyUnicode_Check(tag)) #endif { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in first argument (a string indicating the tag of the loader must be used: 'node', 'rb', 'ts', 'cs', 'js', 'cob'...)"); return Py_ReturnFalse(); } @@ -380,7 +380,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (!PyUnicode_Check(buffer)) #endif { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in second argument (a string indicating the tag of the loader must be used: 'console.log(\"hello\")')"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in second argument (a string indicating the tag of the loader must be used: 'console.log(\"hello\")')"); return Py_ReturnFalse(); } @@ -400,7 +400,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (tag_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid tag string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid tag string conversion"); return Py_ReturnFalse(); } @@ -420,7 +420,7 @@ static PyObject *py_loader_port_load_from_memory(PyObject *self, PyObject *args) if (buffer_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid buffer string conversion"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid buffer string conversion"); return Py_ReturnFalse(); } @@ -460,7 +460,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (var_args_size == 0) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); return Py_ReturnNone(); } @@ -481,7 +481,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (name_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid function name string conversion, first parameter must be a string"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid function name string conversion, first parameter must be a string"); return Py_ReturnNone(); } @@ -495,7 +495,7 @@ static PyObject *py_loader_port_invoke(PyObject *self, PyObject *var_args) if (value_args == NULL) { - PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); + PyErr_SetString(PyExc_ValueErrorPtr(), "Invalid argument allocation"); return Py_ReturnNone(); } @@ -583,7 +583,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (var_args_size == 0) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall('function_name', 'asd', 123, [7, 4]);"); return Py_ReturnNone(); } @@ -604,7 +604,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (name_str == NULL) { - PyErr_SetString(PyExc_TypeError, "Invalid function name string conversion, first parameter must be a string"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid function name string conversion, first parameter must be a string"); return Py_ReturnNone(); } @@ -618,7 +618,7 @@ static PyObject *py_loader_port_await(PyObject *self, PyObject *var_args) if (value_args == NULL) { - PyErr_SetString(PyExc_ValueError, "Invalid argument allocation"); + PyErr_SetString(PyExc_ValueErrorPtr(), "Invalid argument allocation"); return Py_ReturnNone(); } @@ -710,7 +710,7 @@ static PyObject *py_loader_port_inspect(PyObject *self, PyObject *args) result_str = (char *)empty; size = sizeof(empty); - PyErr_SetString(PyExc_ValueError, "Inspect returned an invalid size or string"); + PyErr_SetString(PyExc_ValueErrorPtr(), "Inspect returned an invalid size or string"); } #if PY_MAJOR_VERSION == 2 @@ -739,13 +739,13 @@ static PyObject *py_loader_port_value_create_ptr(PyObject *self, PyObject *args) /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &pointer)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_value_create_ptr(None); or metacall_value_create_ptr(previous_allocated_ptr);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_value_create_ptr(None); or metacall_value_create_ptr(previous_allocated_ptr);"); return Py_ReturnNone(); } if (!PyCapsule_CheckExact(pointer) && pointer != Py_NonePtr()) { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument must be None or a PyCapsule (i.e a previously allocated pointer)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in first argument must be None or a PyCapsule (i.e a previously allocated pointer)"); return Py_ReturnNone(); } @@ -786,7 +786,7 @@ static PyObject *py_loader_port_value_reference(PyObject *self, PyObject *args) /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &obj)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_value_reference(obj);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_value_reference(obj);"); goto error_none; } @@ -797,7 +797,7 @@ static PyObject *py_loader_port_value_reference(PyObject *self, PyObject *args) if (v == NULL) { - PyErr_SetString(PyExc_ValueError, "Failed to convert the Python object to MetaCall value."); + PyErr_SetString(PyExc_ValueErrorPtr(), "Failed to convert the Python object to MetaCall value."); goto error_none; } @@ -830,14 +830,14 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args /* Parse arguments */ if (!PyArg_ParseTuple(args, (char *)format, &capsule)) { - PyErr_SetString(PyExc_TypeError, "Invalid number of arguments, use it like: metacall_value_dereference(ptr);"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid number of arguments, use it like: metacall_value_dereference(ptr);"); return Py_ReturnNone(); } /* Check if it is a valid reference */ if (!PyCapsule_CheckExact(capsule)) { - PyErr_SetString(PyExc_TypeError, "Invalid parameter type in first argument must be a PyCapsule (i.e a previously allocated pointer)"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid parameter type in first argument must be a PyCapsule (i.e a previously allocated pointer)"); return Py_ReturnNone(); } @@ -846,7 +846,7 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (name != py_loader_capsule_reference_id) { - PyErr_SetString(PyExc_TypeError, "Invalid reference, argument must be a PyCapsule from MetaCall"); + PyErr_SetString(PyExc_TypeErrorPtr(), "Invalid reference, argument must be a PyCapsule from MetaCall"); return Py_ReturnNone(); } @@ -865,7 +865,7 @@ static PyObject *py_loader_port_value_dereference(PyObject *self, PyObject *args if (result == NULL) { - PyErr_SetString(PyExc_ValueError, "Failed to convert the MetaCall value to Python object."); + PyErr_SetString(PyExc_ValueErrorPtr(), "Failed to convert the MetaCall value to Python object."); return Py_ReturnNone(); } @@ -883,7 +883,7 @@ static PyObject *py_loader_port_atexit(PyObject *self, PyObject *args) { if (py_loader_impl_destroy(impl) != 0) { - PyErr_SetString(PyExc_RuntimeError, "Failed to destroy Python Loader on MetaCall."); + PyErr_SetString(PyExc_RuntimeErrorPtr(), "Failed to destroy Python Loader on MetaCall."); } } diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index b0ba0c5f7f..3c37a442a8 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -30,9 +30,17 @@ static PyTypeObject *PyFloat_TypePtr = NULL; static PyTypeObject *PyCapsule_TypePtr = NULL; static PyTypeObject *PyFunction_TypePtr = NULL; static PyTypeObject *PyCFunction_TypePtr = NULL; +static PyTypeObject *PyStaticMethod_TypePtr = NULL; +static PyTypeObject *PyDictProxy_TypePtr = NULL; +static PyTypeObject *PyDict_TypePtr = NULL; static PyTypeObject *PyModule_TypePtr = NULL; static PyTypeObject *PyType_TypePtr = NULL; static PyObject *Py_NoneStructPtr = NULL; +static PyObject *PyExc_ExceptionStructPtr = NULL; +static PyObject *PyExc_FileNotFoundErrorPtr = NULL; +static PyObject *PyExc_TypeErrorStructPtr = NULL; +static PyObject *PyExc_ValueErrorStructPtr = NULL; +static PyObject *PyExc_RuntimeErrorStructPtr = NULL; static PyObject *Py_FalseStructPtr = NULL; static PyObject *Py_TrueStructPtr = NULL; #endif @@ -87,6 +95,30 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) dynlink_symbol_uncast_type(address, PyTypeObject *, PyCFunction_TypePtr); + /* PyStaticMethod_Type */ + if (dynlink_symbol(py_library, "PyStaticMethod_Type", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyStaticMethod_TypePtr); + + /* PyDict_TypePtr */ + if (dynlink_symbol(py_library, "PyDict_TypePtr", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyDict_TypePtrPtr); + + /* PyDictProxy_TypePtr */ + if (dynlink_symbol(py_library, "PyDictProxy_TypePtr", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyTypeObject *, PyDictProxy_TypePtrPtr); + /* PyModule_Type */ if (dynlink_symbol(py_library, "PyModule_Type", &address) != 0) { @@ -111,6 +143,46 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) dynlink_symbol_uncast_type(address, PyObject *, Py_NoneStructPtr); + /* PyExc_Exception */ + if (dynlink_symbol(py_library, "PyExc_Exception", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, PyExc_ExceptionStructPtr); + + /* PyExc_FileNotFoundError */ + if (dynlink_symbol(py_library, "PyExc_FileNotFoundError", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, PyExc_FileNotFoundErrorStructPtr); + + /* PyExc_TypeError */ + if (dynlink_symbol(py_library, "PyExc_TypeError", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, PyExc_TypeErrorStructPtr); + + /* PyExc_ValueError */ + if (dynlink_symbol(py_library, "PyExc_ValueError", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, PyExc_ValueErrorStructPtr); + + /* PyExc_RuntimeError */ + if (dynlink_symbol(py_library, "PyExc_RuntimeError", &address) != 0) + { + return 1; + } + + dynlink_symbol_uncast_type(address, PyObject *, PyExc_RuntimeErrorStructPtr); + /* Py_False */ if (dynlink_symbol(py_library, "_Py_FalseStruct", &address) != 0) { @@ -166,6 +238,42 @@ int PyModule_Check(const PyObject *ob) } #endif +PyTypeObject *PyCFunctionTypePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyCFunction_TypePtr; +#else + return &PyCFunction_Type; +#endif +} + +PyTypeObject *PyStaticMethodTypePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyStaticMethod_TypePtr; +#else + return &PyStaticMethod_Type; +#endif +} + +PyTypeObject *PyDictTypePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyDict_TypePtr; +#else + return &PyDict_Type; +#endif +} + +PyTypeObject *PyDictProxyTypePtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyDictProxy_TypePtr; +#else + return &PyDictProxy_Type; +#endif +} + PyTypeObject *PyTypeTypePtr(void) { #if defined(_WIN32) && defined(_MSC_VER) @@ -184,6 +292,51 @@ PyObject *Py_NonePtr(void) #endif } +PyObject *PyExc_ExceptionPtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyExc_ExceptionStructPtr; +#else + return PyExc_Exception; +#endif +} + +PyObject *PyExc_FileNotFoundErrorPtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyExc_FileNotFoundErrorStructPtr; +#else + return PyExc_FileNotFoundError; +#endif +} + +PyObject *PyExc_TypeErrorPtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyExc_TypeErrorStructPtr; +#else + return PyExc_TypeError; +#endif +} + +PyObject *PyExc_ValueErrorPtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyExc_ValueErrorStructPtr; +#else + return PyExc_ValueError; +#endif +} + +PyObject *PyExc_RuntimeErrorPtr(void) +{ +#if defined(_WIN32) && defined(_MSC_VER) + return PyExc_RuntimeErrorStructPtr; +#else + return PyExc_RuntimeError; +#endif +} + PyObject *Py_ReturnNone(void) { #if defined(_WIN32) && defined(_MSC_VER) @@ -303,6 +456,5 @@ __attribute__((weak)) PyObject *PyModule_FromDefAndSpec2(PyModuleDef *def, PyObj } #endif - #endif #endif From 4073b9e730c75696de56058eca3e5b112c8e1488 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:11:31 +0200 Subject: [PATCH 172/364] Solve more issues in python loader. --- source/loaders/py_loader/source/py_loader_symbol_fallback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 3c37a442a8..0d2f41b6af 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -37,7 +37,7 @@ static PyTypeObject *PyModule_TypePtr = NULL; static PyTypeObject *PyType_TypePtr = NULL; static PyObject *Py_NoneStructPtr = NULL; static PyObject *PyExc_ExceptionStructPtr = NULL; -static PyObject *PyExc_FileNotFoundErrorPtr = NULL; +static PyObject *PyExc_FileNotFoundErrorStructPtr = NULL; static PyObject *PyExc_TypeErrorStructPtr = NULL; static PyObject *PyExc_ValueErrorStructPtr = NULL; static PyObject *PyExc_RuntimeErrorStructPtr = NULL; @@ -109,7 +109,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyTypeObject *, PyDict_TypePtrPtr); + dynlink_symbol_uncast_type(address, PyTypeObject *, PyDict_TypePtr); /* PyDictProxy_TypePtr */ if (dynlink_symbol(py_library, "PyDictProxy_TypePtr", &address) != 0) @@ -117,7 +117,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyTypeObject *, PyDictProxy_TypePtrPtr); + dynlink_symbol_uncast_type(address, PyTypeObject *, PyDictProxy_TypePtr); /* PyModule_Type */ if (dynlink_symbol(py_library, "PyModule_Type", &address) != 0) From ee9e64c078073974377a702cca97ab56b6a8539d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:20:24 +0200 Subject: [PATCH 173/364] Solve more issues in python loader. --- .../py_loader/include/py_loader/py_loader_symbol_fallback.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h index cc6d005757..43436b723a 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h @@ -34,6 +34,10 @@ extern "C" { PY_LOADER_NO_EXPORT int py_loader_symbol_fallback_initialize(dynlink py_library); #if defined(_WIN32) && defined(_MSC_VER) + #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) +extern __declspec(selectany) Py_ssize_t _Py_RefTotal = 0; + #endif + #undef PyCFunction_GET_FUNCTION #define PyCFunction_GET_FUNCTION(func) \ (((PyCFunctionObject *)func)->m_ml->ml_meth) From 8301fef61c38d2bf828b90080a9619d1c82f8926 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:27:17 +0200 Subject: [PATCH 174/364] Solve more issues in python loader. --- source/loaders/py_loader/source/py_loader_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index c3012c2a7a..e1ba62e930 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -3773,7 +3773,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) Py_DECREF(nameobj); /* Turns out __dict__ is not a PyDict but PyMapping */ - if (!PyObject_TypeCheck(read_only_dict, &PyDictProxy_Type)) + if (!PyObject_TypeCheck(read_only_dict, PyDictProxyTypePtr())) { Py_XDECREF(read_only_dict); return 1; From 48f717f0af43708a1f30bf8a760bb1f8946e2edd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:36:56 +0200 Subject: [PATCH 175/364] Solve more issues in python loader. --- .../py_loader/py_loader_symbol_fallback.h | 4 - .../loaders/py_loader/source/py_loader_dict.c | 6 +- .../loaders/py_loader/source/py_loader_impl.c | 272 +++++++++--------- .../source/py_loader_symbol_fallback.c | 6 +- .../py_loader/source/py_loader_threading.cpp | 4 +- 5 files changed, 144 insertions(+), 148 deletions(-) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h index 43436b723a..cc6d005757 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_symbol_fallback.h @@ -34,10 +34,6 @@ extern "C" { PY_LOADER_NO_EXPORT int py_loader_symbol_fallback_initialize(dynlink py_library); #if defined(_WIN32) && defined(_MSC_VER) - #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) -extern __declspec(selectany) Py_ssize_t _Py_RefTotal = 0; - #endif - #undef PyCFunction_GET_FUNCTION #define PyCFunction_GET_FUNCTION(func) \ (((PyCFunctionObject *)func)->m_ml->ml_meth) diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index c68d378aaa..f785081417 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -155,7 +155,7 @@ int py_loader_impl_dict_init(struct py_loader_impl_dict_obj *self, PyObject *arg void py_loader_impl_dict_dealloc(struct py_loader_impl_dict_obj *self) { metacall_value_destroy(self->v); - Py_DECREF(self->parent); /* TODO: Review if this is correct or this line is unnecessary */ + Py_DecRef(self->parent); /* TODO: Review if this is correct or this line is unnecessary */ PyDictTypePtr()->tp_dealloc((PyObject *)self); } @@ -176,9 +176,9 @@ PyObject *py_loader_impl_finalizer_wrap_map(PyObject *obj, void *v) union py_loader_impl_dict_cast dict_cast = { &py_loader_impl_dict_type }; PyTuple_SetItem(args, 0, obj); - Py_INCREF(obj); + Py_IncRef(obj); PyObject *wrapper = PyObject_CallObject(dict_cast.object, args); - Py_DECREF(args); + Py_DecRef(args); py_loader_thread_release(); diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index e1ba62e930..e476d1585f 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -259,7 +259,7 @@ int py_loader_impl_finalizer_object(loader_impl impl, PyObject *obj, value v) if (destructor != NULL) { /* This will destroy the capsule too */ - Py_DECREF(destructor); + Py_DecRef(destructor); } else { @@ -336,7 +336,7 @@ void type_py_interface_destroy(type t, type_impl impl) if (Py_IsInitialized() != 0) { py_loader_thread_acquire(); - Py_DECREF(builtin); + Py_DecRef(builtin); py_loader_thread_release(); } } @@ -463,7 +463,7 @@ int py_object_interface_set(object obj, object_impl impl, struct accessor_type * PyObject *pyvalue = py_loader_impl_value_to_capi(py_object->impl, value_type_id(v), v); int retval = PyObject_GenericSetAttr(pyobject_object, key_py_str, pyvalue); - Py_DECREF(key_py_str); + Py_DecRef(key_py_str); py_loader_thread_release(); @@ -499,7 +499,7 @@ value py_object_interface_method_invoke(object obj, object_impl impl, method m, PyObject *python_object = PyObject_CallMethod(obj_impl->obj, method_name(m), "O", args_tuple, NULL); - Py_DECREF(args_tuple); + Py_DecRef(args_tuple); if (python_object == NULL) { @@ -631,7 +631,7 @@ object py_class_interface_constructor(klass cls, class_impl impl, const char *na /* Calling the class will create an instance (object) */ PyObject *python_object = PyObject_CallObject(py_cls->cls, args_tuple); - Py_DECREF(args_tuple); + Py_DecRef(args_tuple); if (python_object == NULL) { @@ -640,7 +640,7 @@ object py_class_interface_constructor(klass cls, class_impl impl, const char *na return NULL; } - Py_INCREF(py_cls->cls); + Py_IncRef(py_cls->cls); py_loader_thread_release(); py_obj->obj = python_object; @@ -692,7 +692,7 @@ int py_class_interface_static_set(klass cls, class_impl impl, struct accessor_ty PyObject *key_py_str = PyUnicode_FromString(attr_name); int result = PyObject_SetAttr(py_class->cls, key_py_str, py_value); - Py_DECREF(key_py_str); + Py_DecRef(key_py_str); py_loader_thread_release(); @@ -736,8 +736,8 @@ value py_class_interface_static_invoke(klass cls, class_impl impl, method m, cla PyObject *python_object = PyObject_Call(method, args_tuple, NULL); - Py_DECREF(args_tuple); - Py_DECREF(method); + Py_DecRef(args_tuple); + Py_DecRef(method); if (python_object == NULL) { @@ -802,7 +802,7 @@ int py_loader_impl_check_future(loader_impl_py py_impl, PyObject *obj) { PyObject *args_tuple = PyTuple_New(1); - Py_INCREF(obj); + Py_IncRef(obj); PyTuple_SetItem(args_tuple, 0, obj); @@ -822,7 +822,7 @@ int py_loader_impl_check_future(loader_impl_py py_impl, PyObject *obj) int ret = PyObject_IsTrue(result); - Py_DECREF(result); + Py_DecRef(result); return ret; } @@ -843,7 +843,7 @@ int py_loader_impl_check_async(loader_impl_py py_impl, PyObject *func) int ret = PyObject_IsTrue(result); - Py_DECREF(result); + Py_DecRef(result); return ret; } @@ -860,7 +860,7 @@ int py_loader_impl_check_class(loader_impl_py py_impl, PyObject *obj) int result = !(PyObject_IsTrue(is_class) == 1); - Py_DECREF(is_class); + Py_DecRef(is_class); return result; } @@ -1171,7 +1171,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) /* Move finalizers */ value_move(callback, invoke_state->callback); - Py_DECREF(invoke_state_capsule); + Py_DecRef(invoke_state_capsule); return callback; } @@ -1187,7 +1187,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) return NULL; } - Py_INCREF(obj); + Py_IncRef(obj); py_func->func = obj; py_func->impl = impl; @@ -1232,7 +1232,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) py_future->py_impl = py_impl; py_future->future = obj; - Py_INCREF(obj); + Py_IncRef(obj); v = value_create_future(f); } @@ -1240,7 +1240,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) { loader_impl_py_class py_cls = malloc(sizeof(struct loader_impl_py_class_type)); - Py_INCREF(obj); + Py_IncRef(obj); PyObject *qualname = PyObject_GetAttrString(obj, "__qualname__"); klass c = class_create(PyUnicode_AsUTF8(qualname), ACCESSOR_TYPE_STATIC, py_cls, &py_class_interface_singleton); @@ -1264,7 +1264,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) { loader_impl_py_object py_obj = malloc(sizeof(struct loader_impl_py_object_type)); - Py_INCREF(obj); + Py_IncRef(obj); PyObject *object_class = PyObject_Type(obj); /* Increments the class reference count */ @@ -1304,7 +1304,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) v = value_create_ptr(obj); /* Create reference to the value so it does not get garbage collected */ - Py_INCREF(obj); + Py_IncRef(obj); /* Set up finalizer in order to free the value */ value_finalizer(v, &py_loader_impl_value_ptr_finalize, impl); @@ -1508,7 +1508,7 @@ PyObject *py_loader_impl_value_to_capi(loader_impl impl, type_id id, value v) /* TODO: The return value of object_impl_get may not be a loader_impl_py_object, it can be a loader_impl_node_node too */ /* TODO: We must detect if it comes from python and use this method, otherwise we must create the object dynamically */ loader_impl_py_object obj_impl = object_impl_get(obj); - Py_INCREF(obj_impl->obj); + Py_IncRef(obj_impl->obj); if (obj_impl == NULL) { @@ -1543,14 +1543,14 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) } loader_impl_py_await_invoke_callback_state callback_state = PyCapsule_GetPointer(capsule, NULL); - Py_DECREF(capsule); + Py_DecRef(capsule); /* pyfuture should never raise InvalidStateError exception here */ /* because this is a callback set in Future.add_done_callback */ PyObject *result_str = PyUnicode_FromString("result"); PyObject *result = PyObject_CallMethodObjArgs(pyfuture, result_str, NULL); - Py_DECREF(result_str); + Py_DecRef(result_str); value v = NULL, ret = NULL; @@ -1559,7 +1559,7 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) type_id id = py_loader_impl_capi_to_value_type(callback_state->impl, result); v = py_loader_impl_capi_to_value(callback_state->impl, result, id); - Py_DECREF(result); + Py_DecRef(result); py_loader_thread_release(); ret = callback_state->resolve_callback(v, callback_state->context); @@ -1600,7 +1600,7 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) loader_impl impl = callback_state->impl; - Py_DECREF(callback_state->coroutine); + Py_DecRef(callback_state->coroutine); py_loader_thread_release(); @@ -1689,7 +1689,7 @@ function_return function_py_interface_invoke(function func, function_impl impl, type_id id = ret_type == NULL ? py_loader_impl_capi_to_value_type(py_func->impl, result) : type_index(ret_type); v = py_loader_impl_capi_to_value(py_func->impl, result, id); - Py_DECREF(result); + Py_DecRef(result); finalize: py_loader_thread_release(); return v; @@ -1750,7 +1750,7 @@ function_return function_py_interface_await(function func, function_impl impl, f if (args_tuple == NULL) { - Py_DECREF(coroutine); + Py_DecRef(coroutine); goto error; } @@ -1759,8 +1759,8 @@ function_return function_py_interface_await(function func, function_impl impl, f if (callback_state == NULL) { - Py_DECREF(coroutine); - Py_DECREF(args_tuple); + Py_DecRef(coroutine); + Py_DecRef(args_tuple); goto error; } @@ -1774,8 +1774,8 @@ function_return function_py_interface_await(function func, function_impl impl, f if (callback_status == NULL) { - Py_DECREF(coroutine); - Py_DECREF(args_tuple); + Py_DecRef(coroutine); + Py_DecRef(args_tuple); free(callback_state); goto error; } @@ -1783,10 +1783,10 @@ function_return function_py_interface_await(function func, function_impl impl, f /* Create a reference to the function so we avoid to delete it when destroying the event loop */ callback_state->func_val = value_create_function(func); - Py_INCREF(py_impl->asyncio_loop); - Py_INCREF(coroutine); - Py_INCREF(py_impl->py_task_callback_handler); - Py_INCREF(callback_status); + Py_IncRef(py_impl->asyncio_loop); + Py_IncRef(coroutine); + Py_IncRef(py_impl->py_task_callback_handler); + Py_IncRef(callback_status); PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); PyTuple_SetItem(args_tuple, 1, coroutine); @@ -1794,7 +1794,7 @@ function_return function_py_interface_await(function func, function_impl impl, f PyTuple_SetItem(args_tuple, 3, callback_status); pyfuture = PyObject_Call(py_impl->thread_background_send, args_tuple, NULL); - Py_DECREF(args_tuple); + Py_DecRef(args_tuple); /* Variable arguments */ if (args_size > signature_args_size) @@ -1819,8 +1819,8 @@ function_return function_py_interface_await(function func, function_impl impl, f v = py_loader_impl_capi_to_value(py_func->impl, pyfuture, id); - Py_DECREF(pyfuture); - Py_DECREF(tuple_args); + Py_DecRef(pyfuture); + Py_DecRef(tuple_args); py_loader_thread_release(); @@ -1834,7 +1834,7 @@ function_return function_py_interface_await(function func, function_impl impl, f } Py_XDECREF(pyfuture); - Py_DECREF(tuple_args); + Py_DecRef(tuple_args); py_loader_thread_release(); @@ -1975,7 +1975,7 @@ int py_loader_impl_get_builtin_type(loader_impl impl, loader_impl_py py_impl, ty error_define_type: type_destroy(builtin_type); error_create_type: - Py_DECREF(builtin); + Py_DecRef(builtin); error_get_builtin: return 1; } @@ -2043,7 +2043,7 @@ int py_loader_impl_initialize_inspect_types(loader_impl impl, loader_impl_py py_ return 0; error_get_builtin_type: - Py_DECREF(py_impl->builtins_module); + Py_DecRef(py_impl->builtins_module); error_import_module: return 1; } @@ -2095,17 +2095,17 @@ int py_loader_impl_initialize_inspect(loader_impl impl, loader_impl_py py_impl) return 0; } - Py_DECREF(py_impl->inspect_isclass); + Py_DecRef(py_impl->inspect_isclass); error_inspect_isclass: - Py_DECREF(py_impl->inspect_ismethod); + Py_DecRef(py_impl->inspect_ismethod); error_inspect_ismethod: - Py_DECREF(py_impl->inspect_getfullargspec); + Py_DecRef(py_impl->inspect_getfullargspec); error_inspect_getfullargspec: - Py_DECREF(py_impl->inspect_getattr_static); + Py_DecRef(py_impl->inspect_getattr_static); error_inspect_getattr_static: - Py_DECREF(py_impl->inspect_signature); + Py_DecRef(py_impl->inspect_signature); error_inspect_signature: - Py_DECREF(py_impl->inspect_module); + Py_DecRef(py_impl->inspect_module); error_import_module: return 1; } @@ -2115,7 +2115,7 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h PyObject *module_name = PyUnicode_DecodeFSDefault("asyncio"); py_impl->asyncio_module = PyImport_Import(module_name); - Py_DECREF(module_name); + Py_DecRef(module_name); if (PyErr_Occurred() != NULL) { @@ -2169,7 +2169,7 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h if (host == 1) { PyObject *args_tuple = PyTuple_New(1); - Py_INCREF(py_impl->asyncio_loop); + Py_IncRef(py_impl->asyncio_loop); PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); PyObject_Call(py_impl->thread_background_register_atexit, args_tuple, NULL); Py_XDECREF(args_tuple); @@ -2178,11 +2178,11 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h return 0; error_after_py_task_callback_handler: - Py_DECREF(py_impl->py_task_callback_handler); + Py_DecRef(py_impl->py_task_callback_handler); error_after_asyncio_iscoroutinefunction: - Py_DECREF(py_impl->asyncio_iscoroutinefunction); + Py_DecRef(py_impl->asyncio_iscoroutinefunction); error_after_asyncio_module: - Py_DECREF(py_impl->asyncio_module); + Py_DecRef(py_impl->asyncio_module); return 1; } @@ -2210,7 +2210,7 @@ int py_loader_impl_initialize_traceback(loader_impl impl, loader_impl_py py_impl Py_XDECREF(py_impl->traceback_format_exception); error_format_exception: - Py_DECREF(py_impl->traceback_module); + Py_DecRef(py_impl->traceback_module); error_import_module: return 1; } @@ -2244,7 +2244,7 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) goto error_callable_check; } - Py_INCREF(py_impl->gc_debug_leak); + Py_IncRef(py_impl->gc_debug_leak); py_impl->gc_debug_stats = PyDict_GetItemString(PyModule_GetDict(py_impl->gc_module), "DEBUG_STATS"); @@ -2253,7 +2253,7 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) goto error_debug_leak; } - Py_INCREF(py_impl->gc_debug_stats); + Py_IncRef(py_impl->gc_debug_stats); flags = PyNumber_Or(py_impl->gc_debug_leak, py_impl->gc_debug_stats); @@ -2264,7 +2264,7 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) PyObject_CallFunctionObjArgs(py_impl->gc_set_debug, flags, NULL); - Py_DECREF(flags); + Py_DecRef(flags); if (PyErr_Occurred() != NULL) { @@ -2282,7 +2282,7 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) error_callable_check: Py_XDECREF(py_impl->gc_set_debug); error_set_debug: - Py_DECREF(py_impl->gc_module); + Py_DecRef(py_impl->gc_module); error_import_module: return 1; } @@ -2378,7 +2378,7 @@ int py_loader_impl_initialize_import(loader_impl_py py_impl) return 0; error_import_function: - Py_DECREF(py_impl->import_module); + Py_DecRef(py_impl->import_module); error_import_compile: py_loader_impl_error_print(py_impl); return 1; @@ -2551,7 +2551,7 @@ int py_loader_impl_initialize_sys_executable(loader_impl_py py_impl) int result = PySys_SetObject("executable", exe_path_obj); - Py_DECREF(exe_path_obj); + Py_DecRef(exe_path_obj); if (result == -1) { @@ -2585,7 +2585,7 @@ int py_loader_impl_initialize_argv(loader_impl_py py_impl, int argc, char **argv int result = PySys_SetObject("argv", list); - Py_DECREF(list); + Py_DecRef(list); if (result == -1) { @@ -2601,7 +2601,7 @@ int py_loader_impl_initialize_argv(loader_impl_py py_impl, int argc, char **argv return 0; error_set_item: - Py_DECREF(list); + Py_DecRef(list); return 1; } @@ -2625,7 +2625,7 @@ static void PyCFunction_dealloc(PyObject *obj) value_type_destroy(invoke_state->callback); py_loader_thread_acquire(); - Py_DECREF(invoke_state_capsule); + Py_DecRef(invoke_state_capsule); PyErr_Restore(error_type, error_value, error_traceback); } @@ -2784,37 +2784,37 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi return py_impl; error_after_asyncio_module: - Py_DECREF(py_impl->asyncio_iscoroutinefunction); - Py_DECREF(py_impl->asyncio_loop); - Py_DECREF(py_impl->asyncio_module); + Py_DecRef(py_impl->asyncio_iscoroutinefunction); + Py_DecRef(py_impl->asyncio_loop); + Py_DecRef(py_impl->asyncio_module); Py_XDECREF(py_impl->py_task_callback_handler); error_after_thread_background_module: - Py_DECREF(py_impl->thread_background_module); - Py_DECREF(py_impl->thread_background_start); - Py_DECREF(py_impl->thread_background_send); - Py_DECREF(py_impl->thread_background_stop); - Py_DECREF(py_impl->thread_background_register_atexit); - Py_DECREF(py_impl->thread_background_future_check); + Py_DecRef(py_impl->thread_background_module); + Py_DecRef(py_impl->thread_background_start); + Py_DecRef(py_impl->thread_background_send); + Py_DecRef(py_impl->thread_background_stop); + Py_DecRef(py_impl->thread_background_register_atexit); + Py_DecRef(py_impl->thread_background_future_check); error_after_import: - Py_DECREF(py_impl->import_module); - Py_DECREF(py_impl->import_function); + Py_DecRef(py_impl->import_module); + Py_DecRef(py_impl->import_function); error_after_inspect: - Py_DECREF(py_impl->inspect_signature); - Py_DECREF(py_impl->inspect_module); - Py_DECREF(py_impl->builtins_module); + Py_DecRef(py_impl->inspect_signature); + Py_DecRef(py_impl->inspect_module); + Py_DecRef(py_impl->builtins_module); error_after_traceback_and_gc: if (traceback_initialized == 0) { - Py_DECREF(py_impl->traceback_format_exception); - Py_DECREF(py_impl->traceback_module); + Py_DecRef(py_impl->traceback_format_exception); + Py_DecRef(py_impl->traceback_module); } #if DEBUG_ENABLED if (gc_initialized == 0) { - Py_DECREF(py_impl->gc_set_debug); - Py_DECREF(py_impl->gc_debug_leak); - Py_DECREF(py_impl->gc_debug_stats); - Py_DECREF(py_impl->gc_module); + Py_DecRef(py_impl->gc_set_debug); + Py_DecRef(py_impl->gc_debug_leak); + Py_DecRef(py_impl->gc_debug_stats); + Py_DecRef(py_impl->gc_module); } #endif error_after_argv: @@ -2864,7 +2864,7 @@ int py_loader_impl_execution_path(loader_impl impl, const loader_path path) #endif clear_current_path: - Py_DECREF(current_path); + Py_DecRef(current_path); py_loader_thread_release(); return result; } @@ -2916,18 +2916,18 @@ void py_loader_impl_module_destroy(loader_impl_py_handle_module module) if (item != NULL) { - Py_DECREF(item); + Py_DecRef(item); PyObject_DelItem(system_modules, module->name); } } - Py_DECREF(module->name); + Py_DecRef(module->name); module->name = NULL; } if (module->instance != NULL) { - Py_DECREF(module->instance); + Py_DecRef(module->instance); module->instance = NULL; } } @@ -2990,8 +2990,8 @@ int py_loader_impl_load_from_file_path(loader_impl_py py_impl, loader_impl_py_ha PyTuple_SetItem(args_tuple, 0, module->name); PyTuple_SetItem(args_tuple, 1, py_path); - Py_INCREF(module->name); - Py_INCREF(py_path); + Py_IncRef(module->name); + Py_IncRef(py_path); module->instance = PyObject_Call(py_impl->import_function, args_tuple, NULL); @@ -3006,15 +3006,15 @@ int py_loader_impl_load_from_file_path(loader_impl_py py_impl, loader_impl_py_ha goto error_module_instance; } - Py_DECREF(args_tuple); - Py_DECREF(py_path); + Py_DecRef(args_tuple); + Py_DecRef(py_path); return 0; error_module_instance: - Py_DECREF(args_tuple); + Py_DecRef(args_tuple); error_tuple_create: - Py_DECREF(py_path); + Py_DecRef(py_path); error_path_create: Py_XDECREF(module->name); module->name = NULL; @@ -3048,7 +3048,7 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl } PyTuple_SetItem(args_tuple, 0, module->name); - Py_INCREF(module->name); + Py_IncRef(module->name); module->instance = PyObject_Call(py_impl->import_function, args_tuple, NULL); @@ -3063,13 +3063,13 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl goto error_module_instance; } - Py_INCREF(module->instance); - Py_DECREF(args_tuple); + Py_IncRef(module->instance); + Py_DecRef(args_tuple); return 0; error_module_instance: - Py_DECREF(args_tuple); + Py_DecRef(args_tuple); error_tuple_create: Py_XDECREF(module->name); module->name = NULL; @@ -3132,7 +3132,7 @@ static void py_loader_impl_load_from_file_exception(loader_impl_py py_impl, cons PyErr_SetObject(exception_type, exception); - Py_DECREF(exception_type); + Py_DecRef(exception_type); py_loader_impl_error_print(py_impl); @@ -3266,7 +3266,7 @@ PyObject *py_loader_impl_load_from_memory_compile(loader_impl_py py_impl, const PyObject *instance = PyImport_ExecCodeModule(name, compiled); - Py_DECREF(compiled); + Py_DecRef(compiled); return instance; } @@ -3385,7 +3385,7 @@ type py_loader_impl_discover_type(loader_impl impl, PyObject *annotation, const log_write("metacall", LOG_LEVEL_DEBUG, "Discover type (%p) (%p): %s", (void *)annotation, (void *)type_derived(t), annotation_name); } - Py_DECREF(annotation_qualname); + Py_DecRef(annotation_qualname); } return t; @@ -3429,9 +3429,9 @@ size_t py_loader_impl_discover_callable_args_count(loader_impl_py py_impl, PyObj args_count--; } - Py_DECREF(is_method); + Py_DecRef(is_method); clear_spec: - Py_DECREF(spec); /* The elements from the tuple (args) are cleaned here */ + Py_DecRef(spec); /* The elements from the tuple (args) are cleaned here */ unsupported_callable: return args_count; } @@ -3448,9 +3448,9 @@ int py_loader_impl_discover_func(loader_impl impl, PyObject *func, function f) } PyTuple_SetItem(args, 0, func); - Py_INCREF(func); + Py_IncRef(func); PyObject *result = PyObject_CallObject(py_impl->inspect_signature, args); - Py_DECREF(args); + Py_DecRef(args); if (result != NULL) { @@ -3505,7 +3505,7 @@ int py_loader_impl_discover_func(loader_impl impl, PyObject *func, function f) signature_set_return(s, py_loader_impl_discover_type(impl, return_annotation, func_name, NULL)); - Py_DECREF(return_annotation); + Py_DecRef(return_annotation); return 0; } @@ -3546,10 +3546,10 @@ int py_loader_impl_discover_method(loader_impl impl, PyObject *callable, method else { PyTuple_SetItem(args, 0, callable); - Py_INCREF(callable); + Py_IncRef(callable); } PyObject *result = PyObject_CallObject(py_impl->inspect_signature, args); - Py_DECREF(args); + Py_DecRef(args); if (result != NULL) { @@ -3602,7 +3602,7 @@ int py_loader_impl_discover_method(loader_impl impl, PyObject *callable, method signature_set_return(s, py_loader_impl_discover_type(impl, return_annotation, m_name, NULL)); - Py_DECREF(return_annotation); + Py_DecRef(return_annotation); return 0; } @@ -3659,7 +3659,7 @@ type py_loader_impl_get_type(loader_impl impl, PyObject *obj) t = NULL; } - Py_DECREF(t_name); + Py_DecRef(t_name); return t; } @@ -3691,12 +3691,12 @@ int py_loader_impl_discover_constructor(loader_impl impl, PyObject *py_class, kl PyObject *name_init = PyUnicode_FromString("__init__"); PyObject *init_method = PyObject_GenericGetAttr(py_class, name_init); - Py_DECREF(name_init); + Py_DecRef(name_init); PyTuple_SetItem(args, 0, init_method); PyObject *result = PyObject_CallObject(py_impl->inspect_signature, args); - Py_DECREF(args); /* Clears init_method reference */ + Py_DecRef(args); /* Clears init_method reference */ if (result == NULL) { @@ -3770,7 +3770,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) { PyObject *nameobj = PyUnicode_FromString("__dict__"); PyObject *read_only_dict = PyObject_GenericGetAttr((PyObject *)py_class, nameobj); - Py_DECREF(nameobj); + Py_DecRef(nameobj); /* Turns out __dict__ is not a PyDict but PyMapping */ if (!PyObject_TypeCheck(read_only_dict, PyDictProxyTypePtr())) @@ -3810,11 +3810,11 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) } PyTuple_SetItem(args, 0, py_class); // class - Py_INCREF(py_class); + Py_IncRef(py_class); PyTuple_SetItem(args, 1, tuple_key); // method - Py_INCREF(tuple_key); + Py_IncRef(tuple_key); PyObject *method_static = PyObject_CallObject(py_impl->inspect_getattr_static, args); - Py_DECREF(args); + Py_DecRef(args); bool is_static_method = PyObject_TypeCheck(method_static, PyStaticMethodTypePtr()); log_write("metacall", LOG_LEVEL_DEBUG, "Introspection: class member %s, type %s, static method: %d", @@ -3831,7 +3831,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) { PyObject *func = PyObject_GetAttrString(tuple_val, "__func__"); args_count = py_loader_impl_discover_callable_args_count(py_impl, func); - Py_DECREF(func); + Py_DecRef(func); } else { @@ -3950,7 +3950,7 @@ int py_loader_impl_discover_module(loader_impl impl, PyObject *module, context c loader_impl_py_class py_cls = malloc(sizeof(struct loader_impl_py_class_type)); - Py_INCREF(module_dict_val); + Py_IncRef(module_dict_val); klass c = class_create(cls_name, ACCESSOR_TYPE_STATIC, py_cls, &py_class_interface_singleton); @@ -3987,7 +3987,7 @@ int py_loader_impl_discover_module(loader_impl impl, PyObject *module, context c return 1; } - Py_INCREF(module_dict_val); + Py_IncRef(module_dict_val); py_func->func = module_dict_val; py_func->impl = impl; @@ -4079,7 +4079,7 @@ void py_loader_impl_error_print(loader_impl_py py_impl) log_write("metacall", LOG_LEVEL_ERROR, error_format_str, type_str, value_str, traceback_str ? traceback_str : traceback_not_found); Py_XDECREF(traceback_list); - Py_DECREF(separator); + Py_DecRef(separator); Py_XDECREF(traceback_str_obj); PyErr_Restore(type, value, traceback); @@ -4135,7 +4135,7 @@ value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject ret = value_create_throwable(th); Py_XDECREF(traceback_list); - Py_DECREF(separator); + Py_DecRef(separator); Py_XDECREF(traceback_str_obj); return ret; @@ -4170,9 +4170,9 @@ void py_loader_impl_gc_print(loader_impl_py py_impl) log_write("metacall", LOG_LEVEL_DEBUG, garbage_format_str, garbage_str); error_garbage_str: - Py_DECREF(garbage_repr); + Py_DecRef(garbage_repr); error_garbage_repr: - Py_DECREF(garbage_list); + Py_DecRef(garbage_list); error_garbage_list: if (PyErr_Occurred() != NULL) { @@ -4255,7 +4255,7 @@ int py_loader_impl_destroy(loader_impl impl) /* Stop event loop for async calls */ { PyObject *args_tuple = PyTuple_New(2); - Py_INCREF(py_impl->asyncio_loop); + Py_IncRef(py_impl->asyncio_loop); PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); /* If it is host, do not join the thread */ PyTuple_SetItem(args_tuple, 1, PyBool_FromLong(!host)); @@ -4272,17 +4272,17 @@ int py_loader_impl_destroy(loader_impl impl) py_loader_thread_destroy(); /* Destroy all Python loader objects */ - Py_DECREF(py_impl->inspect_signature); - Py_DECREF(py_impl->inspect_getattr_static); - Py_DECREF(py_impl->inspect_getfullargspec); - Py_DECREF(py_impl->inspect_ismethod); - Py_DECREF(py_impl->inspect_isclass); - Py_DECREF(py_impl->inspect_module); - Py_DECREF(py_impl->builtins_module); - Py_DECREF(py_impl->traceback_format_exception); - Py_DECREF(py_impl->traceback_module); - Py_DECREF(py_impl->import_function); - Py_DECREF(py_impl->import_module); + Py_DecRef(py_impl->inspect_signature); + Py_DecRef(py_impl->inspect_getattr_static); + Py_DecRef(py_impl->inspect_getfullargspec); + Py_DecRef(py_impl->inspect_ismethod); + Py_DecRef(py_impl->inspect_isclass); + Py_DecRef(py_impl->inspect_module); + Py_DecRef(py_impl->builtins_module); + Py_DecRef(py_impl->traceback_format_exception); + Py_DecRef(py_impl->traceback_module); + Py_DecRef(py_impl->import_function); + Py_DecRef(py_impl->import_module); Py_XDECREF(py_impl->asyncio_iscoroutinefunction); Py_XDECREF(py_impl->asyncio_loop); @@ -4298,10 +4298,10 @@ int py_loader_impl_destroy(loader_impl impl) #if DEBUG_ENABLED { py_loader_impl_gc_print(py_impl); - Py_DECREF(py_impl->gc_set_debug); - Py_DECREF(py_impl->gc_debug_leak); - Py_DECREF(py_impl->gc_debug_stats); - Py_DECREF(py_impl->gc_module); + Py_DecRef(py_impl->gc_set_debug); + Py_DecRef(py_impl->gc_debug_leak); + Py_DecRef(py_impl->gc_debug_stats); + Py_DecRef(py_impl->gc_module); } #endif diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 0d2f41b6af..8771455928 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -340,7 +340,7 @@ PyObject *PyExc_RuntimeErrorPtr(void) PyObject *Py_ReturnNone(void) { #if defined(_WIN32) && defined(_MSC_VER) - Py_INCREF(Py_NoneStructPtr); + Py_IncRef(Py_NoneStructPtr); return Py_NoneStructPtr; #else Py_RETURN_NONE; @@ -361,7 +361,7 @@ PyObject *Py_ReturnNone(void) PyObject *Py_ReturnFalse(void) { #if defined(_WIN32) && defined(_MSC_VER) - Py_INCREF(Py_FalseStructPtr); + Py_IncRef(Py_FalseStructPtr); return Py_FalseStructPtr; #else Py_RETURN_FALSE; @@ -371,7 +371,7 @@ PyObject *Py_ReturnFalse(void) PyObject *Py_ReturnTrue(void) { #if defined(_WIN32) && defined(_MSC_VER) - Py_INCREF(Py_TrueStructPtr); + Py_IncRef(Py_TrueStructPtr); return Py_TrueStructPtr; #else Py_RETURN_TRUE; diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 32b2e1c936..63e5feea0c 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -126,7 +126,7 @@ void py_loader_thread_delayed_destroy(PyObject *obj) if (main_thread_id == current_thread_id) { py_loader_thread_acquire(); - Py_DECREF(obj); + Py_DecRef(obj); py_loader_thread_release(); } else @@ -141,7 +141,7 @@ void py_loader_thread_destroy(void) for (auto obj : delayed_destructor) { - Py_DECREF(obj); + Py_DecRef(obj); } py_loader_thread_release(); From 2d87595fb45baeaeefd539383a3a295dd1254e6e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:38:12 +0200 Subject: [PATCH 176/364] Remove windows matrix temporally. --- .github/workflows/windows-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 3b0d5dabc9..32bab3ef1d 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019, windows-2022, windows-2025] + os: [windows-2019] # TODO: windows-2022, windows-2025 options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, From 953165e0ae0c21660c7a79c4f06782cd468e512e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 15:48:25 +0200 Subject: [PATCH 177/364] Remove windows matrix temporally. --- .../loaders/py_loader/source/py_loader_impl.c | 132 +++++++++--------- .../loaders/py_loader/source/py_loader_port.c | 4 +- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index e476d1585f..420159b37b 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -263,7 +263,7 @@ int py_loader_impl_finalizer_object(loader_impl impl, PyObject *obj, value v) } else { - Py_XDECREF(v_capsule); + Py_DecRef(v_capsule); } py_loader_thread_release(); @@ -441,10 +441,10 @@ value py_object_interface_get(object obj, object_impl impl, struct accessor_type PyObject *pyobject_object = py_object->obj; PyObject *key_py_str = PyUnicode_FromString(attribute_name(accessor->data.attr)); PyObject *generic_attr = PyObject_GenericGetAttr(pyobject_object, key_py_str); - Py_XDECREF(key_py_str); + Py_DecRef(key_py_str); value v = py_loader_impl_capi_to_value(impl, generic_attr, py_loader_impl_capi_to_value_type(py_object->impl, generic_attr)); - Py_XDECREF(generic_attr); + Py_DecRef(generic_attr); py_loader_thread_release(); @@ -508,7 +508,7 @@ value py_object_interface_method_invoke(object obj, object_impl impl, method m, ret = py_loader_impl_capi_to_value(impl, python_object, py_loader_impl_capi_to_value_type(obj_impl->impl, python_object)); - Py_XDECREF(python_object); + Py_DecRef(python_object); release: py_loader_thread_release(); @@ -664,10 +664,10 @@ value py_class_interface_static_get(klass cls, class_impl impl, struct accessor_ PyObject *key_py_str = PyUnicode_FromString(attr_name); PyObject *generic_attr = PyObject_GenericGetAttr(pyobject_class, key_py_str); - Py_XDECREF(key_py_str); + Py_DecRef(key_py_str); value v = py_loader_impl_capi_to_value(impl, generic_attr, py_loader_impl_capi_to_value_type(py_class->impl, generic_attr)); - Py_XDECREF(generic_attr); + Py_DecRef(generic_attr); py_loader_thread_release(); @@ -808,7 +808,7 @@ int py_loader_impl_check_future(loader_impl_py py_impl, PyObject *obj) PyObject *result = PyObject_Call(py_impl->thread_background_future_check, args_tuple, NULL); - Py_XDECREF(args_tuple); + Py_DecRef(args_tuple); if (result == NULL) { @@ -1244,7 +1244,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) PyObject *qualname = PyObject_GetAttrString(obj, "__qualname__"); klass c = class_create(PyUnicode_AsUTF8(qualname), ACCESSOR_TYPE_STATIC, py_cls, &py_class_interface_singleton); - Py_XDECREF(qualname); + Py_DecRef(qualname); py_cls->impl = impl; py_cls->cls = obj; @@ -1274,7 +1274,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) /* So we must avoid calling it's constructor again */ PyObject *repr = PyObject_Repr(obj); object o = object_create(PyUnicode_AsUTF8(repr), ACCESSOR_TYPE_STATIC, py_obj, &py_object_interface_singleton, value_to_class(obj_cls)); - Py_XDECREF(repr); + Py_DecRef(repr); py_obj->impl = impl; py_obj->obj = obj; @@ -1296,7 +1296,7 @@ value py_loader_impl_capi_to_value(loader_impl impl, PyObject *obj, type_id id) v = py_loader_impl_error_value_from_exception(loader_impl_get(impl), (PyObject *)Py_TYPE(obj), obj, tb ? tb : Py_NonePtr()); - Py_XDECREF(tb); + Py_DecRef(tb); } else { @@ -1472,7 +1472,7 @@ PyObject *py_loader_impl_value_to_capi(loader_impl impl, type_id id, value v) invoke_state_capsule = PyCapsule_New(invoke_state, NULL, NULL); - Py_XINCREF(invoke_state_capsule); + Py_IncRef(invoke_state_capsule); /* Set up finalizer in order to free the invoke state */ value_finalizer(invoke_state->callback, &py_loader_impl_value_invoke_state_finalize, invoke_state_capsule); @@ -1583,7 +1583,7 @@ PyObject *py_task_callback_handler_impl(PyObject *self, PyObject *pyfuture) v = py_loader_impl_capi_to_value(callback_state->impl, val, id); } - Py_XDECREF(args); + Py_DecRef(args); PyErr_Clear(); } @@ -1674,7 +1674,7 @@ function_return function_py_interface_invoke(function func, function_impl impl, } } - Py_XDECREF(tuple_args); + Py_DecRef(tuple_args); if (is_var_args) { @@ -1741,7 +1741,7 @@ function_return function_py_interface_await(function func, function_impl impl, f if (coroutine == NULL || PyErr_Occurred() != NULL) { - Py_XDECREF(coroutine); + Py_DecRef(coroutine); goto error; } @@ -1833,7 +1833,7 @@ function_return function_py_interface_await(function func, function_impl impl, f py_loader_impl_error_print(py_impl); } - Py_XDECREF(pyfuture); + Py_DecRef(pyfuture); Py_DecRef(tuple_args); py_loader_thread_release(); @@ -2156,7 +2156,7 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h /* Start the asyncio thread */ PyObject *args_tuple = PyTuple_New(0); py_impl->asyncio_loop = PyObject_Call(py_impl->thread_background_start, args_tuple, NULL); - Py_XDECREF(args_tuple); + Py_DecRef(args_tuple); if (py_impl->asyncio_loop == NULL) { @@ -2172,7 +2172,7 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h Py_IncRef(py_impl->asyncio_loop); PyTuple_SetItem(args_tuple, 0, py_impl->asyncio_loop); PyObject_Call(py_impl->thread_background_register_atexit, args_tuple, NULL); - Py_XDECREF(args_tuple); + Py_DecRef(args_tuple); } return 0; @@ -2208,7 +2208,7 @@ int py_loader_impl_initialize_traceback(loader_impl impl, loader_impl_py py_impl return 0; } - Py_XDECREF(py_impl->traceback_format_exception); + Py_DecRef(py_impl->traceback_format_exception); error_format_exception: Py_DecRef(py_impl->traceback_module); error_import_module: @@ -2276,11 +2276,11 @@ int py_loader_impl_initialize_gc(loader_impl_py py_impl) error_call_set_debug: py_loader_impl_error_print(py_impl); error_debug_stats: - Py_XDECREF(py_impl->gc_debug_stats); + Py_DecRef(py_impl->gc_debug_stats); error_debug_leak: - Py_XDECREF(py_impl->gc_debug_leak); + Py_DecRef(py_impl->gc_debug_leak); error_callable_check: - Py_XDECREF(py_impl->gc_set_debug); + Py_DecRef(py_impl->gc_set_debug); error_set_debug: Py_DecRef(py_impl->gc_module); error_import_module: @@ -2511,17 +2511,17 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) return 0; error_thread_background_register_atexit: - Py_XDECREF(py_impl->thread_background_register_atexit); + Py_DecRef(py_impl->thread_background_register_atexit); error_thread_background_stop: - Py_XDECREF(py_impl->thread_background_stop); + Py_DecRef(py_impl->thread_background_stop); error_thread_background_send: - Py_XDECREF(py_impl->thread_background_send); + Py_DecRef(py_impl->thread_background_send); error_thread_background_start: - Py_XDECREF(py_impl->thread_background_start); + Py_DecRef(py_impl->thread_background_start); error_thread_background_future_check: - Py_XDECREF(py_impl->thread_background_future_check); + Py_DecRef(py_impl->thread_background_future_check); error_thread_background_compile: - Py_XDECREF(py_impl->thread_background_module); + Py_DecRef(py_impl->thread_background_module); if (PyErr_Occurred() != NULL) { @@ -2787,7 +2787,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi Py_DecRef(py_impl->asyncio_iscoroutinefunction); Py_DecRef(py_impl->asyncio_loop); Py_DecRef(py_impl->asyncio_module); - Py_XDECREF(py_impl->py_task_callback_handler); + Py_DecRef(py_impl->py_task_callback_handler); error_after_thread_background_module: Py_DecRef(py_impl->thread_background_module); Py_DecRef(py_impl->thread_background_start); @@ -3016,7 +3016,7 @@ int py_loader_impl_load_from_file_path(loader_impl_py py_impl, loader_impl_py_ha error_tuple_create: Py_DecRef(py_path); error_path_create: - Py_XDECREF(module->name); + Py_DecRef(module->name); module->name = NULL; error_name_create: return 1; @@ -3071,7 +3071,7 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl error_module_instance: Py_DecRef(args_tuple); error_tuple_create: - Py_XDECREF(module->name); + Py_DecRef(module->name); module->name = NULL; error_name_create: return 1; @@ -3246,7 +3246,7 @@ loader_handle py_loader_impl_load_from_file(loader_impl impl, const loader_path py_loader_impl_error_print(py_impl); PyErr_Clear(); } - Py_XDECREF(exception); + Py_DecRef(exception); error_recursive_call: py_loader_thread_release(); py_loader_impl_handle_destroy(py_handle); @@ -3491,15 +3491,15 @@ int py_loader_impl_discover_func(loader_impl impl, PyObject *func, function f) PyObject *annotation = PyObject_GetAttrString(parameter, "annotation"); type t = py_loader_impl_discover_type(impl, annotation, func_name, parameter_name); signature_set(s, iterator, parameter_name, t); - Py_XDECREF(name); - Py_XDECREF(annotation); + Py_DecRef(name); + Py_DecRef(annotation); } } - Py_XDECREF(parameter_list); + Py_DecRef(parameter_list); } - Py_XDECREF(parameters); + Py_DecRef(parameters); function_async(f, py_loader_impl_check_async(py_impl, func) == 1 ? ASYNCHRONOUS : SYNCHRONOUS); @@ -3590,15 +3590,15 @@ int py_loader_impl_discover_method(loader_impl impl, PyObject *callable, method PyObject *annotation = PyObject_GetAttrString(parameter, "annotation"); type t = py_loader_impl_discover_type(impl, annotation, m_name, parameter_name); signature_set(s, iterator, parameter_name, t); - Py_XDECREF(name); - Py_XDECREF(annotation); + Py_DecRef(name); + Py_DecRef(annotation); } } - Py_XDECREF(parameter_list); + Py_DecRef(parameter_list); } - Py_XDECREF(parameters); + Py_DecRef(parameters); signature_set_return(s, py_loader_impl_discover_type(impl, return_annotation, m_name, NULL)); @@ -3664,9 +3664,9 @@ type py_loader_impl_get_type(loader_impl impl, PyObject *obj) } type_name_error: - Py_XDECREF(t_name); + Py_DecRef(t_name); builtin_error: - Py_XDECREF(builtin); + Py_DecRef(builtin); return t; } @@ -3731,8 +3731,8 @@ int py_loader_impl_discover_constructor(loader_impl impl, PyObject *py_class, kl PyObject *annotation = PyObject_GetAttrString(parameter, "annotation"); type t = py_loader_impl_discover_type(impl, annotation, "__init__", parameter_name); constructor_set(ctor, parameter_count++, parameter_name, t); - Py_XDECREF(name); - Py_XDECREF(annotation); + Py_DecRef(name); + Py_DecRef(annotation); } ret = class_register_constructor(c, ctor); @@ -3743,10 +3743,10 @@ int py_loader_impl_discover_constructor(loader_impl impl, PyObject *py_class, kl } } - Py_XDECREF(parameter_list); + Py_DecRef(parameter_list); } - Py_XDECREF(parameters); + Py_DecRef(parameters); return ret; } @@ -3775,7 +3775,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) /* Turns out __dict__ is not a PyDict but PyMapping */ if (!PyObject_TypeCheck(read_only_dict, PyDictProxyTypePtr())) { - Py_XDECREF(read_only_dict); + Py_DecRef(read_only_dict); return 1; } @@ -3869,7 +3869,7 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) } /* Delete the reference of the method here instead of in py_method_interface_destroy */ - Py_XDECREF(tuple_val); + Py_DecRef(tuple_val); } else { @@ -3891,8 +3891,8 @@ int py_loader_impl_discover_class(loader_impl impl, PyObject *py_class, klass c) } } - Py_XDECREF(dict_items); - Py_XDECREF(read_only_dict); + Py_DecRef(dict_items); + Py_DecRef(read_only_dict); } return 0; @@ -4078,9 +4078,9 @@ void py_loader_impl_error_print(loader_impl_py py_impl) log_write("metacall", LOG_LEVEL_ERROR, error_format_str, type_str, value_str, traceback_str ? traceback_str : traceback_not_found); - Py_XDECREF(traceback_list); + Py_DecRef(traceback_list); Py_DecRef(separator); - Py_XDECREF(traceback_str_obj); + Py_DecRef(traceback_str_obj); PyErr_Restore(type, value, traceback); } @@ -4134,9 +4134,9 @@ value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject ret = value_create_throwable(th); - Py_XDECREF(traceback_list); + Py_DecRef(traceback_list); Py_DecRef(separator); - Py_XDECREF(traceback_str_obj); + Py_DecRef(traceback_str_obj); return ret; } @@ -4205,8 +4205,8 @@ void py_loader_impl_sys_path_print(PyObject *sys_path_list) log_write("metacall", LOG_LEVEL_DEBUG, sys_path_format_str, sys_path_str); - Py_XDECREF(sys_path_str_obj); - Py_XDECREF(separator); + Py_DecRef(sys_path_str_obj); + Py_DecRef(separator); } #endif @@ -4260,7 +4260,7 @@ int py_loader_impl_destroy(loader_impl impl) /* If it is host, do not join the thread */ PyTuple_SetItem(args_tuple, 1, PyBool_FromLong(!host)); PyObject_Call(py_impl->thread_background_stop, args_tuple, NULL); - Py_XDECREF(args_tuple); + Py_DecRef(args_tuple); if (PyErr_Occurred() != NULL) { @@ -4284,16 +4284,16 @@ int py_loader_impl_destroy(loader_impl impl) Py_DecRef(py_impl->import_function); Py_DecRef(py_impl->import_module); - Py_XDECREF(py_impl->asyncio_iscoroutinefunction); - Py_XDECREF(py_impl->asyncio_loop); - Py_XDECREF(py_impl->asyncio_module); - Py_XDECREF(py_impl->py_task_callback_handler); - Py_XDECREF(py_impl->thread_background_future_check); - Py_XDECREF(py_impl->thread_background_module); - Py_XDECREF(py_impl->thread_background_start); - Py_XDECREF(py_impl->thread_background_send); - Py_XDECREF(py_impl->thread_background_stop); - Py_XDECREF(py_impl->thread_background_register_atexit); + Py_DecRef(py_impl->asyncio_iscoroutinefunction); + Py_DecRef(py_impl->asyncio_loop); + Py_DecRef(py_impl->asyncio_module); + Py_DecRef(py_impl->py_task_callback_handler); + Py_DecRef(py_impl->thread_background_future_check); + Py_DecRef(py_impl->thread_background_module); + Py_DecRef(py_impl->thread_background_start); + Py_DecRef(py_impl->thread_background_send); + Py_DecRef(py_impl->thread_background_stop); + Py_DecRef(py_impl->thread_background_register_atexit); #if DEBUG_ENABLED { diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index 7f1ad92332..a5bf798fff 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -177,7 +177,7 @@ static PyObject *py_loader_port_load_from_file_impl(PyObject *self, PyObject *ar if (wrapper == NULL) { - Py_XDECREF(result); + Py_DecRef(result); result = Py_ReturnNone(); } else @@ -320,7 +320,7 @@ static PyObject *py_loader_port_load_from_package_impl(PyObject *self, PyObject if (wrapper == NULL) { - Py_XDECREF(result); + Py_DecRef(result); result = Py_ReturnNone(); } else From 6921b218fdb7e98d612f30a41f392f66bc07482a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 16:46:10 +0200 Subject: [PATCH 178/364] Solve more issues from py_loader on windows. --- source/adt/source/adt_map.c | 4 +-- source/adt/source/adt_set.c | 33 +++++++++++++++++-- .../loaders/py_loader/source/py_loader_impl.c | 12 ++++--- .../source/py_loader_symbol_fallback.c | 6 ++-- 4 files changed, 44 insertions(+), 11 deletions(-) diff --git a/source/adt/source/adt_map.c b/source/adt/source/adt_map.c index 2f1faaf5ce..eb1768d0d9 100644 --- a/source/adt/source/adt_map.c +++ b/source/adt/source/adt_map.c @@ -107,9 +107,9 @@ static int map_bucket_rehash(map m, map new_map) size_t index = h % new_map->capacity; - bucket b = &new_map->buckets[index]; + bucket new_bucket = &new_map->buckets[index]; - if (bucket_insert(b, p->key, p->value) != 0) + if (bucket_insert(new_bucket, p->key, p->value) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid map bucket realloc insertion"); return 1; diff --git a/source/adt/source/adt_set.c b/source/adt/source/adt_set.c index 94816c032d..2ffd457172 100644 --- a/source/adt/source/adt_set.c +++ b/source/adt/source/adt_set.c @@ -89,6 +89,35 @@ size_t set_size(set s) return 0; } +/* + +static int set_bucket_realloc_iterator(set s, set_key key, set_value value, set_cb_iterate_args args) +{ + set new_set = (set)args; + + if (new_set != s && key != NULL && args != NULL) + { + set_hash h = new_set->hash_cb(key); + + size_t index = h % new_set->capacity; + + bucket b = &new_set->buckets[index]; + + if (bucket_insert(b, key, value) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Invalid set bucket realloc insertion"); + return 1; + } + + ++new_set->count; + + return 0; + } + + return 1; +} +*/ + static int set_bucket_rehash(set s, set new_set) { size_t bucket_iterator, pair_iterator; @@ -107,9 +136,9 @@ static int set_bucket_rehash(set s, set new_set) size_t index = h % new_set->capacity; - bucket b = &new_set->buckets[index]; + bucket new_bucket = &new_set->buckets[index]; - if (bucket_insert(b, p->key, p->value) != 0) + if (bucket_insert(new_bucket, p->key, p->value) != 0) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid set bucket realloc insertion"); return 1; diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 420159b37b..2f158da186 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -224,10 +224,12 @@ static void (*py_loader_impl_pycfunction_dealloc)(PyObject *) = NULL; /* Implements PyCapsules with null value internally */ static const char py_loader_capsule_null_id[] = "__metacall_capsule_null__"; -PyObject *py_loader_impl_finalizer_object_impl(PyObject *self, PyObject *Py_UNUSED(args)) +PyObject *py_loader_impl_finalizer_object_impl(PyObject *self, PyObject *args) { value v = PyCapsule_GetPointer(self, NULL); + (void)args; + if (v == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Fatal error destroying a value, the metacall value attached to the python value is null"); @@ -2154,9 +2156,11 @@ int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int h } /* Start the asyncio thread */ - PyObject *args_tuple = PyTuple_New(0); - py_impl->asyncio_loop = PyObject_Call(py_impl->thread_background_start, args_tuple, NULL); - Py_DecRef(args_tuple); + { + PyObject *args_tuple = PyTuple_New(0); + py_impl->asyncio_loop = PyObject_Call(py_impl->thread_background_start, args_tuple, NULL); + Py_DecRef(args_tuple); + } if (py_impl->asyncio_loop == NULL) { diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 8771455928..4d915f08dc 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -104,7 +104,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) dynlink_symbol_uncast_type(address, PyTypeObject *, PyStaticMethod_TypePtr); /* PyDict_TypePtr */ - if (dynlink_symbol(py_library, "PyDict_TypePtr", &address) != 0) + if (dynlink_symbol(py_library, "PyDict_Type", &address) != 0) { return 1; } @@ -112,7 +112,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) dynlink_symbol_uncast_type(address, PyTypeObject *, PyDict_TypePtr); /* PyDictProxy_TypePtr */ - if (dynlink_symbol(py_library, "PyDictProxy_TypePtr", &address) != 0) + if (dynlink_symbol(py_library, "PyDictProxy_Type", &address) != 0) { return 1; } @@ -125,7 +125,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyTypeObject *, PyCFunction_TypePtr); + dynlink_symbol_uncast_type(address, PyTypeObject *, PyModule_TypePtr); /* PyType_Type */ if (dynlink_symbol(py_library, "PyType_Type", &address) != 0) From 1c6af4b8eda9cc9d7026210d0c248a28ba1e2188 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 18:04:04 +0200 Subject: [PATCH 179/364] Solve python exception issues. --- source/loaders/py_loader/source/py_loader_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 2f158da186..ca452fd737 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -3001,7 +3001,7 @@ int py_loader_impl_load_from_file_path(loader_impl_py py_impl, loader_impl_py_ha if (!(module->instance != NULL && PyModule_Check(module->instance))) { - if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_ExceptionPtr())) + if (module->instance != NULL && PyExceptionInstance_Check(module->instance)) { *exception = module->instance; module->instance = NULL; @@ -3058,7 +3058,7 @@ int py_loader_impl_load_from_module(loader_impl_py py_impl, loader_impl_py_handl if (!(module->instance != NULL && PyModule_Check(module->instance))) { - if (module->instance != NULL && PyErr_GivenExceptionMatches(module->instance, PyExc_ExceptionPtr())) + if (module->instance != NULL && PyExceptionInstance_Check(module->instance)) { *exception = module->instance; module->instance = NULL; From 3f1cb6d263370c02480fcb680a3f1a7a05591980 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 31 May 2025 18:53:14 +0200 Subject: [PATCH 180/364] Solve issues with exceptions. --- .../source/py_loader_symbol_fallback.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_symbol_fallback.c b/source/loaders/py_loader/source/py_loader_symbol_fallback.c index 4d915f08dc..1f5e55ff9e 100644 --- a/source/loaders/py_loader/source/py_loader_symbol_fallback.c +++ b/source/loaders/py_loader/source/py_loader_symbol_fallback.c @@ -36,11 +36,11 @@ static PyTypeObject *PyDict_TypePtr = NULL; static PyTypeObject *PyModule_TypePtr = NULL; static PyTypeObject *PyType_TypePtr = NULL; static PyObject *Py_NoneStructPtr = NULL; -static PyObject *PyExc_ExceptionStructPtr = NULL; -static PyObject *PyExc_FileNotFoundErrorStructPtr = NULL; -static PyObject *PyExc_TypeErrorStructPtr = NULL; -static PyObject *PyExc_ValueErrorStructPtr = NULL; -static PyObject *PyExc_RuntimeErrorStructPtr = NULL; +static PyObject **PyExc_ExceptionStructPtr = NULL; +static PyObject **PyExc_FileNotFoundErrorStructPtr = NULL; +static PyObject **PyExc_TypeErrorStructPtr = NULL; +static PyObject **PyExc_ValueErrorStructPtr = NULL; +static PyObject **PyExc_RuntimeErrorStructPtr = NULL; static PyObject *Py_FalseStructPtr = NULL; static PyObject *Py_TrueStructPtr = NULL; #endif @@ -149,7 +149,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyObject *, PyExc_ExceptionStructPtr); + dynlink_symbol_uncast_type(address, PyObject **, PyExc_ExceptionStructPtr); /* PyExc_FileNotFoundError */ if (dynlink_symbol(py_library, "PyExc_FileNotFoundError", &address) != 0) @@ -157,7 +157,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyObject *, PyExc_FileNotFoundErrorStructPtr); + dynlink_symbol_uncast_type(address, PyObject **, PyExc_FileNotFoundErrorStructPtr); /* PyExc_TypeError */ if (dynlink_symbol(py_library, "PyExc_TypeError", &address) != 0) @@ -165,7 +165,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyObject *, PyExc_TypeErrorStructPtr); + dynlink_symbol_uncast_type(address, PyObject **, PyExc_TypeErrorStructPtr); /* PyExc_ValueError */ if (dynlink_symbol(py_library, "PyExc_ValueError", &address) != 0) @@ -173,7 +173,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyObject *, PyExc_ValueErrorStructPtr); + dynlink_symbol_uncast_type(address, PyObject **, PyExc_ValueErrorStructPtr); /* PyExc_RuntimeError */ if (dynlink_symbol(py_library, "PyExc_RuntimeError", &address) != 0) @@ -181,7 +181,7 @@ int py_loader_symbol_fallback_initialize(dynlink py_library) return 1; } - dynlink_symbol_uncast_type(address, PyObject *, PyExc_RuntimeErrorStructPtr); + dynlink_symbol_uncast_type(address, PyObject **, PyExc_RuntimeErrorStructPtr); /* Py_False */ if (dynlink_symbol(py_library, "_Py_FalseStruct", &address) != 0) @@ -295,7 +295,7 @@ PyObject *Py_NonePtr(void) PyObject *PyExc_ExceptionPtr(void) { #if defined(_WIN32) && defined(_MSC_VER) - return PyExc_ExceptionStructPtr; + return *PyExc_ExceptionStructPtr; #else return PyExc_Exception; #endif @@ -304,7 +304,7 @@ PyObject *PyExc_ExceptionPtr(void) PyObject *PyExc_FileNotFoundErrorPtr(void) { #if defined(_WIN32) && defined(_MSC_VER) - return PyExc_FileNotFoundErrorStructPtr; + return *PyExc_FileNotFoundErrorStructPtr; #else return PyExc_FileNotFoundError; #endif @@ -313,7 +313,7 @@ PyObject *PyExc_FileNotFoundErrorPtr(void) PyObject *PyExc_TypeErrorPtr(void) { #if defined(_WIN32) && defined(_MSC_VER) - return PyExc_TypeErrorStructPtr; + return *PyExc_TypeErrorStructPtr; #else return PyExc_TypeError; #endif @@ -322,7 +322,7 @@ PyObject *PyExc_TypeErrorPtr(void) PyObject *PyExc_ValueErrorPtr(void) { #if defined(_WIN32) && defined(_MSC_VER) - return PyExc_ValueErrorStructPtr; + return *PyExc_ValueErrorStructPtr; #else return PyExc_ValueError; #endif @@ -331,7 +331,7 @@ PyObject *PyExc_ValueErrorPtr(void) PyObject *PyExc_RuntimeErrorPtr(void) { #if defined(_WIN32) && defined(_MSC_VER) - return PyExc_RuntimeErrorStructPtr; + return *PyExc_RuntimeErrorStructPtr; #else return PyExc_RuntimeError; #endif From 851d08dcf61749f90b045eac721ca5d39ca286c0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 01:59:55 +0200 Subject: [PATCH 181/364] Solve issues in py loader windows. --- source/loaders/py_loader/source/py_loader_impl.c | 1 + source/loaders/py_loader/source/py_loader_threading.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index ca452fd737..c31797b881 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2678,6 +2678,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi /* Initialize symbol fallback */ if (py_loader_symbol_fallback_initialize(loader_impl_dependency(impl, "python")) != 0) { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to initialize the Python Loader Symbol Fallback mechanism"); goto error_init_py; } diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 63e5feea0c..ed4e3ea607 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -69,8 +69,10 @@ void py_loader_thread_initialize(const int host) if (host == 1) { + PyGILState_STATE gstate = PyGILState_Ensure(); main_thread_state = PyThreadState_Get(); main_thread_ref_count++; + PyGILState_Release(gstate); } } From 88f2e1cae0e8da5b6ad4d09cd829b68c232fb85f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 02:01:04 +0200 Subject: [PATCH 182/364] Solve issues in windows library path listing. --- source/portability/source/portability_library_path.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 25cad4a328..221d7a1ccf 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -158,7 +158,8 @@ int portability_library_path_find(const char name[], portability_library_path_st { size_t iterator, size = modules_size / sizeof(HMODULE); - for (iterator = 0; iterator < size; ++iterator) + /* Start from 1 so we avoid the executable itself */ + for (iterator = 1; iterator < size; ++iterator) { if (GetModuleFileNameEx(handle_process, handle_modules[iterator], path, PORTABILITY_PATH_SIZE)) { @@ -267,7 +268,8 @@ int portability_library_path_list(portability_library_path_list_cb callback, voi size_t iterator, size = modules_size / sizeof(HMODULE); char module_name[MAX_PATH]; - for (iterator = 0; iterator < size; ++iterator) + /* Start from 1 so we avoid the executable itself */ + for (iterator = 1; iterator < size; ++iterator) { if (GetModuleFileNameExA(process, modules[iterator], module_name, sizeof(module_name) / sizeof(char))) { From e955b5494b97ca288cf2536bc25f38e24e3073a5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 02:12:43 +0200 Subject: [PATCH 183/364] Make rb_loader weakly linked to libruby. --- source/loaders/rb_loader/CMakeLists.txt | 37 +++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index a142dce09c..5db103bfb9 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -14,12 +14,16 @@ if(NOT Ruby_FOUND) return() endif() +# TODO: Search Ruby_LIBRARY_NAME_PATH like in Python? +set(Ruby_LIBRARY_NAME_PATH "${Ruby_LIBRARY_NAME}") +get_filename_component(Ruby_LIBRARY_NAME "${Ruby_LIBRARY_NAME_PATH}" NAME) + # Copy Ruby DLL into project output directory # TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies # TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da -if(WIN32 AND Ruby_LIBRARY_NAME) +if(Ruby_LIBRARY_NAME_PATH AND WIN32) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}) - file(COPY "${Ruby_LIBRARY_NAME}" DESTINATION ${PROJECT_OUTPUT_DIR}) + file(COPY "${Ruby_LIBRARY_NAME_PATH}" DESTINATION ${PROJECT_OUTPUT_DIR}) endif() # @@ -142,7 +146,9 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - ${Ruby_LIBRARY} # Ruby library + # Delay load for MSVC + $<$:${Ruby_LIBRARY}> # Ruby library + $<$:delayimp> PUBLIC ${DEFAULT_LIBRARIES} @@ -191,6 +197,8 @@ endif() target_link_options(${target} PRIVATE + $<$,$>:-Wl,-undefined,dynamic_lookup> + $<$:/DELAYLOAD:${Ruby_LIBRARY_NAME_PATH}> PUBLIC ${DEFAULT_LINKER_OPTIONS} @@ -213,10 +221,29 @@ install(TARGETS ${target} # Runtime (pack Ruby DLL in windows) # TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies # TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da -if(WIN32 AND Ruby_LIBRARY_NAME) +set(Ruby_LIBRARY_DEVELOPMENT "${Ruby_LIBRARY_NAME_PATH}") + +if(Ruby_LIBRARY_NAME_PATH AND WIN32) install(FILES - "${Ruby_LIBRARY_NAME}" + "${Ruby_LIBRARY_NAME_PATH}" DESTINATION ${INSTALL_LIB} COMPONENT runtime ) + set(Ruby_LIBRARY_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${Ruby_LIBRARY_NAME}") +else() + set(Ruby_LIBRARY_INSTALL "${Ruby_LIBRARY_NAME_PATH}") endif() + +# +# Configuration +# + +# Development +loader_configuration_begin(rb_loader) +loader_configuration_deps(ruby "${Ruby_LIBRARY_DEVELOPMENT}") +loader_configuartion_end_development() + +# Install +loader_configuration_begin(rb_loader) +loader_configuration_deps(ruby "${Ruby_LIBRARY_INSTALL}") +loader_configuartion_end_install() From 88c20b42230c9591d25d950b748451ae264ec667 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 02:27:52 +0200 Subject: [PATCH 184/364] Solve issue on linux. --- source/loaders/rb_loader/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index 5db103bfb9..d3dd5545f3 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -15,7 +15,11 @@ if(NOT Ruby_FOUND) endif() # TODO: Search Ruby_LIBRARY_NAME_PATH like in Python? -set(Ruby_LIBRARY_NAME_PATH "${Ruby_LIBRARY_NAME}") +if(Ruby_LIBRARY_NAME) + set(Ruby_LIBRARY_NAME_PATH "${Ruby_LIBRARY_NAME}") +else() + set(Ruby_LIBRARY_NAME_PATH "${Ruby_LIBRARY}") +endif() get_filename_component(Ruby_LIBRARY_NAME "${Ruby_LIBRARY_NAME_PATH}" NAME) # Copy Ruby DLL into project output directory From 153b301bdd41ddb0b4d8e5ae6ee7d5a7bec52601 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 02:42:10 +0200 Subject: [PATCH 185/364] Solve another issue from rb_loader. --- source/configuration/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/configuration/CMakeLists.txt b/source/configuration/CMakeLists.txt index 4e3405db3a..18b30a7ebc 100644 --- a/source/configuration/CMakeLists.txt +++ b/source/configuration/CMakeLists.txt @@ -195,6 +195,11 @@ function(configurations_write config_dir config_path) set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"py_loader\":\"${config_dir}/py_loader.json\",") endif() + + if(OPTION_BUILD_LOADERS_RB) + set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"rb_loader\":\"${config_dir}/rb_loader.json\",") + endif() + #if(OPTION_BUILD_LOADERS_JS) # set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"js_loader\":\"${config_dir}/js_loader.json\",") #endif() From f81f80dd56818a129ea0b89f825a0ecfc8dcd815 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 02:52:43 +0200 Subject: [PATCH 186/364] Remove GC print unless we use sanitizers on python. --- source/loaders/py_loader/source/py_loader_impl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index c31797b881..47ef9b9d5a 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -4302,7 +4302,9 @@ int py_loader_impl_destroy(loader_impl impl) #if DEBUG_ENABLED { + #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) py_loader_impl_gc_print(py_impl); + #endif Py_DecRef(py_impl->gc_set_debug); Py_DecRef(py_impl->gc_debug_leak); Py_DecRef(py_impl->gc_debug_stats); From 0cad186d7813e15767a0807099ab69eab3b535cc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 13:03:56 +0200 Subject: [PATCH 187/364] Update version to v0.9.0. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5c5cbb3b8f..899f24fc75 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.8 \ No newline at end of file +0.9.0 \ No newline at end of file From ec59057139f684d8e5c185b4c196692d2c88d143 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 21:47:02 +0200 Subject: [PATCH 188/364] Allow PLTHook to be defined by variables. --- source/detours/plthook_detour/CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/detours/plthook_detour/CMakeLists.txt b/source/detours/plthook_detour/CMakeLists.txt index a5db591c14..0907b84fa5 100644 --- a/source/detours/plthook_detour/CMakeLists.txt +++ b/source/detours/plthook_detour/CMakeLists.txt @@ -8,17 +8,19 @@ endif() # # PLTHook -include(FetchContent) +if(NOT PLTHook_SOURCE_DIR) + include(FetchContent) -set(PLTHook_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/plthook") + set(PLTHook_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/plthook") -FetchContent_Declare(PLTHook - GIT_REPOSITORY https://github.com/metacall/plthook.git - GIT_TAG master - SOURCE_DIR ${PLTHook_SOURCE_DIR} -) + FetchContent_Declare(PLTHook + GIT_REPOSITORY https://github.com/metacall/plthook.git + GIT_TAG master + SOURCE_DIR ${PLTHook_SOURCE_DIR} + ) -FetchContent_MakeAvailable(PLTHook) + FetchContent_MakeAvailable(PLTHook) +endif() set(PLTHook_INCLUDE_DIR "${PLTHook_SOURCE_DIR}") From f468fc9181e748a2abcf43070585435f89d871bb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sun, 1 Jun 2025 21:47:55 +0200 Subject: [PATCH 189/364] Update version to v0.9.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 899f24fc75..f514a2f0bd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.0 \ No newline at end of file +0.9.1 \ No newline at end of file From 15f6beeffbf93931d282daf083ad094d5ae7caf2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 00:15:46 +0200 Subject: [PATCH 190/364] Solve issues with ruby loader. --- source/cli/metacallcli/CMakeLists.txt | 15 +++++++++++++++ .../loaders/rb_loader/source/rb_loader_impl.c | 18 +++++++++++++++++- source/scripts/ruby/CMakeLists.txt | 1 + source/scripts/ruby/simplest/CMakeLists.txt | 5 +++++ .../scripts/ruby/simplest/source/simplest.rb | 3 +++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 source/scripts/ruby/simplest/CMakeLists.txt create mode 100644 source/scripts/ruby/simplest/source/simplest.rb diff --git a/source/cli/metacallcli/CMakeLists.txt b/source/cli/metacallcli/CMakeLists.txt index 7d2183283e..8067b8e620 100644 --- a/source/cli/metacallcli/CMakeLists.txt +++ b/source/cli/metacallcli/CMakeLists.txt @@ -416,6 +416,21 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_PY) ) endif() +if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_RB) + add_test(NAME ${target}-rb-simplest + COMMAND $ simplest.rb + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + set_tests_properties(${target}-rb-simplest PROPERTIES + LABELS ${target}-rb-simplest + PASS_REGULAR_EXPRESSION "Hello from Ruby" + ) + test_environment_variables(${target}-rb-simplest + "" + ${TESTS_ENVIRONMENT_VARIABLES} + ) +endif() + if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_TS AND OPTION_BUILD_SCRIPTS AND OPTION_BUILD_SCRIPTS_TS) add_test(NAME ${target}-ts COMMAND ${CMAKE_COMMAND} -D "EXECUTABLE=$" -D "INPUT=${TEST_COMMAND_INPUT}-ts.txt" -P ${TEST_COMMAND_RUNNER} diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index c5139dea94..3c360b256d 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1237,6 +1237,12 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path module_data = rb_loader_impl_load_data(impl, paths[0]); + if (module_data == Qnil) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby module not found: %s", paths[0]); + goto load_error; + } + result = rb_eval_string_protect(StringValuePtr(module_data), &state); if (state != 0) @@ -1246,7 +1252,17 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path goto load_error; } - module_name = rb_funcall(result, rb_intern("name"), 0); + if (result == Qnil) + { + loader_path name; + size_t size = portability_path_get_name(paths[0], strnlen(paths[0], LOADER_PATH_SIZE), name, LOADER_PATH_SIZE); + + module_name = rb_str_new(name, size); + } + else + { + module_name = rb_funcall(result, rb_intern("name"), 0); + } rb_module = rb_loader_impl_create_module(module_name, result, module_data, result); diff --git a/source/scripts/ruby/CMakeLists.txt b/source/scripts/ruby/CMakeLists.txt index 07ca3c8484..46dc789cd7 100644 --- a/source/scripts/ruby/CMakeLists.txt +++ b/source/scripts/ruby/CMakeLists.txt @@ -21,3 +21,4 @@ add_subdirectory(ducktype) add_subdirectory(invalid) add_subdirectory(klass) add_subdirectory(failempty) +add_subdirectory(simplest) diff --git a/source/scripts/ruby/simplest/CMakeLists.txt b/source/scripts/ruby/simplest/CMakeLists.txt new file mode 100644 index 0000000000..ab31b4b0b0 --- /dev/null +++ b/source/scripts/ruby/simplest/CMakeLists.txt @@ -0,0 +1,5 @@ +# +# Configure ruby project +# + +rb_project(simplest 0.1.0) diff --git a/source/scripts/ruby/simplest/source/simplest.rb b/source/scripts/ruby/simplest/source/simplest.rb new file mode 100644 index 0000000000..5adade7138 --- /dev/null +++ b/source/scripts/ruby/simplest/source/simplest.rb @@ -0,0 +1,3 @@ +#!/usr/bin/ruby + +print("Hello from Ruby") From be0731ac8abd23a8502cbea3d9e4e0c40f035f79 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 00:18:29 +0200 Subject: [PATCH 191/364] Update version to v0.9.2. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f514a2f0bd..f76f913174 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.1 \ No newline at end of file +0.9.2 \ No newline at end of file From 9662d2caa79c58520efef185912a27d92d787d6b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 00:20:42 +0200 Subject: [PATCH 192/364] Update mirror of ruby-mswin. --- tools/metacall-environment.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 35bd794675..741a2810f9 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -182,7 +182,7 @@ function Set-Ruby { if (!(Test-Path -Path "$DepsDir\ruby-mswin.7z")) { # Download installer Write-Output "Ruby not found downloading now..." - (New-Object Net.WebClient).DownloadFile("https://github.com/MSP-Greg/ruby-mswin/releases/download/ruby-mswin-builds/Ruby-$RUBY_VERSION-ms.7z", "$DepsDir\ruby-mswin.7z") + (New-Object Net.WebClient).DownloadFile("https://github.com/metacall/ruby-mswin/releases/download/ruby-mswin-builds/Ruby-$RUBY_VERSION-ms.7z", "$DepsDir\ruby-mswin.7z") } mkdir "$DepsDir\Ruby31-ms" From fb5c9ffd7c80c462b485ee1d778b824a5ed818f0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 01:04:38 +0200 Subject: [PATCH 193/364] Solve more issues. --- source/loaders/py_loader/source/py_loader_impl.c | 4 ++++ source/plugins/backtrace_plugin/CMakeLists.txt | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 47ef9b9d5a..4cc86e8a47 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -161,7 +161,9 @@ static value py_loader_impl_error_value(loader_impl_py py_impl); static value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject *type_obj, PyObject *value_obj, PyObject *traceback_obj); #if DEBUG_ENABLED + #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) static void py_loader_impl_gc_print(loader_impl_py py_impl); + #endif static void py_loader_impl_sys_path_print(PyObject *sys_path_list); #endif @@ -4147,6 +4149,7 @@ value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject } #if DEBUG_ENABLED + #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) void py_loader_impl_gc_print(loader_impl_py py_impl) { static const char garbage_format_str[] = "Python Garbage Collector:\n%s"; @@ -4184,6 +4187,7 @@ void py_loader_impl_gc_print(loader_impl_py py_impl) py_loader_impl_error_print(py_impl); } } + #endif void py_loader_impl_sys_path_print(PyObject *sys_path_list) { diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index 441fe1b402..acaf00022d 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -31,6 +31,18 @@ if(NOT BackwardCpp_POPULATED OR NOT BackwardCpp_SOURCE) message(STATUS "BackwardCpp could not be installed, trying to find it on the system") endif() +find_package(Backward + CONFIG + PATHS ${BackwardCpp_SOURCE} +) + +if(NOT BACKWARD_FOUND) + message(WARNING "BackwardCpp could not be found, skipping backtrace plugin compilation") + return() +endif() + +include(${BackwardCpp_SOURCE}/BackwardConfig.cmake) + # # Plugin name and options # @@ -164,7 +176,7 @@ target_link_libraries(${target} PRIVATE ${META_PROJECT_NAME}::metacall # MetaCall library - Backward::Interface # Backward-cpp library + Backward::Backward # Backward-cpp library PUBLIC ${DEFAULT_LIBRARIES} From 19ee89f65af2d89ca4a331545759573507483912 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 01:05:20 +0200 Subject: [PATCH 194/364] Update version to v0.9.3. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f76f913174..b3ec1638fd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.2 \ No newline at end of file +0.9.3 \ No newline at end of file From ecf52d5aef255b7337b8e72a4fdc6e5aa5678711 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 18:02:29 +0200 Subject: [PATCH 195/364] Solve issues on ruby port and loader. --- .../loaders/rb_loader/source/rb_loader_impl.c | 6 +-- .../loaders/rb_loader/source/rb_loader_port.c | 40 ++++++++++++++++++- source/ports/rb_port/package/lib/metacall.rb | 13 +++--- source/ports/rb_port/test/run.rb | 29 ++++++-------- 4 files changed, 60 insertions(+), 28 deletions(-) diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 3c360b256d..5b4373602b 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1252,17 +1252,13 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path goto load_error; } - if (result == Qnil) + /* Define module name */ { loader_path name; size_t size = portability_path_get_name(paths[0], strnlen(paths[0], LOADER_PATH_SIZE), name, LOADER_PATH_SIZE); module_name = rb_str_new(name, size); } - else - { - module_name = rb_funcall(result, rb_intern("name"), 0); - } rb_module = rb_loader_impl_create_module(module_name, result, module_data, result); diff --git a/source/loaders/rb_loader/source/rb_loader_port.c b/source/loaders/rb_loader/source/rb_loader_port.c index eef87b5639..0b3b97c7a0 100644 --- a/source/loaders/rb_loader/source/rb_loader_port.c +++ b/source/loaders/rb_loader/source/rb_loader_port.c @@ -175,7 +175,7 @@ VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) /* Convert the arguments into MetaCall values */ for (iterator = 0; iterator < args_size; ++iterator) { - (void)rb_type_deserialize(rb_loader_impl, argv[iterator], &args[iterator]); + (void)rb_type_deserialize(rb_loader_impl, argv[iterator + 1], &args[iterator]); } /* Execute the call */ @@ -195,6 +195,43 @@ VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) return rb_type_serialize(result); } +VALUE rb_loader_port_inspect(VALUE self) +{ + VALUE result; + size_t size = 0; + char *result_str = NULL, *inspect_str = NULL; + struct metacall_allocator_std_type std_ctx = { &malloc, &realloc, &free }; + + /* Create the allocator */ + void *allocator = metacall_allocator_create(METACALL_ALLOCATOR_STD, (void *)&std_ctx); + + (void)self; + + /* Retrieve inspect data */ + result_str = inspect_str = metacall_inspect(&size, allocator); + + if (inspect_str == NULL || size == 0) + { + static const char empty[] = "{}"; + + result_str = (char *)empty; + size = sizeof(empty); + + rb_raise(rb_eArgError, "Inspect returned an invalid size or string"); + } + + result = rb_str_new(result_str, size - 1); + + if (inspect_str != NULL && size > 0) + { + metacall_allocator_free(allocator, inspect_str); + } + + metacall_allocator_destroy(allocator); + + return result; +} + int rb_loader_port_initialize(loader_impl impl) { VALUE rb_loader_port; @@ -213,6 +250,7 @@ int rb_loader_port_initialize(loader_impl impl) rb_define_module_function(rb_loader_port, "metacall_load_from_file", rb_loader_port_load_from_file, 2); rb_define_module_function(rb_loader_port, "metacall_load_from_memory", rb_loader_port_load_from_memory, 2); rb_define_module_function(rb_loader_port, "metacall", rb_loader_port_metacall, -1); + rb_define_module_function(rb_loader_port, "metacall_inspect", rb_loader_port_inspect, 0); rb_loader_impl = impl; diff --git a/source/ports/rb_port/package/lib/metacall.rb b/source/ports/rb_port/package/lib/metacall.rb index bb21cd623e..ba36cea952 100644 --- a/source/ports/rb_port/package/lib/metacall.rb +++ b/source/ports/rb_port/package/lib/metacall.rb @@ -105,24 +105,25 @@ def metacall_module_load end end + # Initialize the MetaCall Ruby Port + metacall_module_load + public def metacall_load_from_file(tag, paths) - metacall_module_load - MetaCallRbLoaderPort.metacall_load_from_file(tag, paths) end def metacall_load_from_memory(tag, script) - metacall_module_load - MetaCallRbLoaderPort.metacall_load_from_memory(tag, script) end def metacall(function_name, *args) - metacall_module_load - MetaCallRbLoaderPort.metacall(function_name, *args) end + def metacall_inspect() + MetaCallRbLoaderPort.metacall_inspect() + end + end diff --git a/source/ports/rb_port/test/run.rb b/source/ports/rb_port/test/run.rb index 69ead17bd6..cba7d6842c 100644 --- a/source/ports/rb_port/test/run.rb +++ b/source/ports/rb_port/test/run.rb @@ -7,19 +7,19 @@ class RbPortTest < Test::Unit::TestCase # MetaCall (Python from memory) def test_python_memory - script = '#!/usr/bin/env python3\n' \ - 'def inline_multiply_mem(left: int, right: int) -> int:\n' \ - ' return left * right;\n' - 'def inline_hello(left: int, right: int) -> int:\n' \ - ' print(\'Helloo\', left, \' \', right);\n' - ' return;\n' + script = <<~SCRIPT +def inline_multiply_mem(left: int, right: int) -> int: + return left * right +def inline_hello(left: int, right: int) -> int: + print('Helloo', left, ' ', right) + return left * right +SCRIPT - assert_equal(0, MetaCall.metacall_load_from_memory('py', script)) + assert_equal(0, MetaCall::metacall_load_from_memory('py', script)) - # TODO - # assert_equal(4, MetaCall::metacall('inline_multiply_mem', 2, 2)) + assert_equal(4, MetaCall::metacall('inline_multiply_mem', 2, 2)) - assert_equal(nil, MetaCall::metacall('inline_hello', 10, 20)) + assert_equal(200, MetaCall::metacall('inline_hello', 10, 20)) end # MetaCall (Python) @@ -28,8 +28,7 @@ def test_python assert_equal(nil, MetaCall::metacall('hello')) - # TODO - # assert_equal(35, MetaCall::metacall('multiply', 5, 7)) + assert_equal(35, MetaCall::metacall('multiply', 5, 7)) end # MetaCall (Ruby) @@ -38,11 +37,9 @@ def test_ruby assert_equal(nil, MetaCall::metacall('say_null')) - # TODO - # assert_equal(12, MetaCall::metacall('say_multiply', 3, 4)) + assert_equal(12, MetaCall::metacall('say_multiply', 3, 4)) - # TODO - # assert_equal('Hello world!', MetaCall::metacall('say_hello', 'world')) + assert_equal('Hello world!', MetaCall::metacall('say_hello', 'world')) end end From c6964b631cd986cec5bcd846e0c609b86eaa98e0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 18:03:33 +0200 Subject: [PATCH 196/364] Update version to v0.9.4. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b3ec1638fd..2bd77c74f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.3 \ No newline at end of file +0.9.4 \ No newline at end of file From fbe8bdc84d6108a2001e9264e37d5fe4e041d538 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 18:59:45 +0200 Subject: [PATCH 197/364] Solve issues with ruby loader. --- .../loaders/rb_loader/source/rb_loader_impl.c | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 5b4373602b..388e3b2e90 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1229,7 +1229,7 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path This should run only once, the first time after the initialization */ if (rb_loader_impl_run_main == 0 && size == 1 && strcmp(paths[0], rb_loader_impl_main_module) == 0) { - VALUE module_data, result, module_name; + VALUE module_data, result, module_name, module; int state; loader_impl_rb_module rb_module; @@ -1243,24 +1243,47 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path goto load_error; } + /* Define module name */ + { + loader_path name; + size_t size = portability_path_get_name(paths[0], strnlen(paths[0], LOADER_PATH_SIZE), name, LOADER_PATH_SIZE); + module_name = rb_str_new(name, size - 1); + module_name = rb_funcallv(module_name, rb_intern("capitalize"), 0, NULL); + } + + /* Define module that wraps the code */ + { +#define rb_str_new_static_size(str) rb_str_new_static(str, sizeof(str) - 1) + + VALUE wrapped_code = rb_str_plus(rb_str_new_static_size("module "), module_name); + wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\n")); + wrapped_code = rb_str_plus(wrapped_code, module_data); + wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\nend")); + +#undef rb_str_new_static_size + + module_data = wrapped_code; + } + result = rb_eval_string_protect(StringValuePtr(module_data), &state); if (state != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby evaluation failed"); + log_write("metacall", LOG_LEVEL_ERROR, "Ruby evaluation failed %s", paths[0]); rb_loader_impl_print_exception(); goto load_error; } - /* Define module name */ - { - loader_path name; - size_t size = portability_path_get_name(paths[0], strnlen(paths[0], LOADER_PATH_SIZE), name, LOADER_PATH_SIZE); + /* Get the module reference */ + module = rb_const_get(rb_cObject, rb_intern_str(module_name)); - module_name = rb_str_new(name, size); + if (module == Qnil) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby invalid module generation: %s", paths[0]); + goto load_error; } - rb_module = rb_loader_impl_create_module(module_name, result, module_data, result); + rb_module = rb_loader_impl_create_module(module_name, module, module_data, result); if (rb_module == NULL) { @@ -1296,7 +1319,7 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path } } - // Do not load the handle in case there isn't modules + /* Do not load the handle in case there isn't modules */ if (vector_size(handle->modules) == 0) { log_write("metacall", LOG_LEVEL_ERROR, "No module could be loaded"); From 8f9843479797f5c63f5873d087ea8fe92a52a45a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 2 Jun 2025 19:00:52 +0200 Subject: [PATCH 198/364] Update version to v0.9.5. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 2bd77c74f1..03834411d1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.4 \ No newline at end of file +0.9.5 \ No newline at end of file From c3fc2bcc0e11f84365bc878793c2422884ba9c04 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 3 Jun 2025 22:48:58 +0200 Subject: [PATCH 199/364] Solve issues with sanitizers. --- source/ports/node_port/CMakeLists.txt | 14 +++++++++++++- source/ports/py_port/CMakeLists.txt | 4 +++- source/ports/rb_port/CMakeLists.txt | 14 -------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index abb6d38f19..02f0ef8a83 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -224,10 +224,22 @@ endif() set(node_port_test_exec "${node_port_test}_executable") +# MacOS 14 does not support well NodeJS executable with preloaded sanitizers +if(APPLE) + # Check if NodeJS is compiled with Address Sanitizer + if(OPTION_BUILD_ADDRESS_SANITIZER) + check_asan_executable("${NodeJS_EXECUTABLE}" NodeJS_ASAN) + if(NOT NodeJS_ASAN) + # Skip this test because it gives false positives if NodeJS is not compiled with ASan + return() + endif() + endif() +endif() + message(STATUS "Test ${node_port_test_exec}") add_test(NAME ${node_port_test_exec} - COMMAND ${NodeJS_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.js + COMMAND ${NodeJS_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test.js" ) # Define test labels diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index c41504c73f..5bf1d7d389 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -84,9 +84,11 @@ if(OPTION_BUILD_ADDRESS_SANITIZER) endif() endif() +message(STATUS "Test ${py_port_test_exec}") + # Add test (Python) add_test(NAME ${py_port_test_exec} - COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test.py + COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test.py" ) # diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index ae034bee7c..7a2ad6a768 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -68,20 +68,6 @@ endif() set(rb_port_test_executable "${rb_port_test}_executable") -# TODO -# if(OPTION_BUILD_ADDRESS_SANITIZER OR OPTION_BUILD_THREAD_SANITIZER) -# # TODO: This test fails when run with sanitizers: -# # -# # Sanitizer: -# # ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. -# # For solving the issue compile the test with sanitizers when enabled or preload asan -# # -# # Thread Sanitizer: -# # /usr/local/metacall/build/rb_port_test.rb:4:in `require_relative': /usr/lib/x86_64-linux-gnu/libtsan.so.2: cannot allocate memory in static TLS block - /usr/local/metacall/build/rb_portd.so (LoadError) -# # from /usr/local/metacall/build/rb_port_test.rb:4:in `
' -# return() -# endif() - message(STATUS "Test ${rb_port_test_executable}") add_test(NAME ${rb_port_test_executable} From 84bcd1c850ded5b21f6cca4d16bf3a09744b3092 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 3 Jun 2025 22:56:14 +0200 Subject: [PATCH 200/364] Make NPM work in macos. --- tools/metacall-environment.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/metacall-environment.sh b/tools/metacall-environment.sh index 7c2c03a9e6..577889af99 100755 --- a/tools/metacall-environment.sh +++ b/tools/metacall-environment.sh @@ -528,6 +528,9 @@ sub_nodejs(){ # Configure NPM path echo "-DNPM_ROOT=$NODE_PREFIX/bin" >> $CMAKE_CONFIG_PATH + # Make npm available for subsequent calls + export PATH="$NODE_PREFIX/bin:$PATH" + # Build either using pre-compiled binaries or building node from source if [ -z "${NodeJS_BUILD_FROM_SOURCE:-}" ]; then # Define node location From ee52a251494590474484311a7367afb6e7f61615 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 3 Jun 2025 23:32:33 +0200 Subject: [PATCH 201/364] Solve more issues on macos. --- source/ports/node_port/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 02f0ef8a83..cec5ba4f91 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -224,7 +224,8 @@ endif() set(node_port_test_exec "${node_port_test}_executable") -# MacOS 14 does not support well NodeJS executable with preloaded sanitizers +# TODO: Since MacOS 14 with ARM64, it does not support well NodeJS executable with preloaded sanitizers +# The NodeJS initalization fails with: Node Loader failed to hook napi_register_module_v1 if(APPLE) # Check if NodeJS is compiled with Address Sanitizer if(OPTION_BUILD_ADDRESS_SANITIZER) @@ -234,6 +235,15 @@ if(APPLE) return() endif() endif() + + # Check if NodeJS is compiled with Thread Sanitizer + if(OPTION_BUILD_THREAD_SANITIZER) + check_tsan_executable("${NodeJS_EXECUTABLE}" NodeJS_TSAN) + if(NOT NodeJS_TSAN) + # Skip this test because it gives false positives if NodeJS is not compiled with TSan + return() + endif() + endif() endif() message(STATUS "Test ${node_port_test_exec}") From f496108c8c13bffd1b44a98099e5e2ca58c20327 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 3 Jun 2025 23:53:55 +0200 Subject: [PATCH 202/364] Trying to solve issues with linux ubuntu builds. --- docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6ba78b1ccf..f74866582d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,7 @@ services: image: metacall/core:deps container_name: metacall_core_deps build: + network: "host" context: . dockerfile: tools/deps/Dockerfile args: @@ -46,6 +47,7 @@ services: image: metacall/core:dev container_name: metacall_core_dev build: + network: "host" context: . dockerfile: tools/dev/Dockerfile args: @@ -69,6 +71,7 @@ services: image: metacall/core:runtime container_name: metacall_core_runtime build: + network: "host" context: . dockerfile: tools/runtime/Dockerfile args: @@ -92,6 +95,7 @@ services: image: metacall/core:cli container_name: metacall_core_cli build: + network: "host" context: . dockerfile: tools/cli/Dockerfile environment: From 95b0cf76768310d73c3f62f2d92585380255a1bd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 00:32:27 +0200 Subject: [PATCH 203/364] Enable all windows versions again. --- .github/workflows/windows-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 32bab3ef1d..3b0d5dabc9 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019] # TODO: windows-2022, windows-2025 + os: [windows-2019, windows-2022, windows-2025] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, From a336cb4d4b451822b395b73cda11dd6e9ceeef53 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 00:47:53 +0200 Subject: [PATCH 204/364] Add release in order to test win. --- .github/workflows/windows-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 3b0d5dabc9..9846241313 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -32,7 +32,7 @@ jobs: # {build: debug, sanitizer: memory-sanitizer}, # TODO: https://github.com/metacall/core/issues/461 - # {build: release, sanitizer: without-sanitizer} + {build: release, sanitizer: without-sanitizer} ] steps: From 9a0b71d8f5fd2381f52f6e942be07c7133aae60d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 01:21:45 +0200 Subject: [PATCH 205/364] Solve issues with preprocessor on MSVC 2022. --- source/preprocessor/cmake/preprocessor_arguments_body.h.in | 2 +- source/preprocessor/cmake/preprocessor_for_body.h.in | 4 ++-- .../include/preprocessor/preprocessor_arguments.h | 2 +- source/preprocessor/include/preprocessor/preprocessor_for.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/preprocessor/cmake/preprocessor_arguments_body.h.in b/source/preprocessor/cmake/preprocessor_arguments_body.h.in index 86d6d511f1..ddb312ed6a 100644 --- a/source/preprocessor/cmake/preprocessor_arguments_body.h.in +++ b/source/preprocessor/cmake/preprocessor_arguments_body.h.in @@ -47,7 +47,7 @@ PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/cmake/preprocessor_for_body.h.in b/source/preprocessor/cmake/preprocessor_for_body.h.in index 57e9977b58..01212df133 100644 --- a/source/preprocessor/cmake/preprocessor_for_body.h.in +++ b/source/preprocessor/cmake/preprocessor_for_body.h.in @@ -18,7 +18,7 @@ expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_1(expr, __VA_ARGS__)) #endif @PREPROCESSOR_FOR_EACH_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -57,7 +57,7 @@ expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_1(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #endif @PREPROCESSOR_FOR_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_arguments.h b/source/preprocessor/include/preprocessor/preprocessor_arguments.h index c78bc4e06e..961c3e2a89 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_arguments.h +++ b/source/preprocessor/include/preprocessor/preprocessor_arguments.h @@ -104,7 +104,7 @@ extern "C" { PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index 89821d92d5..218305eb48 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -115,7 +115,7 @@ extern "C" { #define PREPROCESSOR_FOR_EACH_IMPL_63(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_62(expr, __VA_ARGS__)) #define PREPROCESSOR_FOR_EACH_IMPL_64(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_63(expr, __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -222,7 +222,7 @@ extern "C" { #define PREPROCESSOR_FOR_IMPL_63(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_62(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #define PREPROCESSOR_FOR_IMPL_64(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_63(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ From 7bab32c2c53290bd46e282882e8ac49dd68d7550 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 01:30:37 +0200 Subject: [PATCH 206/364] Remove release for now in windows. --- .github/workflows/windows-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 9846241313..3b0d5dabc9 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -32,7 +32,7 @@ jobs: # {build: debug, sanitizer: memory-sanitizer}, # TODO: https://github.com/metacall/core/issues/461 - {build: release, sanitizer: without-sanitizer} + # {build: release, sanitizer: without-sanitizer} ] steps: From 149b968fba856b3b4782c7f924be5a49d68123ae Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 01:30:57 +0200 Subject: [PATCH 207/364] Add error info. --- source/threading/include/threading/threading_atomic.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/threading/include/threading/threading_atomic.h b/source/threading/include/threading/threading_atomic.h index 994ac9757c..f5beb243cc 100644 --- a/source/threading/include/threading/threading_atomic.h +++ b/source/threading/include/threading/threading_atomic.h @@ -35,8 +35,9 @@ extern "C" { #if __STDC_VERSION__ - 0L >= 201112L /* C11 support */ #if defined(__STDC_NO_ATOMICS__) - /* TODO: C11 atomics not supported, check the platform and implement support if needed */ + /* TODO: Using C11 but atomics not supported, check the platform and implement support if needed */ #define THREADING_ATOMIC 0 + #error "Using C11 but atomics not supported, check the platform and implement support" #elif defined __has_include #if __has_include() #include @@ -49,6 +50,7 @@ extern "C" { #else /* TODO: C11 is not supported, check the platform and implement support if needed */ #define THREADING_ATOMIC 0 + #error "C11 is not supported, check the platform and implement support" #endif #elif defined(_WIN32) && defined(_MSC_VER) #if (_MSC_VER < 1930) From 1afb052cc1e004c371edfd3a17d6df98d0e6b01e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 4 Jun 2025 01:44:31 +0200 Subject: [PATCH 208/364] Solve issues with threading on windows. --- .../include/threading/threading_atomic.h | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/source/threading/include/threading/threading_atomic.h b/source/threading/include/threading/threading_atomic.h index f5beb243cc..26ba7c45b3 100644 --- a/source/threading/include/threading/threading_atomic.h +++ b/source/threading/include/threading/threading_atomic.h @@ -31,11 +31,19 @@ extern "C" { /* -- Definitions -- */ -#if defined(__STDC_VERSION__) - #if __STDC_VERSION__ - 0L >= 201112L +#if defined(_WIN32) && defined(_MSC_VER) + #if (_MSC_VER < 1930 || defined(__STDC_NO_ATOMICS__)) + /* Before Visual Studio 2022 atomics are not supported, use fallback solution */ + #include + #define THREADING_ATOMIC 1 + #else + #include + #define THREADING_ATOMIC 1 + #endif +#elif defined(__STDC_VERSION__) + #if (__STDC_VERSION__ - 0L) >= 201112L /* C11 support */ #if defined(__STDC_NO_ATOMICS__) - /* TODO: Using C11 but atomics not supported, check the platform and implement support if needed */ #define THREADING_ATOMIC 0 #error "Using C11 but atomics not supported, check the platform and implement support" #elif defined __has_include @@ -48,19 +56,9 @@ extern "C" { #define THREADING_ATOMIC 1 #endif #else - /* TODO: C11 is not supported, check the platform and implement support if needed */ #define THREADING_ATOMIC 0 #error "C11 is not supported, check the platform and implement support" #endif -#elif defined(_WIN32) && defined(_MSC_VER) - #if (_MSC_VER < 1930) - /* Before Visual Studio 2022 atomics are not supported, use fallback solution */ - #include - #define THREADING_ATOMIC 1 - #else - #include - #define THREADING_ATOMIC 1 - #endif #else /* TODO: Unknown compiler and platform, check the platform and compiler, then implement support if needed */ #define THREADING_ATOMIC 0 From b61de760926ebf051dab31e6790d965b3ec43fe1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 14:48:57 +0200 Subject: [PATCH 209/364] Trying to solve issues with preprocessor. --- .../preprocessor/cmake/preprocessor_for_body.h.in | 4 ++-- .../include/preprocessor/preprocessor_for.h | 4 ++-- .../preprocessor_test/source/preprocessor_test.cpp | 13 +++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/source/preprocessor/cmake/preprocessor_for_body.h.in b/source/preprocessor/cmake/preprocessor_for_body.h.in index 01212df133..2573bb7e7a 100644 --- a/source/preprocessor/cmake/preprocessor_for_body.h.in +++ b/source/preprocessor/cmake/preprocessor_for_body.h.in @@ -24,7 +24,7 @@ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_EACH_IMPL_GNUC_BODY@\ - PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) + PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__, ~)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) @@ -63,7 +63,7 @@ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_IMPL_GNUC_BODY@\ - PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) + PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__, ~)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index 218305eb48..d41947fc9b 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -127,7 +127,7 @@ extern "C" { PREPROCESSOR_FOR_EACH_IMPL_29, PREPROCESSOR_FOR_EACH_IMPL_28, PREPROCESSOR_FOR_EACH_IMPL_27, PREPROCESSOR_FOR_EACH_IMPL_26, PREPROCESSOR_FOR_EACH_IMPL_25, PREPROCESSOR_FOR_EACH_IMPL_24, PREPROCESSOR_FOR_EACH_IMPL_23, PREPROCESSOR_FOR_EACH_IMPL_22, PREPROCESSOR_FOR_EACH_IMPL_21, PREPROCESSOR_FOR_EACH_IMPL_20, \ PREPROCESSOR_FOR_EACH_IMPL_19, PREPROCESSOR_FOR_EACH_IMPL_18, PREPROCESSOR_FOR_EACH_IMPL_17, PREPROCESSOR_FOR_EACH_IMPL_16, PREPROCESSOR_FOR_EACH_IMPL_15, PREPROCESSOR_FOR_EACH_IMPL_14, PREPROCESSOR_FOR_EACH_IMPL_13, PREPROCESSOR_FOR_EACH_IMPL_12, PREPROCESSOR_FOR_EACH_IMPL_11, PREPROCESSOR_FOR_EACH_IMPL_10, \ PREPROCESSOR_FOR_EACH_IMPL_9, PREPROCESSOR_FOR_EACH_IMPL_8, PREPROCESSOR_FOR_EACH_IMPL_7, PREPROCESSOR_FOR_EACH_IMPL_6, PREPROCESSOR_FOR_EACH_IMPL_5, PREPROCESSOR_FOR_EACH_IMPL_4, PREPROCESSOR_FOR_EACH_IMPL_3, PREPROCESSOR_FOR_EACH_IMPL_2, PREPROCESSOR_FOR_EACH_IMPL_1, \ - PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) + PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__, ~)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) @@ -234,7 +234,7 @@ extern "C" { PREPROCESSOR_FOR_IMPL_29, PREPROCESSOR_FOR_IMPL_28, PREPROCESSOR_FOR_IMPL_27, PREPROCESSOR_FOR_IMPL_26, PREPROCESSOR_FOR_IMPL_25, PREPROCESSOR_FOR_IMPL_24, PREPROCESSOR_FOR_IMPL_23, PREPROCESSOR_FOR_IMPL_22, PREPROCESSOR_FOR_IMPL_21, PREPROCESSOR_FOR_IMPL_20, \ PREPROCESSOR_FOR_IMPL_19, PREPROCESSOR_FOR_IMPL_18, PREPROCESSOR_FOR_IMPL_17, PREPROCESSOR_FOR_IMPL_16, PREPROCESSOR_FOR_IMPL_15, PREPROCESSOR_FOR_IMPL_14, PREPROCESSOR_FOR_IMPL_13, PREPROCESSOR_FOR_IMPL_12, PREPROCESSOR_FOR_IMPL_11, PREPROCESSOR_FOR_IMPL_10, \ PREPROCESSOR_FOR_IMPL_9, PREPROCESSOR_FOR_IMPL_8, PREPROCESSOR_FOR_IMPL_7, PREPROCESSOR_FOR_IMPL_6, PREPROCESSOR_FOR_IMPL_5, PREPROCESSOR_FOR_IMPL_4, PREPROCESSOR_FOR_IMPL_3, PREPROCESSOR_FOR_IMPL_2, PREPROCESSOR_FOR_IMPL_1, \ - PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) + PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__, ~)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) diff --git a/source/tests/preprocessor_test/source/preprocessor_test.cpp b/source/tests/preprocessor_test/source/preprocessor_test.cpp index 80d4bad37a..75b6529b80 100644 --- a/source/tests/preprocessor_test/source/preprocessor_test.cpp +++ b/source/tests/preprocessor_test/source/preprocessor_test.cpp @@ -179,6 +179,19 @@ TEST_F(preprocessor_test, if) EXPECT_NE((int)0, PREPROCESSOR_IF(0, (int)0, (int)1)); } +TEST_F(preprocessor_test, if_va_args) +{ +#define PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C, ...) \ + PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), 1, 0) + + EXPECT_EQ((int)1, (int)PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C)); + EXPECT_EQ((int)0, (int)PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C, D)); + EXPECT_EQ((int)0, (int)PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C, D, E)); + EXPECT_EQ((int)0, (int)PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C, D, E, F)); + +#undef PREPROCESSOR_TEST_IF_VA_ARGS +} + TEST_F(preprocessor_test, serial) { #define PREPROCSSOR_TEST_SERIAL_TAG abc From 0b27ee2ad6ab6c4d1a7f54204fd12a91b44399c8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 15:56:13 +0300 Subject: [PATCH 210/364] Revert "Trying to solve issues with preprocessor." This reverts commit b61de760926ebf051dab31e6790d965b3ec43fe1. --- source/preprocessor/cmake/preprocessor_for_body.h.in | 4 ++-- source/preprocessor/include/preprocessor/preprocessor_for.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/preprocessor/cmake/preprocessor_for_body.h.in b/source/preprocessor/cmake/preprocessor_for_body.h.in index 2573bb7e7a..01212df133 100644 --- a/source/preprocessor/cmake/preprocessor_for_body.h.in +++ b/source/preprocessor/cmake/preprocessor_for_body.h.in @@ -24,7 +24,7 @@ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_EACH_IMPL_GNUC_BODY@\ - PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__, ~)) + PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) @@ -63,7 +63,7 @@ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_IMPL_GNUC_BODY@\ - PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__, ~)) + PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index d41947fc9b..218305eb48 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -127,7 +127,7 @@ extern "C" { PREPROCESSOR_FOR_EACH_IMPL_29, PREPROCESSOR_FOR_EACH_IMPL_28, PREPROCESSOR_FOR_EACH_IMPL_27, PREPROCESSOR_FOR_EACH_IMPL_26, PREPROCESSOR_FOR_EACH_IMPL_25, PREPROCESSOR_FOR_EACH_IMPL_24, PREPROCESSOR_FOR_EACH_IMPL_23, PREPROCESSOR_FOR_EACH_IMPL_22, PREPROCESSOR_FOR_EACH_IMPL_21, PREPROCESSOR_FOR_EACH_IMPL_20, \ PREPROCESSOR_FOR_EACH_IMPL_19, PREPROCESSOR_FOR_EACH_IMPL_18, PREPROCESSOR_FOR_EACH_IMPL_17, PREPROCESSOR_FOR_EACH_IMPL_16, PREPROCESSOR_FOR_EACH_IMPL_15, PREPROCESSOR_FOR_EACH_IMPL_14, PREPROCESSOR_FOR_EACH_IMPL_13, PREPROCESSOR_FOR_EACH_IMPL_12, PREPROCESSOR_FOR_EACH_IMPL_11, PREPROCESSOR_FOR_EACH_IMPL_10, \ PREPROCESSOR_FOR_EACH_IMPL_9, PREPROCESSOR_FOR_EACH_IMPL_8, PREPROCESSOR_FOR_EACH_IMPL_7, PREPROCESSOR_FOR_EACH_IMPL_6, PREPROCESSOR_FOR_EACH_IMPL_5, PREPROCESSOR_FOR_EACH_IMPL_4, PREPROCESSOR_FOR_EACH_IMPL_3, PREPROCESSOR_FOR_EACH_IMPL_2, PREPROCESSOR_FOR_EACH_IMPL_1, \ - PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__, ~)) + PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) @@ -234,7 +234,7 @@ extern "C" { PREPROCESSOR_FOR_IMPL_29, PREPROCESSOR_FOR_IMPL_28, PREPROCESSOR_FOR_IMPL_27, PREPROCESSOR_FOR_IMPL_26, PREPROCESSOR_FOR_IMPL_25, PREPROCESSOR_FOR_IMPL_24, PREPROCESSOR_FOR_IMPL_23, PREPROCESSOR_FOR_IMPL_22, PREPROCESSOR_FOR_IMPL_21, PREPROCESSOR_FOR_IMPL_20, \ PREPROCESSOR_FOR_IMPL_19, PREPROCESSOR_FOR_IMPL_18, PREPROCESSOR_FOR_IMPL_17, PREPROCESSOR_FOR_IMPL_16, PREPROCESSOR_FOR_IMPL_15, PREPROCESSOR_FOR_IMPL_14, PREPROCESSOR_FOR_IMPL_13, PREPROCESSOR_FOR_IMPL_12, PREPROCESSOR_FOR_IMPL_11, PREPROCESSOR_FOR_IMPL_10, \ PREPROCESSOR_FOR_IMPL_9, PREPROCESSOR_FOR_IMPL_8, PREPROCESSOR_FOR_IMPL_7, PREPROCESSOR_FOR_IMPL_6, PREPROCESSOR_FOR_IMPL_5, PREPROCESSOR_FOR_IMPL_4, PREPROCESSOR_FOR_IMPL_3, PREPROCESSOR_FOR_IMPL_2, PREPROCESSOR_FOR_IMPL_1, \ - PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__, ~)) + PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) #elif defined(_MSC_VER) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) From c4ba42eb7de8a039ab71a9754f99e9933522fdcd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 20:06:45 +0200 Subject: [PATCH 211/364] Trying to solve preprocessor issues. --- cmake/CompileOptions.cmake | 9 +++++++++ .../preprocessor/cmake/preprocessor_arguments_body.h.in | 2 +- source/preprocessor/cmake/preprocessor_for_body.h.in | 4 ++-- .../include/preprocessor/preprocessor_arguments.h | 2 +- .../preprocessor/include/preprocessor/preprocessor_for.h | 4 ++-- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index 1718b84d72..57e66a0acd 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -300,6 +300,15 @@ if(WIN32 AND MSVC) #add_compile_options(/wd4251 /wd4592) #add_compile_options(/ZH:SHA_256) # use SHA256 for generating hashes of compiler processed source files. + # TODO: Preprocessor library not working after MSVC 2019 because they have replaced the implementation + # It seems they wanted to make it work as C99 standard but still seems to be problematic. + # The bug comes from multiple macros from preprocessor library, for more information here is the whole information: + # https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170#rescanning-replacement-list-for-macros + # As a workaround, we disable the new preprocessor. + if(MSVC_VERSION GREATER_EQUAL 1930) + add_compile_options(/Zc:preprocessor-) + endif() + if(CMAKE_BUILD_TYPE STREQUAL "Debug") # Disable optimizations add_compile_options(/Od) diff --git a/source/preprocessor/cmake/preprocessor_arguments_body.h.in b/source/preprocessor/cmake/preprocessor_arguments_body.h.in index ddb312ed6a..86d6d511f1 100644 --- a/source/preprocessor/cmake/preprocessor_arguments_body.h.in +++ b/source/preprocessor/cmake/preprocessor_arguments_body.h.in @@ -47,7 +47,7 @@ PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/cmake/preprocessor_for_body.h.in b/source/preprocessor/cmake/preprocessor_for_body.h.in index 01212df133..57e9977b58 100644 --- a/source/preprocessor/cmake/preprocessor_for_body.h.in +++ b/source/preprocessor/cmake/preprocessor_for_body.h.in @@ -18,7 +18,7 @@ expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_1(expr, __VA_ARGS__)) #endif @PREPROCESSOR_FOR_EACH_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -57,7 +57,7 @@ expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_1(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #endif @PREPROCESSOR_FOR_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_arguments.h b/source/preprocessor/include/preprocessor/preprocessor_arguments.h index 961c3e2a89..c78bc4e06e 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_arguments.h +++ b/source/preprocessor/include/preprocessor/preprocessor_arguments.h @@ -104,7 +104,7 @@ extern "C" { PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index 218305eb48..89821d92d5 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -115,7 +115,7 @@ extern "C" { #define PREPROCESSOR_FOR_EACH_IMPL_63(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_62(expr, __VA_ARGS__)) #define PREPROCESSOR_FOR_EACH_IMPL_64(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_63(expr, __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -222,7 +222,7 @@ extern "C" { #define PREPROCESSOR_FOR_IMPL_63(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_62(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #define PREPROCESSOR_FOR_IMPL_64(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_63(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && _MSC_VER >= 1930) +#if defined(__GNUC__) || defined(__clang__) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ From e4e9ac2e191adf1560dac677c53fc64f7dae0fb7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 20:40:58 +0200 Subject: [PATCH 212/364] Trying to solve ruby issues. --- tools/metacall-environment.ps1 | 55 ++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 741a2810f9..055143a6fc 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -173,7 +173,50 @@ function Set-Java { function Set-Ruby { Write-Output "Install Ruby" - $RUBY_VERSION = "3.1.2" + + # Find vswhere in order to detect MSVC version + $vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + + if (Test-Path $vswherePath) { + $vsInfo = & $vswherePath -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -format json | ConvertFrom-Json + + if ($vsInfo) { + $installationPath = $vsInfo[0].installationPath + $installationVersion = $vsInfo[0].installationVersion + + # Determine major version + $majorVersion = [int]$installationVersion.Split('.')[0] + } + } + + switch ($majorVersion) { + 16 { + # MSVC 2019 + $RUBY_VERSION = "3.1.2" + $RUBY_MAJOR_VERSION = "3.1.0" + $RUBY_FOLDER = "Ruby31-ms" + $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby310" + } + 17 { + # MSVC 2022 + $RUBY_VERSION = "3.2.1" + $RUBY_MAJOR_VERSION = "3.2.0" + $RUBY_FOLDER = "Ruby32-ms" + $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby320" + } + 18 { + # TODO: For 2025 ruby-loco? + # MSVC 2025 + $RUBY_VERSION = "3.2.1" + $RUBY_MAJOR_VERSION = "3.2.0" + $RUBY_FOLDER = "Ruby32-ms" + $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby320" + } + default { + Write-Error "Unknown or unsupported Visual Studio version for Ruby: $majorVersion" + exit 1 + } + } Set-Location $ROOT_DIR $RuntimeDir = "$env:ProgramFiles\ruby" @@ -185,10 +228,10 @@ function Set-Ruby { (New-Object Net.WebClient).DownloadFile("https://github.com/metacall/ruby-mswin/releases/download/ruby-mswin-builds/Ruby-$RUBY_VERSION-ms.7z", "$DepsDir\ruby-mswin.7z") } - mkdir "$DepsDir\Ruby31-ms" + mkdir "$DepsDir\$RUBY_FOLDER" 7z x "$DepsDir\ruby-mswin.7z" -o"$DepsDir" - robocopy /move /e "$DepsDir\Ruby31-ms\" $RuntimeDir + robocopy /move /e "$DepsDir\$RUBY_FOLDER\" $RuntimeDir Add-to-Path "$RuntimeDir\bin" @@ -196,10 +239,10 @@ function Set-Ruby { $RubyDir = $RuntimeDir.Replace('\', '/') Write-Output "-DRuby_VERSION_STRING=""$RUBY_VERSION""" >> $EnvOpts - Write-Output "-DRuby_INCLUDE_DIR=""$RubyDir/include/ruby-3.1.0""" >> $EnvOpts + Write-Output "-DRuby_INCLUDE_DIR=""$RubyDir/include/ruby-$RUBY_MAJOR_VERSION""" >> $EnvOpts Write-Output "-DRuby_EXECUTABLE=""$RubyDir/bin/ruby.exe""" >> $EnvOpts - Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/x64-vcruntime140-ruby310.lib""" >> $EnvOpts - Write-Output "-DRuby_LIBRARY_NAME=""$RubyDir/bin/x64-vcruntime140-ruby310.dll""" >> $EnvOpts + Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/$RUBY_LIBRARY_NAME.lib""" >> $EnvOpts + Write-Output "-DRuby_LIBRARY_NAME=""$RubyDir/bin/$RUBY_LIBRARY_NAME.dll""" >> $EnvOpts } function Set-TypeScript { From b73fa21e5c01502e91d6316cbf542db50562bcfe Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 21:20:11 +0200 Subject: [PATCH 213/364] Add visual studio version. --- .github/workflows/windows-test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 3b0d5dabc9..2b1e160b67 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -17,12 +17,16 @@ concurrency: jobs: windows-test: name: Windows MSVC Test - runs-on: ${{ matrix.os }} + runs-on: windows-${{ matrix.os.year }} strategy: fail-fast: false matrix: - os: [windows-2019, windows-2022, windows-2025] + os: [ + {year: 2019, version: "16.11"}, + {year: 2022, version: "17.9"}, + {year: 2025, version: "18.1"}, + ] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, @@ -45,6 +49,7 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64 + vsversion: ${{ matrix.os.version }} - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" From 447caef610e1308b98a778ceacea0a52f3ba7b01 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 21:23:50 +0200 Subject: [PATCH 214/364] Improve version. --- .github/workflows/windows-test.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 2b1e160b67..a4cf56f5f8 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -17,16 +17,12 @@ concurrency: jobs: windows-test: name: Windows MSVC Test - runs-on: windows-${{ matrix.os.year }} + runs-on: windows-${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ - {year: 2019, version: "16.11"}, - {year: 2022, version: "17.9"}, - {year: 2025, version: "18.1"}, - ] + os: [2019, 2022, 2025] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, @@ -49,7 +45,7 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64 - vsversion: ${{ matrix.os.version }} + vsversion: "${{ matrix.os }}" - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" From 9e589a2e791ec4a06bf47a0a6bffd4f108dbe2bb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Mon, 9 Jun 2025 21:58:47 +0200 Subject: [PATCH 215/364] Use ruby-loco. --- .github/workflows/windows-test.yml | 2 +- tools/metacall-environment.ps1 | 58 ++++-------------------------- 2 files changed, 8 insertions(+), 52 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index a4cf56f5f8..818ffbe82c 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -45,7 +45,7 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64 - vsversion: "${{ matrix.os }}" + # vsversion: "${{ matrix.os }}" - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index 055143a6fc..d66aab7cfc 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -174,50 +174,6 @@ function Set-Java { function Set-Ruby { Write-Output "Install Ruby" - # Find vswhere in order to detect MSVC version - $vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - - if (Test-Path $vswherePath) { - $vsInfo = & $vswherePath -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -format json | ConvertFrom-Json - - if ($vsInfo) { - $installationPath = $vsInfo[0].installationPath - $installationVersion = $vsInfo[0].installationVersion - - # Determine major version - $majorVersion = [int]$installationVersion.Split('.')[0] - } - } - - switch ($majorVersion) { - 16 { - # MSVC 2019 - $RUBY_VERSION = "3.1.2" - $RUBY_MAJOR_VERSION = "3.1.0" - $RUBY_FOLDER = "Ruby31-ms" - $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby310" - } - 17 { - # MSVC 2022 - $RUBY_VERSION = "3.2.1" - $RUBY_MAJOR_VERSION = "3.2.0" - $RUBY_FOLDER = "Ruby32-ms" - $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby320" - } - 18 { - # TODO: For 2025 ruby-loco? - # MSVC 2025 - $RUBY_VERSION = "3.2.1" - $RUBY_MAJOR_VERSION = "3.2.0" - $RUBY_FOLDER = "Ruby32-ms" - $RUBY_LIBRARY_NAME = "x64-vcruntime140-ruby320" - } - default { - Write-Error "Unknown or unsupported Visual Studio version for Ruby: $majorVersion" - exit 1 - } - } - Set-Location $ROOT_DIR $RuntimeDir = "$env:ProgramFiles\ruby" $DepsDir = "$ROOT_DIR\dependencies" @@ -225,24 +181,24 @@ function Set-Ruby { if (!(Test-Path -Path "$DepsDir\ruby-mswin.7z")) { # Download installer Write-Output "Ruby not found downloading now..." - (New-Object Net.WebClient).DownloadFile("https://github.com/metacall/ruby-mswin/releases/download/ruby-mswin-builds/Ruby-$RUBY_VERSION-ms.7z", "$DepsDir\ruby-mswin.7z") + (New-Object Net.WebClient).DownloadFile("https://github.com/metacall/ruby-loco/releases/download/ruby-master/ruby-mswin.7z", "$DepsDir\ruby-mswin.7z") } - mkdir "$DepsDir\$RUBY_FOLDER" + mkdir "$DepsDir\ruby-mswin" 7z x "$DepsDir\ruby-mswin.7z" -o"$DepsDir" - robocopy /move /e "$DepsDir\$RUBY_FOLDER\" $RuntimeDir + robocopy /move /e "$DepsDir\ruby-mswin\" $RuntimeDir Add-to-Path "$RuntimeDir\bin" $EnvOpts = "$ROOT_DIR\build\CMakeConfig.txt" $RubyDir = $RuntimeDir.Replace('\', '/') - Write-Output "-DRuby_VERSION_STRING=""$RUBY_VERSION""" >> $EnvOpts - Write-Output "-DRuby_INCLUDE_DIR=""$RubyDir/include/ruby-$RUBY_MAJOR_VERSION""" >> $EnvOpts + Write-Output "-DRuby_VERSION_STRING=""3.5.0""" >> $EnvOpts + Write-Output "-DRuby_INCLUDE_DIR=""$RubyDir/include/ruby-3.5.0+0""" >> $EnvOpts Write-Output "-DRuby_EXECUTABLE=""$RubyDir/bin/ruby.exe""" >> $EnvOpts - Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/$RUBY_LIBRARY_NAME.lib""" >> $EnvOpts - Write-Output "-DRuby_LIBRARY_NAME=""$RubyDir/bin/$RUBY_LIBRARY_NAME.dll""" >> $EnvOpts + Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/x64-vcruntime140-ruby350.lib""" >> $EnvOpts + Write-Output "-DRuby_LIBRARY_NAME=""$RubyDir/bin/x64-vcruntime140-ruby350.dll""" >> $EnvOpts } function Set-TypeScript { From d30e82e8c4f1a4c59e106d62c5d8596010a4512d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 17:25:58 +0200 Subject: [PATCH 216/364] Add support for preprocessor in msvc 2022+. --- cmake/CompileOptions.cmake | 16 +++-------- .../cmake/preprocessor_arguments_body.h.in | 4 +-- .../cmake/preprocessor_for_body.h.in | 8 +++--- .../preprocessor/preprocessor_arguments.h | 4 +-- .../preprocessor/preprocessor_complement.h | 2 +- .../preprocessor/preprocessor_concatenation.h | 2 +- .../include/preprocessor/preprocessor_for.h | 8 +++--- .../include/preprocessor/preprocessor_if.h | 2 +- .../preprocessor/preprocessor_stringify.h | 6 ++--- .../source/preprocessor_test.cpp | 27 +++++++++++++++++++ 10 files changed, 49 insertions(+), 30 deletions(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index 57e66a0acd..f7126a3ba2 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -300,15 +300,6 @@ if(WIN32 AND MSVC) #add_compile_options(/wd4251 /wd4592) #add_compile_options(/ZH:SHA_256) # use SHA256 for generating hashes of compiler processed source files. - # TODO: Preprocessor library not working after MSVC 2019 because they have replaced the implementation - # It seems they wanted to make it work as C99 standard but still seems to be problematic. - # The bug comes from multiple macros from preprocessor library, for more information here is the whole information: - # https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170#rescanning-replacement-list-for-macros - # As a workaround, we disable the new preprocessor. - if(MSVC_VERSION GREATER_EQUAL 1930) - add_compile_options(/Zc:preprocessor-) - endif() - if(CMAKE_BUILD_TYPE STREQUAL "Debug") # Disable optimizations add_compile_options(/Od) @@ -328,14 +319,14 @@ if(WIN32 AND MSVC) add_compile_options(/Oy) # TODO: Disable runtime checks (not compatible with O2) - # foreach(FLAG_VAR + # foreach(COMPILER_FLAGS # CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE # CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO # CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE # CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO # ) - # string(REGEX REPLACE "/RTC[^ ]*" "" ${FLAG_VAR} "${${FLAG_VAR}}") - # endforeach(FLAG_VAR) + # string(REGEX REPLACE "/RTC[^ ]*" "" ${COMPILER_FLAGS} "${${COMPILER_FLAGS}}") + # endforeach(COMPILER_FLAGS) if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") # Enable debug symbols @@ -357,6 +348,7 @@ if(WIN32 AND MSVC) add_compile_options(/fsanitize=leak) add_link_options(/INCREMENTAL:NO) endif() + endif() if (PROJECT_OS_FAMILY MATCHES "unix" OR PROJECT_OS_FAMILY MATCHES "macos") diff --git a/source/preprocessor/cmake/preprocessor_arguments_body.h.in b/source/preprocessor/cmake/preprocessor_arguments_body.h.in index 86d6d511f1..bad23f8792 100644 --- a/source/preprocessor/cmake/preprocessor_arguments_body.h.in +++ b/source/preprocessor/cmake/preprocessor_arguments_body.h.in @@ -47,7 +47,7 @@ PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ @@ -70,7 +70,7 @@ # define PREPROCESSOR_ARGS_COMMA(...) \ PREPROCESSOR_ARGS_COUNT_IMPL(__VA_ARGS__, PREPROCESSOR_ARGS_COMMA_SEQ_IMPL()) # endif -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_ARGS_COUNT_PREFIX__PREPROCESSOR_ARGS_COUNT_POSTFIX @PREPROCESSOR_ARGS_COUNT_PREFIX_POSTFIX_BODY@0 # define PREPROCESSOR_ARGS_COUNT_IMPL(expr) PREPROCESSOR_ARGS_N_IMPL expr # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/cmake/preprocessor_for_body.h.in b/source/preprocessor/cmake/preprocessor_for_body.h.in index 57e9977b58..a175100f31 100644 --- a/source/preprocessor/cmake/preprocessor_for_body.h.in +++ b/source/preprocessor/cmake/preprocessor_for_body.h.in @@ -18,14 +18,14 @@ expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_1(expr, __VA_ARGS__)) #endif @PREPROCESSOR_FOR_EACH_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_EACH_IMPL_GNUC_BODY@\ PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) # define PREPROCESSOR_FOR_EACH_IMPL_EXPR(...) \ @@ -57,14 +57,14 @@ expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_1(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #endif @PREPROCESSOR_FOR_IMPL_BODY@ -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__, \ @PREPROCESSOR_FOR_IMPL_GNUC_BODY@\ PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) # define PREPROCESSOR_FOR_IMPL_EXPR(...) \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_arguments.h b/source/preprocessor/include/preprocessor/preprocessor_arguments.h index c78bc4e06e..b02fc1dbd0 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_arguments.h +++ b/source/preprocessor/include/preprocessor/preprocessor_arguments.h @@ -104,7 +104,7 @@ extern "C" { PREPROCESSOR_ARGS_COMMA(PREPROCESSOR_COMMA_VARIADIC __VA_ARGS__ ()) \ ) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_ARGS_COUNT_IMPL(...) \ PREPROCESSOR_ARGS_N_IMPL(__VA_ARGS__) # define PREPROCESSOR_ARGS_COUNT(...) \ @@ -190,7 +190,7 @@ extern "C" { # define PREPROCESSOR_ARGS_COMMA(...) \ PREPROCESSOR_ARGS_COUNT_IMPL(__VA_ARGS__, PREPROCESSOR_ARGS_COMMA_SEQ_IMPL()) # endif -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_ARGS_COUNT_PREFIX__PREPROCESSOR_ARGS_COUNT_POSTFIX ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0 # define PREPROCESSOR_ARGS_COUNT_IMPL(expr) PREPROCESSOR_ARGS_N_IMPL expr # define PREPROCESSOR_ARGS_COUNT(...) \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_complement.h b/source/preprocessor/include/preprocessor/preprocessor_complement.h index 78b6688bf2..0cd0b5f02e 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_complement.h +++ b/source/preprocessor/include/preprocessor/preprocessor_complement.h @@ -24,7 +24,7 @@ extern "C" { /* -- Macros -- */ -#if defined(_MSC_VER) && !defined(__clang__) +#if (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_COMPL_IMPL_EXPAND(expr) expr #define PREPROCESSOR_COMPL_IMPL(expr) PREPROCESSOR_COMPL_IMPL_EXPAND(PREPROCESSOR_COMPL_IMPL_##expr) #else diff --git a/source/preprocessor/include/preprocessor/preprocessor_concatenation.h b/source/preprocessor/include/preprocessor/preprocessor_concatenation.h index 4f63401fa6..e5d3c79581 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_concatenation.h +++ b/source/preprocessor/include/preprocessor/preprocessor_concatenation.h @@ -19,7 +19,7 @@ extern "C" { /* -- Macros -- */ -#if defined(_MSC_VER) && !defined(__clang__) +#if (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_CONCAT_IMPL_II(token, expr) expr #define PREPROCESSOR_CONCAT_IMPL_I(left, right) PREPROCESSOR_CONCAT_IMPL_II(~, left##right) #define PREPROCESSOR_CONCAT_IMPL(left, right) PREPROCESSOR_CONCAT_IMPL_I(left, right) diff --git a/source/preprocessor/include/preprocessor/preprocessor_for.h b/source/preprocessor/include/preprocessor/preprocessor_for.h index 89821d92d5..530dc8ee1f 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_for.h +++ b/source/preprocessor/include/preprocessor/preprocessor_for.h @@ -115,7 +115,7 @@ extern "C" { #define PREPROCESSOR_FOR_EACH_IMPL_63(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_62(expr, __VA_ARGS__)) #define PREPROCESSOR_FOR_EACH_IMPL_64(expr, element, ...) expr(element) PREPROCESSOR_FOR_EACH_EVAL(PREPROCESSOR_FOR_EACH_IMPL_63(expr, __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_FOR_EACH(expr, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -128,7 +128,7 @@ extern "C" { PREPROCESSOR_FOR_EACH_IMPL_19, PREPROCESSOR_FOR_EACH_IMPL_18, PREPROCESSOR_FOR_EACH_IMPL_17, PREPROCESSOR_FOR_EACH_IMPL_16, PREPROCESSOR_FOR_EACH_IMPL_15, PREPROCESSOR_FOR_EACH_IMPL_14, PREPROCESSOR_FOR_EACH_IMPL_13, PREPROCESSOR_FOR_EACH_IMPL_12, PREPROCESSOR_FOR_EACH_IMPL_11, PREPROCESSOR_FOR_EACH_IMPL_10, \ PREPROCESSOR_FOR_EACH_IMPL_9, PREPROCESSOR_FOR_EACH_IMPL_8, PREPROCESSOR_FOR_EACH_IMPL_7, PREPROCESSOR_FOR_EACH_IMPL_6, PREPROCESSOR_FOR_EACH_IMPL_5, PREPROCESSOR_FOR_EACH_IMPL_4, PREPROCESSOR_FOR_EACH_IMPL_3, PREPROCESSOR_FOR_EACH_IMPL_2, PREPROCESSOR_FOR_EACH_IMPL_1, \ PREPROCESSOR_FOR_EACH_IMPL_0)(expr, __VA_ARGS__)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_FOR_EACH_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_EACH_IMPL_, count) # define PREPROCESSOR_FOR_EACH_IMPL_EXPR(...) \ @@ -222,7 +222,7 @@ extern "C" { #define PREPROCESSOR_FOR_IMPL_63(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_62(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) #define PREPROCESSOR_FOR_IMPL_64(expr, context, iterator, element, ...) expr(context, iterator, element) PREPROCESSOR_FOR_EVAL(PREPROCESSOR_FOR_IMPL_63(expr, context, PREPROCESSOR_INCREMENT(iterator), __VA_ARGS__)) -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) || defined(__clang__) || (defined(_MSC_VER) && !(!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) # define PREPROCESSOR_FOR(expr, context, ...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ PREPROCESSOR_EMPTY_SYMBOL(), \ @@ -235,7 +235,7 @@ extern "C" { PREPROCESSOR_FOR_IMPL_19, PREPROCESSOR_FOR_IMPL_18, PREPROCESSOR_FOR_IMPL_17, PREPROCESSOR_FOR_IMPL_16, PREPROCESSOR_FOR_IMPL_15, PREPROCESSOR_FOR_IMPL_14, PREPROCESSOR_FOR_IMPL_13, PREPROCESSOR_FOR_IMPL_12, PREPROCESSOR_FOR_IMPL_11, PREPROCESSOR_FOR_IMPL_10, \ PREPROCESSOR_FOR_IMPL_9, PREPROCESSOR_FOR_IMPL_8, PREPROCESSOR_FOR_IMPL_7, PREPROCESSOR_FOR_IMPL_6, PREPROCESSOR_FOR_IMPL_5, PREPROCESSOR_FOR_IMPL_4, PREPROCESSOR_FOR_IMPL_3, PREPROCESSOR_FOR_IMPL_2, PREPROCESSOR_FOR_IMPL_1, \ PREPROCESSOR_FOR_IMPL_0)(expr, context, 0, __VA_ARGS__)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) # define PREPROCESSOR_FOR_IMPL_COUNT(count) \ PREPROCESSOR_CONCAT(PREPROCESSOR_FOR_IMPL_, count) # define PREPROCESSOR_FOR_IMPL_EXPR(...) \ diff --git a/source/preprocessor/include/preprocessor/preprocessor_if.h b/source/preprocessor/include/preprocessor/preprocessor_if.h index 9a491f60df..513df26cf1 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_if.h +++ b/source/preprocessor/include/preprocessor/preprocessor_if.h @@ -33,7 +33,7 @@ extern "C" { #define PREPROCESSOR_IIF_IMPL_1(true_expr, false_expr) true_expr #endif -#if defined(_MSC_VER) && !defined(__clang__) +#if (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_IIF_IMPL_I(expr) expr #define PREPROCESSOR_IIF_IMPL(value, true_expr, false_expr) PREPROCESSOR_IIF_IMPL_I(PREPROCESSOR_IIF_IMPL_##value(true_expr, false_expr)) #else diff --git a/source/preprocessor/include/preprocessor/preprocessor_stringify.h b/source/preprocessor/include/preprocessor/preprocessor_stringify.h index 4cb637c333..fb84478d93 100644 --- a/source/preprocessor/include/preprocessor/preprocessor_stringify.h +++ b/source/preprocessor/include/preprocessor/preprocessor_stringify.h @@ -27,7 +27,7 @@ extern "C" { #if defined(__MWERKS__) #define PREPROCESSOR_STRINGIFY_IMPL_I(tuple) PREPROCESSOR_STRINGIFY_IMPL##tuple #define PREPROCESSOR_STRINGIFY(expr) PREPROCESSOR_STRINGIFY_IMPL_I((expr)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_STRINGIFY_IMPL_I(tuple) PREPROCESSOR_STRINGIFY_IMPL tuple #define PREPROCESSOR_STRINGIFY(expr) PREPROCESSOR_STRINGIFY_IMPL_I((expr)) #else @@ -35,7 +35,7 @@ extern "C" { #endif /* Stringify a symbol or return empty string if the expression expands to nothing */ -#if defined(_MSC_VER) && !defined(__clang__) +#if (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL_II(...) #__VA_ARGS__ #define PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL(...) \ PREPROCESSOR_IF(PREPROCESSOR_ARGS_NOT_EMPTY(__VA_ARGS__), \ @@ -48,7 +48,7 @@ extern "C" { #if defined(__MWERKS__) #define PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL_I(tuple) PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL##tuple #define PREPROCESSOR_STRINGIFY_OR_EMPTY(expr) PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL_I((expr)) -#elif defined(_MSC_VER) && !defined(__clang__) +#elif (defined(_MSC_VER) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)) && !defined(__clang__) #define PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL_I(tuple) PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL tuple #define PREPROCESSOR_STRINGIFY_OR_EMPTY(expr) PREPROCESSOR_STRINGIFY_OR_EMPTY_IMPL_I((expr)) #else diff --git a/source/tests/preprocessor_test/source/preprocessor_test.cpp b/source/tests/preprocessor_test/source/preprocessor_test.cpp index 75b6529b80..4e406c3849 100644 --- a/source/tests/preprocessor_test/source/preprocessor_test.cpp +++ b/source/tests/preprocessor_test/source/preprocessor_test.cpp @@ -192,6 +192,33 @@ TEST_F(preprocessor_test, if_va_args) #undef PREPROCESSOR_TEST_IF_VA_ARGS } +TEST_F(preprocessor_test, if_va_args_ext) +{ +#define PREPROCESSOR_TEST_IF_VA_ARGS_PRINT(A, B, C) \ + do \ + { \ + printf("%d %d %d\n", A, B, C); \ + } while (0) + +#define PREPROCESSOR_TEST_IF_VA_ARGS_PRINT_VA(A, B, C, ...) \ + do \ + { \ + printf(A, B, C, __VA_ARGS__); \ + } while (0) + +#define PREPROCESSOR_TEST_IF_VA_ARGS(A, B, C, ...) \ + PREPROCESSOR_IF(PREPROCESSOR_ARGS_EMPTY(__VA_ARGS__), \ + PREPROCESSOR_TEST_IF_VA_ARGS_PRINT(A, B, C), \ + PREPROCESSOR_TEST_IF_VA_ARGS_PRINT_VA(A, B, C, __VA_ARGS__)) + + PREPROCESSOR_TEST_IF_VA_ARGS(1, 2, 3); + PREPROCESSOR_TEST_IF_VA_ARGS("%s %s %s\n", "B", "C", "D"); + PREPROCESSOR_TEST_IF_VA_ARGS("%s %s %s %s\n", "B", "C", "D", "E"); + PREPROCESSOR_TEST_IF_VA_ARGS("%s %s %s %s %s\n", "B", "C", "D", "E", "F"); + +#undef PREPROCESSOR_TEST_IF_VA_ARGS +} + TEST_F(preprocessor_test, serial) { #define PREPROCSSOR_TEST_SERIAL_TAG abc From 2f86d8da72f89e57110dd0b47ae6e2a6a226fda5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 17:26:41 +0200 Subject: [PATCH 217/364] Solve issues in msvc. --- source/cli/metacallcli/source/application.cpp | 13 +++++++--- .../source/plugin_extension.cpp | 2 +- source/loader/include/loader/loader_impl.h | 2 +- source/loader/source/loader.c | 2 +- source/loader/source/loader_impl.c | 6 ++--- .../source/rapid_json_serial_impl.cpp | 26 +++++++++---------- .../source/metacall_fork_test.cpp | 5 +--- 7 files changed, 29 insertions(+), 27 deletions(-) diff --git a/source/cli/metacallcli/source/application.cpp b/source/cli/metacallcli/source/application.cpp index 0f439da613..a8389d0034 100644 --- a/source/cli/metacallcli/source/application.cpp +++ b/source/cli/metacallcli/source/application.cpp @@ -134,14 +134,19 @@ bool application::cmd(std::vector &arguments) /* Initialize CMD descriptors */ std::string plugin_path(metacall_plugin_path()); - void *args[] = { + void *command_initialize_args[] = { metacall_value_create_string(plugin_path.c_str(), plugin_path.length()) }; - void *command_initialize_ret = metacallhv_s(plugin_cli_handle, "command_initialize", args, sizeof(args) / sizeof(args[0])); + void *command_initialize_ret = metacallhv_s(plugin_cli_handle, "command_initialize", command_initialize_args, sizeof(command_initialize_args) / sizeof(command_initialize_args[0])); check_for_exception(command_initialize_ret); + for (void *arg : command_initialize_args) + { + metacall_value_destroy(arg); + } + /* Convert all arguments into metacall value strings */ std::vector arguments_values; arguments_values.reserve(arguments.size()); @@ -179,11 +184,11 @@ bool application::cmd(std::vector &arguments) { void **command_pair = metacall_value_to_array(command_map[iterator]); - void *args[] = { + void *command_args[] = { command_pair[0] }; - void *command_func = metacallfv_s(command_function_func, args, sizeof(args) / sizeof(args[0])); + void *command_func = metacallfv_s(command_function_func, command_args, sizeof(command_args) / sizeof(command_args[0])); if (metacall_value_id(command_func) == METACALL_FUNCTION) { diff --git a/source/extensions/plugin_extension/source/plugin_extension.cpp b/source/extensions/plugin_extension/source/plugin_extension.cpp index f787bdfe3e..eac0a32c5b 100644 --- a/source/extensions/plugin_extension/source/plugin_extension.cpp +++ b/source/extensions/plugin_extension/source/plugin_extension.cpp @@ -40,7 +40,7 @@ namespace fs = std::experimental::filesystem; static void *extension_loader = NULL; -void *plugin_load_from_path(size_t argc, void *args[], void *data) +static void *plugin_load_from_path(size_t argc, void *args[], void *data) { /* TODO: Improve return values with throwable in the future */ (void)data; diff --git a/source/loader/include/loader/loader_impl.h b/source/loader/include/loader/loader_impl.h index 6f3691d8fb..0fb27961a1 100644 --- a/source/loader/include/loader/loader_impl.h +++ b/source/loader/include/loader/loader_impl.h @@ -45,7 +45,7 @@ LOADER_API loader_impl loader_impl_create(const loader_tag tag); LOADER_API loader_impl loader_impl_create_host(const loader_tag tag); -LOADER_API int loader_impl_dependencies(loader_impl impl, detour d); +LOADER_API int loader_impl_dependencies(loader_impl impl, detour d, const loader_tag tag); LOADER_API int loader_impl_link(plugin p, loader_impl impl); diff --git a/source/loader/source/loader.c b/source/loader/source/loader.c index 5a440a1e15..c01c2c1929 100644 --- a/source/loader/source/loader.c +++ b/source/loader/source/loader.c @@ -250,7 +250,7 @@ plugin loader_get_impl_plugin_options(const loader_tag tag, value options) loader_impl_set_options(impl, options); /* Dynamic link loader dependencies if it is not host */ - if (loader_impl_dependencies(impl, plugin_manager_impl_type(&loader_manager, loader_manager_impl)->d) != 0) + if (loader_impl_dependencies(impl, plugin_manager_impl_type(&loader_manager, loader_manager_impl)->d, tag) != 0) { goto plugin_manager_create_error; } diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 531199fd1c..58470eccf4 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -370,7 +370,7 @@ int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value * return 1; } -int loader_impl_dependencies(loader_impl impl, detour d) +int loader_impl_dependencies(loader_impl impl, detour d, const loader_tag tag) { /* Dependencies have the following format: { @@ -459,7 +459,7 @@ int loader_impl_dependencies(loader_impl impl, detour d) if (loader_impl_dependencies_load(impl, key_str, paths_array, paths_size) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader configuration '%s.json'", key_str, plugin_name(impl->p)); + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader '%s' configuration", key_str, tag); return 1; } } @@ -469,7 +469,7 @@ int loader_impl_dependencies(loader_impl impl, detour d) /* Otherwise try to find if the library is already loaded, and if not, load the process */ if (loader_impl_dependencies_self_find(impl, key_str, dependencies_self) != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader '%s' as a host", key_str, plugin_name(impl->p)); + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load dependency '%s' from loader '%s' as a host", key_str, tag); vector_destroy(dependencies_self); return 1; } diff --git a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp index e2e981d7f8..cd9341e0c1 100644 --- a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp +++ b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp @@ -135,7 +135,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = value_type_size(v); - rapidjson::SizeType length = size > 0 ? (rapidjson::SizeType)(size - 1) : 0; + rapidjson::SizeType length = size > 0 ? static_cast(size - 1) : 0; json_v->SetString(str, length); } @@ -229,7 +229,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = sizeof(str); - rapidjson::SizeType length = size > 0 ? (rapidjson::SizeType)(size - 1) : 0; + rapidjson::SizeType length = size > 0 ? static_cast(size - 1) : 0; json_v->SetString(str, length); } @@ -240,7 +240,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = sizeof(str); - rapidjson::SizeType length = size > 0 ? (rapidjson::SizeType)(size - 1) : 0; + rapidjson::SizeType length = size > 0 ? static_cast(size - 1) : 0; json_v->SetString(str, length); } @@ -251,7 +251,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = sizeof(str); - rapidjson::SizeType length = size > 0 ? (rapidjson::SizeType)(size - 1) : 0; + rapidjson::SizeType length = size > 0 ? static_cast(size - 1) : 0; json_v->SetString(str, length); } @@ -262,7 +262,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = sizeof(str); - rapidjson::SizeType length = size > 0 ? (rapidjson::SizeType)(size - 1) : 0; + rapidjson::SizeType length = size > 0 ? static_cast(size - 1) : 0; json_v->SetString(str, length); } @@ -275,28 +275,28 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) rapidjson::Value message_member, message_value; static const char message_str[] = "message"; - message_member.SetString(message_str, (rapidjson::SizeType)(sizeof(message_str) - 1)); - message_value.SetString(exception_message(ex), strlen(exception_message(ex))); + message_member.SetString(message_str, static_cast(sizeof(message_str) - 1)); + message_value.SetString(exception_message(ex), static_cast(strlen(exception_message(ex)))); json_map.AddMember(message_member, message_value, rapid_json_allocator); rapidjson::Value label_member, label_value; static const char label_str[] = "label"; - label_member.SetString(label_str, (rapidjson::SizeType)(sizeof(label_str) - 1)); - label_value.SetString(exception_label(ex), strlen(exception_label(ex))); + label_member.SetString(label_str, static_cast(sizeof(label_str) - 1)); + label_value.SetString(exception_label(ex), static_cast(strlen(exception_label(ex)))); json_map.AddMember(label_member, label_value, rapid_json_allocator); rapidjson::Value code_member, code_value; static const char code_str[] = "code"; - code_member.SetString(code_str, (rapidjson::SizeType)(sizeof(code_str) - 1)); + code_member.SetString(code_str, static_cast(sizeof(code_str) - 1)); code_value.SetInt64(exception_error_code(ex)); json_map.AddMember(code_member, code_value, rapid_json_allocator); rapidjson::Value stacktrace_member, stacktrace_value; static const char stacktrace_str[] = "stacktrace"; - stacktrace_member.SetString(stacktrace_str, (rapidjson::SizeType)(sizeof(stacktrace_str) - 1)); + stacktrace_member.SetString(stacktrace_str, static_cast(sizeof(stacktrace_str) - 1)); stacktrace_value.SetString(exception_stacktrace(ex), strlen(exception_stacktrace(ex))); json_map.AddMember(stacktrace_member, stacktrace_value, rapid_json_allocator); } @@ -310,7 +310,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) size_t size = sizeof(str); - rapidjson::SizeType length = (rapidjson::SizeType)(size - 1); + rapidjson::SizeType length = static_cast(size - 1); rapidjson::Value json_member, json_inner_value; @@ -328,7 +328,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) std::string s = ostream.str(); - json_v->SetString(s.c_str(), (rapidjson::SizeType)s.length()); + json_v->SetString(s.c_str(), static_cast(s.length())); } else if (id == TYPE_NULL) { diff --git a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp index 0f34b6bd77..ab784ff942 100644 --- a/source/tests/metacall_fork_test/source/metacall_fork_test.cpp +++ b/source/tests/metacall_fork_test/source/metacall_fork_test.cpp @@ -102,10 +102,7 @@ pid_t fork() if (result == RTL_CLONE_PARENT) { - HANDLE me = GetCurrentProcess(); - pid_t child_pid; - - child_pid = GetProcessId(process_info.Process); + pid_t child_pid = GetProcessId(process_info.Process); ResumeThread(process_info.Thread); CloseHandle(process_info.Process); From 3bc6c1b30acaa6df0fdbeebfa397fe297ca0af84 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 17:27:07 +0200 Subject: [PATCH 218/364] Solve issues on workflows, enable windows versions on benchmarks. --- .github/workflows/benchmark.yml | 2 +- .github/workflows/windows-test.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 928da375a4..1b75d77f35 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -99,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019] + os: [windows-2019, windows-2022, windows-2025] env: LTTNG_UST_REGISTER_TIMEOUT: 0 diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 818ffbe82c..962bd34e2b 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -45,7 +45,6 @@ jobs: uses: ilammy/msvc-dev-cmd@v1 with: arch: amd64 - # vsversion: "${{ matrix.os }}" - name: Set up the environment run: cmd.exe /c "powershell .\tools\metacall-environment.ps1 $Env:METACALL_INSTALL_OPTIONS" From 0a6122cb0218b2feac9eff8b48631c53eec0b197 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 17:57:23 +0200 Subject: [PATCH 219/364] Solve issue on cast. --- .../serials/rapid_json_serial/source/rapid_json_serial_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp index cd9341e0c1..f46cb09b1b 100644 --- a/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp +++ b/source/serials/rapid_json_serial/source/rapid_json_serial_impl.cpp @@ -297,7 +297,7 @@ void rapid_json_serial_impl_serialize_value(value v, rapidjson::Value *json_v) static const char stacktrace_str[] = "stacktrace"; stacktrace_member.SetString(stacktrace_str, static_cast(sizeof(stacktrace_str) - 1)); - stacktrace_value.SetString(exception_stacktrace(ex), strlen(exception_stacktrace(ex))); + stacktrace_value.SetString(exception_stacktrace(ex), static_cast(strlen(exception_stacktrace(ex)))); json_map.AddMember(stacktrace_member, stacktrace_value, rapid_json_allocator); } else if (id == TYPE_THROWABLE) From 6fb8de0c4544bae0a7bc5ff03bd6b78fbe9c33b2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 17:57:42 +0200 Subject: [PATCH 220/364] Solve issues with gtest on sanitizers. --- cmake/InstallGTest.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/InstallGTest.cmake b/cmake/InstallGTest.cmake index fa555b16bf..45fdf569c9 100644 --- a/cmake/InstallGTest.cmake +++ b/cmake/InstallGTest.cmake @@ -35,6 +35,18 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) set(GTEST_DISABLE_PTHREADS OFF) endif() + if(MSVC AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) + if(OPTION_BUILD_THREAD_SANITIZER) + set(SANITIZER_FLAGS -DCMAKE_CXX_FLAGS=/fsanitize=thread -DCMAKE_C_FLAGS=/fsanitize=thread) + endif() + if(OPTION_BUILD_ADDRESS_SANITIZER) + set(SANITIZER_FLAGS -DCMAKE_CXX_FLAGS=/fsanitize=address -DCMAKE_C_FLAGS=/fsanitize=address) + endif() + if(OPTION_BUILD_MEMORY_SANITIZER) + set(SANITIZER_FLAGS -DCMAKE_CXX_FLAGS="/fsanitize=memory /fsanitize=leak" -DCMAKE_C_FLAGS="/fsanitize=memory /fsanitize=leak") + endif() + endif() + # Import Google Test Framework ExternalProject_Add(google-test-depends GIT_REPOSITORY https://github.com/google/googletest.git @@ -48,6 +60,7 @@ if(NOT GTEST_FOUND OR USE_BUNDLED_GTEST) -DINSTALL_GTEST=OFF -DBUILD_GMOCK=ON -Dgmock_build_tests=OFF + ${SANITIZER_FLAGS} PREFIX "${CMAKE_CURRENT_BINARY_DIR}" UPDATE_COMMAND "" INSTALL_COMMAND "" From 79e590495e95087a6c634a675e98d71aa6fc7325 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 18:06:22 +0200 Subject: [PATCH 221/364] Add support for newer windows versions. --- .github/workflows/benchmark.yml | 2 +- .github/workflows/windows-test.yml | 2 +- cmake/FindNodeJS.cmake | 4 +++- docs/README.md | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 1b75d77f35..06b428b841 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -99,7 +99,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2019, windows-2022, windows-2025] + os: [windows-2022, windows-2025] env: LTTNG_UST_REGISTER_TIMEOUT: 0 diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 962bd34e2b..1e2a0a8cac 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [2019, 2022, 2025] + os: [2022, 2025] options: [ {build: debug, sanitizer: without-sanitizer}, {build: debug, sanitizer: address-sanitizer}, diff --git a/cmake/FindNodeJS.cmake b/cmake/FindNodeJS.cmake index 1bec27069e..d9e5e66518 100644 --- a/cmake/FindNodeJS.cmake +++ b/cmake/FindNodeJS.cmake @@ -453,7 +453,9 @@ if(NOT NodeJS_LIBRARY) endif() # Check for Visual Studio Version and configure the build command - if(MSVC_VERSION GREATER 1916) + if(MSVC_VERSION GREATER_EQUAL 1930) + set(NodeJS_MSVC_VER vs2022) + if(MSVC_VERSION GREATER_EQUAL 1920) set(NodeJS_MSVC_VER vs2019) elseif(MSVC_VERSION GREATER 1900) set(NodeJS_MSVC_VER vs2017) diff --git a/docs/README.md b/docs/README.md index c93a231880..55c101c5cd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -862,7 +862,8 @@ Where `script.js` is a script contained in host folder `$HOME/metacall` that wil | :-----------------: | :--------------------------------------------------: | | **`ubuntu-latest`** | https://metacall.github.io/core/bench/ubuntu-latest/ | | **`macos-latest`** | https://metacall.github.io/core/bench/macos-latest/ | -| **`windows-2019`** | https://metacall.github.io/core/bench/windows-2019/ | +| **`windows-2022`** | https://metacall.github.io/core/bench/windows-2022/ | +| **`windows-2025`** | https://metacall.github.io/core/bench/windows-2025/ | ## 9. License From e11c4450b6dab056c29b7a02a444fcb523c05c92 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 18:29:17 +0200 Subject: [PATCH 222/364] Solve issue with nodejs. --- cmake/FindNodeJS.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindNodeJS.cmake b/cmake/FindNodeJS.cmake index d9e5e66518..6cea42bf48 100644 --- a/cmake/FindNodeJS.cmake +++ b/cmake/FindNodeJS.cmake @@ -455,7 +455,7 @@ if(NOT NodeJS_LIBRARY) # Check for Visual Studio Version and configure the build command if(MSVC_VERSION GREATER_EQUAL 1930) set(NodeJS_MSVC_VER vs2022) - if(MSVC_VERSION GREATER_EQUAL 1920) + elseif(MSVC_VERSION GREATER_EQUAL 1920) set(NodeJS_MSVC_VER vs2019) elseif(MSVC_VERSION GREATER 1900) set(NodeJS_MSVC_VER vs2017) From 4432914b4816eb10118c1c9b09726b9fad1c80a6 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 22:04:57 +0200 Subject: [PATCH 223/364] Add search paths for dependencies. --- source/loader/source/loader_impl.c | 41 +++++++++++++++++++++++++ source/loaders/CMakeLists.txt | 16 ++++++++++ source/loaders/loader.json.in | 1 + source/loaders/rb_loader/CMakeLists.txt | 21 +++++++++++++ tools/metacall-environment.ps1 | 1 + 5 files changed, 80 insertions(+) diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 58470eccf4..c66b2bfd4f 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -113,6 +113,10 @@ static int loader_impl_dependencies_self_find(loader_impl impl, const char *key_ static int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value *paths_array, size_t paths_size); +#if defined(WIN32) || defined(_WIN32) +static void loader_impl_dependencies_search_paths(loader_impl impl, const loader_tag tag); +#endif + static configuration loader_impl_initialize_configuration(const loader_tag tag); static int loader_impl_initialize_registered(plugin_manager manager, plugin p); @@ -370,6 +374,39 @@ int loader_impl_dependencies_load(loader_impl impl, const char *key_str, value * return 1; } +#if defined(WIN32) || defined(_WIN32) +void loader_impl_dependencies_search_paths(loader_impl impl, const loader_tag tag) +{ + /* Search paths have the following format and are only implemented for Windows: + { + "search_paths": ["C:\Program Files\ruby\bin\ruby_builtin_dlls"] + } + */ + value search_paths_value = configuration_value_type(impl->config, "search_paths", TYPE_ARRAY); + + /* Check if the loader has search paths and initialize them */ + if (search_paths_value != NULL) + { + size_t size = value_type_count(search_paths_value); + value *search_paths_array = value_to_array(search_paths_value); + size_t iterator; + + for (iterator = 0; iterator < size; ++iterator) + { + if (value_type_id(search_paths_array[iterator]) == TYPE_STRING) + { + const char *key_str = value_to_string(search_paths_array[iterator]); + + if (SetDllDirectoryA(key_str) == FALSE) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to register the DLL directory %s in loader '%s'; dependencies with other dependant DLLs may fail to load", key_str, tag); + } + } + } + } +} +#endif + int loader_impl_dependencies(loader_impl impl, detour d, const loader_tag tag) { /* Dependencies have the following format: @@ -412,6 +449,10 @@ int loader_impl_dependencies(loader_impl impl, detour d, const loader_tag tag) /* Initialize the loader detour */ impl->d = d; +#if defined(WIN32) || defined(_WIN32) + loader_impl_dependencies_search_paths(impl, tag); +#endif + /* Check if the loader has dependencies and load them */ if (dependencies_value != NULL) { diff --git a/source/loaders/CMakeLists.txt b/source/loaders/CMakeLists.txt index edcb03e08f..374d6e4a5d 100644 --- a/source/loaders/CMakeLists.txt +++ b/source/loaders/CMakeLists.txt @@ -87,6 +87,22 @@ macro(loader_configuration_begin TARGET) set(LOADER_CONFIGURATION_TARGET "${TARGET}") endmacro() +# Generate configuration with search paths for a loader +# +# "search_paths": [ "C:/Program Files/ruby/bin/ruby_builtin_dlls" ], +# +macro(loader_configuration_paths LIBRARY_PATHS_LIST) + if(NOT "${LIBRARY_PATHS_LIST}" STREQUAL "") + # Normalize the paths + string(REPLACE "\\" "/" LIBRARY_PATHS "${LIBRARY_PATHS_LIST}") + + # Convert to JSON + string(REPLACE ";" "\", \"" LOADER_SEARCH_PATHS "\"${LIBRARY_PATHS}\"") + else() + set(LOADER_SEARCH_PATHS) + endif() +endmacro() + # Generate configuration with dependencies for a loader # # node_loader: diff --git a/source/loaders/loader.json.in b/source/loaders/loader.json.in index dfb183afd3..713a30bbdd 100644 --- a/source/loaders/loader.json.in +++ b/source/loaders/loader.json.in @@ -1,4 +1,5 @@ { + "search_paths": [ @LOADER_SEARCH_PATHS@ ], "dependencies": { @LOADER_DEPENDENCIES@ } diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index d3dd5545f3..bf3a336fa3 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -238,16 +238,37 @@ else() set(Ruby_LIBRARY_INSTALL "${Ruby_LIBRARY_NAME_PATH}") endif() +# Define search paths +set(Ruby_LIBRARY_SEARCH_PATHS_DEVELOPMENT "${Ruby_LIBRARY_SEARCH_PATHS}") + +if(Ruby_LIBRARY_SEARCH_PATHS AND WIN32) + set(Ruby_LIBRARY_SEARCH_PATHS_INSTALL "") + + foreach(SEARCH_PATH IN LISTS Ruby_LIBRARY_SEARCH_PATHS) + install(DIRECTORY + "${SEARCH_PATH}" + DESTINATION ${INSTALL_LIB} + COMPONENT runtime + ) + + get_filename_component(SEARCH_PATH_FOLDER_NAME "${SEARCH_PATH}" NAME) + + list(APPEND Ruby_LIBRARY_SEARCH_PATHS_INSTALL "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB}/${SEARCH_PATH_FOLDER_NAME}") + endforeach() +endif() + # # Configuration # # Development loader_configuration_begin(rb_loader) +loader_configuration_paths("${Ruby_LIBRARY_SEARCH_PATHS_DEVELOPMENT}") loader_configuration_deps(ruby "${Ruby_LIBRARY_DEVELOPMENT}") loader_configuartion_end_development() # Install loader_configuration_begin(rb_loader) +loader_configuration_paths("${Ruby_LIBRARY_SEARCH_PATHS_INSTALL}") loader_configuration_deps(ruby "${Ruby_LIBRARY_INSTALL}") loader_configuartion_end_install() diff --git a/tools/metacall-environment.ps1 b/tools/metacall-environment.ps1 index d66aab7cfc..486edf7713 100755 --- a/tools/metacall-environment.ps1 +++ b/tools/metacall-environment.ps1 @@ -199,6 +199,7 @@ function Set-Ruby { Write-Output "-DRuby_EXECUTABLE=""$RubyDir/bin/ruby.exe""" >> $EnvOpts Write-Output "-DRuby_LIBRARY=""$RubyDir/lib/x64-vcruntime140-ruby350.lib""" >> $EnvOpts Write-Output "-DRuby_LIBRARY_NAME=""$RubyDir/bin/x64-vcruntime140-ruby350.dll""" >> $EnvOpts + Write-Output "-DRuby_LIBRARY_SEARCH_PATHS=""$RubyDir/bin/ruby_builtin_dlls""" >> $EnvOpts } function Set-TypeScript { From b4af2abb0b258fc08957196b3326da7e766ece45 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 10 Jun 2025 22:38:31 +0200 Subject: [PATCH 224/364] Solve issues with ruby. --- source/loaders/rb_loader/CMakeLists.txt | 9 +-------- source/loaders/rb_loader/source/rb_loader_impl.c | 13 +++++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/source/loaders/rb_loader/CMakeLists.txt b/source/loaders/rb_loader/CMakeLists.txt index bf3a336fa3..3e6d2cbdb7 100644 --- a/source/loaders/rb_loader/CMakeLists.txt +++ b/source/loaders/rb_loader/CMakeLists.txt @@ -20,15 +20,8 @@ if(Ruby_LIBRARY_NAME) else() set(Ruby_LIBRARY_NAME_PATH "${Ruby_LIBRARY}") endif() -get_filename_component(Ruby_LIBRARY_NAME "${Ruby_LIBRARY_NAME_PATH}" NAME) -# Copy Ruby DLL into project output directory -# TODO: https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies -# TODO: https://gist.github.com/micahsnyder/5d98ac8548b429309ec5a35bca9366da -if(Ruby_LIBRARY_NAME_PATH AND WIN32) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}) - file(COPY "${Ruby_LIBRARY_NAME_PATH}" DESTINATION ${PROJECT_OUTPUT_DIR}) -endif() +get_filename_component(Ruby_LIBRARY_NAME "${Ruby_LIBRARY_NAME_PATH}" NAME) # # Plugin name and options diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 388e3b2e90..d35208391d 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -1506,7 +1506,7 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_ for (method_index = 0; method_index < methods_size; ++method_index) { VALUE rb_method = rb_ary_entry(methods, method_index); - VALUE name = rb_funcallv(rb_method, rb_intern("id2name"), 0, NULL); + VALUE name = rb_sym2str(rb_method); const char *method_name_str = RSTRING_PTR(name); VALUE instance_method = rb_funcall(cls, rb_intern(method_type_str), 1, rb_method); @@ -1551,7 +1551,7 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_ if (RARRAY_LEN(parameter_pair) == 2) { VALUE parameter_name_id = rb_ary_entry(parameter_pair, 1); - VALUE parameter_name = rb_funcallv(parameter_name_id, rb_intern("id2name"), 0, NULL); + VALUE parameter_name = rb_sym2str(parameter_name_id); const char *parameter_name_str = RSTRING_PTR(parameter_name); signature_set(s, args_it, parameter_name_str, NULL); @@ -1572,7 +1572,7 @@ void rb_loader_impl_discover_attributes(klass c, const char *class_name_str, VAL for (attributes_index = 0; attributes_index < attributes_size; ++attributes_index) { VALUE rb_attr = rb_ary_entry(attributes, attributes_index); - VALUE name = rb_funcallv(rb_attr, rb_intern("id2name"), 0, NULL); + VALUE name = rb_sym2str(rb_attr); const char *attr_name_str = RSTRING_PTR(name); log_write("metacall", LOG_LEVEL_DEBUG, "Attribute '%s' inside '%s'", attr_name_str, class_name_str); @@ -1606,12 +1606,9 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo if (method != Qnil) { - VALUE method_name = rb_funcallv(method, rb_intern("id2name"), 0, NULL); - + VALUE method_name = rb_sym2str(method); const char *method_name_str = RSTRING_PTR(method_name); - rb_function_parser function_parser = set_get(rb_module->function_map, (set_key)method_name_str); - loader_impl_rb_function rb_function = NULL; if (function_parser == NULL) @@ -1666,7 +1663,7 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo { if (RB_TYPE_P(constant, T_SYMBOL)) { - VALUE class_name = rb_funcallv(constant, rb_intern("id2name"), 0, NULL); + VALUE class_name = rb_sym2str(constant); const char *class_name_str = RSTRING_PTR(class_name); VALUE cls = rb_const_get_from(rb_module->module, rb_intern(class_name_str)); loader_impl_rb_class rb_cls = malloc(sizeof(struct loader_impl_rb_class_type)); From 96df3a30bc7be5568aa7788060ed11d8030a94c7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 11 Jun 2025 18:13:37 +0200 Subject: [PATCH 225/364] Remove dead code and enable release on windows. --- .github/workflows/windows-test.yml | 2 +- source/loaders/py_loader/source/py_loader_dict.c | 1 + source/loaders/py_loader/source/py_loader_impl.c | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 1e2a0a8cac..7f48671237 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -32,7 +32,7 @@ jobs: # {build: debug, sanitizer: memory-sanitizer}, # TODO: https://github.com/metacall/core/issues/461 - # {build: release, sanitizer: without-sanitizer} + {build: release, sanitizer: without-sanitizer} ] steps: diff --git a/source/loaders/py_loader/source/py_loader_dict.c b/source/loaders/py_loader/source/py_loader_dict.c index f785081417..abfed7a0ab 100644 --- a/source/loaders/py_loader/source/py_loader_dict.c +++ b/source/loaders/py_loader/source/py_loader_dict.c @@ -43,6 +43,7 @@ #define Py_BUILD_CORE #endif #include + #undef Py_BUILD_CORE /* Disable warnings from Python */ #if defined(__clang__) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 4cc86e8a47..5fb872ddaa 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2396,7 +2396,6 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) "import asyncio\n" "import threading\n" "import sys\n" - // "import atexit; atexit.register(getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None))\n" "class ThreadLoop:\n" " def __init__(self, loop, t):\n" " self.loop = loop\n" @@ -2433,9 +2432,7 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) " tl.t.join()\n" "def atexit_background_loop(tl):\n" /* Checks if py_port_impl_module contains py_loader_port_atexit and executes it */ - // " py_loader_port_atexit = getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)\n" " getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)()\n" - // " tl.loop.call_soon_threadsafe(stop_background_loop, tl, False)\n" "def register_atexit_background_loop(tl):\n" " threading._register_atexit(atexit_background_loop, tl)\n"; From 2bed0f916a566557fb7f8c05ddddd7c737845ff5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 11 Jun 2025 19:57:02 +0200 Subject: [PATCH 226/364] Improve install method of py port. --- source/ports/py_port/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index 5bf1d7d389..91279d3e71 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -26,7 +26,7 @@ if(NOT OPTION_BUILD_GUIX) set(PIP_BACKWARD_COMPATIBILITY "${CMAKE_COMMAND} -E env SETUPTOOLS_USE_DISTUTILS=stdlib") endif() - install(CODE "execute_process(COMMAND ${PIP_BACKWARD_COMPATIBILITY} pip3 install ${PIP_BREAK_SYSTEM_PACKAGES} ${CMAKE_CURRENT_SOURCE_DIR})") + install(CODE "execute_process(COMMAND ${PIP_BACKWARD_COMPATIBILITY} ${Python3_EXECUTABLE} -m pip install ${PIP_BREAK_SYSTEM_PACKAGES} ${CMAKE_CURRENT_SOURCE_DIR})") endif() # Check if loaders are enabled From a639f918a09ebba5163b8b7192e480fb1130a65b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 11 Jun 2025 20:22:56 +0200 Subject: [PATCH 227/364] Add install step to ci. --- .github/workflows/macos-test.yml | 2 +- .github/workflows/windows-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 26247e35b1..d6ba0dc3b5 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -93,7 +93,7 @@ jobs: . .env bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS env: - METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests + METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests install macos-distributable: name: MacOS Distributable Dispatch diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 7f48671237..93508418be 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -64,7 +64,7 @@ jobs: working-directory: ./build run: cmd.exe /c "powershell ..\tools\metacall-build.ps1 $Env:METACALL_BUILD_OPTIONS" env: - METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests + METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests install windows-distributable: name: Windows Distributable Dispatch From 4dcf6e6c8b1b54c010b59e4235e6f52a3078cccb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 11 Jun 2025 20:58:20 +0200 Subject: [PATCH 228/364] Remove release in windows, python still failing. --- .github/workflows/windows-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-test.yml b/.github/workflows/windows-test.yml index 93508418be..3518e6d4db 100644 --- a/.github/workflows/windows-test.yml +++ b/.github/workflows/windows-test.yml @@ -32,7 +32,7 @@ jobs: # {build: debug, sanitizer: memory-sanitizer}, # TODO: https://github.com/metacall/core/issues/461 - {build: release, sanitizer: without-sanitizer} + # {build: release, sanitizer: without-sanitizer} ] steps: From 74345507a07f7547526607d603c60244456d3ba4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 11 Jun 2025 20:59:01 +0200 Subject: [PATCH 229/364] Update version to v0.9.6. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 03834411d1..9cf038687f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.5 \ No newline at end of file +0.9.6 \ No newline at end of file From 20891089161e09ad659c4f0c1667e496e2726b98 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 01:02:47 +0200 Subject: [PATCH 230/364] Solve issue in node port. --- source/ports/node_port/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/ports/node_port/index.js b/source/ports/node_port/index.js index 0df0a75904..23ff5d6830 100644 --- a/source/ports/node_port/index.js +++ b/source/ports/node_port/index.js @@ -38,7 +38,13 @@ const findFilesRecursively = (directory, filePattern, depthLimit = Infinity) => continue; } - const items = fs.readdirSync(dir); + const items = (() => { + try { + return fs.readdirSync(dir); + } catch (e) { + return []; + } + })(); for (const item of items) { const fullPath = path.join(dir, item); From 517bd24f6cd58640f3eac7623fae5df213c1bb97 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 01:03:46 +0200 Subject: [PATCH 231/364] Update version to v0.9.7. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 9cf038687f..bae256fd5b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.6 \ No newline at end of file +0.9.7 \ No newline at end of file From 83011ae50aea469d5bd2169ff8c05e50ef25e382 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 01:55:49 +0200 Subject: [PATCH 232/364] Update backwardcpp. --- source/plugins/backtrace_plugin/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/plugins/backtrace_plugin/CMakeLists.txt b/source/plugins/backtrace_plugin/CMakeLists.txt index acaf00022d..089fa8539b 100644 --- a/source/plugins/backtrace_plugin/CMakeLists.txt +++ b/source/plugins/backtrace_plugin/CMakeLists.txt @@ -7,12 +7,12 @@ endif() # External dependencies # -if(NOT OPTION_BUILD_GUIX) +if(NOT (OPTION_BUILD_GUIX OR BackwardCpp_SOURCE)) include(FetchContent) FetchContent_Declare(BackwardCpp - GIT_REPOSITORY https://github.com/bombela/backward-cpp - GIT_TAG 94718085efa256fb25a311a46b5948ee0d95890a + GIT_REPOSITORY https://github.com/metacall/backward-cpp + GIT_TAG 0bfd0a07a61551413ccd2ab9a9099af3bad40681 ) FetchContent_MakeAvailable(BackwardCpp) From 673b3f458aeebc2222486bd3cdaf853e12b4e660 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 01:56:40 +0200 Subject: [PATCH 233/364] Update version to v0.9.8. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bae256fd5b..b5d0ec558f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.7 \ No newline at end of file +0.9.8 \ No newline at end of file From f6b7fba8e092388c1cfc46bee5c4b536ba534512 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 17:30:41 +0200 Subject: [PATCH 234/364] Remove incompatible ubsan option. --- cmake/CompileOptions.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/cmake/CompileOptions.cmake b/cmake/CompileOptions.cmake index f7126a3ba2..b3cd23a466 100644 --- a/cmake/CompileOptions.cmake +++ b/cmake/CompileOptions.cmake @@ -337,7 +337,6 @@ if(WIN32 AND MSVC) # Sanitizers if(OPTION_BUILD_THREAD_SANITIZER AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) add_compile_options(/fsanitize=thread) - # add_compile_options(/fsanitize=undefined) add_link_options(/INCREMENTAL:NO) elseif(OPTION_BUILD_ADDRESS_SANITIZER AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")) add_compile_options(/fsanitize=address) From b2c2779eb54fc54f9bc30d95e22d08c575c36de9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Thu, 12 Jun 2025 17:30:55 +0200 Subject: [PATCH 235/364] Trying to solve issues with threads python. --- .../include/py_loader/py_loader_threading.h | 2 +- .../loaders/py_loader/source/py_loader_impl.c | 12 +++++++++++- .../py_loader/source/py_loader_threading.cpp | 19 ++++++++++++++++--- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_threading.h b/source/loaders/py_loader/include/py_loader/py_loader_threading.h index 592dcaa027..d55a804b7d 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_threading.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_threading.h @@ -29,7 +29,7 @@ extern "C" { #endif -PY_LOADER_NO_EXPORT void py_loader_thread_initialize(const int host); +PY_LOADER_NO_EXPORT int py_loader_thread_initialize(const int host); PY_LOADER_NO_EXPORT int py_loader_thread_is_main(void); diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 5fb872ddaa..477b7a4b05 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2651,6 +2651,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #if DEBUG_ENABLED int gc_initialized = 1; #endif + int gil_release; if (py_impl == NULL) { @@ -2682,7 +2683,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi } /* Initialize threading */ - py_loader_thread_initialize(host); + gil_release = py_loader_thread_initialize(host); /* Initialize executable */ if (py_loader_impl_initialize_sys_executable(py_impl) != 0) @@ -2780,6 +2781,11 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi PyType_Modified(PyCFunctionTypePtr()); #endif + if (gil_release) + { + py_loader_thread_release(); + } + /* Register initialization */ loader_initialization_register(impl); @@ -2823,6 +2829,10 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi #endif error_after_argv: error_after_sys_executable: + if (gil_release) + { + py_loader_thread_release(); + } (void)py_loader_impl_finalize(py_impl, host); error_init_py: free(py_impl); diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index ed4e3ea607..1b4041fbef 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -30,7 +30,7 @@ struct py_thread_state PyGILState_STATE gstate; py_thread_state() : - ref_count(0) {} + ref_count(0), gstate(PyGILState_UNLOCKED) {} void ensure() { @@ -63,17 +63,30 @@ thread_local py_thread_state current_thread_state; thread_local uint64_t current_thread_id = thread_id_get_current(); static std::vector delayed_destructor; -void py_loader_thread_initialize(const int host) +int py_loader_thread_initialize(const int host) { main_thread_id = thread_id_get_current(); if (host == 1) { + int gil_status = PyGILState_Check(); + PyGILState_STATE gstate = PyGILState_Ensure(); main_thread_state = PyThreadState_Get(); - main_thread_ref_count++; PyGILState_Release(gstate); + + if (gil_status == 0) + { + py_loader_thread_acquire(); + return 1; + } + else + { + main_thread_ref_count++; + } } + + return 0; } int py_loader_thread_is_main() From c40449176c67e6fadb7d3f2286c6efe48464490c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 14 Jun 2025 10:24:27 +0200 Subject: [PATCH 236/364] Trying to improve env var requirements. --- source/CMakeLists.txt | 13 ++++++------ source/ports/node_port/CMakeLists.txt | 1 - source/ports/py_port/CMakeLists.txt | 30 ++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 13cb953f5a..883be65c36 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -79,12 +79,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # Default definitions # -add_definitions( - -DCONFIGURATION_INSTALL_PATH=\"${CMAKE_INSTALL_PREFIX}/${INSTALL_DATA}/configurations/global.json\" - -DSERIAL_LIBRARY_INSTALL_PATH=\"${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}\" - -DLOADER_LIBRARY_INSTALL_PATH=\"${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}\" - -DDETOUR_LIBRARY_INSTALL_PATH=\"${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}\" - -DPORT_LIBRARY_INSTALL_PATH=\"${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}\" +set(DEFAULT_COMPILE_DEFINITIONS + ${DEFAULT_COMPILE_DEFINITIONS} + CONFIGURATION_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${INSTALL_DATA}/configurations/global.json" + SERIAL_LIBRARY_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}" + LOADER_LIBRARY_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}" + DETOUR_LIBRARY_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}" + PORT_LIBRARY_INSTALL_PATH="${CMAKE_INSTALL_PREFIX}/${INSTALL_SHARED}" ) # diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index cec5ba4f91..9a30aeeb83 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -266,5 +266,4 @@ test_environment_variables(${node_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES_RS} ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" - ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index 91279d3e71..91477ab152 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -106,5 +106,33 @@ test_environment_variables(${py_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES} ${TESTS_ENVIRONMENT_VARIABLES_RS} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" - ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} +) + +# +# Define test (Python standalone) +# + +set(py_port_test_exec_alone "${py_port_test}_executable_standalone") + +message(STATUS "Test ${py_port_test_exec_alone}") + +# Add test (Python standalone) +add_test(NAME ${py_port_test_exec_alone} + COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test.py" +) + +# +# Define test labels +# + +set_property(TEST ${py_port_test_exec_alone} + PROPERTY LABELS ${py_port_test_exec_alone} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${py_port_test_exec_alone} + "" + "LOADER_SCRIPT_PATH=${LOADER_SCRIPT_PATH}" + "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" ) From 1ca8a736121a193c6f0d670b61720613b3a98174 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 14 Jun 2025 12:13:50 +0200 Subject: [PATCH 237/364] Improve configuration path detection. --- source/configuration/source/configuration.c | 56 ++++++++++++++++++++- source/plugin/source/plugin_manager.c | 4 +- source/ports/py_port/CMakeLists.txt | 2 + 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/source/configuration/source/configuration.c b/source/configuration/source/configuration.c index 365fdaf0cb..8994e4bb0d 100644 --- a/source/configuration/source/configuration.c +++ b/source/configuration/source/configuration.c @@ -28,6 +28,35 @@ /* -- Methods -- */ +static int configuration_path_from_library_path(dynlink_path library_relative_path, const char relative_path[], size_t relative_path_size) +{ + static const char library_name[] = "metacall" +#if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) + "d" +#endif + ; + + dynlink_path library_path, join_path; + + size_t size, length = 0; + + if (dynlink_library_path(library_name, library_path, &length) != 0) + { + return 1; + } + + /* Get the current folder without the library */ + size = portability_path_get_directory_inplace(library_path, length + 1); + + /* Append the relative path */ + size = portability_path_join(library_path, size, relative_path, relative_path_size, join_path, PORTABILITY_PATH_SIZE); + + /* Make it cannonical */ + size = portability_path_canonical(join_path, size, library_relative_path, PORTABILITY_PATH_SIZE); + + return size == 0; +} + int configuration_initialize(const char *reader, const char *path, void *allocator) { configuration global = NULL; @@ -39,12 +68,20 @@ int configuration_initialize(const char *reader, const char *path, void *allocat return 1; } + /* The order of precedence is: + * 1) Environment variable + * 2) Default relative path to metacall library + * 3) Locate it relative to metacall library install path + * 4) Default installation path (if any) + */ if (path == NULL) { static const char configuration_path[] = CONFIGURATION_PATH; const char *env_path = environment_variable_get(configuration_path, NULL); + dynlink_path library_relative_path; + if (env_path != NULL) { global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, env_path, NULL); @@ -56,9 +93,24 @@ int configuration_initialize(const char *reader, const char *path, void *allocat { static const char configuration_default_path[] = CONFIGURATION_DEFAULT_PATH; - global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, configuration_default_path, NULL); + if (configuration_path_from_library_path(library_relative_path, configuration_default_path, sizeof(configuration_default_path)) == 0) + { + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, library_relative_path, NULL); + + path = library_relative_path; + } + } + + if (global == NULL) + { + static const char relative_path[] = ".." ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR "share" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR "metacall" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR CONFIGURATION_DEFAULT_PATH; + + if (configuration_path_from_library_path(library_relative_path, relative_path, sizeof(relative_path)) == 0) + { + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, library_relative_path, NULL); - path = configuration_default_path; + path = library_relative_path; + } } #if defined(CONFIGURATION_INSTALL_PATH) diff --git a/source/plugin/source/plugin_manager.c b/source/plugin/source/plugin_manager.c index cf6f2dc83c..c2c78980ac 100644 --- a/source/plugin/source/plugin_manager.c +++ b/source/plugin/source/plugin_manager.c @@ -94,9 +94,9 @@ int plugin_manager_initialize(plugin_manager manager, const char *name, const ch /* Initialize the library path */ if (manager->library_path == NULL) { - const char library_name[] = "metacall" + static const char library_name[] = "metacall" #if (!defined(NDEBUG) || defined(DEBUG) || defined(_DEBUG) || defined(__DEBUG) || defined(__DEBUG__)) - "d" + "d" #endif ; diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index 91477ab152..f09f85d840 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -106,6 +106,7 @@ test_environment_variables(${py_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES} ${TESTS_ENVIRONMENT_VARIABLES_RS} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) # @@ -135,4 +136,5 @@ test_environment_variables(${py_port_test_exec_alone} "" "LOADER_SCRIPT_PATH=${LOADER_SCRIPT_PATH}" "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) From 4444b5ffc50152e7b4230f57395340a07e117dac Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 14 Jun 2025 12:33:33 +0200 Subject: [PATCH 238/364] Add environment variables for sanitizer. --- source/ports/py_port/CMakeLists.txt | 2 ++ source/ports/rb_port/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/source/ports/py_port/CMakeLists.txt b/source/ports/py_port/CMakeLists.txt index f09f85d840..83bec99f42 100644 --- a/source/ports/py_port/CMakeLists.txt +++ b/source/ports/py_port/CMakeLists.txt @@ -106,6 +106,7 @@ test_environment_variables(${py_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES} ${TESTS_ENVIRONMENT_VARIABLES_RS} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_ENVIRONMENT_VARIABLES} ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) @@ -136,5 +137,6 @@ test_environment_variables(${py_port_test_exec_alone} "" "LOADER_SCRIPT_PATH=${LOADER_SCRIPT_PATH}" "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_ENVIRONMENT_VARIABLES} ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) diff --git a/source/ports/rb_port/CMakeLists.txt b/source/ports/rb_port/CMakeLists.txt index 7a2ad6a768..0827203ac5 100644 --- a/source/ports/rb_port/CMakeLists.txt +++ b/source/ports/rb_port/CMakeLists.txt @@ -89,5 +89,6 @@ test_environment_variables(${rb_port_test_executable} "" ${TESTS_ENVIRONMENT_VARIABLES} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_ENVIRONMENT_VARIABLES} ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) From 1447a08581cd30f5a2d43345463a3224382b91cc Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Sat, 14 Jun 2025 13:04:32 +0200 Subject: [PATCH 239/364] Add sanitizer env vars for node port. --- source/ports/node_port/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ports/node_port/CMakeLists.txt b/source/ports/node_port/CMakeLists.txt index 9a30aeeb83..1a04fc77e8 100644 --- a/source/ports/node_port/CMakeLists.txt +++ b/source/ports/node_port/CMakeLists.txt @@ -266,4 +266,6 @@ test_environment_variables(${node_port_test_exec} ${TESTS_ENVIRONMENT_VARIABLES_RS} ${TESTS_ENVIRONMENT_VARIABLES_OPENSSL} "METACALL_INSTALL_PATH=${PROJECT_OUTPUT_DIR}" + ${TESTS_SANITIZER_ENVIRONMENT_VARIABLES} + ${TESTS_SANITIZER_PRELOAD_ENVIRONMENT_VARIABLES} ) From 734fe91b90a1fc6b057132b8a2c46c87105ffc4c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 18:23:31 +0200 Subject: [PATCH 240/364] Solved deadlock in python windows. --- .../include/py_loader/py_loader_impl.h | 2 ++ .../loaders/py_loader/source/py_loader_impl.c | 25 +++++++++++++++---- .../loaders/py_loader/source/py_loader_port.c | 22 ++++++++++++++++ .../py_loader/source/py_loader_threading.cpp | 2 +- source/ports/py_port/metacall/api.py | 9 ++++++- 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/source/loaders/py_loader/include/py_loader/py_loader_impl.h b/source/loaders/py_loader/include/py_loader/py_loader_impl.h index f06b3d6038..bc1a081ede 100644 --- a/source/loaders/py_loader/include/py_loader/py_loader_impl.h +++ b/source/loaders/py_loader/include/py_loader/py_loader_impl.h @@ -62,6 +62,8 @@ PY_LOADER_NO_EXPORT int py_loader_impl_finalizer_object(loader_impl impl, PyObje PY_LOADER_NO_EXPORT PyObject *py_loader_impl_capsule_new_null(void); +PY_LOADER_NO_EXPORT int py_loader_impl_initialize_asyncio_module(loader_impl_py py_impl, const int host); + #ifdef __cplusplus } #endif diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 477b7a4b05..1f9fc5e3d7 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2610,7 +2610,12 @@ int py_loader_impl_initialize_argv(loader_impl_py py_impl, int argc, char **argv static void PyCFunction_dealloc(PyObject *obj) { - py_loader_thread_acquire(); + const int gil_status = PyGILState_Check(); + + if (gil_status == 0) + { + py_loader_thread_acquire(); + } /* Check if we are passing our own hook to the callback */ if (PyCFunction_Check(obj) && PyCFunction_GET_FUNCTION(obj) == py_loader_impl_function_type_invoke) @@ -2624,6 +2629,7 @@ static void PyCFunction_dealloc(PyObject *obj) loader_impl_py_function_type_invoke_state invoke_state = PyCapsule_GetPointer(invoke_state_capsule, NULL); + /* Release the GIL and let the destroy be executed outside of Python (if it belongs to another language) */ py_loader_thread_release(); value_type_destroy(invoke_state->callback); py_loader_thread_acquire(); @@ -2636,7 +2642,10 @@ static void PyCFunction_dealloc(PyObject *obj) /* Call to the original meth_dealloc function */ py_loader_impl_pycfunction_dealloc(obj); - py_loader_thread_release(); + if (gil_status == 0) + { + py_loader_thread_release(); + } } loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration config) @@ -2760,10 +2769,16 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi goto error_after_import; } - /* Initialize asyncio module for supporting async */ - if (py_loader_impl_initialize_asyncio_module(py_impl, host) != 0) +#if defined(WIN32) || defined(_WIN32) + /* On Windows, the initialization of this module deadlocks, we delay it to the port on this case */ + if (host == 0) +#endif { - goto error_after_thread_background_module; + /* Initialize asyncio module for supporting async */ + if (py_loader_impl_initialize_asyncio_module(py_impl, host) != 0) + { + goto error_after_thread_background_module; + } } /* Initialize custom dict type */ diff --git a/source/loaders/py_loader/source/py_loader_port.c b/source/loaders/py_loader/source/py_loader_port.c index a5bf798fff..8f60578e3b 100644 --- a/source/loaders/py_loader/source/py_loader_port.c +++ b/source/loaders/py_loader/source/py_loader_port.c @@ -890,6 +890,26 @@ static PyObject *py_loader_port_atexit(PyObject *self, PyObject *args) return Py_ReturnNone(); } +static PyObject *py_loader_port_asyncio_initialize(PyObject *self, PyObject *args) +{ + loader_impl impl = loader_get_impl(py_loader_tag); + const int host = loader_impl_get_option_host(impl); + loader_impl_py py_impl = loader_impl_get(impl); + + (void)self; + (void)args; + + if (impl != NULL) + { + if (py_loader_impl_initialize_asyncio_module(py_impl, host) != 0) + { + PyErr_SetString(PyExc_RuntimeErrorPtr(), "Failed to initialize asyncio module of Python Loader on MetaCall."); + } + } + + return Py_ReturnNone(); +} + static PyMethodDef metacall_methods[] = { { "metacall_load_from_file", py_loader_port_load_from_file, METH_VARARGS, "Loads a script from file." }, @@ -913,6 +933,8 @@ static PyMethodDef metacall_methods[] = { "Get the data which a value of type Pointer is pointing to." }, { "py_loader_port_atexit", py_loader_port_atexit, METH_NOARGS, "At exit function that will be executed when Python is host, for internal cleanup purposes." }, + { "py_loader_port_asyncio_initialize", py_loader_port_asyncio_initialize, METH_NOARGS, + "Initialization function that will be executed when Python is host, for internal initialization purposes." }, { NULL, NULL, 0, NULL } }; diff --git a/source/loaders/py_loader/source/py_loader_threading.cpp b/source/loaders/py_loader/source/py_loader_threading.cpp index 1b4041fbef..64a0ab7fb0 100644 --- a/source/loaders/py_loader/source/py_loader_threading.cpp +++ b/source/loaders/py_loader/source/py_loader_threading.cpp @@ -69,7 +69,7 @@ int py_loader_thread_initialize(const int host) if (host == 1) { - int gil_status = PyGILState_Check(); + const int gil_status = PyGILState_Check(); PyGILState_STATE gstate = PyGILState_Ensure(); main_thread_state = PyThreadState_Get(); diff --git a/source/ports/py_port/metacall/api.py b/source/ports/py_port/metacall/api.py index 80586c86ed..83f28da451 100644 --- a/source/ports/py_port/metacall/api.py +++ b/source/ports/py_port/metacall/api.py @@ -95,7 +95,14 @@ def metacall_module_load(): # Python Port must have been loaded at this point if 'py_port_impl_module' in sys.modules: - return sys.modules['py_port_impl_module'] + port = sys.modules['py_port_impl_module'] + + # For some reason, Windows deadlocks on initializing asyncio + # but if it is delayed, it works, so we initialize it after here + if sys.platform == 'win32': + port.py_loader_port_asyncio_initialize() + + return port else: raise ImportError( 'MetaCall was found but failed to load' From c1e74c827dd940d5b2c605bcf71883ea80217f27 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 22:37:58 +0200 Subject: [PATCH 241/364] Trying to solve configuration issues. --- source/configuration/source/configuration.c | 15 +++++++++++++++ .../configuration/source/configuration_object.c | 2 ++ 2 files changed, 17 insertions(+) diff --git a/source/configuration/source/configuration.c b/source/configuration/source/configuration.c index 8994e4bb0d..f1f6e41f84 100644 --- a/source/configuration/source/configuration.c +++ b/source/configuration/source/configuration.c @@ -101,6 +101,21 @@ int configuration_initialize(const char *reader, const char *path, void *allocat } } +#if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) + /* Windows MSVC stores the build folder in Debug/Release folders, so we must also check in the parent folder */ + if (global == NULL) + { + static const char configuration_default_path_win32[] = ".." ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR CONFIGURATION_DEFAULT_PATH; + + if (configuration_path_from_library_path(library_relative_path, configuration_default_path_win32, sizeof(configuration_default_path_win32)) == 0) + { + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, library_relative_path, NULL); + + path = library_relative_path; + } + } +#endif + if (global == NULL) { static const char relative_path[] = ".." ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR "share" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR "metacall" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR CONFIGURATION_DEFAULT_PATH; diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index f38298023c..57c7ab9cd4 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -96,6 +96,8 @@ configuration configuration_object_initialize(const char *name, const char *path if (path != NULL) { + log_write("metacall", LOG_LEVEL_DEBUG, "Trying to load configuration from %s", path); + config->source = configuration_object_read(path); if (config->source == NULL) From 4eda28a1f87c2778826a4ea28c36301211e771b2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 23:07:30 +0200 Subject: [PATCH 242/364] Add more debug info to configuration. --- source/configuration/source/configuration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/configuration/source/configuration.c b/source/configuration/source/configuration.c index f1f6e41f84..e72793a192 100644 --- a/source/configuration/source/configuration.c +++ b/source/configuration/source/configuration.c @@ -45,6 +45,8 @@ static int configuration_path_from_library_path(dynlink_path library_relative_pa return 1; } + log_write("metacall", LOG_LEVEL_DEBUG, "Finding configuration relative path %s to %s", relative_path, library_path); + /* Get the current folder without the library */ size = portability_path_get_directory_inplace(library_path, length + 1); @@ -102,7 +104,7 @@ int configuration_initialize(const char *reader, const char *path, void *allocat } #if (defined(WIN32) || defined(_WIN32)) && defined(_MSC_VER) - /* Windows MSVC stores the build folder in Debug/Release folders, so we must also check in the parent folder */ + /* Windows MSVC when running the tests, it has the binaries in Debug / Release folders, so we must also check in the parent folder */ if (global == NULL) { static const char configuration_default_path_win32[] = ".." ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR CONFIGURATION_DEFAULT_PATH; From e5f58ed87f622935a9fe2910d2adb55ff5d04e88 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 23:26:20 +0200 Subject: [PATCH 243/364] Add more debug info. --- source/portability/source/portability_library_path.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 221d7a1ccf..314e1fec25 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -196,6 +196,10 @@ int portability_library_path_find(const char name[], portability_library_path_st { const char *image_name = _dyld_get_image_name(image_index); + // TODO: Delete this + printf("Debug: %s\n", image_name); + fflush(stdout); + if (portability_library_path_ends_with(image_name, path) == 0) { size_t image_length = strnlen(image_name, PORTABILITY_PATH_SIZE); From 353e5b0cc447055fe53ecb01d5c8d339acae07b3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 23:41:28 +0200 Subject: [PATCH 244/364] Debug macos. --- source/portability/source/portability_library_path.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 314e1fec25..eb873d6c2c 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -122,6 +122,8 @@ static int portability_library_path_list_phdr_callback(struct dl_phdr_info *info #endif +#include + int portability_library_path_find(const char name[], portability_library_path_str path, size_t *length) { #if defined(unix) || defined(__unix__) || defined(__unix) || \ From 611fb049ea45cc09d832ec443a9c39c265b1f13c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 17 Jun 2025 23:54:48 +0200 Subject: [PATCH 245/364] Test with index 0. --- source/portability/source/portability_library_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index eb873d6c2c..a1dba149bb 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -194,7 +194,7 @@ int portability_library_path_find(const char name[], portability_library_path_st } /* Start from 1 so we avoid the executable itself */ - for (image_index = 1; image_index < size; ++image_index) + for (image_index = 0; image_index < size; ++image_index) { const char *image_name = _dyld_get_image_name(image_index); From 8160473677bf3f7972e34bac7cc267dd2cf8c3af Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 00:12:05 +0200 Subject: [PATCH 246/364] Add more debug info in macos. --- source/portability/source/portability_library_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index a1dba149bb..5f457cbc0b 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -199,7 +199,7 @@ int portability_library_path_find(const char name[], portability_library_path_st const char *image_name = _dyld_get_image_name(image_index); // TODO: Delete this - printf("Debug: %s\n", image_name); + printf("Debug: #%d / %d => %s\n", image_index, size, image_name); fflush(stdout); if (portability_library_path_ends_with(image_name, path) == 0) From c7a8ad3f0313ecb9b32707ac65471d36935469af Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 00:33:38 +0200 Subject: [PATCH 247/364] Add more debug info macos. --- source/portability/source/portability_library_path.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 5f457cbc0b..c94275d39f 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -194,7 +194,7 @@ int portability_library_path_find(const char name[], portability_library_path_st } /* Start from 1 so we avoid the executable itself */ - for (image_index = 0; image_index < size; ++image_index) + for (image_index = 1; image_index < size; ++image_index) { const char *image_name = _dyld_get_image_name(image_index); @@ -202,7 +202,11 @@ int portability_library_path_find(const char name[], portability_library_path_st printf("Debug: #%d / %d => %s\n", image_index, size, image_name); fflush(stdout); - if (portability_library_path_ends_with(image_name, path) == 0) + printf("Debug ends with: %s | %s\n", image_name, path); + printf("Debug ends with: %s | %s\n", image_name, name); + fflush(stdout); + + if (portability_library_path_ends_with(image_name, name) == 0) { size_t image_length = strnlen(image_name, PORTABILITY_PATH_SIZE); @@ -218,6 +222,9 @@ int portability_library_path_find(const char name[], portability_library_path_st *length = image_length; } + printf("Debug ended with: %s | %s => %s\n", image_name, path, name); + fflush(stdout); + return 0; } } From 0e37d08553578bc879a026067263178a430475f3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 00:45:52 +0200 Subject: [PATCH 248/364] Solve issue with macos. --- source/portability/source/portability_library_path.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index c94275d39f..0558c515dd 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -189,8 +189,9 @@ int portability_library_path_find(const char name[], portability_library_path_st if (portability_library_path_ends_with(name, "so") == 0 && name_dylib_length < PORTABILITY_PATH_SIZE) { - memcpy(path, name, sizeof(char) * (name_length - 2)); - memcpy(path, dylib_suffix, sizeof(dylib_suffix)); + const size_t base_length = sizeof(char) * (name_length - 2); + memcpy(path, name, base_length); + memcpy(&path[base_length], dylib_suffix, sizeof(dylib_suffix)); } /* Start from 1 so we avoid the executable itself */ @@ -206,7 +207,7 @@ int portability_library_path_find(const char name[], portability_library_path_st printf("Debug ends with: %s | %s\n", image_name, name); fflush(stdout); - if (portability_library_path_ends_with(image_name, name) == 0) + if (portability_library_path_ends_with(image_name, path) == 0) { size_t image_length = strnlen(image_name, PORTABILITY_PATH_SIZE); @@ -222,7 +223,7 @@ int portability_library_path_find(const char name[], portability_library_path_st *length = image_length; } - printf("Debug ended with: %s | %s => %s\n", image_name, path, name); + printf("------------------------------- Debug ended with: %s | %s => %s\n", image_name, path, name); fflush(stdout); return 0; From a6851fa1526b720f4b3f3f6d785c2a2ad63d5568 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 00:59:03 +0200 Subject: [PATCH 249/364] Solved issues on macos. --- .../portability/source/portability_library_path.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/source/portability/source/portability_library_path.c b/source/portability/source/portability_library_path.c index 0558c515dd..cda5f9cb3e 100644 --- a/source/portability/source/portability_library_path.c +++ b/source/portability/source/portability_library_path.c @@ -122,8 +122,6 @@ static int portability_library_path_list_phdr_callback(struct dl_phdr_info *info #endif -#include - int portability_library_path_find(const char name[], portability_library_path_str path, size_t *length) { #if defined(unix) || defined(__unix__) || defined(__unix) || \ @@ -199,14 +197,6 @@ int portability_library_path_find(const char name[], portability_library_path_st { const char *image_name = _dyld_get_image_name(image_index); - // TODO: Delete this - printf("Debug: #%d / %d => %s\n", image_index, size, image_name); - fflush(stdout); - - printf("Debug ends with: %s | %s\n", image_name, path); - printf("Debug ends with: %s | %s\n", image_name, name); - fflush(stdout); - if (portability_library_path_ends_with(image_name, path) == 0) { size_t image_length = strnlen(image_name, PORTABILITY_PATH_SIZE); @@ -223,9 +213,6 @@ int portability_library_path_find(const char name[], portability_library_path_st *length = image_length; } - printf("------------------------------- Debug ended with: %s | %s => %s\n", image_name, path, name); - fflush(stdout); - return 0; } } From 46b74adeab2ecb915306f16536e0ce9a18b1a3dd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 01:01:50 +0200 Subject: [PATCH 250/364] Update version to v0.9.9. Long live to Argentum Online. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b5d0ec558f..6f060dcbc2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.8 \ No newline at end of file +0.9.9 \ No newline at end of file From a090ae5b810ce40394bd574bdd8e704cbb347a88 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 19:42:10 +0200 Subject: [PATCH 251/364] Improve debugging tools for threading in python loader. --- .../loaders/py_loader/source/py_loader_impl.c | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index 1f9fc5e3d7..a5fa1d9ffb 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -2396,6 +2396,13 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) "import asyncio\n" "import threading\n" "import sys\n" +#if DEBUG_ENABLED + "def trace_calls(frame, event, arg):\n" + " t = threading.current_thread()\n" + " print(f\"[{t.native_id}] {t.name}: {event} {frame.f_code.co_name}\")\n" + "threading.settrace(trace_calls)\n" + "sys.settrace(trace_calls)\n" +#endif "class ThreadLoop:\n" " def __init__(self, loop, t):\n" " self.loop = loop\n" @@ -2410,13 +2417,26 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) " tl.loop.call_soon_threadsafe(f.set_exception, exception)\n" "def background_loop(loop):\n" " asyncio.set_event_loop(loop)\n" - " loop.run_forever()\n" - " loop.run_until_complete(loop.shutdown_asyncgens())\n" - " loop.stop()\n" - " loop.close()\n" + " try:\n" + " loop.run_forever()\n" + " finally:\n" +#if DEBUG_ENABLED + " print('Loop stopping, cleaning up...', flush=True)\n" +#endif + " try:\n" + " loop.run_until_complete(loop.shutdown_asyncgens())\n" + " except Exception as e:\n" + " print(f\"Error during shutdown_asyncgens: {e}\", flush=True)\n" + " loop.close()\n" +#if DEBUG_ENABLED + " print('Event loop closed', flush=True)\n" +#endif "def start_background_loop():\n" " loop = asyncio.new_event_loop()\n" - " t = threading.Thread(target=background_loop, name='MetaCall asyncio event loop', args=(loop,), daemon=False)\n" +#if DEBUG_ENABLED + " loop.set_debug(True)\n" +#endif + " t = threading.Thread(target=background_loop, name='MetaCallEventLoop', args=(loop,), daemon=False)\n" " t.start()\n" " return ThreadLoop(loop, t)\n" "def send_background_loop(tl, coro, callback, capsule):\n" @@ -2427,9 +2447,18 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) /* Stop background loop enqueues at the end of the event loop the task to be finished, so effectively it waits until the event loop finishes */ "def stop_background_loop(tl, join):\n" +#if DEBUG_ENABLED + " print('Requesting loop to stop', flush=True)\n" +#endif " tl.loop.call_soon_threadsafe(tl.loop.stop)\n" " if join:\n" +#if DEBUG_ENABLED + " print('Waiting for thread to join', flush=True)\n" +#endif " tl.t.join()\n" +#if DEBUG_ENABLED + " print('Background loop stopped', flush=True)\n" +#endif "def atexit_background_loop(tl):\n" /* Checks if py_port_impl_module contains py_loader_port_atexit and executes it */ " getattr(sys.modules.get('py_port_impl_module'), 'py_loader_port_atexit', lambda: None)()\n" From e214b903397891e04d909be61f16f9c0e6c46c67 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 18 Jun 2025 19:42:44 +0200 Subject: [PATCH 252/364] Exit properly on CLI error. --- source/cli/metacallcli/source/application.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/cli/metacallcli/source/application.cpp b/source/cli/metacallcli/source/application.cpp index a8389d0034..098f639006 100644 --- a/source/cli/metacallcli/source/application.cpp +++ b/source/cli/metacallcli/source/application.cpp @@ -49,7 +49,7 @@ void application::repl() } /* Register exit function */ - auto exit = [](size_t argc, void *args[], void *data) -> void * { + auto exit_command = [](size_t argc, void *args[], void *data) -> void * { (void)args; (void)data; @@ -67,11 +67,12 @@ void application::repl() return NULL; }; - int result = metacall_register_loaderv(metacall_loader("ext"), plugin_repl_handle, "exit", exit, METACALL_INVALID, 0, NULL); + int result = metacall_register_loaderv(metacall_loader("ext"), plugin_repl_handle, "exit", exit_command, METACALL_INVALID, 0, NULL); if (result != 0) { std::cout << "Exit function was not registered properly, return code: " << result << std::endl; + exit(1); } else { @@ -268,7 +269,7 @@ application::application(int argc, char *argv[]) : if (metacall_initialize() != 0) { /* Exit from application */ - return; + exit(1); } /* Initialize MetaCall arguments */ @@ -372,7 +373,7 @@ void application::arguments_parse(std::vector &arguments) { /* Stop loading more scripts */ std::cout << "Error: Failed to load script '" << script << "' with loader '" << safe_tag << "'" << std::endl; - return; + exit(1); } } } From 578dcfdc250962665581bb31b88c8283cb052b03 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 20 Jun 2025 00:37:47 +0200 Subject: [PATCH 253/364] Improve issues with ruby port. --- .../loaders/rb_loader/source/rb_loader_impl.c | 265 ++++++++++-------- .../loaders/rb_loader/source/rb_loader_port.c | 25 +- source/ports/rb_port/package/lib/metacall.rb | 24 ++ 3 files changed, 195 insertions(+), 119 deletions(-) diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index d35208391d..3258440665 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -89,6 +89,13 @@ typedef struct loader_impl_rb_funcall_protect_type ID id; } * loader_impl_rb_funcall_protect; +typedef struct loader_impl_rb_discover_module_protect_type +{ + loader_impl impl; + loader_impl_rb_module rb_module; + context ctx; +} * loader_impl_rb_discover_module_protect; + static class_interface rb_class_interface_singleton(void); static object_interface rb_object_interface_singleton(void); static void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_str, enum class_visibility_id visibility, const char *method_type_str, VALUE methods, int (*register_method)(klass, method)); @@ -1255,7 +1262,9 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path { #define rb_str_new_static_size(str) rb_str_new_static(str, sizeof(str) - 1) - VALUE wrapped_code = rb_str_plus(rb_str_new_static_size("module "), module_name); + VALUE wrapped_code = rb_str_new_static_size("require 'rubygems'\n"); + wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("module ")); + wrapped_code = rb_str_plus(wrapped_code, module_name); wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\n")); wrapped_code = rb_str_plus(wrapped_code, module_data); wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\nend")); @@ -1509,58 +1518,61 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_ VALUE name = rb_sym2str(rb_method); const char *method_name_str = RSTRING_PTR(name); - VALUE instance_method = rb_funcall(cls, rb_intern(method_type_str), 1, rb_method); - VALUE parameters = rb_funcallv(instance_method, rb_intern("parameters"), 0, NULL); - size_t args_it, args_count = RARRAY_LEN(parameters); - - log_write("metacall", LOG_LEVEL_DEBUG, "Method '%s' inside '%s' of type %s with %" PRIuS " parameters", method_name_str, class_name_str, method_type_str, args_count); - - /* - * TODO: - * Another alternative (for supporting types), which is not used in the current implementation, - * but it can simplify the parser, it's the following: - * - * - For classes: origin_file, definition_line = MyClass.instance_method(:foo).source_location - * - For plain functions: origin_file, definition_line = method(:foo).source_location - * - * Then: - * method_signature = IO.readlines(origin_file)[definition_line.pred] - * - * Now we have only the method signature, this is going to be less problematic than parsing - * the whole file as we are doing now (although for multi-line signatures it's going to be - * a little bit more complicated...) - * - * We can switch to completely duck typed approach (refactoring the tests) or we can use this - * simplified parsing approach and maintain types - */ - - method m = method_create(c, - method_name_str, - args_count, - (method_impl)instance_method, - visibility, - SYNCHRONOUS, /* There is not async functions in Ruby */ - NULL); - - signature s = method_signature(m); - - for (args_it = 0; args_it < args_count; ++args_it) + if (rb_respond_to(cls, RB_SYM2ID(rb_method))) { - VALUE parameter_pair = rb_ary_entry(parameters, args_it); - - if (RARRAY_LEN(parameter_pair) == 2) + VALUE instance_method = rb_funcall(cls, rb_intern(method_type_str), 1, rb_method); + VALUE parameters = rb_funcallv(instance_method, rb_intern("parameters"), 0, NULL); + size_t args_it, args_count = RARRAY_LEN(parameters); + + log_write("metacall", LOG_LEVEL_DEBUG, "Method '%s' inside '%s' of type %s with %" PRIuS " parameters", method_name_str, class_name_str, method_type_str, args_count); + + /* + * TODO: + * Another alternative (for supporting types), which is not used in the current implementation, + * but it can simplify the parser, it's the following: + * + * - For classes: origin_file, definition_line = MyClass.instance_method(:foo).source_location + * - For plain functions: origin_file, definition_line = method(:foo).source_location + * + * Then: + * method_signature = IO.readlines(origin_file)[definition_line.pred] + * + * Now we have only the method signature, this is going to be less problematic than parsing + * the whole file as we are doing now (although for multi-line signatures it's going to be + * a little bit more complicated...) + * + * We can switch to completely duck typed approach (refactoring the tests) or we can use this + * simplified parsing approach and maintain types + */ + + method m = method_create(c, + method_name_str, + args_count, + (method_impl)instance_method, + visibility, + SYNCHRONOUS, /* There is not async functions in Ruby */ + NULL); + + signature s = method_signature(m); + + for (args_it = 0; args_it < args_count; ++args_it) { - VALUE parameter_name_id = rb_ary_entry(parameter_pair, 1); - VALUE parameter_name = rb_sym2str(parameter_name_id); - const char *parameter_name_str = RSTRING_PTR(parameter_name); + VALUE parameter_pair = rb_ary_entry(parameters, args_it); - signature_set(s, args_it, parameter_name_str, NULL); + if (RARRAY_LEN(parameter_pair) == 2) + { + VALUE parameter_name_id = rb_ary_entry(parameter_pair, 1); + VALUE parameter_name = rb_sym2str(parameter_name_id); + const char *parameter_name_str = RSTRING_PTR(parameter_name); + + signature_set(s, args_it, parameter_name_str, NULL); + } } - } - if (register_method(c, m) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby failed to register method '%s' in class '%s'", method_name_str, class_name_str); + if (register_method(c, m) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby failed to register method '%s' in class '%s'", method_name_str, class_name_str); + } } } } @@ -1587,15 +1599,12 @@ void rb_loader_impl_discover_attributes(klass c, const char *class_name_str, VAL } } -int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_module, context ctx) +static VALUE rb_loader_impl_discover_module_protect(VALUE args) { - log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader discovering:"); - - if (rb_module->empty == 0) - { - return 0; - } - + loader_impl_rb_discover_module_protect protect = (loader_impl_rb_discover_module_protect)args; + loader_impl impl = protect->impl; + loader_impl_rb_module rb_module = protect->rb_module; + context ctx = protect->ctx; VALUE instance_methods = rb_funcallv(rb_module->module, rb_intern("instance_methods"), 0, NULL); VALUE methods_size = rb_funcallv(instance_methods, rb_intern("size"), 0, NULL); int index, size = FIX2INT(methods_size); @@ -1630,7 +1639,7 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo if (scope_define(sp, function_name(f), v) != 0) { value_type_destroy(v); - return 1; + return INT2NUM(1); } else { @@ -1640,12 +1649,12 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo } else { - return 1; + return INT2NUM(1); } } else { - return 1; + return INT2NUM(1); } } } @@ -1659,80 +1668,106 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo { VALUE constant = rb_ary_entry(constants, index); - if (constant != Qnil) + if (constant != Qnil && RB_TYPE_P(constant, T_SYMBOL)) { - if (RB_TYPE_P(constant, T_SYMBOL)) - { - VALUE class_name = rb_sym2str(constant); - const char *class_name_str = RSTRING_PTR(class_name); - VALUE cls = rb_const_get_from(rb_module->module, rb_intern(class_name_str)); - loader_impl_rb_class rb_cls = malloc(sizeof(struct loader_impl_rb_class_type)); - klass c = class_create(class_name_str, ACCESSOR_TYPE_DYNAMIC, rb_cls, &rb_class_interface_singleton); + VALUE class_name = rb_sym2str(constant); + const char *class_name_str = RSTRING_PTR(class_name); + VALUE cls = rb_const_get_from(rb_module->module, rb_intern(class_name_str)); + loader_impl_rb_class rb_cls = malloc(sizeof(struct loader_impl_rb_class_type)); + klass c = class_create(class_name_str, ACCESSOR_TYPE_DYNAMIC, rb_cls, &rb_class_interface_singleton); - rb_cls->class = cls; - rb_cls->impl = impl; + rb_cls->class = cls; + rb_cls->impl = impl; - /* Discover methods */ - VALUE argv[1] = { Qtrue }; /* include_superclasses ? Qtrue : Qfalse; */ - VALUE methods = rb_class_public_instance_methods(1, argv, cls); /* argc, argv, cls */ - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "instance_method", methods, &class_register_method); + /* Discover methods */ + VALUE argv[1] = { Qtrue }; /* include_superclasses ? Qtrue : Qfalse; */ + VALUE methods = rb_class_public_instance_methods(1, argv, cls); /* argc, argv, cls */ + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "instance_method", methods, &class_register_method); - methods = rb_class_protected_instance_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "instance_method", methods, &class_register_method); + methods = rb_class_protected_instance_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "instance_method", methods, &class_register_method); - methods = rb_class_private_instance_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "instance_method", methods, &class_register_method); + methods = rb_class_private_instance_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "instance_method", methods, &class_register_method); #if RUBY_VERSION_MAJOR == 3 && RUBY_VERSION_MINOR >= 0 - methods = rb_obj_public_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "singleton_method", methods, &class_register_static_method); + methods = rb_obj_public_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "singleton_method", methods, &class_register_static_method); - methods = rb_obj_protected_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "singleton_method", methods, &class_register_static_method); + methods = rb_obj_protected_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "singleton_method", methods, &class_register_static_method); - methods = rb_obj_private_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "singleton_method", methods, &class_register_static_method); + methods = rb_obj_private_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "singleton_method", methods, &class_register_static_method); #else - methods = rb_obj_singleton_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "singleton_method", methods, &class_register_static_method); + methods = rb_obj_singleton_methods(1, argv, cls); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "method", methods, &class_register_static_method); #endif - /* Discover attributes */ - VALUE static_attributes = rb_mod_class_variables(1, argv, cls); - rb_loader_impl_discover_attributes(c, class_name_str, static_attributes, &class_register_static_attribute); - - VALUE instance_attributes = rb_obj_instance_variables(cls); - rb_loader_impl_discover_attributes(c, class_name_str, instance_attributes, &class_register_attribute); - - /* Define default constructor. Ruby only supports one constructor, a - * method called 'initialize'. It can have arguments but when inspected via - * reflection, the signature is variadic arguments and cannot be inspected: - * - * MyClass.methods(:initialize).parameters = [[:rest]] # variadic args notation in Ruby - * - * Due to this, we will always register only one default constructor without arguments - * which will take all the arguments when invoking 'new' and apply them as variadic. - */ - constructor ctor = constructor_create(0, VISIBILITY_PUBLIC); - - if (class_register_constructor(c, ctor) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Failed to register default constructor in class %s", class_name_str); - } + /* Discover attributes */ + VALUE static_attributes = rb_mod_class_variables(1, argv, cls); + rb_loader_impl_discover_attributes(c, class_name_str, static_attributes, &class_register_static_attribute); + + VALUE instance_attributes = rb_obj_instance_variables(cls); + rb_loader_impl_discover_attributes(c, class_name_str, instance_attributes, &class_register_attribute); + + /* Define default constructor. Ruby only supports one constructor, a + * method called 'initialize'. It can have arguments but when inspected via + * reflection, the signature is variadic arguments and cannot be inspected: + * + * MyClass.methods(:initialize).parameters = [[:rest]] # variadic args notation in Ruby + * + * Due to this, we will always register only one default constructor without arguments + * which will take all the arguments when invoking 'new' and apply them as variadic. + */ + constructor ctor = constructor_create(0, VISIBILITY_PUBLIC); + + if (class_register_constructor(c, ctor) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to register default constructor in class %s", class_name_str); + } - scope sp = context_scope(ctx); - value v = value_create_class(c); + scope sp = context_scope(ctx); + value v = value_create_class(c); - if (scope_define(sp, class_name_str, v) != 0) - { - value_type_destroy(v); - return 1; - } + if (scope_define(sp, class_name_str, v) != 0) + { + value_type_destroy(v); + return INT2NUM(1); } } } - return 0; + return INT2NUM(0); +} + +int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_module, context ctx) +{ + struct loader_impl_rb_discover_module_protect_type protect; + int state; + VALUE result; + + log_write("metacall", LOG_LEVEL_DEBUG, "Ruby loader discovering:"); + + if (rb_module->empty == 0) + { + return 0; + } + + protect.impl = impl; + protect.rb_module = rb_module; + protect.ctx = ctx; + + result = rb_protect(rb_loader_impl_discover_module_protect, (VALUE)&protect, &state); + + if (state != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby module discover failed"); + rb_loader_impl_print_exception(); + return 1; + } + + return NUM2INT(result); } int rb_loader_impl_discover(loader_impl impl, loader_handle handle, context ctx) diff --git a/source/loaders/rb_loader/source/rb_loader_port.c b/source/loaders/rb_loader/source/rb_loader_port.c index 0b3b97c7a0..18f957f0d6 100644 --- a/source/loaders/rb_loader/source/rb_loader_port.c +++ b/source/loaders/rb_loader/source/rb_loader_port.c @@ -29,7 +29,7 @@ static loader_impl rb_loader_impl = NULL; -VALUE rb_loader_port_load_from_file(VALUE self, VALUE tag_value, VALUE paths_value) +static VALUE rb_loader_port_load_from_file(VALUE self, VALUE tag_value, VALUE paths_value) { const char *tag; const char **paths; @@ -96,7 +96,7 @@ VALUE rb_loader_port_load_from_file(VALUE self, VALUE tag_value, VALUE paths_val return LONG2NUM(result); } -VALUE rb_loader_port_load_from_memory(VALUE self, VALUE tag_value, VALUE buffer_value) +static VALUE rb_loader_port_load_from_memory(VALUE self, VALUE tag_value, VALUE buffer_value) { const char *tag; const char *buffer; @@ -138,7 +138,7 @@ VALUE rb_loader_port_load_from_memory(VALUE self, VALUE tag_value, VALUE buffer_ return LONG2NUM(result); } -VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) +static VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) { const char *function_name; size_t args_size, iterator; @@ -195,7 +195,7 @@ VALUE rb_loader_port_metacall(int argc, VALUE *argv, VALUE self) return rb_type_serialize(result); } -VALUE rb_loader_port_inspect(VALUE self) +static VALUE rb_loader_port_inspect(VALUE self) { VALUE result; size_t size = 0; @@ -232,6 +232,22 @@ VALUE rb_loader_port_inspect(VALUE self) return result; } +static VALUE rb_loader_port_atexit(VALUE self) +{ + static int atexit_executed = 0; + + (void)self; + + if (atexit_executed == 0 && rb_loader_impl_destroy(rb_loader_impl) != 0) + { + rb_raise(rb_eSystemExit, "Failed to destroy Ruby Loader from MetaCall"); + } + + atexit_executed = 1; + + return Qnil; +} + int rb_loader_port_initialize(loader_impl impl) { VALUE rb_loader_port; @@ -251,6 +267,7 @@ int rb_loader_port_initialize(loader_impl impl) rb_define_module_function(rb_loader_port, "metacall_load_from_memory", rb_loader_port_load_from_memory, 2); rb_define_module_function(rb_loader_port, "metacall", rb_loader_port_metacall, -1); rb_define_module_function(rb_loader_port, "metacall_inspect", rb_loader_port_inspect, 0); + rb_define_module_function(rb_loader_port, "rb_loader_port_atexit", rb_loader_port_atexit, 0); rb_loader_impl = impl; diff --git a/source/ports/rb_port/package/lib/metacall.rb b/source/ports/rb_port/package/lib/metacall.rb index ba36cea952..f54e37ca58 100644 --- a/source/ports/rb_port/package/lib/metacall.rb +++ b/source/ports/rb_port/package/lib/metacall.rb @@ -99,6 +99,8 @@ def metacall_module_load # Check again if the port was loaded if defined?(MetaCallRbLoaderPort) + + return MetaCallRbLoaderPort else raise LoadError, 'MetaCall was found but failed to load MetaCallRbLoaderPort' @@ -108,6 +110,28 @@ def metacall_module_load # Initialize the MetaCall Ruby Port metacall_module_load + # When we are running MetaCall with Ruby, we should hook the at exit method + if ENV.key?('METACALL_HOST') + module Kernel + alias_method :original_exit, :exit + alias_method :original_exit_bang, :exit! + + def exit(status = true) + if defined?(MetaCallRbLoaderPort) && MetaCall.respond_to?(:rb_loader_port_atexit) + MetaCallRbLoaderPort.rb_loader_port_atexit + end + original_exit(status) + end + + def exit!(status = true) + if defined?(MetaCallRbLoaderPort) && MetaCall.respond_to?(:rb_loader_port_atexit) + MetaCallRbLoaderPort.rb_loader_port_atexit + end + original_exit_bang(status) + end + end + end + public def metacall_load_from_file(tag, paths) From 4eea25b2dc58b6013db3061e0d0339d13e375ab9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 20 Jun 2025 17:21:58 +0200 Subject: [PATCH 254/364] Solve issues with ruby. --- .../loaders/rb_loader/source/rb_loader_impl.c | 166 ++++++++++++------ source/ports/rb_port/package/lib/metacall.rb | 2 - source/scripts/ruby/klass/source/klass.rb | 2 - 3 files changed, 109 insertions(+), 61 deletions(-) diff --git a/source/loaders/rb_loader/source/rb_loader_impl.c b/source/loaders/rb_loader/source/rb_loader_impl.c index 3258440665..9d0e43afbb 100644 --- a/source/loaders/rb_loader/source/rb_loader_impl.c +++ b/source/loaders/rb_loader/source/rb_loader_impl.c @@ -968,7 +968,12 @@ loader_impl_data rb_loader_impl_initialize(loader_impl impl, configuration confi ruby_init(); - ruby_init_loadpath(); + /* Apparently ruby_init_loadpath is not enough to initialize the builtins and gems, + * so we use ruby_options instead + */ + /* ruby_init_loadpath(); */ + + ruby_options(argc, argv); } if (rb_loader_impl_initialize_types(impl) != 0) @@ -1098,7 +1103,7 @@ VALUE rb_loader_impl_module_eval_protect(VALUE args) return rb_mod_module_eval(protect->argc, protect->argv, protect->module); } -void rb_loader_impl_print_exception(void) +static void rb_loader_impl_print_exception(void) { VALUE exception = rb_gv_get("$!"); @@ -1262,12 +1267,43 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path { #define rb_str_new_static_size(str) rb_str_new_static(str, sizeof(str) - 1) - VALUE wrapped_code = rb_str_new_static_size("require 'rubygems'\n"); + static const char header[] = + /* AtExitInterceptor is needed due to Ruby's nature, it calls + * at_exit during ruby_cleanup and due to this, scripts depending on + * this feature like unit tests will run after MetaCall has started + * to destroy the objects of reflect associated to the loader. + * In order to avoid this, we hook into at_exit and we execute at + * the end of the main script execution. + */ + "module AtExitInterceptor\n" + " @captured_exit_procs = []\n" + " def self.captured_exit_procs\n" + " @captured_exit_procs\n" + " end\n" + /* Replace Kernel.at_exit */ + " module ::Kernel\n" + " alias_method :__original_at_exit, :at_exit\n" + " def at_exit(&block)\n" + " AtExitInterceptor.captured_exit_procs << block\n" + " nil\n" + " end\n" + " end\n" + /* Manual runner */ + " def self.run_all\n" + /* Run in reverse order to match Ruby's actual behavior */ + " @captured_exit_procs.reverse_each do |proc|\n" + " proc.call\n" + " end\n" + " end\n" + "end\n"; + + VALUE wrapped_code = rb_str_new_static_size(header); wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("module ")); wrapped_code = rb_str_plus(wrapped_code, module_name); wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\n")); wrapped_code = rb_str_plus(wrapped_code, module_data); - wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\nend")); + wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("\nend\n")); + wrapped_code = rb_str_plus(wrapped_code, rb_str_new_static_size("AtExitInterceptor.run_all\n")); #undef rb_str_new_static_size @@ -1278,9 +1314,28 @@ loader_handle rb_loader_impl_load_from_file(loader_impl impl, const loader_path if (state != 0) { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby evaluation failed %s", paths[0]); - rb_loader_impl_print_exception(); - goto load_error; + VALUE err = rb_errinfo(); + VALUE system_exit_class = rb_const_get(rb_cObject, rb_intern("SystemExit")); + + /* Check if the script exited */ + if (rb_obj_is_kind_of(err, system_exit_class)) + { + VALUE status = rb_funcall(err, rb_intern("status"), 0); + int exit_status = NUM2INT(status); + + if (exit_status != 0) + { + exit(exit_status); + } + + rb_set_errinfo(Qnil); + } + else + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby evaluation failed %s", paths[0]); + rb_loader_impl_print_exception(); + goto load_error; + } } /* Get the module reference */ @@ -1518,61 +1573,58 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_ VALUE name = rb_sym2str(rb_method); const char *method_name_str = RSTRING_PTR(name); - if (rb_respond_to(cls, RB_SYM2ID(rb_method))) - { - VALUE instance_method = rb_funcall(cls, rb_intern(method_type_str), 1, rb_method); - VALUE parameters = rb_funcallv(instance_method, rb_intern("parameters"), 0, NULL); - size_t args_it, args_count = RARRAY_LEN(parameters); + VALUE instance_method = rb_funcall(cls, rb_intern(method_type_str), 1, rb_method); + VALUE parameters = rb_funcallv(instance_method, rb_intern("parameters"), 0, NULL); + size_t args_it, args_count = RARRAY_LEN(parameters); - log_write("metacall", LOG_LEVEL_DEBUG, "Method '%s' inside '%s' of type %s with %" PRIuS " parameters", method_name_str, class_name_str, method_type_str, args_count); + log_write("metacall", LOG_LEVEL_DEBUG, "Method '%s' inside '%s' of type %s with %" PRIuS " parameters", method_name_str, class_name_str, method_type_str, args_count); - /* - * TODO: - * Another alternative (for supporting types), which is not used in the current implementation, - * but it can simplify the parser, it's the following: - * - * - For classes: origin_file, definition_line = MyClass.instance_method(:foo).source_location - * - For plain functions: origin_file, definition_line = method(:foo).source_location - * - * Then: - * method_signature = IO.readlines(origin_file)[definition_line.pred] - * - * Now we have only the method signature, this is going to be less problematic than parsing - * the whole file as we are doing now (although for multi-line signatures it's going to be - * a little bit more complicated...) - * - * We can switch to completely duck typed approach (refactoring the tests) or we can use this - * simplified parsing approach and maintain types - */ + /* + * TODO: + * Another alternative (for supporting types), which is not used in the current implementation, + * but it can simplify the parser, it's the following: + * + * - For classes: origin_file, definition_line = MyClass.instance_method(:foo).source_location + * - For plain functions: origin_file, definition_line = method(:foo).source_location + * + * Then: + * method_signature = IO.readlines(origin_file)[definition_line.pred] + * + * Now we have only the method signature, this is going to be less problematic than parsing + * the whole file as we are doing now (although for multi-line signatures it's going to be + * a little bit more complicated...) + * + * We can switch to completely duck typed approach (refactoring the tests) or we can use this + * simplified parsing approach and maintain types + */ - method m = method_create(c, - method_name_str, - args_count, - (method_impl)instance_method, - visibility, - SYNCHRONOUS, /* There is not async functions in Ruby */ - NULL); + method m = method_create(c, + method_name_str, + args_count, + (method_impl)instance_method, + visibility, + SYNCHRONOUS, /* There is not async functions in Ruby */ + NULL); - signature s = method_signature(m); + signature s = method_signature(m); - for (args_it = 0; args_it < args_count; ++args_it) - { - VALUE parameter_pair = rb_ary_entry(parameters, args_it); + for (args_it = 0; args_it < args_count; ++args_it) + { + VALUE parameter_pair = rb_ary_entry(parameters, args_it); - if (RARRAY_LEN(parameter_pair) == 2) - { - VALUE parameter_name_id = rb_ary_entry(parameter_pair, 1); - VALUE parameter_name = rb_sym2str(parameter_name_id); - const char *parameter_name_str = RSTRING_PTR(parameter_name); + if (RARRAY_LEN(parameter_pair) == 2) + { + VALUE parameter_name_id = rb_ary_entry(parameter_pair, 1); + VALUE parameter_name = rb_sym2str(parameter_name_id); + const char *parameter_name_str = RSTRING_PTR(parameter_name); - signature_set(s, args_it, parameter_name_str, NULL); - } + signature_set(s, args_it, parameter_name_str, NULL); } + } - if (register_method(c, m) != 0) - { - log_write("metacall", LOG_LEVEL_ERROR, "Ruby failed to register method '%s' in class '%s'", method_name_str, class_name_str); - } + if (register_method(c, m) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Ruby failed to register method '%s' in class '%s'", method_name_str, class_name_str); } } } @@ -1680,7 +1732,7 @@ static VALUE rb_loader_impl_discover_module_protect(VALUE args) rb_cls->impl = impl; /* Discover methods */ - VALUE argv[1] = { Qtrue }; /* include_superclasses ? Qtrue : Qfalse; */ + VALUE argv[1] = { Qfalse /* include_superclasses ? Qtrue : Qfalse; */ }; VALUE methods = rb_class_public_instance_methods(1, argv, cls); /* argc, argv, cls */ rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "instance_method", methods, &class_register_method); @@ -1692,13 +1744,13 @@ static VALUE rb_loader_impl_discover_module_protect(VALUE args) #if RUBY_VERSION_MAJOR == 3 && RUBY_VERSION_MINOR >= 0 methods = rb_obj_public_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "singleton_method", methods, &class_register_static_method); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "method", methods, &class_register_static_method); methods = rb_obj_protected_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "singleton_method", methods, &class_register_static_method); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PROTECTED, "method", methods, &class_register_static_method); methods = rb_obj_private_methods(1, argv, cls); - rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "singleton_method", methods, &class_register_static_method); + rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PRIVATE, "method", methods, &class_register_static_method); #else methods = rb_obj_singleton_methods(1, argv, cls); rb_loader_impl_discover_methods(c, cls, class_name_str, VISIBILITY_PUBLIC, "method", methods, &class_register_static_method); diff --git a/source/ports/rb_port/package/lib/metacall.rb b/source/ports/rb_port/package/lib/metacall.rb index f54e37ca58..e889f03ea9 100644 --- a/source/ports/rb_port/package/lib/metacall.rb +++ b/source/ports/rb_port/package/lib/metacall.rb @@ -99,8 +99,6 @@ def metacall_module_load # Check again if the port was loaded if defined?(MetaCallRbLoaderPort) - - return MetaCallRbLoaderPort else raise LoadError, 'MetaCall was found but failed to load MetaCallRbLoaderPort' diff --git a/source/scripts/ruby/klass/source/klass.rb b/source/scripts/ruby/klass/source/klass.rb index ad37a45739..86e392930a 100644 --- a/source/scripts/ruby/klass/source/klass.rb +++ b/source/scripts/ruby/klass/source/klass.rb @@ -39,6 +39,4 @@ def return_class_function() return MyClass end - #p return_class_function()::CLASS_CONSTANT - From a58272041baba227dc2ee44344d9e12038f0efee Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Fri, 20 Jun 2025 17:22:17 +0200 Subject: [PATCH 255/364] Solve issues with debug prints on python. --- .../loaders/py_loader/source/py_loader_impl.c | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index a5fa1d9ffb..dcf5ab92a8 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -54,6 +54,12 @@ #define DEBUG_ENABLED 0 #endif +/* Set this variable to 1 in order to debug garbage collection data +* and threading flow for improving the debug of memory leaks and async bugs. +* Set it to 0 in order to remove all the noise. +*/ +#define DEBUG_PRINT_ENABLED 1 + typedef struct loader_impl_py_function_type { PyObject *func; @@ -160,7 +166,7 @@ static value py_loader_impl_error_value(loader_impl_py py_impl); static value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject *type_obj, PyObject *value_obj, PyObject *traceback_obj); -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) static void py_loader_impl_gc_print(loader_impl_py py_impl); #endif @@ -2221,7 +2227,7 @@ int py_loader_impl_initialize_traceback(loader_impl impl, loader_impl_py py_impl return 1; } -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED int py_loader_impl_initialize_gc(loader_impl_py py_impl) { PyObject *flags; @@ -2396,10 +2402,10 @@ int py_loader_impl_initialize_thread_background_module(loader_impl_py py_impl) "import asyncio\n" "import threading\n" "import sys\n" -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED "def trace_calls(frame, event, arg):\n" " t = threading.current_thread()\n" - " print(f\"[{t.native_id}] {t.name}: {event} {frame.f_code.co_name}\")\n" + " print(f\"[{t.native_id}] {t.name}: {event} {frame.f_code.co_name}\", flush=True)\n" "threading.settrace(trace_calls)\n" "sys.settrace(trace_calls)\n" #endif @@ -2686,7 +2692,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi loader_impl_py py_impl = malloc(sizeof(struct loader_impl_py_type)); int traceback_initialized = 1; -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED int gc_initialized = 1; #endif int gil_release; @@ -2762,7 +2768,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi traceback_initialized = 0; } -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED /* Initialize GC module */ { gc_initialized = py_loader_impl_initialize_gc(py_impl); @@ -2862,7 +2868,7 @@ loader_impl_data py_loader_impl_initialize(loader_impl impl, configuration confi Py_DecRef(py_impl->traceback_format_exception); Py_DecRef(py_impl->traceback_module); } -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED if (gc_initialized == 0) { Py_DecRef(py_impl->gc_set_debug); @@ -2917,7 +2923,7 @@ int py_loader_impl_execution_path(loader_impl impl, const loader_path path) goto clear_current_path; } -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED py_loader_impl_sys_path_print(system_paths); #endif @@ -4199,7 +4205,7 @@ value py_loader_impl_error_value_from_exception(loader_impl_py py_impl, PyObject return ret; } -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) void py_loader_impl_gc_print(loader_impl_py py_impl) { @@ -4355,7 +4361,7 @@ int py_loader_impl_destroy(loader_impl impl) Py_DecRef(py_impl->thread_background_stop); Py_DecRef(py_impl->thread_background_register_atexit); -#if DEBUG_ENABLED +#if DEBUG_ENABLED && DEBUG_PRINT_ENABLED { #if (defined(__ADDRESS_SANITIZER__) || defined(__MEMORY_SANITIZER__)) py_loader_impl_gc_print(py_impl); From d8e061b17c2a4eebe8a4e9fbebbc876ec58a7e75 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 1 Jul 2025 08:05:21 +0200 Subject: [PATCH 256/364] Solve issues with deadlocks on windows. --- .../loaders/py_loader/source/py_loader_impl.c | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index dcf5ab92a8..d5a11d618e 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -4302,6 +4302,80 @@ int py_loader_impl_finalize(loader_impl_py py_impl, const int host) return 0; } +#if defined(WIN32) || defined(_WIN32) +/* On Windows, threads are destroyed when atexit is executed, we should control this in order to avoid deadlocks */ +static long py_loader_impl_asyncio_thread_native_id(loader_impl_py py_impl) +{ + PyObject *thread_obj = PyObject_GetAttrString(py_impl->asyncio_loop, "t"); + + if (thread_obj == NULL) + { + return -1; + } + + PyObject *native_id_obj = PyObject_GetAttrString(thread_obj, "native_id"); + Py_DecRef(thread_obj); + + if (thread_obj == NULL) + { + return -1; + } + + long native_id = PyLong_AsLong(native_id_obj); + Py_DecRef(native_id_obj); + + if (PyErr_Occurred()) + { + py_loader_impl_error_print(py_impl); + return -1; + } + + return native_id; +} + +static int py_loader_impl_check_thread(loader_impl_py py_impl) +{ + long thread_id = py_loader_impl_asyncio_thread_native_id(py_impl); + + if (thread_id == -1) + { + return -1; + } + + HANDLE thread_handle = OpenThread(THREAD_QUERY_INFORMATION | SYNCHRONIZE, FALSE, thread_id); + + if (thread_handle == NULL) + { + return 1; + } + + DWORD result = WaitForSingleObject(thread_handle, 0); + + CloseHandle(thread_handle); + + if (result == WAIT_TIMEOUT) + { + return 0; + } + else if (result == WAIT_OBJECT_0) + { + /* This workaround forces to skip thread waiting, so it avoids deadlocks */ + PyObject *sys_modules = PyImport_GetModuleDict(); + + if (PyDict_DelItemString(sys_modules, "threading") < 0) + { + PyErr_Print(); + } + + return 1; + } + else + { + return -1; + } +} +#endif + int py_loader_impl_destroy(loader_impl impl) { const int host = loader_impl_get_option_host(impl); @@ -4319,6 +4393,9 @@ int py_loader_impl_destroy(loader_impl impl) py_loader_thread_acquire(); /* Stop event loop for async calls */ +#if defined(WIN32) || defined(_WIN32) + if (py_loader_impl_check_thread(py_impl) == 0) +#endif { PyObject *args_tuple = PyTuple_New(2); Py_IncRef(py_impl->asyncio_loop); From 1cc1a3cb086ab9e3815b874816687f6d7dc16fda Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 1 Jul 2025 08:33:13 +0200 Subject: [PATCH 257/364] Solve issues with wasmtime. --- .../loaders/wasm_loader/source/wasm_loader_impl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/loaders/wasm_loader/source/wasm_loader_impl.c b/source/loaders/wasm_loader/source/wasm_loader_impl.c index 558ea02156..d359ef872f 100644 --- a/source/loaders/wasm_loader/source/wasm_loader_impl.c +++ b/source/loaders/wasm_loader/source/wasm_loader_impl.c @@ -18,6 +18,13 @@ * */ +#ifdef WASMTIME + #if defined(_WIN32) && defined(_MSC_VER) + #define WASM_API_EXTERN + #endif + #include +#endif + #include #include #include @@ -35,13 +42,6 @@ #include -#ifdef WASMTIME - #if defined(_WIN32) && defined(_MSC_VER) - #define WASM_API_EXTERN - #endif - #include -#endif - #define COUNT_OF(array) (sizeof(array) / sizeof(array[0])) typedef struct loader_impl_wasm_type From 33220069d4cefeb098f35b258506d7717e252a37 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 1 Jul 2025 08:39:39 +0200 Subject: [PATCH 258/364] Update version to v0.9.10. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6f060dcbc2..ea8f4fd664 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.9 \ No newline at end of file +0.9.10 \ No newline at end of file From cd0348f8f22209ff51ac375ab47bded5895292a1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Tue, 1 Jul 2025 22:24:38 +0200 Subject: [PATCH 259/364] Solve issues with macos ci. --- .github/workflows/macos-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index d6ba0dc3b5..2a57259961 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -110,7 +110,7 @@ jobs: workflow_file_name: test.yml wait_workflow: true client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}' - ref: ${{ github.head_ref || github.ref_name }} + ref: main - name: MacOS Workflow Dispatch uses: convictional/trigger-workflow-and-wait@v1.6.1 with: From 73c020e0188434705d5308ac2e7e83f94c0138fd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 00:41:46 +0200 Subject: [PATCH 260/364] Improve python package publish and add nodejs package publish. --- .github/workflows/release-nodejs.yml | 26 ++++++++++++++++++++++++++ source/ports/node_port/upload.sh | 22 +++++++++++++++++++--- source/ports/py_port/VERSION | 2 +- source/ports/py_port/upload.sh | 3 +-- 4 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release-nodejs.yml diff --git a/.github/workflows/release-nodejs.yml b/.github/workflows/release-nodejs.yml new file mode 100644 index 0000000000..1f82be6da6 --- /dev/null +++ b/.github/workflows/release-nodejs.yml @@ -0,0 +1,26 @@ +name: Release NodeJS Package + +on: + push: + branches: [ master, develop ] + paths: + - 'source/ports/node_port/package.json' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + release: + name: Release NodeJS Port + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Release the port + working-directory: source/ports/node_port + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: ./upload.sh diff --git a/source/ports/node_port/upload.sh b/source/ports/node_port/upload.sh index a38301bd8c..664e4b83c5 100755 --- a/source/ports/node_port/upload.sh +++ b/source/ports/node_port/upload.sh @@ -19,8 +19,24 @@ # limitations under the License. # -# TODO: Update version in package.json -# TODO: Automate for CD/CI +set -euxo pipefail + +NPM_VERSION=$(npm view metacall version) +PORT_VERSION=$(node -p "require('./package.json').version") + +if [[ "$NPM_VERSION" == "$PORT_VERSION" ]]; then + echo "Current package version is the same as NPM version, skipping upload." + exit 0 +fi + +if [[ -z "${NPM_TOKEN:-}" ]]; then + echo "NPM_TOKEN environment variable is not set or empty, skipping upload" + exit 1 +fi + +# Register the token +echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc # Publish -npm login && npm publish +npm login +npm publish diff --git a/source/ports/py_port/VERSION b/source/ports/py_port/VERSION index 5d4294b912..2411653a50 100644 --- a/source/ports/py_port/VERSION +++ b/source/ports/py_port/VERSION @@ -1 +1 @@ -0.5.1 \ No newline at end of file +0.5.2 \ No newline at end of file diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index 5e86354329..c1505e7c3f 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -30,8 +30,7 @@ if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then fi # Install dependencies and upload MetaCall package -python3 -m pip install --user --upgrade twine setuptools wheel # build -# python3 -m build +python3 -m pip install --user --upgrade twine setuptools wheel python3 setup.py sdist bdist_wheel python3 -m twine check dist/* python3 -m twine upload dist/* From 695a79985bf71f4972c20725717cdf070a109166 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 00:48:08 +0200 Subject: [PATCH 261/364] Trying to solve more issues in node and python packages. --- .github/workflows/release-nodejs.yml | 2 +- .github/workflows/release-python.yml | 2 +- source/ports/py_port/setup.cfg | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-nodejs.yml b/.github/workflows/release-nodejs.yml index 1f82be6da6..da626217cc 100644 --- a/.github/workflows/release-nodejs.yml +++ b/.github/workflows/release-nodejs.yml @@ -4,7 +4,7 @@ on: push: branches: [ master, develop ] paths: - - 'source/ports/node_port/package.json' + - 'source/ports/node_port/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 52f6f4c881..d2d96cabd3 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -4,7 +4,7 @@ on: push: branches: [ master, develop ] paths: - - 'source/ports/py_port/VERSION' + - 'source/ports/py_port/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/source/ports/py_port/setup.cfg b/source/ports/py_port/setup.cfg index 79bc67848f..6a92005e23 100644 --- a/source/ports/py_port/setup.cfg +++ b/source/ports/py_port/setup.cfg @@ -3,3 +3,6 @@ # 3. If at all possible, it is good practice to do this. If you cannot, you # will need to generate wheels for each Python version that you support. universal=1 + +[metadata] +license_files=LICENSE.txt From 44395aec234bb8d73cae2813027f09fe07fc57cb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 00:55:04 +0200 Subject: [PATCH 262/364] Solve issues with python. --- source/ports/py_port/setup.cfg | 1 + source/ports/py_port/setup.py | 3 --- source/ports/py_port/upload.sh | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/ports/py_port/setup.cfg b/source/ports/py_port/setup.cfg index 6a92005e23..cc49de8777 100644 --- a/source/ports/py_port/setup.cfg +++ b/source/ports/py_port/setup.cfg @@ -5,4 +5,5 @@ universal=1 [metadata] +license=Apache-2.0 license_files=LICENSE.txt diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index 4841636e96..bda3e96c88 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -71,9 +71,6 @@ 'Intended Audience :: Developers', 'Topic :: Software Development :: Interpreters', - # License - 'License :: OSI Approved :: Apache Software License', - # Python versions support #'Programming Language :: Python :: 2', #'Programming Language :: Python :: 2.6', diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index c1505e7c3f..d3ff9f3e2f 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -30,7 +30,8 @@ if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then fi # Install dependencies and upload MetaCall package -python3 -m pip install --user --upgrade twine setuptools wheel +python3 -m pip install --user --upgrade twine setuptools wheel build +python3 -m build python3 setup.py sdist bdist_wheel python3 -m twine check dist/* python3 -m twine upload dist/* From 3a47ed3f3e006bbc80a0e8f7a323e4ae24f4a036 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 00:57:22 +0200 Subject: [PATCH 263/364] Remove python build. --- source/ports/py_port/upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index d3ff9f3e2f..01e368666a 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -31,7 +31,7 @@ fi # Install dependencies and upload MetaCall package python3 -m pip install --user --upgrade twine setuptools wheel build -python3 -m build +# python3 -m build python3 setup.py sdist bdist_wheel python3 -m twine check dist/* python3 -m twine upload dist/* From 2f6a01045ef5fc81c1bbc90524481d168f2a4ed1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 06:48:37 +0200 Subject: [PATCH 264/364] Update python port. --- source/ports/py_port/README.rst | 4 ++-- source/ports/py_port/metacall/__init__.py | 2 +- source/ports/py_port/metacall/{api.py => metacall.py} | 0 source/ports/py_port/setup.cfg | 6 ------ 4 files changed, 3 insertions(+), 9 deletions(-) rename source/ports/py_port/metacall/{api.py => metacall.py} (100%) diff --git a/source/ports/py_port/README.rst b/source/ports/py_port/README.rst index c90d8c46b6..27c27ab530 100644 --- a/source/ports/py_port/README.rst +++ b/source/ports/py_port/README.rst @@ -25,7 +25,7 @@ Then install MetaCall Python package through MetaCall: .. code:: console - metacall pip3 install metacall + pip3 install metacall Example ======= @@ -55,7 +55,7 @@ Running the example: .. code:: console - metacall main.py + python3 main.py Using pointers (calling to a C library) --------------------------------------- diff --git a/source/ports/py_port/metacall/__init__.py b/source/ports/py_port/metacall/__init__.py index 412cd2dd18..e34d69bc51 100644 --- a/source/ports/py_port/metacall/__init__.py +++ b/source/ports/py_port/metacall/__init__.py @@ -17,4 +17,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from metacall.api import metacall, metacall_load_from_file, metacall_load_from_memory, metacall_load_from_package, metacall_inspect, metacall_value_create_ptr, metacall_value_reference, metacall_value_dereference +from metacall.metacall import metacall, metacall_load_from_file, metacall_load_from_memory, metacall_load_from_package, metacall_inspect, metacall_value_create_ptr, metacall_value_reference, metacall_value_dereference diff --git a/source/ports/py_port/metacall/api.py b/source/ports/py_port/metacall/metacall.py similarity index 100% rename from source/ports/py_port/metacall/api.py rename to source/ports/py_port/metacall/metacall.py diff --git a/source/ports/py_port/setup.cfg b/source/ports/py_port/setup.cfg index cc49de8777..51402097a7 100644 --- a/source/ports/py_port/setup.cfg +++ b/source/ports/py_port/setup.cfg @@ -1,9 +1,3 @@ -[bdist_wheel] -# This flag says that the code is written to work on both Python 2 and Python -# 3. If at all possible, it is good practice to do this. If you cannot, you -# will need to generate wheels for each Python version that you support. -universal=1 - [metadata] license=Apache-2.0 license_files=LICENSE.txt From 4eb5d8cb4c9f1a2f2404ebf83e41723c5553b208 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 06:49:39 +0200 Subject: [PATCH 265/364] Testing node port. --- .github/workflows/release-nodejs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-nodejs.yml b/.github/workflows/release-nodejs.yml index da626217cc..bc733d6137 100644 --- a/.github/workflows/release-nodejs.yml +++ b/.github/workflows/release-nodejs.yml @@ -3,8 +3,8 @@ name: Release NodeJS Package on: push: branches: [ master, develop ] - paths: - - 'source/ports/node_port/**' + # paths: + # - 'source/ports/node_port/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} From 7059976e5dcfa3ec2f4b577a414d865f6a6fc538 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 06:53:02 +0200 Subject: [PATCH 266/364] Trying to build python package. --- source/ports/py_port/metacall/__init__.py | 2 +- source/ports/py_port/metacall/{metacall.py => api.py} | 0 source/ports/py_port/upload.sh | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename source/ports/py_port/metacall/{metacall.py => api.py} (100%) diff --git a/source/ports/py_port/metacall/__init__.py b/source/ports/py_port/metacall/__init__.py index e34d69bc51..412cd2dd18 100644 --- a/source/ports/py_port/metacall/__init__.py +++ b/source/ports/py_port/metacall/__init__.py @@ -17,4 +17,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from metacall.metacall import metacall, metacall_load_from_file, metacall_load_from_memory, metacall_load_from_package, metacall_inspect, metacall_value_create_ptr, metacall_value_reference, metacall_value_dereference +from metacall.api import metacall, metacall_load_from_file, metacall_load_from_memory, metacall_load_from_package, metacall_inspect, metacall_value_create_ptr, metacall_value_reference, metacall_value_dereference diff --git a/source/ports/py_port/metacall/metacall.py b/source/ports/py_port/metacall/api.py similarity index 100% rename from source/ports/py_port/metacall/metacall.py rename to source/ports/py_port/metacall/api.py diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index 01e368666a..d3ff9f3e2f 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -31,7 +31,7 @@ fi # Install dependencies and upload MetaCall package python3 -m pip install --user --upgrade twine setuptools wheel build -# python3 -m build +python3 -m build python3 setup.py sdist bdist_wheel python3 -m twine check dist/* python3 -m twine upload dist/* From 5b8ddaa46e8b820295707af423607d8076c52db5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 06:54:41 +0200 Subject: [PATCH 267/364] Corrected bash script. --- source/ports/node_port/upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/node_port/upload.sh b/source/ports/node_port/upload.sh index 664e4b83c5..f37d4c53a5 100755 --- a/source/ports/node_port/upload.sh +++ b/source/ports/node_port/upload.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash # # MetaCall NodeJS Port Deploy Script by Parra Studios From 050a199baaaf9b952f1d6e7c54e56557a1277e84 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 06:57:45 +0200 Subject: [PATCH 268/364] Update version of node package. --- .github/workflows/release-nodejs.yml | 4 ++-- source/ports/node_port/package-lock.json | 2 +- source/ports/node_port/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-nodejs.yml b/.github/workflows/release-nodejs.yml index bc733d6137..da626217cc 100644 --- a/.github/workflows/release-nodejs.yml +++ b/.github/workflows/release-nodejs.yml @@ -3,8 +3,8 @@ name: Release NodeJS Package on: push: branches: [ master, develop ] - # paths: - # - 'source/ports/node_port/**' + paths: + - 'source/ports/node_port/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/source/ports/node_port/package-lock.json b/source/ports/node_port/package-lock.json index bfb3b0d1b7..33e7e61c0e 100644 --- a/source/ports/node_port/package-lock.json +++ b/source/ports/node_port/package-lock.json @@ -1,6 +1,6 @@ { "name": "metacall", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/source/ports/node_port/package.json b/source/ports/node_port/package.json index f9508ef757..5c15efc0b8 100644 --- a/source/ports/node_port/package.json +++ b/source/ports/node_port/package.json @@ -1,6 +1,6 @@ { "name": "metacall", - "version": "0.5.0", + "version": "0.5.1", "description": "Call Python, C#, Ruby... functions from NodeJS (a NodeJS Port for MetaCall)", "repository": "github:metacall/core", "bugs": "https://github.com/metacall/core/issues", From ac753a400bf5415e629ed22e2df80fd9d955e3fa Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia Date: Wed, 2 Jul 2025 07:01:11 +0200 Subject: [PATCH 269/364] Update python package, remove version. --- source/ports/py_port/VERSION | 1 - source/ports/py_port/setup.py | 6 +----- source/ports/py_port/upload.sh | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 source/ports/py_port/VERSION diff --git a/source/ports/py_port/VERSION b/source/ports/py_port/VERSION deleted file mode 100644 index 2411653a50..0000000000 --- a/source/ports/py_port/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.5.2 \ No newline at end of file diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index bda3e96c88..c1e17fe04b 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -32,10 +32,6 @@ with open(os.path.join(current_path, 'README.rst'), encoding='utf-8') as f: long_description = f.read() -# Get the version -with open(os.path.join(current_path, 'VERSION')) as f: - version = f.read() - # Define set up options options = { 'name': 'metacall', @@ -43,7 +39,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - 'version': version, + 'version': '0.5.2', 'description': 'A library for providing inter-language foreign function interface calls', 'long_description': long_description, diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index d3ff9f3e2f..6aa047bb8a 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -22,7 +22,7 @@ set -exuo pipefail PYPI_VERSION=$(curl -s https://pypi.org/rss/project/metacall/releases.xml | sed -n 's/\s*\([0-9.]*\).*/\1/p' | sed -n '2 p') -PORT_VERSION=$(cat VERSION) +PORT_VERSION=$(python3 setup.py --version) if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then echo "Current package version is the same as PyPI version, skipping upload." From 9499dddf3399919e8684b7172f2820d885c83409 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:04:14 +0200 Subject: [PATCH 270/364] Remove setup.py run on python package. --- source/ports/py_port/upload.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index 6aa047bb8a..73a9db3ad4 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -32,7 +32,6 @@ fi # Install dependencies and upload MetaCall package python3 -m pip install --user --upgrade twine setuptools wheel build python3 -m build -python3 setup.py sdist bdist_wheel python3 -m twine check dist/* python3 -m twine upload dist/* From f2b132747c0d62aaf83e658d378bcc3e6b490534 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:09:02 +0200 Subject: [PATCH 271/364] Remove setup.cfg. --- source/ports/py_port/MANIFEST.in | 4 ---- source/ports/py_port/setup.cfg | 3 --- 2 files changed, 7 deletions(-) delete mode 100644 source/ports/py_port/setup.cfg diff --git a/source/ports/py_port/MANIFEST.in b/source/ports/py_port/MANIFEST.in index 7557376f5f..a4fa0c0da8 100644 --- a/source/ports/py_port/MANIFEST.in +++ b/source/ports/py_port/MANIFEST.in @@ -3,7 +3,3 @@ include LICENSE.txt # Include the data files recursive-include data * - -# If using Python 2.6 or less, then have to include package data, even though -# it's already declared in setup.py -# include sample/*.dat diff --git a/source/ports/py_port/setup.cfg b/source/ports/py_port/setup.cfg deleted file mode 100644 index 51402097a7..0000000000 --- a/source/ports/py_port/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[metadata] -license=Apache-2.0 -license_files=LICENSE.txt From bc6deb47a64c7bf8c9075cb745b191be4afc81f9 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:11:26 +0200 Subject: [PATCH 272/364] Update license_files. --- source/ports/py_port/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index c1e17fe04b..535850a824 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -54,6 +54,7 @@ # License 'license': 'Apache License 2.0', + 'license_files': 'LICENSE.txt', # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'classifiers': [ From 9ebb3f33f3f4cfb2e4ac5cf1a4ded6ed18f76911 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:12:42 +0200 Subject: [PATCH 273/364] Update license properly. --- source/ports/py_port/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index 535850a824..ea1e15e57e 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -54,7 +54,7 @@ # License 'license': 'Apache License 2.0', - 'license_files': 'LICENSE.txt', + 'license_files': ['LICENSE.txt'], # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'classifiers': [ From f0075922a38884e8a9c653e2f1f6fa3f2c58bfda Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:16:48 +0200 Subject: [PATCH 274/364] Test python package. --- source/ports/py_port/upload.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index 73a9db3ad4..a3aba92f0d 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -29,6 +29,9 @@ if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then exit 0 fi +# Delete previous build +rm -rf dist build *.egg-info + # Install dependencies and upload MetaCall package python3 -m pip install --user --upgrade twine setuptools wheel build python3 -m build @@ -36,4 +39,4 @@ python3 -m twine check dist/* python3 -m twine upload dist/* # Delete output -rm -rf dist/* build/* +rm -rf dist build *.egg-info From 60242c043e86a45cd801d26642b7956728487831 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:18:00 +0200 Subject: [PATCH 275/364] Remove license files. --- source/ports/py_port/setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py index ea1e15e57e..c1e17fe04b 100644 --- a/source/ports/py_port/setup.py +++ b/source/ports/py_port/setup.py @@ -54,7 +54,6 @@ # License 'license': 'Apache License 2.0', - 'license_files': ['LICENSE.txt'], # See https://pypi.python.org/pypi?%3Aaction=list_classifiers 'classifiers': [ From da32696f7fbefa70800b10253a27f0f8fd02793f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 2 Jul 2025 01:41:53 -0400 Subject: [PATCH 276/364] Create pyproject.toml --- source/ports/py_port/pyproject.toml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source/ports/py_port/pyproject.toml diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml new file mode 100644 index 0000000000..6df32310da --- /dev/null +++ b/source/ports/py_port/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=61", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "metacall" +version = "0.5.2" +description = "A library for providing inter-language foreign function interface calls" +readme = "README.rst" +requires-python = ">=3.7" +license = { text = "Apache-2.0" } +authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Topic :: Software Development :: Interpreters", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13" +] +dependencies = [] + +[tool.setuptools] +packages = ["metacall"] + +[tool.setuptools.package-data] +"metacall" = ["*"] From e857ef0f3e8f7d7a4cbfa7b754f7ec3485751cce Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:48:59 +0200 Subject: [PATCH 277/364] Improving pyproject.toml. --- source/ports/py_port/pyproject.toml | 9 +- source/ports/py_port/setup.py | 124 ---------------------------- 2 files changed, 8 insertions(+), 125 deletions(-) delete mode 100644 source/ports/py_port/setup.py diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 6df32310da..9bf127f9bb 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -6,8 +6,9 @@ build-backend = "setuptools.build_meta" name = "metacall" version = "0.5.2" description = "A library for providing inter-language foreign function interface calls" +keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" -requires-python = ">=3.7" +requires-python = ">=3.3" license = { text = "Apache-2.0" } authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ @@ -29,6 +30,12 @@ classifiers = [ ] dependencies = [] +[project.urls] +Homepage = "https://metacall.io/" +Repository = "https://github.com/metacall/core" +Documentation = "https://core.metacall.io/" +Issues = "https://github.com/metacall/core/issues" + [tool.setuptools] packages = ["metacall"] diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py deleted file mode 100644 index c1e17fe04b..0000000000 --- a/source/ports/py_port/setup.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python3 - -# MetaCall Python Port by Parra Studios -# A frontend for Python language bindings in MetaCall. -# -# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# To use a consistent encoding -from codecs import open -import os -import sys -import re - -# Always prefer setuptools over distutils -from setuptools import setup, find_packages - -current_path = os.path.abspath(os.path.dirname(__file__)) - -# Get the long description from the README file -with open(os.path.join(current_path, 'README.rst'), encoding='utf-8') as f: - long_description = f.read() - -# Define set up options -options = { - 'name': 'metacall', - - # Versions should comply with PEP440. For a discussion on single-sourcing - # the version across setup.py and the project code, see - # https://packaging.python.org/en/latest/single_source_version.html - 'version': '0.5.2', - - 'description': 'A library for providing inter-language foreign function interface calls', - 'long_description': long_description, - 'long_description_content_type': 'text/x-rst', - - # The project's main homepage - 'url': 'https://github.com/metacall/core', - - # Author details - 'author': 'Vicente Eduardo Ferrer Garcia', - 'author_email': 'vic798@gmail.com', - - # License - 'license': 'Apache License 2.0', - - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - 'classifiers': [ - # Project Status - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 4 - Beta', - - # Audience - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Interpreters', - - # Python versions support - #'Programming Language :: Python :: 2', - #'Programming Language :: Python :: 2.6', - #'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - ], - - # Keywords - 'keywords': 'metacall python port ffi polyglot faas serverless', - - # Modules - 'py_modules': ['metacall'], - - # List additional groups of dependencies here (e.g. development - # dependencies). You can install these using the following syntax, - # for example: - # $ pip install -e .[dev,test] - 'extras_require': { - 'dev': ['check-manifest'], - 'test': ['coverage'], - }, - - # If there are data files included in your packages that need to be - # installed, specify them here. If using Python 2.6 or less, then these - # have to be included in MANIFEST.in as well. - #package_data: { - # 'sample': ['package_data.dat'], - #}, - - # Although 'package_data' is the preferred approach, in some case you may - # need to place data files outside of your packages. See: - # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa - # In this case, 'data_file' will be installed into '<sys.prefix>/my_data' - #data_files: [('my_data', ['data/data_file'])], -} - -# Exclude base packages -exclude_packages = ['contrib', 'docs', 'test', 'test.py' 'CMakeLists.txt', '.gitignore', 'upload.sh'] - -# Define required packages -options['packages'] = find_packages(exclude=exclude_packages) - -# Execute the setup -setup(**options) From 8404af32724d66c700802989611507e105e69b5e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:51:41 +0200 Subject: [PATCH 278/364] Update port version. --- source/ports/py_port/upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index a3aba92f0d..e2b992fb35 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -22,7 +22,7 @@ set -exuo pipefail PYPI_VERSION=$(curl -s https://pypi.org/rss/project/metacall/releases.xml | sed -n 's/\s*<title>\([0-9.]*\).*/\1/p' | sed -n '2 p') -PORT_VERSION=$(python3 setup.py --version) +PORT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml) if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then echo "Current package version is the same as PyPI version, skipping upload." From 20150d60272a457dddf25df3f14914eb05122c3e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:54:47 +0200 Subject: [PATCH 279/364] Update license version. --- source/ports/py_port/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 9bf127f9bb..aaca782f19 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -9,7 +9,8 @@ description = "A library for providing inter-language foreign function interface keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" requires-python = ">=3.3" -license = { text = "Apache-2.0" } +license = "Apache-2.0" +license-files = ["LICENSE.txt"] authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", From 5d23bb53608a2f8e45d2493dacbc2d91535572dd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 07:59:20 +0200 Subject: [PATCH 280/364] Remove unused files python package. --- source/ports/py_port/MANIFEST.in | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 source/ports/py_port/MANIFEST.in diff --git a/source/ports/py_port/MANIFEST.in b/source/ports/py_port/MANIFEST.in deleted file mode 100644 index a4fa0c0da8..0000000000 --- a/source/ports/py_port/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -# Include the license file -include LICENSE.txt - -# Include the data files -recursive-include data * From 51517a8d301230cbc5ada6b3ca1789519b0db74b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:02:35 +0200 Subject: [PATCH 281/364] Update setuptools. --- source/ports/py_port/pyproject.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index aaca782f19..0e69dda307 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=61", "wheel"] +requires = ["setuptools>=65", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -39,6 +39,3 @@ Issues = "https://github.com/metacall/core/issues" [tool.setuptools] packages = ["metacall"] - -[tool.setuptools.package-data] -"metacall" = ["*"] From 3ac6927f75374f4c8390c90550cd463c1515f381 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:04:51 +0200 Subject: [PATCH 282/364] Remove license. --- source/ports/py_port/LICENSE.txt | 201 ---------------------------- source/ports/py_port/pyproject.toml | 1 - 2 files changed, 202 deletions(-) delete mode 100644 source/ports/py_port/LICENSE.txt diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt deleted file mode 100644 index d56ad81fad..0000000000 --- a/source/ports/py_port/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 0e69dda307..04ac721347 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -10,7 +10,6 @@ keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless readme = "README.rst" requires-python = ">=3.3" license = "Apache-2.0" -license-files = ["LICENSE.txt"] authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", From f36c6b1842b42ad2e7723b24e3191ae8e7aa8041 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Wed, 2 Jul 2025 02:07:50 -0400 Subject: [PATCH 283/364] Update pyproject.toml --- source/ports/py_port/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 04ac721347..77562f8c0d 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -12,6 +12,7 @@ requires-python = ">=3.3" license = "Apache-2.0" authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ + "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Software Development :: Interpreters", From d4c26f62f9520b46996c9c9a42f9e701a03d9879 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:11:34 +0200 Subject: [PATCH 284/364] Modify license. --- source/ports/py_port/LICENSE.txt | 201 ++++++++++++++++++++++++++++ source/ports/py_port/pyproject.toml | 3 +- 2 files changed, 202 insertions(+), 2 deletions(-) create mode 100644 source/ports/py_port/LICENSE.txt diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt new file mode 100644 index 0000000000..d56ad81fad --- /dev/null +++ b/source/ports/py_port/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 77562f8c0d..b55234f78c 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -9,10 +9,9 @@ description = "A library for providing inter-language foreign function interface keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" requires-python = ">=3.3" -license = "Apache-2.0" +license = { file = "LICENSE.txt" } authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ - "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Software Development :: Interpreters", From 22750ba0bb7aff2a4126e51408a20f1bff5e0184 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:13:02 +0200 Subject: [PATCH 285/364] License files python package. --- source/ports/py_port/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index b55234f78c..55c6bf84b7 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -9,7 +9,7 @@ description = "A library for providing inter-language foreign function interface keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" requires-python = ">=3.3" -license = { file = "LICENSE.txt" } +license-files = ["LICENSE.txt"] authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", From 02ddf49476d9b3f36bc2d0c239c3056e2b63d0f4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:14:14 +0200 Subject: [PATCH 286/364] Remove license completely. --- source/ports/py_port/LICENSE.txt | 201 ---------------------------- source/ports/py_port/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 202 deletions(-) delete mode 100644 source/ports/py_port/LICENSE.txt diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt deleted file mode 100644 index d56ad81fad..0000000000 --- a/source/ports/py_port/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index 55c6bf84b7..a1f7964119 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -9,7 +9,7 @@ description = "A library for providing inter-language foreign function interface keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" requires-python = ">=3.3" -license-files = ["LICENSE.txt"] +# license-files = ["LICENSE.txt"] authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", From 113ba8c36a95d03546ac4c264dabae44881b72f4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:16:39 +0200 Subject: [PATCH 287/364] Add license to python package again. --- source/ports/py_port/LICENSE.txt | 201 +++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 source/ports/py_port/LICENSE.txt diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt new file mode 100644 index 0000000000..d56ad81fad --- /dev/null +++ b/source/ports/py_port/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 5de40d6e1ba6610dca8e141d8f580b0328c8482d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:19:09 +0200 Subject: [PATCH 288/364] Add token permissions to python package. --- .github/workflows/release-python.yml | 4 + source/ports/py_port/LICENSE.txt | 201 --------------------------- 2 files changed, 4 insertions(+), 201 deletions(-) delete mode 100644 source/ports/py_port/LICENSE.txt diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index d2d96cabd3..a5f0c7de4f 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -6,6 +6,10 @@ on: paths: - 'source/ports/py_port/**' +permissions: + id-token: write + contents: read + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt deleted file mode 100644 index d56ad81fad..0000000000 --- a/source/ports/py_port/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. From 9fe130b0f69e3c6b38fc19f1531f1fe500024bdf Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 08:21:48 +0200 Subject: [PATCH 289/364] Remove license from python package completely. --- source/ports/py_port/pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml index a1f7964119..a693b8d587 100644 --- a/source/ports/py_port/pyproject.toml +++ b/source/ports/py_port/pyproject.toml @@ -9,7 +9,6 @@ description = "A library for providing inter-language foreign function interface keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] readme = "README.rst" requires-python = ">=3.3" -# license-files = ["LICENSE.txt"] authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", From 12668e1d07b34407a30ac470823de4b9ab9dccdd Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 17:02:02 +0200 Subject: [PATCH 290/364] Update version to v0.9.11. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ea8f4fd664..6889a31129 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.10 \ No newline at end of file +0.9.11 \ No newline at end of file From c8339e8a91a80e41c242bab635c952787ceca426 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 17:32:47 +0200 Subject: [PATCH 291/364] Move to setup.py again, it conflicts with distributables. --- source/ports/py_port/LICENSE.txt | 201 ++++++++++++++++++++++++++++ source/ports/py_port/MANIFEST.in | 2 + source/ports/py_port/README.rst | 20 +++ source/ports/py_port/pyproject.toml | 39 ------ source/ports/py_port/setup.py | 134 +++++++++++++++++++ source/ports/py_port/upload.sh | 2 +- 6 files changed, 358 insertions(+), 40 deletions(-) create mode 100644 source/ports/py_port/LICENSE.txt create mode 100644 source/ports/py_port/MANIFEST.in delete mode 100644 source/ports/py_port/pyproject.toml create mode 100644 source/ports/py_port/setup.py diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt new file mode 100644 index 0000000000..d56ad81fad --- /dev/null +++ b/source/ports/py_port/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/source/ports/py_port/MANIFEST.in b/source/ports/py_port/MANIFEST.in new file mode 100644 index 0000000000..e02cfac5fd --- /dev/null +++ b/source/ports/py_port/MANIFEST.in @@ -0,0 +1,2 @@ +# Include the license file +include LICENSE.txt diff --git a/source/ports/py_port/README.rst b/source/ports/py_port/README.rst index 27c27ab530..6947e5c090 100644 --- a/source/ports/py_port/README.rst +++ b/source/ports/py_port/README.rst @@ -51,6 +51,26 @@ Calling Ruby from Python metacall('multiply', 3, 4); # 12 +Calling NodeJS from Python (MonkeyPatch API) +------------------------ + +``sum.js`` + +.. code:: js + + module.exports = { + sum: (x, y) => x + y, + }; + +``main.py`` + +.. code:: python + + import metacall + from sum.js import sum + + sum(3, 4); # 7 + Running the example: .. code:: console diff --git a/source/ports/py_port/pyproject.toml b/source/ports/py_port/pyproject.toml deleted file mode 100644 index a693b8d587..0000000000 --- a/source/ports/py_port/pyproject.toml +++ /dev/null @@ -1,39 +0,0 @@ -[build-system] -requires = ["setuptools>=65", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "metacall" -version = "0.5.2" -description = "A library for providing inter-language foreign function interface calls" -keywords = ["metacall", "python", "port", "ffi", "polyglot", "faas", "serverless"] -readme = "README.rst" -requires-python = ">=3.3" -authors = [{ name = "Vicente Eduardo Ferrer Garcia", email = "vic798@gmail.com" }] -classifiers = [ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Topic :: Software Development :: Interpreters", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13" -] -dependencies = [] - -[project.urls] -Homepage = "https://metacall.io/" -Repository = "https://github.com/metacall/core" -Documentation = "https://core.metacall.io/" -Issues = "https://github.com/metacall/core/issues" - -[tool.setuptools] -packages = ["metacall"] diff --git a/source/ports/py_port/setup.py b/source/ports/py_port/setup.py new file mode 100644 index 0000000000..f5094e04c6 --- /dev/null +++ b/source/ports/py_port/setup.py @@ -0,0 +1,134 @@ +#!/usr/bin/env python3 + +# MetaCall Python Port by Parra Studios +# A frontend for Python language bindings in MetaCall. +# +# Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# To use a consistent encoding +from codecs import open +import os +import sys +import re + +# Always prefer setuptools over distutils +from setuptools import setup, find_packages + +current_path = os.path.abspath(os.path.dirname(__file__)) + +# Get the long description from the README file +with open(os.path.join(current_path, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + +# Define set up options +options = { + 'name': 'metacall', + + # Versions should comply with PEP440. For a discussion on single-sourcing + # the version across setup.py and the project code, see + # https://packaging.python.org/en/latest/single_source_version.html + 'version': '0.5.3', + + 'description': 'A library for providing inter-language foreign function interface calls', + 'long_description': long_description, + 'long_description_content_type': 'text/x-rst', + + # The project's main homepage + 'url': 'https://github.com/metacall/core', + + 'project_urls': { + 'Homepage': 'https://metacall.io/', + 'Repository': 'https://github.com/metacall/core', + 'Documentation': 'https://core.metacall.io/', + 'Issues': 'https://github.com/metacall/core/issues', + }, + + # Author details + 'author': 'Vicente Eduardo Ferrer Garcia', + 'author_email': 'vic798@gmail.com', + + # License + 'license': 'Apache License 2.0', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + 'classifiers': [ + # Project Status + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 4 - Beta', + + # Audience + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Interpreters', + + # Python versions support + #'Programming Language :: Python :: 2', + #'Programming Language :: Python :: 2.6', + #'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', + ], + + # Keywords + 'keywords': 'metacall python port ffi polyglot faas serverless', + + # Required Python version + 'python_requires': '>=3.3', + + # Dependencies + 'install_requires': [], + + # List additional groups of dependencies here (e.g. development + # dependencies). You can install these using the following syntax, + # for example: + # $ pip install -e .[dev,test] + 'extras_require': { + 'dev': ['check-manifest'], + 'test': ['coverage'], + }, + + # If there are data files included in your packages that need to be + # installed, specify them here. If using Python 2.6 or less, then these + # have to be included in MANIFEST.in as well. + #package_data: { + # 'sample': ['package_data.dat'], + #}, + + # Although 'package_data' is the preferred approach, in some case you may + # need to place data files outside of your packages. See: + # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa + # In this case, 'data_file' will be installed into '<sys.prefix>/my_data' + #data_files: [('my_data', ['data/data_file'])], +} + +# Exclude base packages +exclude_packages = ['contrib', 'docs', 'test', 'test.py', 'CMakeLists.txt', '.gitignore', 'upload.sh'] + +# Define required packages +options['packages'] = find_packages(exclude=exclude_packages) + +# Execute the setup +setup(**options) diff --git a/source/ports/py_port/upload.sh b/source/ports/py_port/upload.sh index e2b992fb35..a3aba92f0d 100755 --- a/source/ports/py_port/upload.sh +++ b/source/ports/py_port/upload.sh @@ -22,7 +22,7 @@ set -exuo pipefail PYPI_VERSION=$(curl -s https://pypi.org/rss/project/metacall/releases.xml | sed -n 's/\s*<title>\([0-9.]*\).*/\1/p' | sed -n '2 p') -PORT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml) +PORT_VERSION=$(python3 setup.py --version) if [[ "$PYPI_VERSION" == "$PORT_VERSION" ]]; then echo "Current package version is the same as PyPI version, skipping upload." From 913ae9dc5c4411953d95c5c26fe7e933491c1968 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 17:34:22 +0200 Subject: [PATCH 292/364] Remove license from python package,. --- source/ports/py_port/LICENSE.txt | 201 ------------------------------- source/ports/py_port/MANIFEST.in | 2 - 2 files changed, 203 deletions(-) delete mode 100644 source/ports/py_port/LICENSE.txt delete mode 100644 source/ports/py_port/MANIFEST.in diff --git a/source/ports/py_port/LICENSE.txt b/source/ports/py_port/LICENSE.txt deleted file mode 100644 index d56ad81fad..0000000000 --- a/source/ports/py_port/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016-2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/source/ports/py_port/MANIFEST.in b/source/ports/py_port/MANIFEST.in deleted file mode 100644 index e02cfac5fd..0000000000 --- a/source/ports/py_port/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -# Include the license file -include LICENSE.txt From 69f2aa51087b490059ef65624103dae72c006f5f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 17:35:47 +0200 Subject: [PATCH 293/364] Solve issues. --- source/ports/py_port/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/py_port/README.rst b/source/ports/py_port/README.rst index 6947e5c090..469dad7302 100644 --- a/source/ports/py_port/README.rst +++ b/source/ports/py_port/README.rst @@ -52,7 +52,7 @@ Calling Ruby from Python metacall('multiply', 3, 4); # 12 Calling NodeJS from Python (MonkeyPatch API) ------------------------- +-------------------------------------------- ``sum.js`` From b5c5fa940ddcfe51a59f9c6c5dbbb35f8fa17c32 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 2 Jul 2025 18:01:19 +0200 Subject: [PATCH 294/364] Update to version v0.9.12. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6889a31129..bf1ba0c171 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.11 \ No newline at end of file +0.9.12 \ No newline at end of file From 54b6b15e6288fabf61a143e631c439854546955a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Tue, 8 Jul 2025 19:18:14 -0400 Subject: [PATCH 295/364] Update docker-hub.yml --- .github/workflows/docker-hub.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 907dc9ba32..34267338aa 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -81,6 +81,8 @@ jobs: version: v${{ env.BUILDKIT_VERSION }} - name: Login to Docker Hub + # Only run when master or when tagging a version + if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} From ae05b71b9a088720f331a99596372f40327cd7f0 Mon Sep 17 00:00:00 2001 From: Mahdi Sharifi <devraymondsh@gmail.com> Date: Wed, 9 Jul 2025 02:49:46 +0330 Subject: [PATCH 296/364] Implement metacall_box for passing function arguments with different types (#538) * Implement metacall_box for passing function arguments with different types * Update metacall_test.rs --------- Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- source/ports/rs_port/src/cast.rs | 2 +- source/ports/rs_port/src/lib.rs | 1 + .../rs_port/src/types/metacall_exception.rs | 2 +- .../ports/rs_port/src/types/metacall_value.rs | 33 +++++++++++++++++ source/ports/rs_port/tests/metacall_test.rs | 36 ++++++++----------- 5 files changed, 51 insertions(+), 23 deletions(-) diff --git a/source/ports/rs_port/src/cast.rs b/source/ports/rs_port/src/cast.rs index 51574fdf16..61e4c3e8c9 100644 --- a/source/ports/rs_port/src/cast.rs +++ b/source/ports/rs_port/src/cast.rs @@ -235,6 +235,6 @@ pub fn metacallobj_untyped_to_raw(ret: Box<dyn MetaCallValue>) -> Option<*mut c_ None } -pub fn metacall_implementer_to_traitobj(v: impl MetaCallValue) -> Box<dyn MetaCallValue> { +pub fn metacall_box(v: impl MetaCallValue) -> Box<dyn MetaCallValue> { Box::new(v) as Box<dyn MetaCallValue> } diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index ac93df572d..328236d574 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -88,6 +88,7 @@ pub use types::*; #[doc(hidden)] mod init; +pub use cast::metacall_box; pub use init::initialize; pub use init::is_initialized; diff --git a/source/ports/rs_port/src/types/metacall_exception.rs b/source/ports/rs_port/src/types/metacall_exception.rs index c3bf662cc4..f753fce6ce 100644 --- a/source/ports/rs_port/src/types/metacall_exception.rs +++ b/source/ports/rs_port/src/types/metacall_exception.rs @@ -180,7 +180,7 @@ impl MetaCallThrowable { Ok(mut value) => { value.leak = true; - cast::metacall_implementer_to_traitobj(value) + cast::metacall_box(value) } Err(original) => original, } diff --git a/source/ports/rs_port/src/types/metacall_value.rs b/source/ports/rs_port/src/types/metacall_value.rs index 97a6695672..bbc5870ff2 100644 --- a/source/ports/rs_port/src/types/metacall_value.rs +++ b/source/ports/rs_port/src/types/metacall_value.rs @@ -429,3 +429,36 @@ impl MetaCallValue for MetaCallThrowable { self.into_raw() } } +/// Just a Rust barrier made for easier polymorphism. +impl MetaCallValue for Box<dyn MetaCallValue> { + fn get_metacall_id() -> metacall_value_id { + metacall_value_id::METACALL_INVALID + } + fn from_metacall_raw_leak(v: *mut c_void) -> Result<Self, Box<dyn MetaCallValue>> { + Ok(cast::raw_to_metacallobj_untyped_leak(v)) + } + fn into_metacall_raw(self) -> *mut c_void { + match_metacall_value!(self, { + bool: bool => bool.into_metacall_raw(), + char: char => char.into_metacall_raw(), + num: i16 => num.into_metacall_raw(), + num: i32 => num.into_metacall_raw(), + num: i64 => num.into_metacall_raw(), + num: f32 => num.into_metacall_raw(), + num: f64 => num.into_metacall_raw(), + str: String => str.into_metacall_raw(), + buf: Vec<i8> => buf.into_metacall_raw(), + arr: Vec<Box<dyn MetaCallValue>> => arr.into_metacall_raw(), + map: HashMap<String, Box<dyn MetaCallValue>> => map.into_metacall_raw(), + ptr: MetaCallPointer => ptr.into_metacall_raw(), + fut: MetaCallFuture => fut.into_metacall_raw(), + fun: MetaCallFunction => fun.into_metacall_raw(), + null: MetaCallNull => null.into_metacall_raw(), + cls: MetaCallClass => cls.into_metacall_raw(), + obj: MetaCallObject => obj.into_metacall_raw(), + exc: MetaCallException => exc.into_metacall_raw(), + thr: MetaCallThrowable => thr.into_metacall_raw(), + _ => MetaCallNull().into_metacall_raw() + }) + } +} diff --git a/source/ports/rs_port/tests/metacall_test.rs b/source/ports/rs_port/tests/metacall_test.rs index ad6389262c..d23e2e2ae3 100644 --- a/source/ports/rs_port/tests/metacall_test.rs +++ b/source/ports/rs_port/tests/metacall_test.rs @@ -81,27 +81,22 @@ fn test_float() { fn test_double() { generate_test::<f64>("test_double", 1.2345_f64); } -// TODO -// fn test_mixed_numbers() { -// let result = ::metacall::metacall::<i64>( -// "test_mixed_numbers", -// [ -// Box::new(1 as i16) as Box<dyn MetaCallValue>, -// Box::new(2 as i32) as Box<dyn MetaCallValue>, -// Box::new(3 as i64) as Box<dyn MetaCallValue>, -// ], -// ); - -// // TODO -// // ::metacall::metacall::<i64>("test_mixed_numbers", [1_i16, 2_i32, 3_i64]); -// // ::metacall::metacall::<i64>("test_mixed_numbers", (1_i16, 2_i32, 3_i64)); +fn test_mixed_numbers() { + let result = ::metacall::metacall::<i64>( + "test_mixed_numbers", + [ + ::metacall::metacall_box(1 as i16), + ::metacall::metacall_box(2 as i32), + ::metacall::metacall_box(3 as i64), + ], + ); -// assert!(result.is_ok()); + assert!(result.is_ok()); -// if let Ok(ret) = result { -// assert_eq!(ret, 6_i64) -// } -// } + if let Ok(ret) = result { + assert_eq!(ret, 6_i64) + } +} fn test_string() { generate_test::<String>( "return_the_argument_py", @@ -393,8 +388,7 @@ fn metacall() { test_int(); test_long(); test_short(); - // TODO - // test_mixed_numbers(); + test_mixed_numbers(); } if load::from_single_file("node", js_test_file).is_ok() { test_exception(); From 81faf03ff665a2014a247a1c7c4fb08f25164e6b Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 9 Jul 2025 17:04:08 +0200 Subject: [PATCH 297/364] Remove PORT_LIBRARY_PATH. --- docker-compose.yml | 3 --- source/CMakeLists.txt | 8 -------- source/ports/rs_port/CMakeLists.txt | 1 - tools/cli/Dockerfile | 1 - tools/dev/Dockerfile | 1 - tools/metacall-sanitizer.sh | 1 - tools/runtime/Dockerfile | 1 - 7 files changed, 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f74866582d..1c1997b138 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,7 +64,6 @@ services: CONFIGURATION_PATH: $METACALL_PATH/build/configurations/global.json SERIAL_LIBRARY_PATH: $METACALL_PATH/build DETOUR_LIBRARY_PATH: $METACALL_PATH/build - PORT_LIBRARY_PATH: $METACALL_PATH/build NODE_PATH: /usr/lib/node_modules runtime: @@ -88,7 +87,6 @@ services: CONFIGURATION_PATH: /usr/local/share/metacall/configurations/global.json SERIAL_LIBRARY_PATH: /usr/local/lib DETOUR_LIBRARY_PATH: /usr/local/lib - PORT_LIBRARY_PATH: /usr/local/lib NODE_PATH: /usr/local/lib/node_modules cli: @@ -108,5 +106,4 @@ services: CONFIGURATION_PATH: /usr/local/share/metacall/configurations/global.json SERIAL_LIBRARY_PATH: /usr/local/lib DETOUR_LIBRARY_PATH: /usr/local/lib - PORT_LIBRARY_PATH: /usr/local/lib NODE_PATH: /usr/local/lib/node_modules diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 883be65c36..b7c1e402b9 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -18,9 +18,6 @@ set(SERIAL_LIBRARY_PATH "@OUTPUT_DIRECTORY_DIR@" CACHE PATH "MetaCall serial lib # Export output detour plugin directory set(DETOUR_LIBRARY_PATH "@OUTPUT_DIRECTORY_DIR@" CACHE PATH "MetaCall detour library path") -# Export output port directory -set(PORT_LIBRARY_PATH "@OUTPUT_DIRECTORY_DIR@" CACHE PATH "MetaCall port library path") - # Add extra environment varible set(EXTRA_ENVIRONMENT_VARIABLES "" CACHE PATH "MetaCall extra environment variable") @@ -54,16 +51,11 @@ set(TESTS_DETOUR_ENVIRONMENT_VARIABLES "DETOUR_LIBRARY_PATH=${DETOUR_LIBRARY_PATH}" ) -set(TESTS_PORT_ENVIRONMENT_VARIABLES - "PORT_LIBRARY_PATH=${PORT_LIBRARY_PATH}" -) - set(TESTS_ENVIRONMENT_VARIABLES ${TESTS_LOADER_ENVIRONMENT_VARIABLES} ${TESTS_CONFIGURATION_ENVIRONMENT_VARIABLES} ${TESTS_SERIAL_ENVIRONMENT_VARIABLES} ${TESTS_DETOUR_ENVIRONMENT_VARIABLES} - ${TESTS_PORT_ENVIRONMENT_VARIABLES} ${TESTS_SANITIZER_ENVIRONMENT_VARIABLES} ${TESTS_MEMCHECK_ENVIRONMENT_VARIABLES} ${EXTRA_ENVIRONMENT_VARIABLES} diff --git a/source/ports/rs_port/CMakeLists.txt b/source/ports/rs_port/CMakeLists.txt index 548d583b93..972c34922d 100644 --- a/source/ports/rs_port/CMakeLists.txt +++ b/source/ports/rs_port/CMakeLists.txt @@ -215,7 +215,6 @@ set(RS_PORT_DEBUG_ENVIRONMENT_VARIABLES "CONFIGURATION_PATH=${PROJECT_OUTPUT_DIR}/configurations/global.json" "SERIAL_LIBRARY_PATH=${PROJECT_OUTPUT_DIR}" "DETOUR_LIBRARY_PATH=${PROJECT_OUTPUT_DIR}" - "PORT_LIBRARY_PATH=${PROJECT_OUTPUT_DIR}" "${PROJECT_LIBRARY_PATH_NAME}=${TEST_LIB_PATH}" ) diff --git a/tools/cli/Dockerfile b/tools/cli/Dockerfile index fed409c5e2..0da28539b1 100644 --- a/tools/cli/Dockerfile +++ b/tools/cli/Dockerfile @@ -37,7 +37,6 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ CONFIGURATION_PATH=/usr/local/share/metacall/configurations/global.json \ SERIAL_LIBRARY_PATH=/usr/local/lib \ DETOUR_LIBRARY_PATH=/usr/local/lib \ - PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ DOTNET_CLI_TELEMETRY_OPTOUT=true diff --git a/tools/dev/Dockerfile b/tools/dev/Dockerfile index 9f5805944d..ec35dfde43 100644 --- a/tools/dev/Dockerfile +++ b/tools/dev/Dockerfile @@ -37,7 +37,6 @@ ENV LOADER_LIBRARY_PATH=$METACALL_PATH/build \ CONFIGURATION_PATH=$METACALL_PATH/build/configurations/global.json \ SERIAL_LIBRARY_PATH=$METACALL_PATH/build \ DETOUR_LIBRARY_PATH=$METACALL_PATH/build \ - PORT_LIBRARY_PATH=$METACALL_PATH/build \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/lib/node_modules \ DOTNET_CLI_TELEMETRY_OPTOUT=true diff --git a/tools/metacall-sanitizer.sh b/tools/metacall-sanitizer.sh index 6605ac112c..cd3f08b402 100755 --- a/tools/metacall-sanitizer.sh +++ b/tools/metacall-sanitizer.sh @@ -44,7 +44,6 @@ export LOADER_SCRIPT_PATH="${BUILD_DIR}/scripts" export CONFIGURATION_PATH="${BUILD_DIR}/configurations/global.json" export SERIAL_LIBRARY_PATH="${BUILD_DIR}" export DETOUR_LIBRARY_PATH="${BUILD_DIR}" -export PORT_LIBRARY_PATH="${BUILD_DIR}" BUILD_OPTIONS=( ${BUILD_SANITIZER} debug ${BUILD_LANGUAGES[@]} examples tests scripts ports install pack benchmarks diff --git a/tools/runtime/Dockerfile b/tools/runtime/Dockerfile index 1276b7e11c..4ac47f5184 100644 --- a/tools/runtime/Dockerfile +++ b/tools/runtime/Dockerfile @@ -61,7 +61,6 @@ ENV LOADER_LIBRARY_PATH=/usr/local/lib \ CONFIGURATION_PATH=/usr/local/share/metacall/configurations/global.json \ SERIAL_LIBRARY_PATH=/usr/local/lib \ DETOUR_LIBRARY_PATH=/usr/local/lib \ - PORT_LIBRARY_PATH=/usr/local/lib \ DEBIAN_FRONTEND=noninteractive \ NODE_PATH=/usr/local/lib/node_modules \ DOTNET_CLI_TELEMETRY_OPTOUT=true From a0f4a115b31ed95e3612ccb187118f7ed53368b1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 9 Jul 2025 17:04:52 +0200 Subject: [PATCH 298/364] Update version of node port in lockfile. --- source/ports/node_port/package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/node_port/package-lock.json b/source/ports/node_port/package-lock.json index 33e7e61c0e..8fc04f8971 100644 --- a/source/ports/node_port/package-lock.json +++ b/source/ports/node_port/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "metacall", - "version": "0.5.0", + "version": "0.5.1", "license": "Apache-2.0", "devDependencies": { "mocha": "^9.2.1" From d6103ee5cfb7bed1454fe99f1871d9598ee309e1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 9 Jul 2025 17:05:19 +0200 Subject: [PATCH 299/364] Add support to relative paths in configurations. --- .../configuration/configuration_object.h | 21 ++ .../configuration/source/configuration_impl.c | 63 ++--- .../source/configuration_object.c | 37 ++- source/loader/source/loader_impl.c | 14 +- source/tests/CMakeLists.txt | 1 + .../CMakeLists.txt | 265 ++++++++++++++++++ .../data/configurations/global.json.in | 3 + .../data/configurations/py_loader.json.in | 8 + .../data/scripts/main.py | 6 + ...l_configuration_exec_relative_path_test.py | 4 + .../source/main.cpp | 28 ++ ..._configuration_exec_relative_path_test.cpp | 59 ++++ 12 files changed, 457 insertions(+), 52 deletions(-) create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/CMakeLists.txt create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/data/configurations/global.json.in create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/data/configurations/py_loader.json.in create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/data/scripts/main.py create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/data/scripts/metacall_configuration_exec_relative_path_test.py create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/source/main.cpp create mode 100644 source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp diff --git a/source/configuration/include/configuration/configuration_object.h b/source/configuration/include/configuration/configuration_object.h index 2c22e6eb24..7a5f88679f 100644 --- a/source/configuration/include/configuration/configuration_object.h +++ b/source/configuration/include/configuration/configuration_object.h @@ -76,6 +76,27 @@ CONFIGURATION_API configuration configuration_object_initialize(const char *name */ CONFIGURATION_API int configuration_object_childs(configuration config, vector childs, set storage); +/** +* @brief +* Get an absolute path from the value @v which is a string representing a path, +* if the path is absolute, store it in @path as it is, otherwise, join the @config +* path to the value string @v and make it canonical +* +* @param[in] config +* Pointer to configuration object +* +* @param[in] v +* The value representing the path +* +* @param[out] path +* The string where it is going to be store the path +* +* @return +* Returns the size of the path +* +*/ +CONFIGURATION_API size_t configuration_object_child_path(configuration config, value v, char *path); + /** * @brief * Set value of configuration object @config diff --git a/source/configuration/source/configuration_impl.c b/source/configuration/source/configuration_impl.c index ca61ed14be..5482f73756 100644 --- a/source/configuration/source/configuration_impl.c +++ b/source/configuration/source/configuration_impl.c @@ -69,18 +69,15 @@ int configuration_impl_initialize(const char *name) int configuration_impl_load(configuration config, void *allocator) { configuration_impl_singleton singleton = configuration_impl_singleton_instance(); - - set storage; - vector queue, childs; - - storage = set_create(&hash_callback_str, &comparable_callback_str); + set storage = set_create(&hash_callback_str, &comparable_callback_str); + int result = 1; if (storage == NULL) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation load set allocation"); - return 1; + goto alloc_storage_error; } queue = vector_create(sizeof(configuration)); @@ -89,9 +86,7 @@ int configuration_impl_load(configuration config, void *allocator) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation load queue allocation"); - set_destroy(storage); - - return 1; + goto alloc_queue_error; } childs = vector_create(sizeof(configuration)); @@ -100,11 +95,7 @@ int configuration_impl_load(configuration config, void *allocator) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation load childs allocation"); - set_destroy(storage); - - vector_destroy(queue); - - return 1; + goto alloc_childs_error; } vector_push_back(queue, &config); @@ -131,13 +122,7 @@ int configuration_impl_load(configuration config, void *allocator) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation load (childs) <%p>", current); - set_destroy(storage); - - vector_destroy(queue); - - vector_destroy(childs); - - return 1; + goto load_error; } } @@ -145,7 +130,12 @@ int configuration_impl_load(configuration config, void *allocator) vector_clear(childs); - if (configuration_object_childs(current, childs, storage) == 0 && vector_size(childs) > 0) + if (configuration_object_childs(current, childs, storage) != 0) + { + goto load_error; + } + + if (vector_size(childs) > 0) { size_t iterator; @@ -160,13 +150,7 @@ int configuration_impl_load(configuration config, void *allocator) log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation child singleton insertion (%s, %s)", configuration_object_name(child), configuration_object_path(child)); - set_destroy(storage); - - vector_destroy(queue); - - vector_destroy(childs); - - return 1; + goto load_error; } vector_push_back(queue, &child); @@ -176,25 +160,22 @@ int configuration_impl_load(configuration config, void *allocator) { log_write("metacall", LOG_LEVEL_ERROR, "Invalid configuration implementation child set insertion"); - set_destroy(storage); - - vector_destroy(queue); - - vector_destroy(childs); - - return 1; + goto load_error; } } } } - set_destroy(storage); - - vector_destroy(queue); + result = 0; +load_error: vector_destroy(childs); - - return 0; +alloc_childs_error: + vector_destroy(queue); +alloc_queue_error: + set_destroy(storage); +alloc_storage_error: + return result; } int configuration_impl_destroy(void) diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index 57c7ab9cd4..e49e8a733d 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -13,6 +13,8 @@ #include <log/log.h> +#include <portability/portability_path.h> + #include <string.h> /* -- Member Data -- */ @@ -102,6 +104,8 @@ configuration configuration_object_initialize(const char *name, const char *path if (config->source == NULL) { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load configuration %s from %s", name, path); + free(config); return NULL; @@ -216,6 +220,31 @@ int configuration_object_childs_valid(set_key key, set_value val) return 1; } +size_t configuration_object_child_path(configuration config, value v, char *path) +{ + const char *value_path = value_to_string(v); + size_t size = value_type_size(v); + + if (portability_path_is_absolute(value_path, size) == 0) + { + memcpy(path, value_path, size); + } + else + { + char absolute_path[PORTABILITY_PATH_SIZE]; + + size_t absolute_path_size = portability_path_get_directory(config->path, strnlen(config->path, PORTABILITY_PATH_SIZE), absolute_path, PORTABILITY_PATH_SIZE); + + char join_path[PORTABILITY_PATH_SIZE]; + + size_t join_path_size = portability_path_join(absolute_path, absolute_path_size, value_path, size, join_path, PORTABILITY_PATH_SIZE); + + size = portability_path_canonical(join_path, join_path_size, path, PORTABILITY_PATH_SIZE); + } + + return size; +} + int configuration_object_childs(configuration config, vector childs, set storage) { struct set_iterator_type it; @@ -229,11 +258,13 @@ int configuration_object_childs(configuration config, vector childs, set storage { if (set_get(storage, key) == NULL) { - value v = val; + char path[PORTABILITY_PATH_SIZE]; + + configuration child; - const char *path = value_to_string(v); + configuration_object_child_path(config, val, path); - configuration child = configuration_object_initialize(key, path, config); + child = configuration_object_initialize(key, path, config); if (child == NULL) { diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index c66b2bfd4f..260a787af4 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -35,6 +35,7 @@ #include <log/log.h> #include <configuration/configuration.h> +#include <configuration/configuration_object.h> #include <portability/portability_library_path.h> @@ -282,16 +283,13 @@ void loader_impl_configuration_execution_paths(loader_impl_interface iface, load { if (value_type_id(execution_paths_array[iterator]) == TYPE_STRING) { - const char *str = value_to_string(execution_paths_array[iterator]); - size_t str_size = value_type_size(execution_paths_array[iterator]); + loader_path execution_path; - if (str != NULL) - { - loader_path execution_path; - - strncpy(execution_path, str, str_size > LOADER_PATH_SIZE ? LOADER_PATH_SIZE : str_size); + configuration_object_child_path(impl->config, execution_paths_array[iterator], execution_path); - iface->execution_path(impl, execution_path); + if (iface->execution_path(impl, execution_path) != 0) + { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load execution path %s in configuration %s", execution_path, configuration_object_name(impl->config)); } } } diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index bf31bbbf9b..6e6ad2ffc9 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -158,6 +158,7 @@ add_subdirectory(metacall_inspect_test) add_subdirectory(metacall_integration_test) add_subdirectory(metacall_depends_test) add_subdirectory(metacall_configuration_exec_path_test) +add_subdirectory(metacall_configuration_exec_relative_path_test) add_subdirectory(metacall_configuration_default_test) add_subdirectory(metacall_clear_test) add_subdirectory(metacall_python_test) diff --git a/source/tests/metacall_configuration_exec_relative_path_test/CMakeLists.txt b/source/tests/metacall_configuration_exec_relative_path_test/CMakeLists.txt new file mode 100644 index 0000000000..93ad2822f8 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/CMakeLists.txt @@ -0,0 +1,265 @@ +# Check if python loader is enabled +if(NOT OPTION_BUILD_LOADERS_PY) + return() +endif() + +# +# Executable name and options +# + +# Target name +set(target metacall-configuration-exec-relative-path-test) +message(STATUS "Test ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/main.cpp + ${source_path}/metacall_configuration_exec_relative_path_test.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Dependecies +# + +add_dependencies(${target} + ${META_PROJECT_NAME}::metacall +) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GTest + + ${META_PROJECT_NAME}::metacall +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + +# +# Linker options +# + +target_link_options(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $<TARGET_FILE:${target}> +) + +# +# Define dependencies +# + +add_dependencies(${target} + py_loader +) + +# +# Set test variables +# + +set(PY_LOADER_SCRIPT_PATH "${CMAKE_CURRENT_BINARY_DIR}/scripts") +set(PY_CONFIGURATION_PATH "${CMAKE_CURRENT_BINARY_DIR}/configurations") +set(PY_EXECUTION_PATH "${PY_LOADER_SCRIPT_PATH}/a/b/c/d/e") + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +if(OPTION_BUILD_ADDRESS_SANITIZER) + # TODO: This test fails when run with sanitizers: + # ERROR: LeakSanitizer: detected memory leaks + # + # Direct leak of 551991 byte(s) in 221 object(s) allocated from: + # #0 0x7f3819e399cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 + # #1 0x7f38161499c7 (/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0+0x1169c7) + # + # Direct leak of 1344 byte(s) in 2 object(s) allocated from: + # #0 0x7f3819e388d5 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:85 + # #1 0x7f38162370d4 in _PyObject_GC_Resize (/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0+0x2040d4) + # + # Direct leak of 64 byte(s) in 2 object(s) allocated from: + # #0 0x7f3819e399cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 + # #1 0x7f381622e105 in PyThread_allocate_lock (/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0+0x1fb105) + # + # Indirect leak of 238277 byte(s) in 249 object(s) allocated from: + # #0 0x7f3819e399cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69 + # #1 0x7f38161499c7 (/usr/lib/x86_64-linux-gnu/libpython3.9.so.1.0+0x1169c7) + # + # SUMMARY: AddressSanitizer: 791676 byte(s) leaked in 474 allocation(s). + # + # For solving this, we should enable Python support for sanitizers and debug it properly + set_tests_properties(${target} PROPERTIES + PASS_REGULAR_EXPRESSION "[ PASSED ]" + ) +endif() + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + "LOADER_LIBRARY_PATH=${LOADER_LIBRARY_PATH}" + "LOADER_SCRIPT_PATH=${PY_LOADER_SCRIPT_PATH}" + "CONFIGURATION_PATH=${PY_CONFIGURATION_PATH}/global.json" + "SERIAL_LIBRARY_PATH=${SERIAL_LIBRARY_PATH}" + "DETOUR_LIBRARY_PATH=${DETOUR_LIBRARY_PATH}" + "${TESTS_SANITIZER_ENVIRONMENT_VARIABLES}" +) + +# +# External dependencies +# + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(Python3_FIND_ABI "ON" "ANY" "ANY") + find_package(Python3 COMPONENTS Development) + + # Fallback to release if not found + if(NOT Python3_Development_FOUND) + set(Python3_FIND_ABI) + find_package(Python3 COMPONENTS Development REQUIRED) + endif() +else() + find_package(Python3 COMPONENTS Development REQUIRED) +endif() + +# Find Python DLL +include(Portability) + +if(PROJECT_OS_FAMILY STREQUAL win32 AND Python3_LIBRARIES AND Python3_ROOT_DIR AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + foreach(library ${Python3_LIBRARIES}) + if(${library} MATCHES "[^_d][.]lib$") + # Get the library path with dll suffix + string(REGEX REPLACE "[.]lib$" ".dll" LIB_PATH ${library}) + # Get the library name + get_filename_component(LIB_NAME "${LIB_PATH}" NAME) + # Find the library in the Python3 root path + find_file(Python3_LIBRARY_NAME_PATH ${LIB_NAME} + PATHS ${Python3_ROOT_DIR} + NO_DEFAULT_PATH + ) + if(Python3_LIBRARY_NAME_PATH) + break() + endif() + endif() + endforeach() +endif() + +if(NOT Python3_LIBRARY_NAME_PATH) + set(Python3_LIBRARY_NAME_PATH "${Python3_LIBRARIES}") +endif() + +# +# Configure test data +# + +file(COPY data/scripts/main.py DESTINATION ${PY_LOADER_SCRIPT_PATH}) + +file(COPY data/scripts/metacall_configuration_exec_relative_path_test.py DESTINATION ${PY_EXECUTION_PATH}) + +# Set relative paths +set(PY_CONFIGURATION_OUTPUT_PATH "${PY_CONFIGURATION_PATH}") +set(PY_CONFIGURATION_PATH ".") +set(PY_EXECUTION_PATH "../scripts/a/b/c/d/e") + +configure_file(data/configurations/global.json.in ${PY_CONFIGURATION_OUTPUT_PATH}/global.json @ONLY) + +configure_file(data/configurations/py_loader.json.in ${PY_CONFIGURATION_OUTPUT_PATH}/py_loader.json @ONLY) diff --git a/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/global.json.in b/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/global.json.in new file mode 100644 index 0000000000..ca417e6a73 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/global.json.in @@ -0,0 +1,3 @@ +{ + "py_loader":"@PY_CONFIGURATION_PATH@/py_loader.json" +} diff --git a/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/py_loader.json.in b/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/py_loader.json.in new file mode 100644 index 0000000000..02a8e81f9c --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/data/configurations/py_loader.json.in @@ -0,0 +1,8 @@ +{ + "execution_paths": [ + "@PY_EXECUTION_PATH@" + ], + "dependencies": { + "python": ["@Python3_LIBRARY_NAME_PATH@"] + } +} diff --git a/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/main.py b/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/main.py new file mode 100644 index 0000000000..a34daba892 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/main.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import metacall_configuration_exec_relative_path_test + +def main(): + return metacall_configuration_exec_relative_path_test.hello_world('test') diff --git a/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/metacall_configuration_exec_relative_path_test.py b/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/metacall_configuration_exec_relative_path_test.py new file mode 100644 index 0000000000..5a8d8d1560 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/data/scripts/metacall_configuration_exec_relative_path_test.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +def hello_world(text): + return 'Python hello_world: ' + text diff --git a/source/tests/metacall_configuration_exec_relative_path_test/source/main.cpp b/source/tests/metacall_configuration_exec_relative_path_test/source/main.cpp new file mode 100644 index 0000000000..5820341294 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/source/main.cpp @@ -0,0 +1,28 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff --git a/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp b/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp new file mode 100644 index 0000000000..9257ec9187 --- /dev/null +++ b/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp @@ -0,0 +1,59 @@ +/* + * MetaCall Library by Parra Studios + * A library for providing a foreign function interface calls. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +#include <metacall/metacall.h> +#include <metacall/metacall_loaders.h> + +class metacall_configuration_exec_relative_path_test : public testing::Test +{ +public: +}; + +TEST_F(metacall_configuration_exec_relative_path_test, DefaultConstructor) +{ + metacall_print_info(); + + ASSERT_EQ((int)0, (int)metacall_initialize()); + +/* Python */ +#if defined(OPTION_BUILD_LOADERS_PY) + { + const char *py_scripts[] = { + "main.py" + }; + + void *ret = NULL; + + ASSERT_EQ((int)0, (int)metacall_load_from_file("py", py_scripts, sizeof(py_scripts) / sizeof(py_scripts[0]), NULL)); + + ret = metacall("main"); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Python hello_world: test")); + + metacall_value_destroy(ret); + } +#endif /* OPTION_BUILD_LOADERS_PY */ + + metacall_destroy(); +} From 46e4fddd0eee0f538d31c7ccdc5e69478873ca9d Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 9 Jul 2025 17:05:34 +0200 Subject: [PATCH 300/364] Update rs_port version. --- source/ports/rs_port/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index 25789507be..d1030b99df 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.4.2" +version = "0.4.3" [lib] crate-type = ["lib"] From 1001fcd8bb1445d96d1f69c71cf5a788bcf35bfa Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 9 Jul 2025 17:09:32 +0200 Subject: [PATCH 301/364] Update version to v0.9.13. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bf1ba0c171..6af8ded76e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.12 \ No newline at end of file +0.9.13 \ No newline at end of file From cd8a068ca7a2af4bd288f5fe5456a603b85237e4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 15:13:45 +0200 Subject: [PATCH 302/364] Solve wrong error message location. --- source/configuration/source/configuration_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/configuration/source/configuration_object.c b/source/configuration/source/configuration_object.c index e49e8a733d..8d5ec45848 100644 --- a/source/configuration/source/configuration_object.c +++ b/source/configuration/source/configuration_object.c @@ -104,8 +104,6 @@ configuration configuration_object_initialize(const char *name, const char *path if (config->source == NULL) { - log_write("metacall", LOG_LEVEL_ERROR, "Failed to load configuration %s from %s", name, path); - free(config); return NULL; @@ -268,6 +266,8 @@ int configuration_object_childs(configuration config, vector childs, set storage if (child == NULL) { + log_write("metacall", LOG_LEVEL_ERROR, "Failed to load configuration %s from %s", (char *)key, path); + return 1; } From 51701a47cc51b86b78f1b9ed27b568f674952891 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 19:38:43 +0200 Subject: [PATCH 303/364] Add error generation (throwable). --- .../include/metacall/metacall_error.h | 24 +++++++++++++ source/metacall/source/metacall_error.c | 35 +++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/source/metacall/include/metacall/metacall_error.h b/source/metacall/include/metacall/metacall_error.h index ae030b965b..e17815fbc7 100644 --- a/source/metacall/include/metacall/metacall_error.h +++ b/source/metacall/include/metacall/metacall_error.h @@ -49,6 +49,30 @@ typedef struct metacall_exception_type *metacall_exception; /* -- Methods -- */ +/** +* @brief +* Create an throwable value from an exception with a simple API in a single instruction +* +* @param[in] label +* Label of the exception +* +* @param[in] code +* Error code of the exception +* +* @param[in] stacktrace +* Stack trace of the exception +* +* @param[in] message +* Message of the exception to be formatted with the variable arguments +* +* @param[in] va_args +* Arguments for formatting the message +* +* @return +* The value of type throwable containing the exception created +*/ +METACALL_API void *metacall_error_throw(const char *label, int64_t code, const char *stacktrace, const char *message, ...); + /** * @brief * Retrieve the exception from a value, it can be either a throwable value with an exception inside or an exception itself diff --git a/source/metacall/source/metacall_error.c b/source/metacall/source/metacall_error.c index 4bceddc720..68829a5ab5 100644 --- a/source/metacall/source/metacall_error.c +++ b/source/metacall/source/metacall_error.c @@ -28,6 +28,41 @@ /* -- Methods -- */ +void *metacall_error_throw(const char *label, int64_t code, const char *stacktrace, const char *message, ...) +{ + va_list args, args_copy; + int length; + char *buffer; + exception ex; + throwable th; + + va_start(args, message); + va_copy(args_copy, args); + length = vsnprintf(NULL, 0, message, args_copy); + va_end(args_copy); + + if (length < 0) + { + va_end(args); + return NULL; /* TODO: Return a generic static error here */ + } + + buffer = malloc(length + 1); + + if (!buffer) + { + va_end(args); + return NULL; /* TODO: Return a generic static error here */ + } + + vsnprintf(buffer, length + 1, message, args); + va_end(args); + + ex = exception_create_message_const(buffer, label, code, stacktrace); + th = throwable_create(value_create_exception(ex)); + return value_create_throwable(th); +} + int metacall_error_from_value(void *v, metacall_exception ex) { if (v == NULL || ex == NULL) From c722edd16aeca5cbcc0bc12bc4ba69d1ef035336 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 19:40:38 +0200 Subject: [PATCH 304/364] Add exception facility for errors. --- .../include/reflect/reflect_exception.h | 2 + source/reflect/source/reflect_exception.c | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/source/reflect/include/reflect/reflect_exception.h b/source/reflect/include/reflect/reflect_exception.h index 81ff9a3a80..476bb417bc 100644 --- a/source/reflect/include/reflect/reflect_exception.h +++ b/source/reflect/include/reflect/reflect_exception.h @@ -37,6 +37,8 @@ REFLECT_API exception exception_create(char *message, char *label, int64_t code, REFLECT_API exception exception_create_const(const char *message, const char *label, int64_t code, const char *stacktrace); +REFLECT_API exception exception_create_message_const(char *message, const char *label, int64_t code, const char *stacktrace); + REFLECT_API int exception_increment_reference(exception ex); REFLECT_API int exception_decrement_reference(exception ex); diff --git a/source/reflect/source/reflect_exception.c b/source/reflect/source/reflect_exception.c index 34b3dc2d38..7a85d46b0e 100644 --- a/source/reflect/source/reflect_exception.c +++ b/source/reflect/source/reflect_exception.c @@ -153,6 +153,73 @@ exception exception_create_const(const char *message, const char *label, int64_t return NULL; } +exception exception_create_message_const(char *message, const char *label, int64_t code, const char *stacktrace) +{ + exception ex = malloc(sizeof(struct exception_type)); + + if (ex == NULL) + { + goto exception_bad_alloc; + } + + ex->message = message; + + if (label != NULL) + { + size_t label_size = strlen(label) + 1; + + ex->label = malloc(sizeof(char) * label_size); + + if (ex->label == NULL) + { + goto label_bad_alloc; + } + + memcpy(ex->label, label, label_size); + } + else + { + ex->label = NULL; + } + + if (stacktrace != NULL) + { + size_t stacktrace_size = strlen(stacktrace) + 1; + + ex->stacktrace = malloc(sizeof(char) * stacktrace_size); + + if (ex->stacktrace == NULL) + { + goto stacktrace_bad_alloc; + } + + memcpy(ex->stacktrace, stacktrace, stacktrace_size); + } + else + { + ex->stacktrace = NULL; + } + + ex->code = code; + ex->id = thread_id_get_current(); + + threading_atomic_ref_count_initialize(&ex->ref); + + reflect_memory_tracker_allocation(exception_stats); + + return ex; + +stacktrace_bad_alloc: + if (ex->label != NULL) + { + free(ex->label); + } +label_bad_alloc: + free(ex); +exception_bad_alloc: + return NULL; +} + int exception_increment_reference(exception ex) { if (ex == NULL) From abf23518c4506dea81030d0294dabe3f7b62c09f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 19:40:55 +0200 Subject: [PATCH 305/364] Solve issues with metacall values. --- source/reflect/source/reflect_value_type.c | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/source/reflect/source/reflect_value_type.c b/source/reflect/source/reflect_value_type.c index 6775aac44a..cc56921610 100644 --- a/source/reflect/source/reflect_value_type.c +++ b/source/reflect/source/reflect_value_type.c @@ -525,15 +525,29 @@ value value_from_double(value v, double d) value value_from_string(value v, const char *str, size_t length) { - if (v != NULL && str != NULL && length > 0) + if (v != NULL) { - size_t current_size = value_size(v); + if (str == NULL || length == 0) + { + return value_from(v, NULL, 1); + } + else + { + size_t current_size = value_type_size(v); - size_t bytes = length + 1; + size_t bytes = length + 1; - size_t size = (bytes <= current_size) ? bytes : current_size; + size_t size = (bytes <= current_size) ? bytes : current_size; - return value_from(v, str, size); + value_from(v, str, size); + + if (bytes > current_size) + { + char *str = value_to_string(v); + + str[size - 1] = '\0'; + } + } } return v; @@ -543,7 +557,7 @@ value value_from_buffer(value v, const void *buffer, size_t size) { if (v != NULL && buffer != NULL && size > 0) { - size_t current_size = value_size(v); + size_t current_size = value_type_size(v); size_t bytes = sizeof(char) * size; @@ -557,7 +571,7 @@ value value_from_array(value v, const value *values, size_t size) { if (v != NULL && values != NULL && size > 0) { - size_t current_size = value_size(v); + size_t current_size = value_type_size(v); size_t bytes = sizeof(const value) * size; @@ -571,7 +585,7 @@ value value_from_map(value v, const value *tuples, size_t size) { if (v != NULL && tuples != NULL && size > 0) { - size_t current_size = value_size(v); + size_t current_size = value_type_size(v); size_t bytes = sizeof(const value) * size; From b6054cee5d044e7ad29509357995bd40749a806e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 19:41:48 +0200 Subject: [PATCH 306/364] Improve C loader with more types and issues. --- .../loaders/c_loader/source/c_loader_impl.cpp | 107 ++++++++++++++++-- source/scripts/c/compiled/source/compiled.c | 101 +++++++++++++++++ source/scripts/c/loadtest/source/loadtest.cpp | 4 + source/scripts/c/loadtest/source/loadtest.h | 2 +- 4 files changed, 203 insertions(+), 11 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index a4e57914c4..d1ef1cb785 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -55,6 +55,7 @@ namespace fs = std::experimental::filesystem; #include <string> #include <vector> +#include <cassert> #include <cstring> /* LibFFI */ @@ -633,10 +634,18 @@ ffi_type *c_loader_impl_ffi_type(type_id id) return &ffi_type_float; case TYPE_DOUBLE: return &ffi_type_double; + case TYPE_STRING: + return &ffi_type_pointer; + case TYPE_BUFFER: + return &ffi_type_pointer; + case TYPE_ARRAY: + return &ffi_type_pointer; case TYPE_PTR: return &ffi_type_pointer; case TYPE_FUNCTION: return &ffi_type_pointer; + case TYPE_NULL: + return &ffi_type_void; } return &ffi_type_void; @@ -648,8 +657,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f if (args_size != signature_count(s)) { - log_write("metacall", LOG_LEVEL_ERROR, "Invalid number of arguments when calling %s (canceling call in order to avoid a segfault)", function_name(func)); - return NULL; + return metacall_error_throw("C Loader Error", 0, "", "Invalid number of arguments when calling %s (canceling call in order to avoid a segfault)", function_name(func)); } loader_impl_c_function c_function = static_cast<loader_impl_c_function>(impl); @@ -663,7 +671,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f if (id != value_id) { - log_write("metacall", LOG_LEVEL_ERROR, + return metacall_error_throw("C Loader Error", 0, "", "Type mismatch in when calling %s in argument number %" PRIuS " (expected %s of type %s and received %s)." " Canceling call in order to avoid a segfault.", @@ -672,7 +680,6 @@ function_return function_c_interface_invoke(function func, function_impl impl, f type_name(t), type_id_name(id), type_id_name(value_id)); - return NULL; } if (id == TYPE_FUNCTION) @@ -683,19 +690,39 @@ function_return function_c_interface_invoke(function func, function_impl impl, f closures.push_back(closure); } - else + else if (id == TYPE_STRING || id == TYPE_BUFFER || id == TYPE_ARRAY || id == TYPE_PTR) { + /* + String, buffer requires to be pointer to a string + Array requires to be pointer to a array + Pointer requires to be pointer to pointer + */ + + /* In order to work, this must be true */ + assert(args[args_count] == value_data(args[args_count])); + + c_function->values[args_count] = (void *)&args[args_count]; + } + else if (type_id_integer(id) == 0 || type_id_decimal(id) == 0) + { + /* Primitive types already have the pointer indirection */ c_function->values[args_count] = value_data((value)args[args_count]); } + else + { + return metacall_error_throw("C Loader Error", 0, "", + "Type %s in argument number %" PRIuS " of function %s is not supported.", + type_id_name(id), + args_count, + function_name(func)); + } } type_id ret_id = type_index(signature_get_return(s)); size_t ret_size = value_type_id_size(ret_id); void *ret = NULL; - /* TODO: This if is not correct because the sizes of strings, objects, etc are - relative to the pointer, not the value contents, we should review this */ - if (ret_size <= sizeof(ffi_arg)) + if (ret_size <= sizeof(ffi_arg) && (type_id_integer(ret_id) == 0 || type_id_decimal(ret_id) == 0)) { ffi_arg result; @@ -705,9 +732,50 @@ function_return function_c_interface_invoke(function func, function_impl impl, f } else { - ret = value_type_create(NULL, ret_size, ret_id); + void *result = NULL; + void *result_ptr = &result; + + if (ret_id == TYPE_NULL) + { + ret = value_create_null(); + result_ptr = NULL; + } + else if (ret_id != TYPE_STRING && ret_id != TYPE_BUFFER && ret_id != TYPE_ARRAY && ret_id != TYPE_PTR) + { + /* TODO: This is not tested and we do not know how to handle it */ + /* TODO: result = ret = value_type_create(NULL, ret_size, ret_id); */ + + return metacall_error_throw("C Loader Error", 0, "", + "Return type %s in of function %s is not supported.", + type_id_name(ret_id), + function_name(func)); + } - ffi_call(&c_function->cif, FFI_FN(c_function->address), value_data(ret), c_function->values); + ffi_call(&c_function->cif, FFI_FN(c_function->address), result_ptr, c_function->values); + + if (ret_id == TYPE_STRING) + { + char *str = (char *)result; + ret = value_create_string(str, strlen(str)); + } + else if (ret_id == TYPE_BUFFER) + { + return metacall_error_throw("C Loader Error", 0, "", + "Return type %s in of function %s is not supported, buffer is unsafe to be returned because there is no way to reconstruct it without overflowing as there is no null character nor size information.", + type_id_name(ret_id), + function_name(func)); + } + else if (ret_id == TYPE_ARRAY) + { + return metacall_error_throw("C Loader Error", 0, "", + "Return type %s in of function %s is not supported, array is unsafe to be returned because there is no way to reconstruct it without overflowing as there is no null character nor size information.", + type_id_name(ret_id), + function_name(func)); + } + else if (ret_id == TYPE_PTR) + { + ret = value_create_ptr(result); + } } /* Clear allocated closures if any */ @@ -800,6 +868,7 @@ int c_loader_impl_initialize_types(loader_impl impl) { TYPE_BOOL, "bool" }, { TYPE_CHAR, "char" }, + { TYPE_CHAR, "unsigned char" }, { TYPE_CHAR, "int8_t" }, { TYPE_CHAR, "uint8_t" }, { TYPE_CHAR, "int_least8_t" }, @@ -808,6 +877,7 @@ int c_loader_impl_initialize_types(loader_impl impl) { TYPE_CHAR, "uint_fast8_t" }, { TYPE_SHORT, "short" }, + { TYPE_SHORT, "unsigned short" }, { TYPE_SHORT, "int16_t" }, { TYPE_SHORT, "uint16_t" }, { TYPE_SHORT, "int_least16_t" }, @@ -816,6 +886,7 @@ int c_loader_impl_initialize_types(loader_impl impl) { TYPE_SHORT, "uint_fast16_t" }, { TYPE_INT, "int" }, + { TYPE_INT, "unsigned int" }, { TYPE_INT, "uint32_t" }, { TYPE_INT, "int32_t" }, { TYPE_INT, "int_least32_t" }, @@ -824,7 +895,9 @@ int c_loader_impl_initialize_types(loader_impl impl) { TYPE_INT, "uint_fast32_t" }, { TYPE_LONG, "long" }, + { TYPE_LONG, "unsigned long" }, { TYPE_LONG, "long long" }, + { TYPE_LONG, "unsigned long long" }, { TYPE_LONG, "uint64_t" }, { TYPE_LONG, "int64_t" }, { TYPE_LONG, "int_least64_t" }, @@ -838,6 +911,11 @@ int c_loader_impl_initialize_types(loader_impl impl) { TYPE_FLOAT, "float" }, { TYPE_DOUBLE, "double" }, + { TYPE_STRING, "unsigned char *" }, + { TYPE_STRING, "char *" }, + { TYPE_STRING, "const unsigned char *" }, + { TYPE_STRING, "const char *" }, + { TYPE_NULL, "void" } /* TODO: Do more types */ @@ -932,6 +1010,10 @@ static type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXTyp return TYPE_PTR; } + case CXType_ConstantArray: + case CXType_IncompleteArray: + return TYPE_ARRAY; + case CXType_FunctionProto: case CXType_FunctionNoProto: { c_loader_closure_type *closure_type = new c_loader_closure_type(impl); @@ -964,7 +1046,12 @@ static type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXTyp case CXType_Bool: return TYPE_BOOL; + case CXType_Short: + case CXType_UShort: + return TYPE_SHORT; + case CXType_Int: + case CXType_UInt: return TYPE_INT; case CXType_Void: diff --git a/source/scripts/c/compiled/source/compiled.c b/source/scripts/c/compiled/source/compiled.c index b7468cde78..e41807a41d 100644 --- a/source/scripts/c/compiled/source/compiled.c +++ b/source/scripts/c/compiled/source/compiled.c @@ -1,4 +1,7 @@ +#include <assert.h> #include <stdio.h> +#include <stdlib.h> +#include <string.h> void compiled_print(int a, double b) { @@ -9,3 +12,101 @@ long compiled_sum(long a, long b) { return a + b; } + +char *return_text(void) +{ + static char input[] = "hello"; + return input; +} + +void process_text(char *input) +{ + printf("inside of compiled script '%s'\n", input); + assert(strcmp(input, "test_test") == 0); +} + +typedef struct data_t +{ + int value; +} * data_ptr_t; + +data_ptr_t alloc_data(void) +{ + data_ptr_t ptr = malloc(sizeof(struct data_t)); + + ptr->value = 0; + + printf("alloc_data %p\n", ptr); + + return ptr; +} + +void alloc_data_args(data_ptr_t *ptr) +{ + *ptr = malloc(sizeof(struct data_t)); + + (*ptr)->value = 0; + + printf("alloc_data_args %p\n", *ptr); + printf("alloc_data_args ref %p\n", ptr); +} + +int compare_data_value(data_ptr_t left, data_ptr_t right) +{ + printf("left %p\n", left); + printf("right %p\n", right); + assert(left == right); + return left == right; +} + +void set_data_value(data_ptr_t ptr, int value) +{ + printf("set_data_value %p\n", ptr); + ptr->value = value; +} + +int get_data_value(data_ptr_t ptr) +{ + printf("get_data_value %p\n", ptr); + return ptr->value; +} + +void free_data(data_ptr_t ptr) +{ + printf("free_data %p\n", ptr); + free(ptr); +} + +// TODO: When calling from NodeJS it does not work, +// NodeJS emmits double as a call, and this expects long, it needs a casting +void modify_int_ptr(long *l) +{ + printf("l %p\n", l); + printf("value %d\n", *l); + assert(*l == 324444L); + *l = 111L; +} + +void modify_double_ptr(double *d) +{ + printf("d %p\n", d); + printf("value %f\n", *d); + assert(*d == 324444.0); + *d = 111.0; +} + +void modify_str_ptr(char **str_ptr) +{ + static char new_str[] = "yeet"; + printf("(C) pointer %p\n", str_ptr); + printf("(C) string %p\n", (*str_ptr)); + printf("(C) string value %s\n", *str_ptr); + fflush(stdout); + assert(strcmp("asd", *str_ptr) == 0); + *str_ptr = new_str; + printf("(C) pointer %p\n", str_ptr); + printf("(C) string %p\n", (*str_ptr)); + printf("(C) string value %s\n", *str_ptr); + fflush(stdout); + assert(strcmp("yeet", *str_ptr) == 0); +} diff --git a/source/scripts/c/loadtest/source/loadtest.cpp b/source/scripts/c/loadtest/source/loadtest.cpp index 8dcb43dedb..5ddaf4b11c 100644 --- a/source/scripts/c/loadtest/source/loadtest.cpp +++ b/source/scripts/c/loadtest/source/loadtest.cpp @@ -1,4 +1,5 @@ #include "loadtest.h" +#include <iostream> #include <vector> long call_cpp_func(void) @@ -23,6 +24,9 @@ int pair_list_init(pair_list **t) (*t)->pairs[i].d = (double)(((double)i) * 1.0); } + std::cout << "pair_list_init: " << t << std::endl; + std::cout << "pair_list_init: *(" << *t << ")" << std::endl; + return 0; } diff --git a/source/scripts/c/loadtest/source/loadtest.h b/source/scripts/c/loadtest/source/loadtest.h index 3e4f072748..4a93356958 100644 --- a/source/scripts/c/loadtest/source/loadtest.h +++ b/source/scripts/c/loadtest/source/loadtest.h @@ -11,7 +11,7 @@ extern "C" { #endif -#include <cstdint> +#include <stdint.h> typedef struct { From 10df5e1e50b6fb9d7a29ca249cbddce71b7a3c97 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 28 Aug 2025 19:42:07 +0200 Subject: [PATCH 307/364] Solve issues with pointers in node loader. --- source/loaders/node_loader/source/node_loader_impl.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/loaders/node_loader/source/node_loader_impl.cpp b/source/loaders/node_loader/source/node_loader_impl.cpp index e12594884a..b493d19646 100644 --- a/source/loaders/node_loader/source/node_loader_impl.cpp +++ b/source/loaders/node_loader/source/node_loader_impl.cpp @@ -1442,14 +1442,13 @@ value node_loader_impl_napi_to_value(loader_impl_node node_impl, napi_env env, n } else if (valuetype == napi_external) { - /* Returns the previously allocated copy */ void *c = nullptr; status = napi_get_value_external(env, v, &c); node_loader_impl_exception(env, status); - return c; + return value_create_ptr(c); } return ret; @@ -1635,10 +1634,7 @@ napi_value node_loader_impl_value_to_napi(loader_impl_node node_impl, napi_env e } else if (id == TYPE_PTR) { - /* Copy value and set the ownership, the old value will be deleted after the call */ - void *c = value_copy(arg_value); - - value_move(arg_value, c); + void *c = value_to_ptr(arg_value); status = napi_create_external(env, c, nullptr, nullptr, &v); From 703d33648e84f08400166aa6d9537809053b9ca8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 29 Aug 2025 18:10:41 +0200 Subject: [PATCH 308/364] Add support for array by value. --- .../loaders/c_loader/source/c_loader_impl.cpp | 132 +++++++++++++++++- source/scripts/c/compiled/source/compiled.c | 31 ++++ .../source/metacall_c_test.cpp | 64 +++++++++ 3 files changed, 222 insertions(+), 5 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index d1ef1cb785..d2cfefed1b 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -517,6 +517,95 @@ class c_loader_closure_value } }; +static type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXType cx_type, c_loader_type_impl **impl_type); + +class c_loader_array_type : public c_loader_type_impl +{ +public: + std::optional<long long> size; + type_id id; + + c_loader_array_type(loader_impl impl, CXCursor cursor, CXType cx_type, c_loader_type_impl **impl_type) + { + CXType element_cx_type = clang_getArrayElementType(cx_type); + + id = c_loader_impl_clang_type(impl, cursor, element_cx_type, impl_type); + + if (cx_type.kind == CXType_ConstantArray) + { + size = clang_getArraySize(cx_type); + + if (size < 0) + { + size = 0; + } + } + } + + ~c_loader_array_type() {} + + void *generate_c_array(void *array, size_t args_count, function func, void **error) + { + size_t count = metacall_value_count(array); + + /* Check if array size is correct */ + if (size.has_value()) + { + if (count != static_cast<size_t>(*size)) + { + *error = metacall_error_throw("C Loader Error", 0, "", "Argument %" PRIuS " of type array with different size when calling %s (expecting an array of size %d, received an array of size %" PRIuS ")", args_count, function_name(func), *size, count); + return NULL; + } + } + + /* Check if array type is correct */ + void **array_ptr = metacall_value_to_array(array); + + for (size_t it = 0; it < count; ++it) + { + if (metacall_value_id(array_ptr[it]) != id) + { + *error = metacall_error_throw("C Loader Error", 0, "", "Argument %" PRIuS " of type array with different type when calling %s (expecting an array of type %s, received an array of type %s in the element %" PRIuS ")", args_count, function_name(func), type_id_name(id), metacall_value_type_name(array_ptr[it]), it); + return NULL; + } + } + + /* Allocate temporal memory */ + size_t type_size = value_type_id_size(id); + void **memory_ptr = static_cast<void **>(malloc(sizeof(void **))); + + if (memory_ptr == NULL) + { + *error = metacall_error_throw("C Loader Error", 0, "", "Argument %" PRIuS " failed to allocate memory pointer for the array when calling %s", args_count, function_name(func)); + return NULL; + } + + void *memory = malloc(count * type_size); + + if (memory == NULL) + { + *error = metacall_error_throw("C Loader Error", 0, "", "Argument %" PRIuS " failed to allocate memory for the array when calling %s", args_count, function_name(func)); + free(memory_ptr); + return NULL; + } + + for (size_t it = 0; it < count; ++it) + { + std::memcpy(&((unsigned char *)memory)[it * type_size], array_ptr[it], type_size); + } + + *memory_ptr = memory; + + return memory_ptr; + } + + static void free_c_array(void **memory_ptr) + { + free(*memory_ptr); + free(memory_ptr); + } +}; + std::string c_loader_impl_cxstring_to_str(const CXString &s) { std::string result = clang_getCString(s); @@ -690,11 +779,10 @@ function_return function_c_interface_invoke(function func, function_impl impl, f closures.push_back(closure); } - else if (id == TYPE_STRING || id == TYPE_BUFFER || id == TYPE_ARRAY || id == TYPE_PTR) + else if (id == TYPE_STRING || id == TYPE_BUFFER || id == TYPE_PTR) { /* String, buffer requires to be pointer to a string - Array requires to be pointer to a array Pointer requires to be pointer to pointer */ @@ -703,6 +791,19 @@ function_return function_c_interface_invoke(function func, function_impl impl, f c_function->values[args_count] = (void *)&args[args_count]; } + else if (id == TYPE_ARRAY) + { + c_loader_array_type *array = static_cast<c_loader_array_type *>(type_derived(t)); + void *error = NULL; + void *array_ptr = array->generate_c_array(args[args_count], args_count, func, &error); + + if (error != NULL) + { + return error; + } + + c_function->values[args_count] = array_ptr; + } else if (type_id_integer(id) == 0 || type_id_decimal(id) == 0) { /* Primitive types already have the pointer indirection */ @@ -778,6 +879,17 @@ function_return function_c_interface_invoke(function func, function_impl impl, f } } + for (size_t args_count = 0; args_count < args_size; ++args_count) + { + type t = signature_get_type(s, args_count); + type_id id = type_index(t); + + if (id == TYPE_ARRAY) + { + c_loader_array_type::free_c_array(static_cast<void **>(c_function->values[args_count])); + } + } + /* Clear allocated closures if any */ for (c_loader_closure_value *closure : closures) { @@ -984,7 +1096,7 @@ int c_loader_impl_execution_path(loader_impl impl, const loader_path path) return 0; } -static type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXType cx_type, c_loader_type_impl **impl_type) +type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXType cx_type, c_loader_type_impl **impl_type) { switch (cx_type.kind) { @@ -1011,8 +1123,18 @@ static type_id c_loader_impl_clang_type(loader_impl impl, CXCursor cursor, CXTyp } case CXType_ConstantArray: - case CXType_IncompleteArray: - return TYPE_ARRAY; + case CXType_IncompleteArray: { + c_loader_array_type *array_type = new c_loader_array_type(impl, cursor, cx_type, impl_type); + + if (array_type != nullptr) + { + *impl_type = static_cast<c_loader_array_type *>(array_type); + + return TYPE_ARRAY; + } + + return TYPE_INVALID; + } case CXType_FunctionProto: case CXType_FunctionNoProto: { diff --git a/source/scripts/c/compiled/source/compiled.c b/source/scripts/c/compiled/source/compiled.c index e41807a41d..c8e33e9d98 100644 --- a/source/scripts/c/compiled/source/compiled.c +++ b/source/scripts/c/compiled/source/compiled.c @@ -77,6 +77,37 @@ void free_data(data_ptr_t ptr) free(ptr); } +/* https://github.com/metacall/core/issues/570 */ +void apply_blur_filter(int pixels[], int width, int height) +{ + int size = width * height; + + printf("pixels == %p\n", pixels); + fflush(stdout); + + for (int i = 0; i < size; i++) + { + printf("pixels[%d] == %d\n", pixels[i], i); + fflush(stdout); + assert(pixels[i] == i); + pixels[i] = pixels[i] / 2; + } + printf("C: Blur filter applied on %d pixels\n", size); +} + +double calculate_brightness(int pixels[], int size) +{ + long sum = 0; + for (int i = 0; i < size; i++) + { + assert(pixels[i] == i); + sum += pixels[i]; + } + double avg = (double)sum / (double)size; + printf("C: Average brightness = %f\n", avg); + return avg; +} + // TODO: When calling from NodeJS it does not work, // NodeJS emmits double as a call, and this expects long, it needs a casting void modify_int_ptr(long *l) diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index 46cce764e4..2721c469cf 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -60,6 +60,70 @@ TEST_F(metacall_c_test, DefaultConstructor) metacall_value_destroy(ret); + /* https://github.com/metacall/core/issues/570 */ + { + /* Call by array */ + { + void *args[] = { + metacall_value_create_array(NULL, 100), + metacall_value_create_int(10), + metacall_value_create_int(10) + }; + + void **array_ptr = metacall_value_to_array(args[0]); + + for (int i = 0; i < 100; ++i) + { + array_ptr[i] = metacall_value_create_int(i); + } + + std::cout << "value: " << args[0] << std::endl; + std::cout << "array: " << array_ptr << std::endl; + + ret = metacallv("apply_blur_filter", args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + + metacall_value_destroy(args[0]); + metacall_value_destroy(args[1]); + metacall_value_destroy(args[2]); + } + + /* Call by pointer */ + { + int array[100]; + + void *args[] = { + metacall_value_create_ptr(array), + metacall_value_create_int(10), + metacall_value_create_int(10) + }; + + for (int i = 0; i < 100; ++i) + { + array[i] = i; + } + + ret = metacallv("apply_blur_filter", args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + + metacall_value_destroy(args[0]); + metacall_value_destroy(args[1]); + metacall_value_destroy(args[2]); + } + + // TODO: double calculate_brightness(int pixels[], int size) + } + /* File with dependencies */ const char *c_dep_scripts[] = { "ffi.c", From 0a313d25ebca4d8e795117228637e0d1e6cb7557 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 2 Sep 2025 17:24:20 +0200 Subject: [PATCH 309/364] Improve C loader ptr and tests. --- .../loaders/c_loader/source/c_loader_impl.cpp | 12 +- source/scripts/c/loadtest/source/loadtest.cpp | 4 + .../source/metacall_c_lib_test.cpp | 17 ++- .../source/metacall_c_test.cpp | 104 ++++++++++++++++++ 4 files changed, 126 insertions(+), 11 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index d2cfefed1b..bb712d5ad1 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -52,6 +52,7 @@ namespace fs = std::experimental::filesystem; #endif #include <map> +#include <optional> #include <string> #include <vector> @@ -779,18 +780,19 @@ function_return function_c_interface_invoke(function func, function_impl impl, f closures.push_back(closure); } - else if (id == TYPE_STRING || id == TYPE_BUFFER || id == TYPE_PTR) + else if (id == TYPE_STRING || id == TYPE_BUFFER) { - /* - String, buffer requires to be pointer to a string - Pointer requires to be pointer to pointer - */ + /* String, buffer requires to be pointer to a string */ /* In order to work, this must be true */ assert(args[args_count] == value_data(args[args_count])); c_function->values[args_count] = (void *)&args[args_count]; } + else if (id == TYPE_PTR) + { + c_function->values[args_count] = args[args_count]; + } else if (id == TYPE_ARRAY) { c_loader_array_type *array = static_cast<c_loader_array_type *>(type_derived(t)); diff --git a/source/scripts/c/loadtest/source/loadtest.cpp b/source/scripts/c/loadtest/source/loadtest.cpp index 5ddaf4b11c..3bc2b63289 100644 --- a/source/scripts/c/loadtest/source/loadtest.cpp +++ b/source/scripts/c/loadtest/source/loadtest.cpp @@ -13,6 +13,9 @@ int pair_list_init(pair_list **t) { static const uint32_t size = 3; + std::cout << "pair_list_init: " << t << std::endl; + std::cout << "pair_list_init: *(" << *t << ")" << std::endl; + *t = new pair_list(); (*t)->size = size; @@ -37,6 +40,7 @@ double pair_list_value(pair_list *t, uint32_t id) void pair_list_destroy(pair_list *t) { + std::cout << "pair_list_destroy: *(" << t << ")" << std::endl; delete[] t->pairs; delete t; } diff --git a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp index cabe0100b3..1f61c2b179 100644 --- a/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp +++ b/source/tests/metacall_c_lib_test/source/metacall_c_lib_test.cpp @@ -43,14 +43,20 @@ TEST_F(metacall_c_lib_test, DefaultConstructor) metacall_value_destroy(ret); - void *pair_list = NULL; + void *pair_list_ptr = metacall_value_create_ptr(NULL); void *args_init[] = { - metacall_value_create_ptr(&pair_list), + metacall_value_create_ptr(pair_list_ptr), }; + std::cout << "pair_list_ptr: " << pair_list_ptr << std::endl; + std::cout << "pair_list_ptr: *(" << metacall_value_to_ptr(pair_list_ptr) << ")" << std::endl; + ret = metacallv("pair_list_init", args_init); + std::cout << "pair_list_ptr: " << pair_list_ptr << std::endl; + std::cout << "pair_list_ptr: *(" << metacall_value_to_ptr(pair_list_ptr) << ")" << std::endl; + EXPECT_NE((void *)NULL, (void *)ret); EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_INT); @@ -62,7 +68,7 @@ TEST_F(metacall_c_lib_test, DefaultConstructor) metacall_value_destroy(args_init[0]); void *args_value[] = { - metacall_value_create_ptr(pair_list), + pair_list_ptr, metacall_value_create_int(2) }; @@ -76,11 +82,10 @@ TEST_F(metacall_c_lib_test, DefaultConstructor) metacall_value_destroy(ret); - metacall_value_destroy(args_value[0]); metacall_value_destroy(args_value[1]); void *args_destroy[] = { - metacall_value_create_ptr(pair_list), + pair_list_ptr, }; ret = metacallv("pair_list_destroy", args_destroy); @@ -91,7 +96,7 @@ TEST_F(metacall_c_lib_test, DefaultConstructor) metacall_value_destroy(ret); - metacall_value_destroy(args_destroy[0]); + metacall_value_destroy(pair_list_ptr); metacall_destroy(); } diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index 2721c469cf..490428e15c 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -41,6 +41,37 @@ void *sum_callback(size_t argc, void *args[], void *data) return metacall_value_create_int(result); } +void *test_string_reference(size_t argc, void *args[], void *data) +{ + printf("ptr %p\n", args[0]); + fflush(stdout); + + void *string_value = metacall_value_to_ptr(args[0]); + + printf("string ptr %p\n", string_value); + printf("type id %s\n", metacall_value_type_name(string_value)); + fflush(stdout); + + char *str = metacall_value_to_string(string_value); + + (void)argc; + (void)data; + + printf("native string %s\n", str); + + EXPECT_STREQ("asd", str); + + static const char yeet[] = "yeet"; + + metacall_value_from_string(string_value, yeet, sizeof(yeet) - 1); + + printf("type id %s\n", metacall_value_type_name(string_value)); + printf("native string %s\n", str); + fflush(stdout); + + return metacall_value_create_null(); +} + TEST_F(metacall_c_test, DefaultConstructor) { ASSERT_EQ((int)0, (int)metacall_initialize()); @@ -196,6 +227,79 @@ TEST_F(metacall_c_test, DefaultConstructor) // metacall_value_destroy(ret); + /* References (Native) */ + { + static const char str[] = "asd"; + void *str_value = metacall_value_create_string(str, sizeof(str) - 1); + void *str_value_ref = metacall_value_reference(str_value); + + printf("ptr %p\n", str_value_ref); + printf("string %p\n", str_value); + printf("string str %s\n", metacall_value_to_string(str_value)); + fflush(stdout); + + { + void *new_str_value = metacall_value_to_ptr(str_value_ref); + char *new_str = metacall_value_to_string(new_str_value); + + EXPECT_STREQ("asd", new_str); + } + + void *args[] = { + str_value_ref + }; + + metacall_register("test_string_reference", test_string_reference, NULL, METACALL_NULL, 1, METACALL_PTR); + + ret = metacallv_s("test_string_reference", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + + printf("type id %s\n", metacall_value_type_name(str_value)); + fflush(stdout); + + // It chops the string because it has a fixed size from 'asd' + EXPECT_STREQ(metacall_value_to_string(str_value), "yee"); + + metacall_value_destroy(str_value); + metacall_value_destroy(str_value_ref); + } + + /* References (C) */ + { + static const char str[] = "asd"; + void *str_value = metacall_value_create_string(str, sizeof(str) - 1); + void *str_value_ref = metacall_value_reference(str_value); + + printf("(R) ptr %p\n", str_value_ref); + printf("(R) string ptr %p\n", str_value); + printf("(R) string str %s\n", metacall_value_to_string(str_value)); + fflush(stdout); + + void *args[] = { + str_value_ref + }; + + ret = metacallv_s("modify_str_ptr", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + + char *str_value_deref = static_cast<char *>(metacall_value_dereference(str_value_ref)); + + EXPECT_STREQ(str_value_deref, "yeet"); + + metacall_value_destroy(str_value); + metacall_value_destroy(str_value_ref); + } + /* Print inspect information */ { size_t size = 0; From 55dbfb4402b49c5bd8c85b9ff8d1684e8bc555cf Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 2 Sep 2025 22:55:47 +0200 Subject: [PATCH 310/364] Improve pointer, array in C loader. --- .../loaders/c_loader/source/c_loader_impl.cpp | 80 ++++++++++++++++--- .../reflect/source/reflect_value_type_cast.c | 6 ++ .../source/metacall_c_test.cpp | 65 ++++++++++++++- 3 files changed, 141 insertions(+), 10 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index bb712d5ad1..c041ffc5cd 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -759,7 +759,8 @@ function_return function_c_interface_invoke(function func, function_impl impl, f type_id id = type_index(t); type_id value_id = value_type_id((value)args[args_count]); - if (id != value_id) + /* We can accept pointers if we pass to an array, it is unsafe but it improves efficiency */ + if (id != value_id && !(value_id == TYPE_PTR && id == TYPE_ARRAY)) { return metacall_error_throw("C Loader Error", 0, "", "Type mismatch in when calling %s in argument number %" PRIuS @@ -772,7 +773,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f type_id_name(value_id)); } - if (id == TYPE_FUNCTION) + if (value_id == TYPE_FUNCTION) { c_loader_closure_value *closure = new c_loader_closure_value(static_cast<c_loader_closure_type *>(type_derived(t))); @@ -780,7 +781,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f closures.push_back(closure); } - else if (id == TYPE_STRING || id == TYPE_BUFFER) + else if (value_id == TYPE_STRING || value_id == TYPE_BUFFER) { /* String, buffer requires to be pointer to a string */ @@ -789,11 +790,11 @@ function_return function_c_interface_invoke(function func, function_impl impl, f c_function->values[args_count] = (void *)&args[args_count]; } - else if (id == TYPE_PTR) + else if (value_id == TYPE_PTR) { c_function->values[args_count] = args[args_count]; } - else if (id == TYPE_ARRAY) + else if (value_id == TYPE_ARRAY) { c_loader_array_type *array = static_cast<c_loader_array_type *>(type_derived(t)); void *error = NULL; @@ -806,7 +807,7 @@ function_return function_c_interface_invoke(function func, function_impl impl, f c_function->values[args_count] = array_ptr; } - else if (type_id_integer(id) == 0 || type_id_decimal(id) == 0) + else if (type_id_integer(value_id) == 0 || type_id_decimal(value_id) == 0) { /* Primitive types already have the pointer indirection */ c_function->values[args_count] = value_data((value)args[args_count]); @@ -883,10 +884,9 @@ function_return function_c_interface_invoke(function func, function_impl impl, f for (size_t args_count = 0; args_count < args_size; ++args_count) { - type t = signature_get_type(s, args_count); - type_id id = type_index(t); + type_id value_id = value_type_id((value)args[args_count]); - if (id == TYPE_ARRAY) + if (value_id == TYPE_ARRAY) { c_loader_array_type::free_c_array(static_cast<void **>(c_function->values[args_count])); } @@ -1353,6 +1353,68 @@ static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_bas command_line_args.push_back(includes.back().c_str()); } + /* TODO: Load from memory (discover from memory) */ + /* + #include <clang-c/Index.h> + #include <stdio.h> + #include <stdlib.h> + + int main() { + const char *source_code = + "int add(int a, int b) {\n" + " return a + b;\n" + "}"; + + // Simulate an in-memory file + CXUnsavedFile unsaved_file; + unsaved_file.Filename = "example.c"; + unsaved_file.Contents = source_code; + unsaved_file.Length = (unsigned long)strlen(source_code); + + // Create index + CXIndex index = clang_createIndex(0, 0); + + // Parse translation unit from buffer (unsaved file) + CXTranslationUnit tu; + CXErrorCode err = clang_parseTranslationUnit2( + index, + "example.c", // filename for context (matches unsaved file) + NULL, 0, // command line args + &unsaved_file, 1, // unsaved files + CXTranslationUnit_None, // options + &tu + ); + + if (err != CXError_Success) { + fprintf(stderr, "Failed to parse translation unit.\n"); + return 1; + } + + // Get the cursor to the root of the translation unit + CXCursor cursor = clang_getTranslationUnitCursor(tu); + + // Visit each AST node + clang_visitChildren( + cursor, + [](CXCursor c, CXCursor parent, CXClientData client_data) { + CXString spelling = clang_getCursorSpelling(c); + CXString kind = clang_getCursorKindSpelling(clang_getCursorKind(c)); + printf("Cursor: %s (%s)\n", clang_getCString(spelling), clang_getCString(kind)); + clang_disposeString(spelling); + clang_disposeString(kind); + return CXChildVisit_Recurse; + }, + NULL + ); + + // Clean up + clang_disposeTranslationUnit(tu); + clang_disposeIndex(index); + + return 0; + } + */ + for (std::string file : c_handle->files) { /* Define the command line arguments (simulating compiler flags) */ diff --git a/source/reflect/source/reflect_value_type_cast.c b/source/reflect/source/reflect_value_type_cast.c index 7b7410da32..e7b6670265 100644 --- a/source/reflect/source/reflect_value_type_cast.c +++ b/source/reflect/source/reflect_value_type_cast.c @@ -36,6 +36,12 @@ value value_type_cast(value v, type_id id) return v; } + /* Exception raised, avoid casting */ + if (type_id_throwable(src_id) == 0) + { + return v; + } + /* Cast from string to any type */ if (type_id_string(src_id) == 0) { diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index 490428e15c..7aa43a950a 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -93,6 +93,8 @@ TEST_F(metacall_c_test, DefaultConstructor) /* https://github.com/metacall/core/issues/570 */ { + /* void apply_blur_filter(int pixels[], int width, int height) */ + /* Call by array */ { void *args[] = { @@ -152,7 +154,68 @@ TEST_F(metacall_c_test, DefaultConstructor) metacall_value_destroy(args[2]); } - // TODO: double calculate_brightness(int pixels[], int size) + /* double calculate_brightness(int pixels[], int size) */ + + /* Call by array */ + { + void *args[] = { + metacall_value_create_array(NULL, 100), + metacall_value_create_int(100) + }; + + void **array_ptr = metacall_value_to_array(args[0]); + + for (int i = 0; i < 100; ++i) + { + array_ptr[i] = metacall_value_create_int(i); + } + + std::cout << "value: " << args[0] << std::endl; + std::cout << "array: " << array_ptr << std::endl; + + ret = metacallv("calculate_brightness", args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_DOUBLE); + + std::cout << "result: " << metacall_value_to_double(ret) << std::endl; + + EXPECT_EQ((double)metacall_value_to_double(ret), (double)49.5); + + metacall_value_destroy(ret); + + metacall_value_destroy(args[0]); + metacall_value_destroy(args[1]); + } + + /* Call by pointer */ + { + int array[100]; + + void *args[] = { + metacall_value_create_ptr(array), + metacall_value_create_int(100) + }; + + for (int i = 0; i < 100; ++i) + { + array[i] = i; + } + + ret = metacallv("calculate_brightness", args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_DOUBLE); + + std::cout << "result: " << metacall_value_to_double(ret) << std::endl; + + metacall_value_destroy(ret); + + metacall_value_destroy(args[0]); + metacall_value_destroy(args[1]); + } } /* File with dependencies */ From 9c9581bb288f24f8bc3b14cf4095d693020806a0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 3 Sep 2025 17:13:00 +0200 Subject: [PATCH 311/364] Solve issues with tests. --- source/scripts/c/compiled/source/compiled.c | 4 ++ .../source/metacall_c_test.cpp | 59 +++++++++++++++++-- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/source/scripts/c/compiled/source/compiled.c b/source/scripts/c/compiled/source/compiled.c index c8e33e9d98..8493e28d98 100644 --- a/source/scripts/c/compiled/source/compiled.c +++ b/source/scripts/c/compiled/source/compiled.c @@ -114,6 +114,7 @@ void modify_int_ptr(long *l) { printf("l %p\n", l); printf("value %d\n", *l); + fflush(stdout); assert(*l == 324444L); *l = 111L; } @@ -122,6 +123,7 @@ void modify_double_ptr(double *d) { printf("d %p\n", d); printf("value %f\n", *d); + fflush(stdout); assert(*d == 324444.0); *d = 111.0; } @@ -130,7 +132,9 @@ void modify_str_ptr(char **str_ptr) { static char new_str[] = "yeet"; printf("(C) pointer %p\n", str_ptr); + fflush(stdout); printf("(C) string %p\n", (*str_ptr)); + fflush(stdout); printf("(C) string value %s\n", *str_ptr); fflush(stdout); assert(strcmp("asd", *str_ptr) == 0); diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index 7aa43a950a..b661e8b394 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -43,6 +43,10 @@ void *sum_callback(size_t argc, void *args[], void *data) void *test_string_reference(size_t argc, void *args[], void *data) { + (void)argc; + (void)data; + + /* Get string from pointer */ printf("ptr %p\n", args[0]); fflush(stdout); @@ -54,13 +58,12 @@ void *test_string_reference(size_t argc, void *args[], void *data) char *str = metacall_value_to_string(string_value); - (void)argc; - (void)data; - printf("native string %s\n", str); + /* Check it is a valid string */ EXPECT_STREQ("asd", str); + /* Replace the string, it will be choped by the previous length */ static const char yeet[] = "yeet"; metacall_value_from_string(string_value, yeet, sizeof(yeet) - 1); @@ -69,6 +72,13 @@ void *test_string_reference(size_t argc, void *args[], void *data) printf("native string %s\n", str); fflush(stdout); + EXPECT_STREQ("yee", str); + + /* Define a new string in the pointer value */ + static const char hello[] = "hello world"; + + metacall_value_from_ptr(args[0], metacall_value_create_string(hello, sizeof(hello) - 1)); + return metacall_value_create_null(); } @@ -325,18 +335,26 @@ TEST_F(metacall_c_test, DefaultConstructor) printf("type id %s\n", metacall_value_type_name(str_value)); fflush(stdout); - // It chops the string because it has a fixed size from 'asd' + /* It chops the string because it has a fixed size from 'asd' */ EXPECT_STREQ(metacall_value_to_string(str_value), "yee"); metacall_value_destroy(str_value); + + /* It should contain the new string */ + void *new_str = metacall_value_dereference(str_value_ref); + + EXPECT_STREQ(metacall_value_to_string(new_str), "hello world"); + + metacall_value_destroy(new_str); metacall_value_destroy(str_value_ref); } - /* References (C) */ + /* References (C: string) */ { static const char str[] = "asd"; void *str_value = metacall_value_create_string(str, sizeof(str) - 1); void *str_value_ref = metacall_value_reference(str_value); + void *str_value_ref_ref = metacall_value_reference(str_value_ref); printf("(R) ptr %p\n", str_value_ref); printf("(R) string ptr %p\n", str_value); @@ -344,7 +362,7 @@ TEST_F(metacall_c_test, DefaultConstructor) fflush(stdout); void *args[] = { - str_value_ref + str_value_ref_ref }; ret = metacallv_s("modify_str_ptr", args, 1); @@ -361,6 +379,35 @@ TEST_F(metacall_c_test, DefaultConstructor) metacall_value_destroy(str_value); metacall_value_destroy(str_value_ref); + metacall_value_destroy(str_value_ref_ref); + } + + /* References (C: int) */ + { + void *int_value = metacall_value_create_long(324444L); + void *int_value_ref = metacall_value_reference(int_value); + + printf("(R) ptr %p\n", int_value_ref); + printf("(R) int ptr %p\n", int_value); + printf("(R) int value %ld\n", metacall_value_to_long(int_value)); + fflush(stdout); + + void *args[] = { + int_value_ref + }; + + ret = metacallv_s("modify_int_ptr", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + + EXPECT_EQ((long)metacall_value_to_long(int_value), (long)111L); + + metacall_value_destroy(int_value); + metacall_value_destroy(int_value_ref); } /* Print inspect information */ From 6b59246e6e9e5c1aaec4677d8bad0b2498b883e8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 3 Sep 2025 17:13:58 +0200 Subject: [PATCH 312/364] Update bindings. --- source/ports/rs_port/src/bindings.rs | 1429 +------------------------- 1 file changed, 1 insertion(+), 1428 deletions(-) diff --git a/source/ports/rs_port/src/bindings.rs b/source/ports/rs_port/src/bindings.rs index 8f6385d5bf..7222ae7443 100644 --- a/source/ports/rs_port/src/bindings.rs +++ b/source/ports/rs_port/src/bindings.rs @@ -1,1430 +1,3 @@ /* automatically generated by rust-bindgen 0.71.1 */ -pub type __pid_t = ::std::os::raw::c_int; -pub type pid_t = __pid_t; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum metacall_allocator_id { - METACALL_ALLOCATOR_STD = 0, - METACALL_ALLOCATOR_NGINX = 1, -} -unsafe extern "C" { - #[doc = " @brief\n Create an allocator instance\n\n @param[in] allocator_id\n Type of allocator to be created\n\n @param[in] ctx\n Context of the allocator\n\n @return\n Pointer to allocator if success, null otherwise"] - pub fn metacall_allocator_create( - allocator_id: metacall_allocator_id, - ctx: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Reserve memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] size\n Size in bytes to be allocated\n\n @return\n Pointer to allocated data on success, null otherwise"] - pub fn metacall_allocator_alloc( - allocator: *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Reallocate memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Original pointer to data\n\n @param[in] size\n Original size in bytes\n\n @param[in] new_size\n New size in bytes to be reallocated\n\n @return\n Pointer to new reallocated data on success, null otherwise"] - pub fn metacall_allocator_realloc( - allocator: *mut ::std::os::raw::c_void, - data: *mut ::std::os::raw::c_void, - size: usize, - new_size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Free memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Pointer to data to be freed"] - pub fn metacall_allocator_free( - allocator: *mut ::std::os::raw::c_void, - data: *mut ::std::os::raw::c_void, - ); -} -unsafe extern "C" { - #[doc = " @brief\n Destroy an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance"] - pub fn metacall_allocator_destroy(allocator: *mut ::std::os::raw::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct metacall_exception_type { - pub message: *const ::std::os::raw::c_char, - pub label: *const ::std::os::raw::c_char, - pub code: i64, - pub stacktrace: *const ::std::os::raw::c_char, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of metacall_exception_type"][::std::mem::size_of::<metacall_exception_type>() - 32usize]; - ["Alignment of metacall_exception_type"] - [::std::mem::align_of::<metacall_exception_type>() - 8usize]; - ["Offset of field: metacall_exception_type::message"] - [::std::mem::offset_of!(metacall_exception_type, message) - 0usize]; - ["Offset of field: metacall_exception_type::label"] - [::std::mem::offset_of!(metacall_exception_type, label) - 8usize]; - ["Offset of field: metacall_exception_type::code"] - [::std::mem::offset_of!(metacall_exception_type, code) - 16usize]; - ["Offset of field: metacall_exception_type::stacktrace"] - [::std::mem::offset_of!(metacall_exception_type, stacktrace) - 24usize]; -}; -pub type metacall_exception = *mut metacall_exception_type; -unsafe extern "C" { - #[doc = " @brief\n Retrieve the exception from a value, it can be either a throwable value with an exception inside or an exception itself\n\n @param[in] v\n Value that represents the exception to be retrieved\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to @v\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_error_from_value( - v: *mut ::std::os::raw::c_void, - ex: metacall_exception, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Retrieve last error that has happened after a call to any API from MetaCall\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to the internal MetaCall exception\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_error_last(ex: metacall_exception) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Clear last error that has happened after a call to any API from MetaCall"] - pub fn metacall_error_clear(); -} -unsafe extern "C" { - #[doc = " @brief\n Initialize link detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_link_initialize() -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_link_register( - tag: *const ::std::os::raw::c_char, - library: *const ::std::os::raw::c_char, - symbol: *const ::std::os::raw::c_char, - fn_: ::std::option::Option<unsafe extern "C" fn()>, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] loader\n Pointer to the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_link_register_loader( - loader: *mut ::std::os::raw::c_void, - library: *const ::std::os::raw::c_char, - symbol: *const ::std::os::raw::c_char, - fn_: ::std::option::Option<unsafe extern "C" fn()>, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Remove the hook previously registered\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_link_unregister( - tag: *const ::std::os::raw::c_char, - library: *const ::std::os::raw::c_char, - symbol: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Unregister link detours and destroy shared memory"] - pub fn metacall_link_destroy(); -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum metacall_log_id { - METACALL_LOG_STDIO = 0, - METACALL_LOG_FILE = 1, - METACALL_LOG_SOCKET = 2, - METACALL_LOG_SYSLOG = 3, - METACALL_LOG_NGINX = 4, - METACALL_LOG_CUSTOM = 5, -} -unsafe extern "C" { - #[doc = " @brief\n Create a log instance\n\n @param[in] log_id\n Type of log to be created\n\n @param[in] ctx\n Context of the log (a pointer to metacall_log_{stdio, file, socket, syslog, nginx, custom}_type)\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_log( - log_id: metacall_log_id, - ctx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum metacall_value_id { - METACALL_BOOL = 0, - METACALL_CHAR = 1, - METACALL_SHORT = 2, - METACALL_INT = 3, - METACALL_LONG = 4, - METACALL_FLOAT = 5, - METACALL_DOUBLE = 6, - METACALL_STRING = 7, - METACALL_BUFFER = 8, - METACALL_ARRAY = 9, - METACALL_MAP = 10, - METACALL_PTR = 11, - METACALL_FUTURE = 12, - METACALL_FUNCTION = 13, - METACALL_NULL = 14, - METACALL_CLASS = 15, - METACALL_OBJECT = 16, - METACALL_EXCEPTION = 17, - METACALL_THROWABLE = 18, - METACALL_SIZE = 19, - METACALL_INVALID = 20, -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from boolean @b\n\n @param[in] b\n Boolean will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_bool(b: ::std::os::raw::c_uchar) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from char @c\n\n @param[in] c\n Character will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_char(c: ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from short @s\n\n @param[in] s\n Short will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_short(s: ::std::os::raw::c_short) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from integer @i\n\n @param[in] i\n Integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_int(i: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from long @l\n\n @param[in] l\n Long integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_long(l: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from single precision floating point number @f\n\n @param[in] f\n Float will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_float(f: f32) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from double precision floating point number @d\n\n @param[in] d\n Double will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_double(d: f64) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from a C string @str\n\n @param[in] str\n Constant string will be copied into value (needs to be null terminated)\n\n @param[in] length\n Length of the constant string\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_string( - str_: *const ::std::os::raw::c_char, - length: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value buffer from array @buffer\n\n @param[in] buffer\n Constant memory block will be copied into value array\n\n @param[in] size\n Size in bytes of data contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_buffer( - buffer: *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value array from array of values @values\n\n @param[in] values\n Constant array of values will be copied into value list\n\n @param[in] size\n Number of elements contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_array( - values: *mut *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value map from array of tuples @map\n\n @param[in] tuples\n Constant array of tuples will be copied into value map\n\n @param[in] size\n Number of elements contained in the map\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_map( - tuples: *mut *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from pointer @ptr\n\n @param[in] ptr\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_ptr( - ptr: *const ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from future @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_future( - f: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from function @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_function( - f: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from function @f binding a closure @c to it\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @param[in] c\n Pointer to closure that will be binded into function @f\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_function_closure( - f: *mut ::std::os::raw::c_void, - c: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value of type null\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_null() -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from class @c\n\n @param[in] c\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_class( - c: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from object @o\n\n @param[in] o\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_object( - o: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from exception @ex\n\n @param[in] ex\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_exception( - ex: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a value from throwable @th\n\n @param[in] th\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] - pub fn metacall_value_create_throwable( - th: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Returns the size of the value\n\n @param[in] v\n Reference to the value\n\n @return\n Size in bytes of the value"] - pub fn metacall_value_size(v: *mut ::std::os::raw::c_void) -> usize; -} -unsafe extern "C" { - #[doc = " @brief\n Returns the amount of values this value contains\n\n @param[in] v\n Reference to the value\n\n @return\n Number of values @v represents"] - pub fn metacall_value_count(v: *mut ::std::os::raw::c_void) -> usize; -} -unsafe extern "C" { - #[doc = " @brief\n Provide type id of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return type id assigned to value"] - pub fn metacall_value_id(v: *mut ::std::os::raw::c_void) -> metacall_value_id; -} -unsafe extern "C" { - #[doc = " @brief\n Provide type id in a readable form (as string) of a type id\n\n @param[in] id\n Value type identifier\n\n @return\n Return string related to the type id"] - pub fn metacall_value_id_name(id: metacall_value_id) -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Provide type id in a readable form (as string) of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return string related to the type id assigned to value"] - pub fn metacall_value_type_name( - v: *mut ::std::os::raw::c_void, - ) -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Deep copies the value @v, the result copy resets\n the reference counter and ownership, including the finalizer\n\n @param[in] v\n Reference to the value to be copied\n\n @return\n Copy of the value @v on success, null otherwhise"] - pub fn metacall_value_copy(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Creates a new pointer value, with a reference to the\n data contained inside the value @v. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n\n In this case, void *ptr is a value equivalent to int*,\n and it points directly to the integer contained in void *v.\n Note that if we destroy the value @v, the reference will\n point to already freed memory, causing use-after-free when used.\n\n @param[in] v\n Reference to the value to be referenced\n\n @return\n A new value of type pointer, pointing to the @v data"] - pub fn metacall_value_reference(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n If you pass a reference previously created (i.e a value of\n type pointer, pointing to another value), it returns the\n original value. It does not modify the memory of the values\n neither allocates anything. If the value @v is pointing to\n has been deleted, it will cause an use-after-free. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n void *w = metacall_value_dereference(ptr);\n assert(v == w); // Both are the same value\n\n @param[in] v\n Reference to the value to be dereferenced\n\n @return\n The value containing the data which ptr is pointing to"] - pub fn metacall_value_dereference( - v: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Copies the ownership from @src to @dst, including the finalizer,\n and resets the owner and finalizer of @src\n\n @param[in] src\n Source value which will lose the ownership\n\n @param[in] dst\n Destination value which will recieve the ownership"] - pub fn metacall_value_move(src: *mut ::std::os::raw::c_void, dest: *mut ::std::os::raw::c_void); -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to boolean\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to boolean"] - pub fn metacall_value_to_bool(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uchar; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to char\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to char"] - pub fn metacall_value_to_char(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to short\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to short"] - pub fn metacall_value_to_short(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_short; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to integer"] - pub fn metacall_value_to_int(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to long integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to long integer"] - pub fn metacall_value_to_long(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to single precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to float"] - pub fn metacall_value_to_float(v: *mut ::std::os::raw::c_void) -> f32; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to double precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to dobule"] - pub fn metacall_value_to_double(v: *mut ::std::os::raw::c_void) -> f64; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to string\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to C string (null terminated)"] - pub fn metacall_value_to_string(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to buffer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to memory block"] - pub fn metacall_value_to_buffer(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to array of values\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to array of values"] - pub fn metacall_value_to_array( - v: *mut ::std::os::raw::c_void, - ) -> *mut *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to map\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to map (array of tuples (array of values))"] - pub fn metacall_value_to_map( - v: *mut ::std::os::raw::c_void, - ) -> *mut *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to pointer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to pointer"] - pub fn metacall_value_to_ptr(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to future\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to future"] - pub fn metacall_value_to_future(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to function\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to function"] - pub fn metacall_value_to_function( - v: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to null\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to null"] - pub fn metacall_value_to_null(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to class\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to class"] - pub fn metacall_value_to_class(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to object\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to object"] - pub fn metacall_value_to_object(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to exception\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to exception"] - pub fn metacall_value_to_exception( - v: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v to throwable\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to throwable"] - pub fn metacall_value_to_throwable( - v: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign boolean @b to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] b\n Boolean to be assigned to value @v\n\n @return\n Value with boolean @b assigned to it"] - pub fn metacall_value_from_bool( - v: *mut ::std::os::raw::c_void, - b: ::std::os::raw::c_uchar, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign character @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Character to be assigned to value @v\n\n @return\n Value with char @c assigned to it"] - pub fn metacall_value_from_char( - v: *mut ::std::os::raw::c_void, - c: ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign short @s to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] s\n Short to be assigned to value @v\n\n @return\n Value with short @s assigned to it"] - pub fn metacall_value_from_short( - v: *mut ::std::os::raw::c_void, - s: ::std::os::raw::c_short, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign integer @i to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] i\n Integer to be assigned to value @v\n\n @return\n Value with integer @i assigned to it"] - pub fn metacall_value_from_int( - v: *mut ::std::os::raw::c_void, - i: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign long integer @l to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] l\n Long integer to be assigned to value @v\n\n @return\n Value with long @l assigned to it"] - pub fn metacall_value_from_long( - v: *mut ::std::os::raw::c_void, - l: ::std::os::raw::c_long, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign single precision floating point @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Float to be assigned to value @v\n\n @return\n Value with float @f assigned to it"] - pub fn metacall_value_from_float( - v: *mut ::std::os::raw::c_void, - f: f32, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign double precision floating point @d to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] d\n Double to be assigned to value @v\n\n @return\n Value with double @d assigned to it"] - pub fn metacall_value_from_double( - v: *mut ::std::os::raw::c_void, - d: f64, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign string @str to value @v, truncates to @v size if it is smaller\n than @length + 1. It does not add null terminator if truncated.\n\n @param[in] v\n Reference to the value\n\n @param[in] str\n Constant string to be assigned to value @v (it needs to be null terminated)\n\n @param[in] length\n Length of the constant string @str\n\n @return\n Value with string @str assigned to it"] - pub fn metacall_value_from_string( - v: *mut ::std::os::raw::c_void, - str_: *const ::std::os::raw::c_char, - length: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign array @buffer to value buffer @v\n\n @param[in] v\n Reference to the value\n\n @param[in] buffer\n Constant array to be assigned to value @v\n\n @param[in] size\n Number of elements contained in @buffer\n\n @return\n Value with array @buffer assigned to it"] - pub fn metacall_value_from_buffer( - v: *mut ::std::os::raw::c_void, - buffer: *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign array of values @values to value array @v\n\n @param[in] v\n Reference to the value\n\n @param[in] values\n Constant array of values to be assigned to value array @v\n\n @param[in] size\n Number of values contained in constant array @values\n\n @return\n Value with array of values @values assigned to it"] - pub fn metacall_value_from_array( - v: *mut ::std::os::raw::c_void, - values: *mut *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign array of values @values to value map @v\n\n @param[in] v\n Reference to the value\n\n @param[in] tuples\n Constant array of tuples to be assigned to value map @v\n\n @param[in] size\n Number of values contained in constant array @tuples\n\n @return\n Value with array of tuples @tuples assigned to it"] - pub fn metacall_value_from_map( - v: *mut ::std::os::raw::c_void, - tuples: *mut *const ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign pointer reference @ptr to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ptr\n Pointer to be assigned to value @v\n\n @return\n Value with pointer @ptr assigned to it"] - pub fn metacall_value_from_ptr( - v: *mut ::std::os::raw::c_void, - ptr: *const ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign future @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Future to be assigned to value @v\n\n @return\n Value with future @f assigned to it"] - pub fn metacall_value_from_future( - v: *mut ::std::os::raw::c_void, - f: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign function @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Function to be assigned to value @v\n\n @return\n Value with function @f assigned to it"] - pub fn metacall_value_from_function( - v: *mut ::std::os::raw::c_void, - f: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign null to value @v\n\n @param[in] v\n Reference to the value\n\n @return\n Value with null assigned to it"] - pub fn metacall_value_from_null(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign class @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Class to be assigned to value @v\n\n @return\n Value with class @c assigned to it"] - pub fn metacall_value_from_class( - v: *mut ::std::os::raw::c_void, - c: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign object @o to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] o\n Object to be assigned to value @v\n\n @return\n Value with object @o assigned to it"] - pub fn metacall_value_from_object( - v: *mut ::std::os::raw::c_void, - o: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign exception @ex to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ex\n Exception to be assigned to value @v\n\n @return\n Value with exception @ex assigned to it"] - pub fn metacall_value_from_exception( - v: *mut ::std::os::raw::c_void, - ex: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Assign throwable @th to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] th\n Throwable to be assigned to value @v\n\n @return\n Value with throwable @th assigned to it"] - pub fn metacall_value_from_throwable( - v: *mut ::std::os::raw::c_void, - th: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Casts a value to a new type @id\n\n @param[in] v\n Reference to the value\n\n @param[in] id\n New type id of value to be casted\n\n @return\n Casted value or reference to @v if casting is between equivalent types"] - pub fn metacall_value_cast( - v: *mut ::std::os::raw::c_void, - id: metacall_value_id, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to boolean\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to boolean"] - pub fn metacall_value_cast_bool(v: *mut *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_uchar; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to char\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to char"] - pub fn metacall_value_cast_char(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to short\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to short"] - pub fn metacall_value_cast_short( - v: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_short; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to int\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to int"] - pub fn metacall_value_cast_int(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to long\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to long"] - pub fn metacall_value_cast_long(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to float\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to float"] - pub fn metacall_value_cast_float(v: *mut *mut ::std::os::raw::c_void) -> f32; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to double\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to double"] - pub fn metacall_value_cast_double(v: *mut *mut ::std::os::raw::c_void) -> f64; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to string\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to a C string (null terminated)"] - pub fn metacall_value_cast_string( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to buffer\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to buffer"] - pub fn metacall_value_cast_buffer( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to array\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to array of values"] - pub fn metacall_value_cast_array( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to map\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to map"] - pub fn metacall_value_cast_map( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to ptr\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to ptr"] - pub fn metacall_value_cast_ptr( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to future\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to future"] - pub fn metacall_value_cast_future( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to function\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to function"] - pub fn metacall_value_cast_function( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to null\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to null"] - pub fn metacall_value_cast_null( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to class\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to class"] - pub fn metacall_value_cast_class( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to object\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to object"] - pub fn metacall_value_cast_object( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to exception\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to exception"] - pub fn metacall_value_cast_exception( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert value @v implicitly to throwable\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to throwable"] - pub fn metacall_value_cast_throwable( - v: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Destroy a value from scope stack\n\n @param[in] v\n Reference to the value"] - pub fn metacall_value_destroy(v: *mut ::std::os::raw::c_void); -} -pub type metacall_pid = pid_t; -pub type metacall_pre_fork_callback_ptr = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, ->; -pub type metacall_post_fork_callback_ptr = ::std::option::Option< - unsafe extern "C" fn( - arg1: metacall_pid, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -unsafe extern "C" { - #[doc = " @brief\n Initialize fork detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_fork_initialize() -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Set fork hook callback\n\n @param[in] pre_callback\n Callback to be called before fork detour is executed\n\n @param[in] post_callback\n Callback to be called after fork detour is executed"] - pub fn metacall_fork( - pre_callback: metacall_pre_fork_callback_ptr, - post_callback: metacall_post_fork_callback_ptr, - ); -} -unsafe extern "C" { - #[doc = " @brief\n Unregister fork detours and destroy shared memory"] - pub fn metacall_fork_destroy(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct metacall_initialize_configuration_type { - pub tag: *const ::std::os::raw::c_char, - pub options: *mut ::std::os::raw::c_void, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of metacall_initialize_configuration_type"] - [::std::mem::size_of::<metacall_initialize_configuration_type>() - 16usize]; - ["Alignment of metacall_initialize_configuration_type"] - [::std::mem::align_of::<metacall_initialize_configuration_type>() - 8usize]; - ["Offset of field: metacall_initialize_configuration_type::tag"] - [::std::mem::offset_of!(metacall_initialize_configuration_type, tag) - 0usize]; - ["Offset of field: metacall_initialize_configuration_type::options"] - [::std::mem::offset_of!(metacall_initialize_configuration_type, options) - 8usize]; -}; -pub type metacall_await_callback = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct metacall_await_callbacks_type { - pub resolve: metacall_await_callback, - pub reject: metacall_await_callback, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of metacall_await_callbacks_type"] - [::std::mem::size_of::<metacall_await_callbacks_type>() - 16usize]; - ["Alignment of metacall_await_callbacks_type"] - [::std::mem::align_of::<metacall_await_callbacks_type>() - 8usize]; - ["Offset of field: metacall_await_callbacks_type::resolve"] - [::std::mem::offset_of!(metacall_await_callbacks_type, resolve) - 0usize]; - ["Offset of field: metacall_await_callbacks_type::reject"] - [::std::mem::offset_of!(metacall_await_callbacks_type, reject) - 8usize]; -}; -pub type metacall_await_callbacks = metacall_await_callbacks_type; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct metacall_version_type { - pub major: ::std::os::raw::c_uint, - pub minor: ::std::os::raw::c_uint, - pub patch: ::std::os::raw::c_uint, - pub revision: *const ::std::os::raw::c_char, - pub str_: *const ::std::os::raw::c_char, - pub name: *const ::std::os::raw::c_char, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of metacall_version_type"][::std::mem::size_of::<metacall_version_type>() - 40usize]; - ["Alignment of metacall_version_type"] - [::std::mem::align_of::<metacall_version_type>() - 8usize]; - ["Offset of field: metacall_version_type::major"] - [::std::mem::offset_of!(metacall_version_type, major) - 0usize]; - ["Offset of field: metacall_version_type::minor"] - [::std::mem::offset_of!(metacall_version_type, minor) - 4usize]; - ["Offset of field: metacall_version_type::patch"] - [::std::mem::offset_of!(metacall_version_type, patch) - 8usize]; - ["Offset of field: metacall_version_type::revision"] - [::std::mem::offset_of!(metacall_version_type, revision) - 16usize]; - ["Offset of field: metacall_version_type::str_"] - [::std::mem::offset_of!(metacall_version_type, str_) - 24usize]; - ["Offset of field: metacall_version_type::name"] - [::std::mem::offset_of!(metacall_version_type, name) - 32usize]; -}; -unsafe extern "C" { - #[doc = " @brief\n Returns default serializer used by MetaCall\n\n @return\n Name of the serializer to be used with serialization methods"] - pub fn metacall_serial() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Returns default detour used by MetaCall\n\n @return\n Name of the detour to be used with detouring methods"] - pub fn metacall_detour() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Disables MetaCall logs, must be called before @metacall_initialize.\n\n When initializing MetaCall, it initializes a default logs to stdout\n if none was defined. If you want to benchmark or simply disable this\n default logs, you can call to this function before @metacall_initialize."] - pub fn metacall_log_null(); -} -unsafe extern "C" { - #[doc = " @brief\n Flags to be set in MetaCall library\n\n @param[in] flags\n Combination of flags referring to definitions METACALL_FLAGS_*"] - pub fn metacall_flags(flags: ::std::os::raw::c_int); -} -unsafe extern "C" { - #[doc = " @brief\n Initialize MetaCall library\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_initialize() -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Initialize MetaCall library with configuration arguments\n\n @param[in] initialize_config\n Extension of the script to be loaded in memory with data to be injected\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_initialize_ex( - initialize_config: *mut metacall_initialize_configuration_type, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Initialize MetaCall application arguments\n\n @param[in] argc\n Number of additional parameters to be passed to the runtime when initializing\n\n @param[in] argv\n Additional parameters to be passed to the runtime when initializing (when using MetaCall as an application)"] - pub fn metacall_initialize_args( - argc: ::std::os::raw::c_int, - argv: *mut *mut ::std::os::raw::c_char, - ); -} -unsafe extern "C" { - #[doc = " @brief\n Get the number of arguments in which MetaCall was initialized\n\n @return\n An integer equal or greater than zero"] - pub fn metacall_argc() -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the arguments in which MetaCall was initialized\n\n @return\n A pointer to an array of strings with the additional arguments"] - pub fn metacall_argv() -> *mut *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Check if script context is loaded by @tag\n\n @param[in] tag\n Extension of the script (if tag is NULL, it returns the status of the whole MetaCall instance)\n\n @return\n Zero if context is initialized, different from zero otherwise"] - pub fn metacall_is_initialized(tag: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Amount of function call arguments supported by MetaCall\n\n @return\n Number of arguments suported"] - pub fn metacall_args_size() -> usize; -} -unsafe extern "C" { - #[doc = " @brief\n Set a execution path defined by @path to the extension script @tag\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path to be loaded\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_execution_path( - tag: *const ::std::os::raw::c_char, - path: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Set a execution path defined by @path to the extension script @tag with length\n\n @param[in] tag\n Extension of the script\n\n @param[in] tag_length\n Length of the extension of the tag\n\n @param[in] path\n Path to be loaded\n\n @param[in] path_length\n Length of the path\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_execution_path_s( - tag: *const ::std::os::raw::c_char, - tag_length: usize, - path: *const ::std::os::raw::c_char, - path_length: usize, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Loads a script from file specified by @path\n\n @param[in] tag\n Extension of the script\n\n @param[in] paths\n Path array of files\n\n @param[in] size\n Size of the array @paths\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_load_from_file( - tag: *const ::std::os::raw::c_char, - paths: *mut *const ::std::os::raw::c_char, - size: usize, - handle: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Loads a script from memory\n\n @param[in] tag\n Extension of the script\n\n @param[in] buffer\n Memory block representing the string of the script\n\n @param[in] size\n Memory block representing the string of the script\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_load_from_memory( - tag: *const ::std::os::raw::c_char, - buffer: *const ::std::os::raw::c_char, - size: usize, - handle: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Loads a package of scrips from file specified by @path into loader defined by @extension\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path of the package\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_load_from_package( - tag: *const ::std::os::raw::c_char, - path: *const ::std::os::raw::c_char, - handle: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Loads a a list of scrips from configuration specified by @path into loader\n with the following format:\n {\n \"language_id\": \"<tag>\",\n \"path\": \"<path>\",\n \"scripts\": [ \"<script0>\", \"<script1>\", ..., \"<scriptN>\" ]\n }\n\n @param[in] path\n Path of the configuration\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @param[in] allocator\n Pointer to allocator will allocate the configuration\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_load_from_configuration( - path: *const ::std::os::raw::c_char, - handle: *mut *mut ::std::os::raw::c_void, - allocator: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallv( - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallv_s( - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallhv( - handle: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n Includes @size in order to allow variadic arguments or safe calls\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallhv_s( - handle: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacall(name: *const ::std::os::raw::c_char, ...) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallt( - name: *const ::std::os::raw::c_char, - ids: *const metacall_value_id, - ... - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallt_s( - name: *const ::std::os::raw::c_char, - ids: *const metacall_value_id, - size: usize, - ... - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallht_s( - handle: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ids: *const metacall_value_id, - size: usize, - ... - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get the function by @name\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] - pub fn metacall_function(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create an empty handler into a loader with name @name\n\n @param[in] loader\n Pointer to the loader which the handle belongs to\n\n @param[in] name\n Name of the handle\n\n @param[out] handle_ptr\n On success, returns the pointer to the handle created, otherwise NULL\n\n @return\n Return zero on success, different from zero on error"] - pub fn metacall_handle_initialize( - loader: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - handle_ptr: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Populate the objects of @handle_src into @handle_dest\n\n @param[inout] handle_dest\n Handle where the objects from @handle_src will be stored\n\n @param[in] handle_src\n Handle from where the objects will be copied\n\n @return\n Return zero on success, different from zero on error"] - pub fn metacall_handle_populate( - handle_dest: *mut ::std::os::raw::c_void, - handle_src: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the function by @name from @handle\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] - pub fn metacall_handle_function( - handle: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get the function parameter type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n @param[in] parameter\n The index of the parameter to be retrieved\n\n @param[out] id\n The parameter type id that will be returned\n\n @return\n Return 0 if the @parameter index exists and @func is valid, 1 otherwhise"] - pub fn metacall_function_parameter_type( - func: *mut ::std::os::raw::c_void, - parameter: usize, - id: *mut metacall_value_id, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the function return type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n\n @param[out] id\n The value id of the return type of the function @func\n\n @return\n Return 0 if the @func is valid, 1 otherwhise"] - pub fn metacall_function_return_type( - func: *mut ::std::os::raw::c_void, - id: *mut metacall_value_id, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get minimun mumber of arguments accepted by function @func\n\n @param[in] func\n Function reference\n\n @return\n Return mumber of arguments"] - pub fn metacall_function_size(func: *mut ::std::os::raw::c_void) -> usize; -} -unsafe extern "C" { - #[doc = " @brief\n Check if the function @func is asynchronous or synchronous\n\n @param[in] func\n Function reference\n\n @return\n Return 0 if it is syncrhonous, 1 if it is asynchronous and -1 if the function is NULL"] - pub fn metacall_function_async(func: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the handle by @name\n\n @param[in] tag\n Extension of the script\n\n @param[in] name\n Name of the handle\n\n @return\n Handle reference, null if the function does not exist"] - pub fn metacall_handle( - tag: *const ::std::os::raw::c_char, - name: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get name of a @handle\n\n @param[in] handle\n Pointer to the handle to be retrieved\n\n @return\n String that references the handle"] - pub fn metacall_handle_id(handle: *mut ::std::os::raw::c_void) - -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Return a value representing the handle as a map of functions (or values)\n\n @param[in] handle\n Reference to the handle to be described\n\n @return\n A value of type map on success, null otherwise"] - pub fn metacall_handle_export( - handle: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallfv( - func: *mut ::std::os::raw::c_void, - args: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of function arguments\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallfv_s( - func: *mut ::std::os::raw::c_void, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by variable arguments @va_args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallf(func: *mut ::std::os::raw::c_void, ...) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallfs( - func: *mut ::std::os::raw::c_void, - buffer: *const ::std::os::raw::c_char, - size: usize, - allocator: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallfmv( - func: *mut ::std::os::raw::c_void, - keys: *mut *mut ::std::os::raw::c_void, - values: *mut *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallfms( - func: *mut ::std::os::raw::c_void, - buffer: *const ::std::os::raw::c_char, - size: usize, - allocator: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Register a function by name @name and arguments @va_args\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] va_args\n Varidic function parameter types\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacall_register( - name: *const ::std::os::raw::c_char, - invoke: ::std::option::Option< - unsafe extern "C" fn( - arg1: usize, - arg2: *mut *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - func: *mut *mut ::std::os::raw::c_void, - return_type: metacall_value_id, - size: usize, - ... - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacall_registerv( - name: *const ::std::os::raw::c_char, - invoke: ::std::option::Option< - unsafe extern "C" fn( - arg1: usize, - arg2: *mut *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - func: *mut *mut ::std::os::raw::c_void, - return_type: metacall_value_id, - size: usize, - types: *mut metacall_value_id, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Obtain the loader instance by @tag\n\n @param[in] tag\n Tag in which the loader is identified, normally it is the extension of the script\n\n @return\n Pointer the loader by @tag"] - pub fn metacall_loader(tag: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] loader\n Opaque pointer to the loader in which you want to register the function (this allows to register the function into a different loader than the host)\n\n @param[in] handle\n Opaque pointer to the handle in which you want to register the function (if it is NULL, it will be defined on the global scope of the loader)\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Zero if the function was registered properly, distinct from zero otherwise"] - pub fn metacall_register_loaderv( - loader: *mut ::std::os::raw::c_void, - handle: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - invoke: ::std::option::Option< - unsafe extern "C" fn( - arg1: usize, - arg2: *mut *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - return_type: metacall_value_id, - size: usize, - types: *mut metacall_value_id, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacall_await( - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Awaits for a promise and registers a callback to be executed when a future is resolved\n\n @param[in] f\n The pointer to the future\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacall_await_future( - f: *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacall_await_s( - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfv_await( - func: *mut ::std::os::raw::c_void, - args: *mut *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfv_await_s( - func: *mut ::std::os::raw::c_void, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func (offered without function pointers for languages without support to function pointers)\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] cb\n Pointer to struct containing the function pointers to reject and resolve that will be executed when task completion or error\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfv_await_struct_s( - func: *mut ::std::os::raw::c_void, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - cb: metacall_await_callbacks, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] size\n Number of elements of the arrays @keys and @values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfmv_await( - func: *mut ::std::os::raw::c_void, - keys: *mut *mut ::std::os::raw::c_void, - values: *mut *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfmv_await_s( - func: *mut ::std::os::raw::c_void, - keys: *mut *mut ::std::os::raw::c_void, - values: *mut *mut ::std::os::raw::c_void, - size: usize, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfs_await( - func: *mut ::std::os::raw::c_void, - buffer: *const ::std::os::raw::c_char, - size: usize, - allocator: *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] - pub fn metacallfms_await( - func: *mut ::std::os::raw::c_void, - buffer: *const ::std::os::raw::c_char, - size: usize, - allocator: *mut ::std::os::raw::c_void, - resolve_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - reject_callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void, - >, - data: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get the class by @name\n\n @param[in] name\n Name of the class\n\n @return\n Class reference, null if the class does not exist"] - pub fn metacall_class(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a class method anonymously by value array @args (this procedure assumes there's no overloaded methods and does type conversion on values)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallv_class( - cls: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a class method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallt_class( - cls: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ret: metacall_value_id, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Create a new object instance from @cls by value array @args\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the new object\n\n @param[in] args\n Array of pointers constructor parameters\n\n @param[in] size\n Number of elements of constructor parameters\n\n @return\n Pointer to the new object value instance"] - pub fn metacall_class_new( - cls: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get an attribute from @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the class attribute value or NULL if an error occurred"] - pub fn metacall_class_static_get( - cls: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Set an attribute to @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] - pub fn metacall_class_static_set( - cls: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - v: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Call an object method anonymously by value array @args\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallv_object( - obj: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Call a object method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] - pub fn metacallt_object( - obj: *mut ::std::os::raw::c_void, - name: *const ::std::os::raw::c_char, - ret: metacall_value_id, - args: *mut *mut ::std::os::raw::c_void, - size: usize, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get an attribute from @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the object attribute value or NULL if an error occurred"] - pub fn metacall_object_get( - obj: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Set an attribute to @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] - pub fn metacall_object_set( - obj: *mut ::std::os::raw::c_void, - key: *const ::std::os::raw::c_char, - v: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the value contained by throwable object @th\n\n @param[in] th\n Pointer to the throwable object\n\n @return\n Pointer to the value inside of the throwable or NULL in case of error"] - pub fn metacall_throwable_value(th: *mut ::std::os::raw::c_void) - -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Provide information about all loaded objects\n\n @param[out] size\n Size in bytes of return buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n String containing introspection information"] - pub fn metacall_inspect( - size: *mut usize, - allocator: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Provide information about all loaded objects as a value\n\n @return\n Value containing introspection information"] - pub fn metacall_inspect_value() -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Convert the value @v to serialized string\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] v\n Reference to the value\n\n @param[out] size\n Size of new allocated string\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n New allocated string containing stringified value"] - pub fn metacall_serialize( - name: *const ::std::os::raw::c_char, - v: *mut ::std::os::raw::c_void, - size: *mut usize, - allocator: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Convert the string @buffer to value\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] buffer\n String to be deserialized\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n New allocated value representing the string (must be freed)"] - pub fn metacall_deserialize( - name: *const ::std::os::raw::c_char, - buffer: *const ::std::os::raw::c_char, - size: usize, - allocator: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Clear handle from memory and unload related resources\n\n @param[in] handle\n Reference to the handle to be unloaded\n\n @return\n Zero if success, different from zero otherwise"] - pub fn metacall_clear(handle: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " @brief\n Get the plugin extension handle to be used for loading plugins\n\n @return\n Pointer to the extension handle, or null if it failed to load"] - pub fn metacall_plugin_extension() -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get the handle containing all the functionality of the plugins from core\n\n @return\n Pointer to the core plugin handle, or null if it failed to load"] - pub fn metacall_plugin_core() -> *mut ::std::os::raw::c_void; -} -unsafe extern "C" { - #[doc = " @brief\n Get the plugin extension path to be used for accessing the plugins folder\n\n @return\n String containing the core plugin path, or null if it failed to load the plugin extension"] - pub fn metacall_plugin_path() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Destroy MetaCall library"] - pub fn metacall_destroy(); -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version struct\n\n @return\n Static struct containing unpacked version"] - pub fn metacall_version() -> *const metacall_version_type; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is @major,\n I is @minor and P is @patch\n\n @param[in] major\n Unsigned integer representing major version\n\n @param[in] minor\n Unsigned integer representing minor version\n\n @param[in] patch\n Unsigned integer representing patch version\n\n @return\n Hexadecimal integer containing packed version"] - pub fn metacall_version_hex_make( - major: ::std::os::raw::c_uint, - minor: ::std::os::raw::c_uint, - patch: ::std::os::raw::c_uint, - ) -> u32; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is major,\n I is minor and P is patch\n\n @return\n Hexadecimal integer containing packed version"] - pub fn metacall_version_hex() -> u32; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version string\n\n @return\n Static string containing module version"] - pub fn metacall_version_str() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version revision string\n\n @return\n Static string containing module version revision"] - pub fn metacall_version_revision() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module version name\n\n @return\n Static string containing module version name"] - pub fn metacall_version_name() -> *const ::std::os::raw::c_char; -} -unsafe extern "C" { - #[doc = " @brief\n Provide the module information\n\n @return\n Static string containing module information"] - pub fn metacall_print_info() -> *const ::std::os::raw::c_char; -} +pub type __pid_t = :: std :: os :: raw :: c_int ; pub type pid_t = __pid_t ; # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_allocator_id { METACALL_ALLOCATOR_STD = 0 , METACALL_ALLOCATOR_NGINX = 1 , } unsafe extern "C" { # [doc = " @brief\n Create an allocator instance\n\n @param[in] allocator_id\n Type of allocator to be created\n\n @param[in] ctx\n Context of the allocator\n\n @return\n Pointer to allocator if success, null otherwise"] pub fn metacall_allocator_create (allocator_id : metacall_allocator_id , ctx : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Reserve memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] size\n Size in bytes to be allocated\n\n @return\n Pointer to allocated data on success, null otherwise"] pub fn metacall_allocator_alloc (allocator : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Reallocate memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Original pointer to data\n\n @param[in] size\n Original size in bytes\n\n @param[in] new_size\n New size in bytes to be reallocated\n\n @return\n Pointer to new reallocated data on success, null otherwise"] pub fn metacall_allocator_realloc (allocator : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , size : usize , new_size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Free memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Pointer to data to be freed"] pub fn metacall_allocator_free (allocator : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = " @brief\n Destroy an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance"] pub fn metacall_allocator_destroy (allocator : * mut :: std :: os :: raw :: c_void) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_exception_type { pub message : * const :: std :: os :: raw :: c_char , pub label : * const :: std :: os :: raw :: c_char , pub code : i64 , pub stacktrace : * const :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_exception_type"] [:: std :: mem :: size_of :: < metacall_exception_type > () - 32usize] ; ["Alignment of metacall_exception_type"] [:: std :: mem :: align_of :: < metacall_exception_type > () - 8usize] ; ["Offset of field: metacall_exception_type::message"] [:: std :: mem :: offset_of ! (metacall_exception_type , message) - 0usize] ; ["Offset of field: metacall_exception_type::label"] [:: std :: mem :: offset_of ! (metacall_exception_type , label) - 8usize] ; ["Offset of field: metacall_exception_type::code"] [:: std :: mem :: offset_of ! (metacall_exception_type , code) - 16usize] ; ["Offset of field: metacall_exception_type::stacktrace"] [:: std :: mem :: offset_of ! (metacall_exception_type , stacktrace) - 24usize] ; } ; pub type metacall_exception = * mut metacall_exception_type ; unsafe extern "C" { # [doc = " @brief\n Create an throwable value from an exception with a simple API in a single instruction\n\n @param[in] label\n Label of the exception\n\n @param[in] code\n Error code of the exception\n\n @param[in] stacktrace\n Stack trace of the exception\n\n @param[in] message\n Message of the exception to be formatted with the variable arguments\n\n @param[in] va_args\n Arguments for formatting the message\n\n @return\n The value of type throwable containing the exception created"] pub fn metacall_error_throw (label : * const :: std :: os :: raw :: c_char , code : i64 , stacktrace : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Retrieve the exception from a value, it can be either a throwable value with an exception inside or an exception itself\n\n @param[in] v\n Value that represents the exception to be retrieved\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to @v\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_error_from_value (v : * mut :: std :: os :: raw :: c_void , ex : metacall_exception) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Retrieve last error that has happened after a call to any API from MetaCall\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to the internal MetaCall exception\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_error_last (ex : metacall_exception) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Clear last error that has happened after a call to any API from MetaCall"] pub fn metacall_error_clear () ; } unsafe extern "C" { # [doc = " @brief\n Initialize link detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_register (tag : * const :: std :: os :: raw :: c_char , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char , fn_ : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] loader\n Pointer to the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_register_loader (loader : * mut :: std :: os :: raw :: c_void , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char , fn_ : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Remove the hook previously registered\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_unregister (tag : * const :: std :: os :: raw :: c_char , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Unregister link detours and destroy shared memory"] pub fn metacall_link_destroy () ; } # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_log_id { METACALL_LOG_STDIO = 0 , METACALL_LOG_FILE = 1 , METACALL_LOG_SOCKET = 2 , METACALL_LOG_SYSLOG = 3 , METACALL_LOG_NGINX = 4 , METACALL_LOG_CUSTOM = 5 , } unsafe extern "C" { # [doc = " @brief\n Create a log instance\n\n @param[in] log_id\n Type of log to be created\n\n @param[in] ctx\n Context of the log (a pointer to metacall_log_{stdio, file, socket, syslog, nginx, custom}_type)\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_log (log_id : metacall_log_id , ctx : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_value_id { METACALL_BOOL = 0 , METACALL_CHAR = 1 , METACALL_SHORT = 2 , METACALL_INT = 3 , METACALL_LONG = 4 , METACALL_FLOAT = 5 , METACALL_DOUBLE = 6 , METACALL_STRING = 7 , METACALL_BUFFER = 8 , METACALL_ARRAY = 9 , METACALL_MAP = 10 , METACALL_PTR = 11 , METACALL_FUTURE = 12 , METACALL_FUNCTION = 13 , METACALL_NULL = 14 , METACALL_CLASS = 15 , METACALL_OBJECT = 16 , METACALL_EXCEPTION = 17 , METACALL_THROWABLE = 18 , METACALL_SIZE = 19 , METACALL_INVALID = 20 , } unsafe extern "C" { # [doc = " @brief\n Create a value from boolean @b\n\n @param[in] b\n Boolean will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_bool (b : :: std :: os :: raw :: c_uchar) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from char @c\n\n @param[in] c\n Character will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_char (c : :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from short @s\n\n @param[in] s\n Short will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_short (s : :: std :: os :: raw :: c_short) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from integer @i\n\n @param[in] i\n Integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_int (i : :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from long @l\n\n @param[in] l\n Long integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_long (l : :: std :: os :: raw :: c_long) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from single precision floating point number @f\n\n @param[in] f\n Float will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_float (f : f32) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from double precision floating point number @d\n\n @param[in] d\n Double will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_double (d : f64) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from a C string @str\n\n @param[in] str\n Constant string will be copied into value (needs to be null terminated)\n\n @param[in] length\n Length of the constant string\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_string (str_ : * const :: std :: os :: raw :: c_char , length : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value buffer from array @buffer\n\n @param[in] buffer\n Constant memory block will be copied into value array\n\n @param[in] size\n Size in bytes of data contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_buffer (buffer : * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value array from array of values @values\n\n @param[in] values\n Constant array of values will be copied into value list\n\n @param[in] size\n Number of elements contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_array (values : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value map from array of tuples @map\n\n @param[in] tuples\n Constant array of tuples will be copied into value map\n\n @param[in] size\n Number of elements contained in the map\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_map (tuples : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from pointer @ptr\n\n @param[in] ptr\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_ptr (ptr : * const :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from future @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_future (f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from function @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_function (f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from function @f binding a closure @c to it\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @param[in] c\n Pointer to closure that will be binded into function @f\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_function_closure (f : * mut :: std :: os :: raw :: c_void , c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value of type null\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_null () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from class @c\n\n @param[in] c\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_class (c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from object @o\n\n @param[in] o\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_object (o : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from exception @ex\n\n @param[in] ex\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_exception (ex : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from throwable @th\n\n @param[in] th\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_throwable (th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Returns the size of the value\n\n @param[in] v\n Reference to the value\n\n @return\n Size in bytes of the value"] pub fn metacall_value_size (v : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Returns the amount of values this value contains\n\n @param[in] v\n Reference to the value\n\n @return\n Number of values @v represents"] pub fn metacall_value_count (v : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Provide type id of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return type id assigned to value"] pub fn metacall_value_id (v : * mut :: std :: os :: raw :: c_void) -> metacall_value_id ; } unsafe extern "C" { # [doc = " @brief\n Provide type id in a readable form (as string) of a type id\n\n @param[in] id\n Value type identifier\n\n @return\n Return string related to the type id"] pub fn metacall_value_id_name (id : metacall_value_id) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide type id in a readable form (as string) of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return string related to the type id assigned to value"] pub fn metacall_value_type_name (v : * mut :: std :: os :: raw :: c_void) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Deep copies the value @v, the result copy resets\n the reference counter and ownership, including the finalizer\n\n @param[in] v\n Reference to the value to be copied\n\n @return\n Copy of the value @v on success, null otherwhise"] pub fn metacall_value_copy (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Creates a new pointer value, with a reference to the\n data contained inside the value @v. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n\n In this case, void *ptr is a value equivalent to int*,\n and it points directly to the integer contained in void *v.\n Note that if we destroy the value @v, the reference will\n point to already freed memory, causing use-after-free when used.\n\n @param[in] v\n Reference to the value to be referenced\n\n @return\n A new value of type pointer, pointing to the @v data"] pub fn metacall_value_reference (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n If you pass a reference previously created (i.e a value of\n type pointer, pointing to another value), it returns the\n original value. It does not modify the memory of the values\n neither allocates anything. If the value @v is pointing to\n has been deleted, it will cause an use-after-free. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n void *w = metacall_value_dereference(ptr);\n assert(v == w); // Both are the same value\n\n @param[in] v\n Reference to the value to be dereferenced\n\n @return\n The value containing the data which ptr is pointing to"] pub fn metacall_value_dereference (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Copies the ownership from @src to @dst, including the finalizer,\n and resets the owner and finalizer of @src\n\n @param[in] src\n Source value which will lose the ownership\n\n @param[in] dst\n Destination value which will recieve the ownership"] pub fn metacall_value_move (src : * mut :: std :: os :: raw :: c_void , dest : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to boolean\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to boolean"] pub fn metacall_value_to_bool (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uchar ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to char\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to char"] pub fn metacall_value_to_char (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to short\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to short"] pub fn metacall_value_to_short (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_short ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to integer"] pub fn metacall_value_to_int (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to long integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to long integer"] pub fn metacall_value_to_long (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_long ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to single precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to float"] pub fn metacall_value_to_float (v : * mut :: std :: os :: raw :: c_void) -> f32 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to double precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to dobule"] pub fn metacall_value_to_double (v : * mut :: std :: os :: raw :: c_void) -> f64 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to string\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to C string (null terminated)"] pub fn metacall_value_to_string (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to buffer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to memory block"] pub fn metacall_value_to_buffer (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to array of values\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to array of values"] pub fn metacall_value_to_array (v : * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to map\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to map (array of tuples (array of values))"] pub fn metacall_value_to_map (v : * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to pointer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to pointer"] pub fn metacall_value_to_ptr (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to future\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to future"] pub fn metacall_value_to_future (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to function\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to function"] pub fn metacall_value_to_function (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to null\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to null"] pub fn metacall_value_to_null (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to class\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to class"] pub fn metacall_value_to_class (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to object\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to object"] pub fn metacall_value_to_object (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to exception\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to exception"] pub fn metacall_value_to_exception (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to throwable\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to throwable"] pub fn metacall_value_to_throwable (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign boolean @b to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] b\n Boolean to be assigned to value @v\n\n @return\n Value with boolean @b assigned to it"] pub fn metacall_value_from_bool (v : * mut :: std :: os :: raw :: c_void , b : :: std :: os :: raw :: c_uchar) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign character @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Character to be assigned to value @v\n\n @return\n Value with char @c assigned to it"] pub fn metacall_value_from_char (v : * mut :: std :: os :: raw :: c_void , c : :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign short @s to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] s\n Short to be assigned to value @v\n\n @return\n Value with short @s assigned to it"] pub fn metacall_value_from_short (v : * mut :: std :: os :: raw :: c_void , s : :: std :: os :: raw :: c_short) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign integer @i to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] i\n Integer to be assigned to value @v\n\n @return\n Value with integer @i assigned to it"] pub fn metacall_value_from_int (v : * mut :: std :: os :: raw :: c_void , i : :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign long integer @l to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] l\n Long integer to be assigned to value @v\n\n @return\n Value with long @l assigned to it"] pub fn metacall_value_from_long (v : * mut :: std :: os :: raw :: c_void , l : :: std :: os :: raw :: c_long) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign single precision floating point @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Float to be assigned to value @v\n\n @return\n Value with float @f assigned to it"] pub fn metacall_value_from_float (v : * mut :: std :: os :: raw :: c_void , f : f32) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign double precision floating point @d to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] d\n Double to be assigned to value @v\n\n @return\n Value with double @d assigned to it"] pub fn metacall_value_from_double (v : * mut :: std :: os :: raw :: c_void , d : f64) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign string @str to value @v, truncates to @v size if it is smaller\n than @length + 1. It does not add null terminator if truncated.\n\n @param[in] v\n Reference to the value\n\n @param[in] str\n Constant string to be assigned to value @v (it needs to be null terminated)\n\n @param[in] length\n Length of the constant string @str\n\n @return\n Value with string @str assigned to it"] pub fn metacall_value_from_string (v : * mut :: std :: os :: raw :: c_void , str_ : * const :: std :: os :: raw :: c_char , length : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array @buffer to value buffer @v\n\n @param[in] v\n Reference to the value\n\n @param[in] buffer\n Constant array to be assigned to value @v\n\n @param[in] size\n Number of elements contained in @buffer\n\n @return\n Value with array @buffer assigned to it"] pub fn metacall_value_from_buffer (v : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array of values @values to value array @v\n\n @param[in] v\n Reference to the value\n\n @param[in] values\n Constant array of values to be assigned to value array @v\n\n @param[in] size\n Number of values contained in constant array @values\n\n @return\n Value with array of values @values assigned to it"] pub fn metacall_value_from_array (v : * mut :: std :: os :: raw :: c_void , values : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array of values @values to value map @v\n\n @param[in] v\n Reference to the value\n\n @param[in] tuples\n Constant array of tuples to be assigned to value map @v\n\n @param[in] size\n Number of values contained in constant array @tuples\n\n @return\n Value with array of tuples @tuples assigned to it"] pub fn metacall_value_from_map (v : * mut :: std :: os :: raw :: c_void , tuples : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign pointer reference @ptr to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ptr\n Pointer to be assigned to value @v\n\n @return\n Value with pointer @ptr assigned to it"] pub fn metacall_value_from_ptr (v : * mut :: std :: os :: raw :: c_void , ptr : * const :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign future @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Future to be assigned to value @v\n\n @return\n Value with future @f assigned to it"] pub fn metacall_value_from_future (v : * mut :: std :: os :: raw :: c_void , f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign function @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Function to be assigned to value @v\n\n @return\n Value with function @f assigned to it"] pub fn metacall_value_from_function (v : * mut :: std :: os :: raw :: c_void , f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign null to value @v\n\n @param[in] v\n Reference to the value\n\n @return\n Value with null assigned to it"] pub fn metacall_value_from_null (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign class @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Class to be assigned to value @v\n\n @return\n Value with class @c assigned to it"] pub fn metacall_value_from_class (v : * mut :: std :: os :: raw :: c_void , c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign object @o to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] o\n Object to be assigned to value @v\n\n @return\n Value with object @o assigned to it"] pub fn metacall_value_from_object (v : * mut :: std :: os :: raw :: c_void , o : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign exception @ex to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ex\n Exception to be assigned to value @v\n\n @return\n Value with exception @ex assigned to it"] pub fn metacall_value_from_exception (v : * mut :: std :: os :: raw :: c_void , ex : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign throwable @th to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] th\n Throwable to be assigned to value @v\n\n @return\n Value with throwable @th assigned to it"] pub fn metacall_value_from_throwable (v : * mut :: std :: os :: raw :: c_void , th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Casts a value to a new type @id\n\n @param[in] v\n Reference to the value\n\n @param[in] id\n New type id of value to be casted\n\n @return\n Casted value or reference to @v if casting is between equivalent types"] pub fn metacall_value_cast (v : * mut :: std :: os :: raw :: c_void , id : metacall_value_id) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to boolean\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to boolean"] pub fn metacall_value_cast_bool (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uchar ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to char\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to char"] pub fn metacall_value_cast_char (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to short\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to short"] pub fn metacall_value_cast_short (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_short ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to int\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to int"] pub fn metacall_value_cast_int (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to long\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to long"] pub fn metacall_value_cast_long (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_long ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to float\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to float"] pub fn metacall_value_cast_float (v : * mut * mut :: std :: os :: raw :: c_void) -> f32 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to double\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to double"] pub fn metacall_value_cast_double (v : * mut * mut :: std :: os :: raw :: c_void) -> f64 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to string\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to a C string (null terminated)"] pub fn metacall_value_cast_string (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to buffer\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to buffer"] pub fn metacall_value_cast_buffer (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to array\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to array of values"] pub fn metacall_value_cast_array (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to map\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to map"] pub fn metacall_value_cast_map (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to ptr\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to ptr"] pub fn metacall_value_cast_ptr (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to future\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to future"] pub fn metacall_value_cast_future (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to function\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to function"] pub fn metacall_value_cast_function (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to null\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to null"] pub fn metacall_value_cast_null (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to class\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to class"] pub fn metacall_value_cast_class (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to object\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to object"] pub fn metacall_value_cast_object (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to exception\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to exception"] pub fn metacall_value_cast_exception (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to throwable\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to throwable"] pub fn metacall_value_cast_throwable (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Destroy a value from scope stack\n\n @param[in] v\n Reference to the value"] pub fn metacall_value_destroy (v : * mut :: std :: os :: raw :: c_void) ; } pub type metacall_pid = pid_t ; pub type metacall_pre_fork_callback_ptr = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub type metacall_post_fork_callback_ptr = :: std :: option :: Option < unsafe extern "C" fn (arg1 : metacall_pid , arg2 : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; unsafe extern "C" { # [doc = " @brief\n Initialize fork detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_fork_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Set fork hook callback\n\n @param[in] pre_callback\n Callback to be called before fork detour is executed\n\n @param[in] post_callback\n Callback to be called after fork detour is executed"] pub fn metacall_fork (pre_callback : metacall_pre_fork_callback_ptr , post_callback : metacall_post_fork_callback_ptr) ; } unsafe extern "C" { # [doc = " @brief\n Unregister fork detours and destroy shared memory"] pub fn metacall_fork_destroy () ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_initialize_configuration_type { pub tag : * const :: std :: os :: raw :: c_char , pub options : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_initialize_configuration_type"] [:: std :: mem :: size_of :: < metacall_initialize_configuration_type > () - 16usize] ; ["Alignment of metacall_initialize_configuration_type"] [:: std :: mem :: align_of :: < metacall_initialize_configuration_type > () - 8usize] ; ["Offset of field: metacall_initialize_configuration_type::tag"] [:: std :: mem :: offset_of ! (metacall_initialize_configuration_type , tag) - 0usize] ; ["Offset of field: metacall_initialize_configuration_type::options"] [:: std :: mem :: offset_of ! (metacall_initialize_configuration_type , options) - 8usize] ; } ; pub type metacall_await_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_await_callbacks_type { pub resolve : metacall_await_callback , pub reject : metacall_await_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_await_callbacks_type"] [:: std :: mem :: size_of :: < metacall_await_callbacks_type > () - 16usize] ; ["Alignment of metacall_await_callbacks_type"] [:: std :: mem :: align_of :: < metacall_await_callbacks_type > () - 8usize] ; ["Offset of field: metacall_await_callbacks_type::resolve"] [:: std :: mem :: offset_of ! (metacall_await_callbacks_type , resolve) - 0usize] ; ["Offset of field: metacall_await_callbacks_type::reject"] [:: std :: mem :: offset_of ! (metacall_await_callbacks_type , reject) - 8usize] ; } ; pub type metacall_await_callbacks = metacall_await_callbacks_type ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_version_type { pub major : :: std :: os :: raw :: c_uint , pub minor : :: std :: os :: raw :: c_uint , pub patch : :: std :: os :: raw :: c_uint , pub revision : * const :: std :: os :: raw :: c_char , pub str_ : * const :: std :: os :: raw :: c_char , pub name : * const :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_version_type"] [:: std :: mem :: size_of :: < metacall_version_type > () - 40usize] ; ["Alignment of metacall_version_type"] [:: std :: mem :: align_of :: < metacall_version_type > () - 8usize] ; ["Offset of field: metacall_version_type::major"] [:: std :: mem :: offset_of ! (metacall_version_type , major) - 0usize] ; ["Offset of field: metacall_version_type::minor"] [:: std :: mem :: offset_of ! (metacall_version_type , minor) - 4usize] ; ["Offset of field: metacall_version_type::patch"] [:: std :: mem :: offset_of ! (metacall_version_type , patch) - 8usize] ; ["Offset of field: metacall_version_type::revision"] [:: std :: mem :: offset_of ! (metacall_version_type , revision) - 16usize] ; ["Offset of field: metacall_version_type::str_"] [:: std :: mem :: offset_of ! (metacall_version_type , str_) - 24usize] ; ["Offset of field: metacall_version_type::name"] [:: std :: mem :: offset_of ! (metacall_version_type , name) - 32usize] ; } ; unsafe extern "C" { # [doc = " @brief\n Returns default serializer used by MetaCall\n\n @return\n Name of the serializer to be used with serialization methods"] pub fn metacall_serial () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Returns default detour used by MetaCall\n\n @return\n Name of the detour to be used with detouring methods"] pub fn metacall_detour () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Disables MetaCall logs, must be called before @metacall_initialize.\n\n When initializing MetaCall, it initializes a default logs to stdout\n if none was defined. If you want to benchmark or simply disable this\n default logs, you can call to this function before @metacall_initialize."] pub fn metacall_log_null () ; } unsafe extern "C" { # [doc = " @brief\n Flags to be set in MetaCall library\n\n @param[in] flags\n Combination of flags referring to definitions METACALL_FLAGS_*"] pub fn metacall_flags (flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall library\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall library with configuration arguments\n\n @param[in] initialize_config\n Extension of the script to be loaded in memory with data to be injected\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_initialize_ex (initialize_config : * mut metacall_initialize_configuration_type) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall application arguments\n\n @param[in] argc\n Number of additional parameters to be passed to the runtime when initializing\n\n @param[in] argv\n Additional parameters to be passed to the runtime when initializing (when using MetaCall as an application)"] pub fn metacall_initialize_args (argc : :: std :: os :: raw :: c_int , argv : * mut * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = " @brief\n Get the number of arguments in which MetaCall was initialized\n\n @return\n An integer equal or greater than zero"] pub fn metacall_argc () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the arguments in which MetaCall was initialized\n\n @return\n A pointer to an array of strings with the additional arguments"] pub fn metacall_argv () -> * mut * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Check if script context is loaded by @tag\n\n @param[in] tag\n Extension of the script (if tag is NULL, it returns the status of the whole MetaCall instance)\n\n @return\n Zero if context is initialized, different from zero otherwise"] pub fn metacall_is_initialized (tag : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Amount of function call arguments supported by MetaCall\n\n @return\n Number of arguments suported"] pub fn metacall_args_size () -> usize ; } unsafe extern "C" { # [doc = " @brief\n Set a execution path defined by @path to the extension script @tag\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path to be loaded\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_execution_path (tag : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Set a execution path defined by @path to the extension script @tag with length\n\n @param[in] tag\n Extension of the script\n\n @param[in] tag_length\n Length of the extension of the tag\n\n @param[in] path\n Path to be loaded\n\n @param[in] path_length\n Length of the path\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_execution_path_s (tag : * const :: std :: os :: raw :: c_char , tag_length : usize , path : * const :: std :: os :: raw :: c_char , path_length : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a script from file specified by @path\n\n @param[in] tag\n Extension of the script\n\n @param[in] paths\n Path array of files\n\n @param[in] size\n Size of the array @paths\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_file (tag : * const :: std :: os :: raw :: c_char , paths : * mut * const :: std :: os :: raw :: c_char , size : usize , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a script from memory\n\n @param[in] tag\n Extension of the script\n\n @param[in] buffer\n Memory block representing the string of the script\n\n @param[in] size\n Memory block representing the string of the script\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_memory (tag : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_char , size : usize , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a package of scrips from file specified by @path into loader defined by @extension\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path of the package\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_package (tag : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a a list of scrips from configuration specified by @path into loader\n with the following format:\n {\n \"language_id\": \"<tag>\",\n \"path\": \"<path>\",\n \"scripts\": [ \"<script0>\", \"<script1>\", ..., \"<scriptN>\" ]\n }\n\n @param[in] path\n Path of the configuration\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @param[in] allocator\n Pointer to allocator will allocate the configuration\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_configuration (path : * const :: std :: os :: raw :: c_char , handle : * mut * mut :: std :: os :: raw :: c_void , allocator : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_s (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallhv (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n Includes @size in order to allow variadic arguments or safe calls\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallhv_s (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall (name : * const :: std :: os :: raw :: c_char , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt (name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_s (name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , size : usize , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallht_s (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , size : usize , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the function by @name\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] pub fn metacall_function (name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create an empty handler into a loader with name @name\n\n @param[in] loader\n Pointer to the loader which the handle belongs to\n\n @param[in] name\n Name of the handle\n\n @param[out] handle_ptr\n On success, returns the pointer to the handle created, otherwise NULL\n\n @return\n Return zero on success, different from zero on error"] pub fn metacall_handle_initialize (loader : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , handle_ptr : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Populate the objects of @handle_src into @handle_dest\n\n @param[inout] handle_dest\n Handle where the objects from @handle_src will be stored\n\n @param[in] handle_src\n Handle from where the objects will be copied\n\n @return\n Return zero on success, different from zero on error"] pub fn metacall_handle_populate (handle_dest : * mut :: std :: os :: raw :: c_void , handle_src : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the function by @name from @handle\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] pub fn metacall_handle_function (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the function parameter type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n @param[in] parameter\n The index of the parameter to be retrieved\n\n @param[out] id\n The parameter type id that will be returned\n\n @return\n Return 0 if the @parameter index exists and @func is valid, 1 otherwhise"] pub fn metacall_function_parameter_type (func : * mut :: std :: os :: raw :: c_void , parameter : usize , id : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the function return type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n\n @param[out] id\n The value id of the return type of the function @func\n\n @return\n Return 0 if the @func is valid, 1 otherwhise"] pub fn metacall_function_return_type (func : * mut :: std :: os :: raw :: c_void , id : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get minimun mumber of arguments accepted by function @func\n\n @param[in] func\n Function reference\n\n @return\n Return mumber of arguments"] pub fn metacall_function_size (func : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Check if the function @func is asynchronous or synchronous\n\n @param[in] func\n Function reference\n\n @return\n Return 0 if it is syncrhonous, 1 if it is asynchronous and -1 if the function is NULL"] pub fn metacall_function_async (func : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the handle by @name\n\n @param[in] tag\n Extension of the script\n\n @param[in] name\n Name of the handle\n\n @return\n Handle reference, null if the function does not exist"] pub fn metacall_handle (tag : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get name of a @handle\n\n @param[in] handle\n Pointer to the handle to be retrieved\n\n @return\n String that references the handle"] pub fn metacall_handle_id (handle : * mut :: std :: os :: raw :: c_void) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Return a value representing the handle as a map of functions (or values)\n\n @param[in] handle\n Reference to the handle to be described\n\n @return\n A value of type map on success, null otherwise"] pub fn metacall_handle_export (handle : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfv (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of function arguments\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfv_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by variable arguments @va_args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallf (func : * mut :: std :: os :: raw :: c_void , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfs (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfmv (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfms (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @va_args\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] va_args\n Varidic function parameter types\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall_register (name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , func : * mut * mut :: std :: os :: raw :: c_void , return_type : metacall_value_id , size : usize , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall_registerv (name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , func : * mut * mut :: std :: os :: raw :: c_void , return_type : metacall_value_id , size : usize , types : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Obtain the loader instance by @tag\n\n @param[in] tag\n Tag in which the loader is identified, normally it is the extension of the script\n\n @return\n Pointer the loader by @tag"] pub fn metacall_loader (tag : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] loader\n Opaque pointer to the loader in which you want to register the function (this allows to register the function into a different loader than the host)\n\n @param[in] handle\n Opaque pointer to the handle in which you want to register the function (if it is NULL, it will be defined on the global scope of the loader)\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Zero if the function was registered properly, distinct from zero otherwise"] pub fn metacall_register_loaderv (loader : * mut :: std :: os :: raw :: c_void , handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , return_type : metacall_value_id , size : usize , types : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Awaits for a promise and registers a callback to be executed when a future is resolved\n\n @param[in] f\n The pointer to the future\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await_future (f : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await_s (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func (offered without function pointers for languages without support to function pointers)\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] cb\n Pointer to struct containing the function pointers to reject and resolve that will be executed when task completion or error\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await_struct_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , cb : metacall_await_callbacks , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] size\n Number of elements of the arrays @keys and @values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfmv_await (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfmv_await_s (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfs_await (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfms_await (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the class by @name\n\n @param[in] name\n Name of the class\n\n @return\n Class reference, null if the class does not exist"] pub fn metacall_class (name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a class method anonymously by value array @args (this procedure assumes there's no overloaded methods and does type conversion on values)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_class (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a class method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_class (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ret : metacall_value_id , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a new object instance from @cls by value array @args\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the new object\n\n @param[in] args\n Array of pointers constructor parameters\n\n @param[in] size\n Number of elements of constructor parameters\n\n @return\n Pointer to the new object value instance"] pub fn metacall_class_new (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get an attribute from @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the class attribute value or NULL if an error occurred"] pub fn metacall_class_static_get (cls : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Set an attribute to @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] pub fn metacall_class_static_set (cls : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Call an object method anonymously by value array @args\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_object (obj : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a object method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_object (obj : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ret : metacall_value_id , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get an attribute from @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the object attribute value or NULL if an error occurred"] pub fn metacall_object_get (obj : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Set an attribute to @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] pub fn metacall_object_set (obj : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the value contained by throwable object @th\n\n @param[in] th\n Pointer to the throwable object\n\n @return\n Pointer to the value inside of the throwable or NULL in case of error"] pub fn metacall_throwable_value (th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Provide information about all loaded objects\n\n @param[out] size\n Size in bytes of return buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n String containing introspection information"] pub fn metacall_inspect (size : * mut usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide information about all loaded objects as a value\n\n @return\n Value containing introspection information"] pub fn metacall_inspect_value () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert the value @v to serialized string\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] v\n Reference to the value\n\n @param[out] size\n Size of new allocated string\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n New allocated string containing stringified value"] pub fn metacall_serialize (name : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void , size : * mut usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert the string @buffer to value\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] buffer\n String to be deserialized\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n New allocated value representing the string (must be freed)"] pub fn metacall_deserialize (name : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Clear handle from memory and unload related resources\n\n @param[in] handle\n Reference to the handle to be unloaded\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_clear (handle : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the plugin extension handle to be used for loading plugins\n\n @return\n Pointer to the extension handle, or null if it failed to load"] pub fn metacall_plugin_extension () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the handle containing all the functionality of the plugins from core\n\n @return\n Pointer to the core plugin handle, or null if it failed to load"] pub fn metacall_plugin_core () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the plugin extension path to be used for accessing the plugins folder\n\n @return\n String containing the core plugin path, or null if it failed to load the plugin extension"] pub fn metacall_plugin_path () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Destroy MetaCall library"] pub fn metacall_destroy () ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version struct\n\n @return\n Static struct containing unpacked version"] pub fn metacall_version () -> * const metacall_version_type ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is @major,\n I is @minor and P is @patch\n\n @param[in] major\n Unsigned integer representing major version\n\n @param[in] minor\n Unsigned integer representing minor version\n\n @param[in] patch\n Unsigned integer representing patch version\n\n @return\n Hexadecimal integer containing packed version"] pub fn metacall_version_hex_make (major : :: std :: os :: raw :: c_uint , minor : :: std :: os :: raw :: c_uint , patch : :: std :: os :: raw :: c_uint) -> u32 ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is major,\n I is minor and P is patch\n\n @return\n Hexadecimal integer containing packed version"] pub fn metacall_version_hex () -> u32 ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version string\n\n @return\n Static string containing module version"] pub fn metacall_version_str () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version revision string\n\n @return\n Static string containing module version revision"] pub fn metacall_version_revision () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version name\n\n @return\n Static string containing module version name"] pub fn metacall_version_name () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module information\n\n @return\n Static string containing module information"] pub fn metacall_print_info () -> * const :: std :: os :: raw :: c_char ; } \ No newline at end of file From 020dc0e1512729a08512c9ce2afe0c0bd2cc6fb5 Mon Sep 17 00:00:00 2001 From: Fahd Ashour <fahd.fady212@gmail.com> Date: Thu, 4 Sep 2025 18:04:05 +0300 Subject: [PATCH 313/364] fix and refactor: rust port not finding metacall shared libraries and config files (#569) * refactor(rs_port): init translating search functionality * stash * CI: update rust workflow for testing Signed-off-by: fahdfady <fahd.fady212@gmail.com> * CI(release-rust): update test job to use matrix strategy for OS compatibility Signed-off-by: fahdfady <fahd.fady212@gmail.com> * CI: rust release, remove windows * canonicalize * Update build.rs * Update release-rust.yml * Update release-rust.yml * Update release-rust.yml --------- Signed-off-by: fahdfady <fahd.fady212@gmail.com> Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- .github/workflows/release-rust.yml | 35 +++++- source/ports/rs_port/build.rs | 168 +++++++++++++++++++++++++++-- 2 files changed, 191 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 10baaf1e74..13644cd0f6 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -1,11 +1,12 @@ name: Release Rust Crates on: + workflow_dispatch: + pull_request: push: branches: [ master, develop ] paths: - - 'source/ports/rs_port/Cargo.toml' - - 'source/ports/rs_port/inline/Cargo.toml' + - 'source/ports/rs_port/**' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -15,9 +16,39 @@ env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} jobs: + test: + name: Rust Port Tests + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install MetaCall Unix + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + run: curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh + - name: Install MetaCall Windows + if: matrix.os == 'windows-latest' + run: powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/metacall/install/master/install.ps1')))" + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Build and Test the Rust Port + working-directory: source/ports/rs_port + run: | + cargo build --verbose + cargo test --verbose + release: name: Release Rust Port runs-on: ubuntu-latest + needs: test steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 4b7bcf3095..1c623ca2fc 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -1,4 +1,147 @@ -use std::env; +use std::{ + env, fs, + path::{Path, PathBuf}, + vec, +}; + +// Search for MetaCall libraries in platform-specific locations +// Handle custom installation paths via environment variables +// Find configuration files recursively +// Provide helpful error messages when things aren't found + +/// Represents the install paths for a platform +struct InstallPath { + paths: Vec<PathBuf>, + names: Vec<&'static str>, +} + +/// Find files recursively in a directory matching a pattern +fn find_files_recursively<P: AsRef<Path>>( + root_dir: P, + filename: &str, + max_depth: Option<usize>, +) -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> { + let mut matches = Vec::new(); + let mut stack = vec![(root_dir.as_ref().to_path_buf(), 0)]; + + while let Some((current_dir, depth)) = stack.pop() { + if let Some(max) = max_depth { + if depth > max { + continue; + } + } + + if let Ok(entries) = fs::read_dir(¤t_dir) { + for entry in entries.flatten() { + let path = entry.path(); + + if path.is_file() { + // Simple filename comparison instead of regex + if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { + if file_name == filename { + matches.push(path); + } + } + } else if path.is_dir() { + stack.push((path, depth + 1)); + } + } + } + } + + Ok(matches) +} + +fn platform_install_paths() -> Result<InstallPath, Box<dyn std::error::Error>> { + if cfg!(target_os = "windows") { + // Defaults to path: C:\Users\Default\AppData\Local + let local_app_data = env::var("LOCALAPPDATA") + .unwrap_or_else(|_| String::from("C:\\Users\\Default\\AppData\\Local")); + + Ok(InstallPath { + paths: vec![PathBuf::from(local_app_data) + .join("MetaCall") + .join("metacall")], + names: vec!["metacall.dll"], + }) + } else if cfg!(target_os = "macos") { + Ok(InstallPath { + paths: vec![ + PathBuf::from("/opt/homebrew/lib/"), + PathBuf::from("/usr/local/lib/"), + ], + names: vec!["metacall.dylib"], + }) + } else if cfg!(target_os = "linux") { + Ok(InstallPath { + paths: vec![PathBuf::from("/usr/local/lib/"), PathBuf::from("/gnu/lib/")], + names: vec!["libmetacall.so"], + }) + } else { + Err(format!("Platform {} not supported", env::consts::OS).into()) + } +} + +/// Get search paths, checking for custom installation path first +fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { + // First, check if user specified a custom path + if let Ok(custom_path) = env::var("METACALL_INSTALL_PATH") { + // For custom paths, we need to search for any metacall library variant + return Ok(InstallPath { + paths: vec![PathBuf::from(custom_path)], + names: vec!["libmetacall.so", "libmetacalld.so", "libmetacall.dylib", "libmetacalld.dylib", "metacall.dll", "metacalld.dll"] + }); + } + + // Fall back to platform-specific paths + platform_install_paths() +} + +/// Find the MetaCall library +/// This orchestrates the search process +fn find_metacall_library() -> Result<PathBuf, Box<dyn std::error::Error>> { + let search_config = get_search_config()?; + + // Search in each configured path + for search_path in &search_config.paths { + for name in &search_config.names { + // Search with no limit in depth + match find_files_recursively(search_path, &name.to_string(), None) { + Ok(files) if !files.is_empty() => { + let found_lib = fs::canonicalize(&files[0])?; + + return Ok(found_lib.clone()); + } + Ok(_) => { + // No files found in this path, continue searching + continue; + } + Err(e) => { + eprintln!( + "Error searching in {}: {}", + search_path.display(), + e + ); + continue; + } + } + } + } + + // If we get here, library wasn't found + let search_paths: Vec<String> = search_config + .paths + .iter() + .map(|p| p.display().to_string()) + .collect(); + + Err(format!( + "MetaCall library not found. Searched in: {}. \ + If you have it installed elsewhere, set METACALL_INSTALL_PATH environment variable.", + search_paths.join(", ") + ) + .into()) +} fn main() { // When running tests from CMake @@ -21,16 +164,21 @@ fn main() { } } } else { - // When building from Cargo - let profile = env::var("PROFILE").unwrap(); - match profile.as_str() { - // "debug" => { - // println!("cargo:rustc-link-lib=dylib=metacalld"); - // } - "debug" | "release" => { - println!("cargo:rustc-link-lib=dylib=metacall") + // When building from Cargo, try to find MetaCall + match find_metacall_library() { + Ok(lib_path) => { + // Extract the directory containing the library + if let Some(lib_dir) = lib_path.parent() { + println!("cargo:rustc-link-search=native={}", lib_dir.display()); + println!("cargo:rustc-link-lib=dylib=metacall"); + } } - _ => { + Err(e) => { + // Print the error + eprintln!("Failed to find MetaCall library with: {e} \ + Still trying to link in case the library is in system paths"); + + // Still try to link in case the library is in system paths println!("cargo:rustc-link-lib=dylib=metacall") } } From 57641a6a6815fb8dfa1f93c35e62e31def0ef2d3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 4 Sep 2025 17:05:19 +0200 Subject: [PATCH 314/364] Improve tcc support on C Loader. --- source/loaders/c_loader/source/c_loader_impl.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index c041ffc5cd..3fffb19ece 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -1443,6 +1443,15 @@ static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_bas return data.result; } +static int c_loader_impl_tcc_relocate(TCCState *state) +{ +#ifdef TCC_RELOCATE_AUTO + return tcc_relocate(state, TCC_RELOCATE_AUTO); +#else + return tcc_relocate(state); +#endif +} + loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path paths[], size_t size) { loader_impl_c c_impl = static_cast<loader_impl_c>(loader_impl_get(impl)); @@ -1497,7 +1506,7 @@ loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path p } } - if (tcc_relocate(c_handle->state) == -1) + if (c_loader_impl_tcc_relocate(c_handle->state) == -1) { log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate"); goto error; @@ -1529,7 +1538,7 @@ loader_handle c_loader_impl_load_from_memory(loader_impl impl, const loader_name goto error; } - if (tcc_relocate(c_handle->state) == -1) + if (c_loader_impl_tcc_relocate(c_handle->state) == -1) { log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate"); goto error; From b34f79780ca0c2ea189fc5bce3acfcddb1aa3cc5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 4 Sep 2025 17:05:33 +0200 Subject: [PATCH 315/364] Solve issue with MacOS CMake. --- .github/workflows/macos-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/macos-test.yml b/.github/workflows/macos-test.yml index 2a57259961..520de15171 100644 --- a/.github/workflows/macos-test.yml +++ b/.github/workflows/macos-test.yml @@ -40,6 +40,10 @@ jobs: with: fetch-depth: 0 + - name: Uninstall CMake + run: | + brew uninstall --force cmake + - name: Uninstall NodeJS and NPM run: | npm uninstall npm -g From 832cbb4048ad296f9c6838a70b456e32483d0f9f Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 4 Sep 2025 17:10:52 +0200 Subject: [PATCH 316/364] Remove release of rust ci from PR and workflow dispatch. --- .github/workflows/release-rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 13644cd0f6..6d2f0897fb 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -49,6 +49,7 @@ jobs: name: Release Rust Port runs-on: ubuntu-latest needs: test + if: ${{ github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request' }} steps: - name: Check out the repo uses: actions/checkout@v4 From 6afe9bef2a62c1dce103063e25b42062af67cb74 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 4 Sep 2025 17:23:29 +0200 Subject: [PATCH 317/364] Update version to v0.9.14. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6af8ded76e..69010fa5be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.13 \ No newline at end of file +0.9.14 \ No newline at end of file From 4e91b7094ef52a15fcb6d56e00ea105fc8d42739 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 4 Sep 2025 18:11:54 +0200 Subject: [PATCH 318/364] Solve cmake issue in macos benchmarks ci. --- .github/workflows/benchmark.yml | 36 +++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 06b428b841..67a684cd07 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -32,9 +32,41 @@ jobs: with: fetch-depth: 0 - - name: Export XCode SDK Root + - name: Prepare MacOS Installation if: matrix.os == 'macos-latest' - run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV + run: | + echo "Uninstall CMake" + brew uninstall --force cmake + + echo "Uninstall NodeJS and NPM" + npm uninstall npm -g + rm -rf /usr/local/lib/node_modules/npm + + echo "Uninstall Ruby" + brew uninstall --force --ignore-dependencies ruby + brew cleanup -s ruby + brew cleanup --prune-prefix + RUBY_FRAMEWORK_DIR=$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/Ruby.framework + sudo rm -rf $RUBY_FRAMEWORK_DIR + + echo "Uninstall Go" + brew uninstall --force go + brew autoremove + sudo rm -rf /usr/local/Cellar/go + sudo rm -rf /usr/local/go + sudo rm -rf /usr/local/opt/go + sudo rm -rf /etc/paths.d/go + sudo rm -rf /usr/local/bin/go + sudo rm -rf /usr/local/bin/gofmt + + echo "Uninstall Java" + sudo rm -rf /Library/Java/JavaVirtualMachines/* + sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin + sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane + unset JAVA_HOME + + echo "Export XCode SDK Root" + echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV # TODO: Add support for NetCore Bench - name: Set up the environment From 59e7b9141c81c7c0861b6759f7428932541392c4 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 00:44:33 +0200 Subject: [PATCH 319/364] Solve more issues in build.rs. --- source/ports/rs_port/build.rs | 63 +++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 1c623ca2fc..e1fe1464ea 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -15,6 +15,12 @@ struct InstallPath { names: Vec<&'static str>, } +/// Represents the match of a library when it's found +struct LibraryPath { + path: PathBuf, + library: String, +} + /// Find files recursively in a directory matching a pattern fn find_files_recursively<P: AsRef<Path>>( root_dir: P, @@ -70,7 +76,7 @@ fn platform_install_paths() -> Result<InstallPath, Box<dyn std::error::Error>> { PathBuf::from("/opt/homebrew/lib/"), PathBuf::from("/usr/local/lib/"), ], - names: vec!["metacall.dylib"], + names: vec!["libmetacall.dylib"], }) } else if cfg!(target_os = "linux") { Ok(InstallPath { @@ -89,7 +95,14 @@ fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { // For custom paths, we need to search for any metacall library variant return Ok(InstallPath { paths: vec![PathBuf::from(custom_path)], - names: vec!["libmetacall.so", "libmetacalld.so", "libmetacall.dylib", "libmetacalld.dylib", "metacall.dll", "metacalld.dll"] + names: vec![ + "libmetacall.so", + "libmetacalld.so", + "libmetacall.dylib", + "libmetacalld.dylib", + "metacall.dll", + "metacalld.dll", + ], }); } @@ -97,31 +110,48 @@ fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { platform_install_paths() } +/// Get the parent path and library name +fn get_parent_and_library(path: &Path) -> Option<(PathBuf, String)> { + let parent = path.parent()?.to_path_buf(); + + // Get the file stem (filename without extension) + let stem = path.file_stem()?.to_str()?; + + // Remove "lib" prefix if present + let cleaned_stem = stem.strip_prefix("lib").unwrap_or(stem).to_string(); + + Some((parent, cleaned_stem)) +} + /// Find the MetaCall library /// This orchestrates the search process -fn find_metacall_library() -> Result<PathBuf, Box<dyn std::error::Error>> { +fn find_metacall_library() -> Result<LibraryPath, Box<dyn std::error::Error>> { let search_config = get_search_config()?; // Search in each configured path for search_path in &search_config.paths { for name in &search_config.names { // Search with no limit in depth - match find_files_recursively(search_path, &name.to_string(), None) { + match find_files_recursively(search_path, name, None) { Ok(files) if !files.is_empty() => { let found_lib = fs::canonicalize(&files[0])?; - return Ok(found_lib.clone()); + match get_parent_and_library(&found_lib) { + Some((parent, name)) => { + return Ok(LibraryPath { + path: parent, + library: name, + }) + } + None => continue, + }; } Ok(_) => { // No files found in this path, continue searching continue; } Err(e) => { - eprintln!( - "Error searching in {}: {}", - search_path.display(), - e - ); + eprintln!("Error searching in {}: {}", search_path.display(), e); continue; } } @@ -167,16 +197,15 @@ fn main() { // When building from Cargo, try to find MetaCall match find_metacall_library() { Ok(lib_path) => { - // Extract the directory containing the library - if let Some(lib_dir) = lib_path.parent() { - println!("cargo:rustc-link-search=native={}", lib_dir.display()); - println!("cargo:rustc-link-lib=dylib=metacall"); - } + println!("cargo:rustc-link-search=native={}", lib_path.path.display()); + println!("cargo:rustc-link-lib=dylib={}", lib_path.library); } Err(e) => { // Print the error - eprintln!("Failed to find MetaCall library with: {e} \ - Still trying to link in case the library is in system paths"); + eprintln!( + "Failed to find MetaCall library with: {e} \ + Still trying to link in case the library is in system paths" + ); // Still try to link in case the library is in system paths println!("cargo:rustc-link-lib=dylib=metacall") From 8364cf74007a1007665c394de579c24a67d5fa55 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 01:04:50 +0200 Subject: [PATCH 320/364] Solve issues with cargo test. --- source/ports/rs_port/build.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index e1fe1464ea..96502c30b0 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -197,8 +197,25 @@ fn main() { // When building from Cargo, try to find MetaCall match find_metacall_library() { Ok(lib_path) => { + // Define linker flags println!("cargo:rustc-link-search=native={}", lib_path.path.display()); println!("cargo:rustc-link-lib=dylib={}", lib_path.library); + + // Set the runtime environment variable for finding the library during tests + #[cfg(target_os = "linux")] + println!( + "cargo:rustc-env=LD_LIBRARY_PATH={}", + lib_path.path.display() + ); + + #[cfg(target_os = "macos")] + println!( + "cargo:rustc-env=DYLD_LIBRARY_PATH={}", + lib_path.path.display() + ); + + #[cfg(target_os = "windows")] + println!("cargo:rustc-env=PATH={}", lib_path.path.display()); } Err(e) => { // Print the error From 9d153cb945c2b5193807e6bdfa1a18a32685a86c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 01:19:44 +0200 Subject: [PATCH 321/364] Comment out windows in rs_port ci. --- .github/workflows/release-rust.yml | 2 +- source/ports/rs_port/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 6d2f0897fb..a660c45974 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] # TODO: windows-latest steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index d1030b99df..4779e08f0e 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.4.3" +version = "0.4.4" [lib] crate-type = ["lib"] From 2c06892ffad1a676ddc1574dfd1ff4e2aeb29bbf Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 17:24:05 +0200 Subject: [PATCH 322/364] Trying to solve issues with windows on rs_port. --- .github/workflows/release-rust.yml | 2 +- source/ports/rs_port/src/types/metacall_value.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index a660c45974..6d2f0897fb 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # TODO: windows-latest + os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out the repo uses: actions/checkout@v4 diff --git a/source/ports/rs_port/src/types/metacall_value.rs b/source/ports/rs_port/src/types/metacall_value.rs index bbc5870ff2..111dbd5908 100644 --- a/source/ports/rs_port/src/types/metacall_value.rs +++ b/source/ports/rs_port/src/types/metacall_value.rs @@ -162,10 +162,10 @@ impl MetaCallValue for i64 { fn from_metacall_raw_leak(v: *mut c_void) -> Result<Self, Box<dyn MetaCallValue>> { let value = unsafe { metacall_value_to_long(v) }; - Ok(value) + Ok(value as i64) } fn into_metacall_raw(self) -> *mut c_void { - unsafe { metacall_value_create_long(self) } + unsafe { metacall_value_create_long(self.try_into().unwrap()) } } } /// Equivalent to MetaCall float type. From a1eb88f2bf7994b00f2fa46e2a90948ea29050e3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 17:41:04 +0200 Subject: [PATCH 323/364] Add load from memory in c loader. --- .../loaders/c_loader/source/c_loader_impl.cpp | 241 ++++++++++-------- .../source/metacall_c_test.cpp | 20 +- 2 files changed, 146 insertions(+), 115 deletions(-) diff --git a/source/loaders/c_loader/source/c_loader_impl.cpp b/source/loaders/c_loader/source/c_loader_impl.cpp index 3fffb19ece..70470488c5 100644 --- a/source/loaders/c_loader/source/c_loader_impl.cpp +++ b/source/loaders/c_loader/source/c_loader_impl.cpp @@ -76,12 +76,42 @@ typedef struct loader_impl_c_type } * loader_impl_c; +struct loader_impl_c_handle_base_type; + +typedef struct loader_impl_c_handle_base_type *loader_impl_c_handle_base; + +typedef struct c_loader_impl_discover_visitor_data_type +{ + loader_impl impl; + loader_impl_c_handle_base c_handle; + scope sp; + int result; + +} * c_loader_impl_discover_visitor_data; + +static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCursor, void *data); + typedef struct loader_impl_c_handle_base_type { +public: + virtual ~loader_impl_c_handle_base_type() {} + + virtual bool recursive_includes() = 0; + + virtual int discover(loader_impl impl, context ctx) = 0; + + virtual const void *symbol(std::string &name) = 0; + + virtual int discover_visitor(std::vector<const char *> &command_line_args, void *data) = 0; + +} * loader_impl_c_handle_base; + +typedef struct loader_impl_c_handle_file_type : loader_impl_c_handle_base_type +{ public: std::vector<std::string> files; - virtual ~loader_impl_c_handle_base_type() {} + virtual ~loader_impl_c_handle_file_type() {} virtual bool recursive_includes() = 0; @@ -89,6 +119,38 @@ typedef struct loader_impl_c_handle_base_type virtual const void *symbol(std::string &name) = 0; + int discover_visitor(std::vector<const char *> &command_line_args, void *data) + { + for (std::string file : this->files) + { + /* Define the command line arguments (simulating compiler flags) */ + CXIndex index = clang_createIndex(0, 1); + CXTranslationUnit unit = NULL; + CXErrorCode error = clang_parseTranslationUnit2( + index, + file.c_str(), + command_line_args.data(), command_line_args.size(), + nullptr, 0, + CXTranslationUnit_None, + &unit); + + if (error != CXError_Success) + { + log_write("metacall", LOG_LEVEL_ERROR, "Unable to parse translation unit of: %s with error code %d", file.c_str(), error); + clang_disposeIndex(index); + return -1; + } + + CXCursor cursor = clang_getTranslationUnitCursor(unit); + clang_visitChildren(cursor, c_loader_impl_discover_visitor, data); + + clang_disposeTranslationUnit(unit); + clang_disposeIndex(index); + } + + return 0; + } + void add(const loader_path path, size_t size) { if (this->is_ld_script(path, size) == false) @@ -118,12 +180,65 @@ typedef struct loader_impl_c_handle_base_type return true; } -} * loader_impl_c_handle_base; +} * loader_impl_c_handle_file; + +typedef struct loader_impl_c_handle_memory_type : loader_impl_c_handle_base_type +{ +public: + std::string name; + std::string buffer; + + virtual ~loader_impl_c_handle_memory_type() {} + + virtual bool recursive_includes() = 0; + + virtual int discover(loader_impl impl, context ctx) = 0; + + virtual const void *symbol(std::string &name) = 0; + + int discover_visitor(std::vector<const char *> &command_line_args, void *data) + { + CXUnsavedFile unsaved_file; + + /* Simulate an in-memory file */ + unsaved_file.Filename = this->name.c_str(); + unsaved_file.Contents = this->buffer.c_str(); + unsaved_file.Length = this->buffer.length(); + + /* Define the command line arguments (simulating compiler flags) */ + CXIndex index = clang_createIndex(0, 1); + CXTranslationUnit unit = NULL; + CXErrorCode error = clang_parseTranslationUnit2( + index, + this->name.c_str(), + command_line_args.data(), command_line_args.size(), + &unsaved_file, 1, + CXTranslationUnit_None, + &unit); + + if (error != CXError_Success) + { + log_write("metacall", LOG_LEVEL_ERROR, "Unable to parse translation unit of: %s with error code %d", this->name.c_str(), error); + clang_disposeIndex(index); + return -1; + } + + CXCursor cursor = clang_getTranslationUnitCursor(unit); + clang_visitChildren(cursor, c_loader_impl_discover_visitor, data); + + clang_disposeTranslationUnit(unit); + clang_disposeIndex(index); + + return 0; + } + +} * loader_impl_c_handle_memory; static void c_loader_impl_discover_symbols(void *ctx, const char *name, const void *addr); static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_base c_handle, context ctx); -typedef struct loader_impl_c_handle_tcc_type : loader_impl_c_handle_base_type +template <typename T> +struct loader_impl_c_handle_tcc_type : T { public: TCCState *state; @@ -207,7 +322,7 @@ typedef struct loader_impl_c_handle_tcc_type : loader_impl_c_handle_base_type virtual int discover(loader_impl impl, context ctx) { /* Get all symbols */ - tcc_list_symbols(this->state, static_cast<void *>(this), &c_loader_impl_discover_symbols); + tcc_list_symbols(this->state, static_cast<void *>(&symbols), &c_loader_impl_discover_symbols); /* Parse the AST and register functions */ return c_loader_impl_discover_ast(impl, this, ctx); @@ -222,10 +337,15 @@ typedef struct loader_impl_c_handle_tcc_type : loader_impl_c_handle_base_type return this->symbols[name]; } +}; + +typedef struct loader_impl_c_handle_tcc_type<loader_impl_c_handle_file_type> loader_impl_c_handle_tcc_file_type; +typedef loader_impl_c_handle_tcc_file_type *loader_impl_c_handle_tcc_file; -} * loader_impl_c_handle_tcc; +typedef struct loader_impl_c_handle_tcc_type<loader_impl_c_handle_memory_type> loader_impl_c_handle_tcc_memory_type; +typedef loader_impl_c_handle_tcc_memory_type *loader_impl_c_handle_tcc_memory; -typedef struct loader_impl_c_handle_dynlink_type : loader_impl_c_handle_base_type +typedef struct loader_impl_c_handle_dynlink_type : loader_impl_c_handle_file_type { public: dynlink lib; @@ -385,15 +505,6 @@ typedef struct loader_impl_c_function_type } * loader_impl_c_function; -typedef struct c_loader_impl_discover_visitor_data_type -{ - loader_impl impl; - loader_impl_c_handle_base c_handle; - scope sp; - int result; - -} * c_loader_impl_discover_visitor_data; - /* Retrieve the equivalent FFI type from type id */ static ffi_type *c_loader_impl_ffi_type(type_id id); @@ -681,9 +792,9 @@ void c_loader_impl_function_closure(ffi_cif *cif, void *ret, void *args[], void static void c_loader_impl_discover_symbols(void *ctx, const char *name, const void *addr) { - loader_impl_c_handle_tcc c_handle = static_cast<loader_impl_c_handle_tcc>(ctx); + std::map<std::string, const void *> *symbols = static_cast<std::map<std::string, const void *> *>(ctx); - c_handle->symbols.insert(std::pair<std::string, const void *>(name, addr)); + symbols->insert(std::pair<std::string, const void *>(name, addr)); } static bool c_loader_impl_file_exists(const loader_path path) @@ -1305,7 +1416,7 @@ static int c_loader_impl_discover_signature(loader_impl impl, loader_impl_c_hand return 0; } -static CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCursor, void *data) +CXChildVisitResult c_loader_impl_discover_visitor(CXCursor cursor, CXCursor, void *data) { c_loader_impl_discover_visitor_data visitor_data = static_cast<c_loader_impl_discover_visitor_data>(data); @@ -1353,91 +1464,9 @@ static int c_loader_impl_discover_ast(loader_impl impl, loader_impl_c_handle_bas command_line_args.push_back(includes.back().c_str()); } - /* TODO: Load from memory (discover from memory) */ - /* - #include <clang-c/Index.h> - #include <stdio.h> - #include <stdlib.h> - - int main() { - const char *source_code = - "int add(int a, int b) {\n" - " return a + b;\n" - "}"; - - // Simulate an in-memory file - CXUnsavedFile unsaved_file; - unsaved_file.Filename = "example.c"; - unsaved_file.Contents = source_code; - unsaved_file.Length = (unsigned long)strlen(source_code); - - // Create index - CXIndex index = clang_createIndex(0, 0); - - // Parse translation unit from buffer (unsaved file) - CXTranslationUnit tu; - CXErrorCode err = clang_parseTranslationUnit2( - index, - "example.c", // filename for context (matches unsaved file) - NULL, 0, // command line args - &unsaved_file, 1, // unsaved files - CXTranslationUnit_None, // options - &tu - ); - - if (err != CXError_Success) { - fprintf(stderr, "Failed to parse translation unit.\n"); - return 1; - } - - // Get the cursor to the root of the translation unit - CXCursor cursor = clang_getTranslationUnitCursor(tu); - - // Visit each AST node - clang_visitChildren( - cursor, - [](CXCursor c, CXCursor parent, CXClientData client_data) { - CXString spelling = clang_getCursorSpelling(c); - CXString kind = clang_getCursorKindSpelling(clang_getCursorKind(c)); - printf("Cursor: %s (%s)\n", clang_getCString(spelling), clang_getCString(kind)); - clang_disposeString(spelling); - clang_disposeString(kind); - return CXChildVisit_Recurse; - }, - NULL - ); - - // Clean up - clang_disposeTranslationUnit(tu); - clang_disposeIndex(index); - - return 0; - } - */ - - for (std::string file : c_handle->files) + if (c_handle->discover_visitor(command_line_args, static_cast<void *>(&data)) != 0) { - /* Define the command line arguments (simulating compiler flags) */ - CXIndex index = clang_createIndex(0, 1); - CXTranslationUnit unit = clang_parseTranslationUnit( - index, - file.c_str(), - command_line_args.data(), command_line_args.size(), - nullptr, 0, - CXTranslationUnit_None); - - if (unit == nullptr) - { - log_write("metacall", LOG_LEVEL_ERROR, "Unable to parse translation unit of: %s", file.c_str()); - clang_disposeIndex(index); - return -1; - } - - CXCursor cursor = clang_getTranslationUnitCursor(unit); - clang_visitChildren(cursor, c_loader_impl_discover_visitor, static_cast<void *>(&data)); - - clang_disposeTranslationUnit(unit); - clang_disposeIndex(index); + return 1; } return data.result; @@ -1455,7 +1484,7 @@ static int c_loader_impl_tcc_relocate(TCCState *state) loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path paths[], size_t size) { loader_impl_c c_impl = static_cast<loader_impl_c>(loader_impl_get(impl)); - loader_impl_c_handle_tcc c_handle = new loader_impl_c_handle_tcc_type(); + loader_impl_c_handle_tcc_file c_handle = new loader_impl_c_handle_tcc_file_type(); if (c_handle->initialize(c_impl) == false) { @@ -1522,7 +1551,7 @@ loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path p loader_handle c_loader_impl_load_from_memory(loader_impl impl, const loader_name name, const char *buffer, size_t size) { loader_impl_c c_impl = static_cast<loader_impl_c>(loader_impl_get(impl)); - loader_impl_c_handle_tcc c_handle = new loader_impl_c_handle_tcc_type(); + loader_impl_c_handle_tcc_memory c_handle = new loader_impl_c_handle_tcc_memory_type(); /* Apparently TCC has an unsafe API for compiling strings */ (void)size; @@ -1544,7 +1573,9 @@ loader_handle c_loader_impl_load_from_memory(loader_impl impl, const loader_name goto error; } - /* TODO: Load the buffer with the parser while iterating after loading it with TCC */ + c_handle->name = name; + c_handle->name.append(".c"); + c_handle->buffer.assign(buffer, size); return c_handle; diff --git a/source/tests/metacall_c_test/source/metacall_c_test.cpp b/source/tests/metacall_c_test/source/metacall_c_test.cpp index b661e8b394..9b4bf3f6bc 100644 --- a/source/tests/metacall_c_test/source/metacall_c_test.cpp +++ b/source/tests/metacall_c_test/source/metacall_c_test.cpp @@ -284,21 +284,21 @@ TEST_F(metacall_c_test, DefaultConstructor) metacall_value_destroy(args[0]); /* Memory */ - // TODO - // const char c_buffer[] = { - // "int compiled_mult(int a, int b) { return a * b; }" - // }; + { + const char c_buffer[] = { + "int compiled_mult_memory(int a, int b) { return a * b; }" + }; - // EXPECT_EQ((int)0, (int)metacall_load_from_memory("c", c_buffer, sizeof(c_buffer), NULL)); + EXPECT_EQ((int)0, (int)metacall_load_from_memory("c", c_buffer, sizeof(c_buffer), NULL)); - // TODO - // void *ret = metacall("compiled_mult", 3, 4); + void *ret = metacall("compiled_mult_memory", 3, 4); - // EXPECT_NE((void *)NULL, (void *)ret); + EXPECT_NE((void *)NULL, (void *)ret); - // EXPECT_EQ((int)metacall_value_to_int(ret), (int)0); + EXPECT_EQ((int)metacall_value_to_int(ret), (int)12); - // metacall_value_destroy(ret); + metacall_value_destroy(ret); + } /* References (Native) */ { From fce639c6fa420eb3aa041286f66b35c928de2013 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Fri, 5 Sep 2025 17:41:35 +0200 Subject: [PATCH 324/364] Solve issues in rust port. --- source/ports/rs_port/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 96502c30b0..3ad13b15d9 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -68,7 +68,7 @@ fn platform_install_paths() -> Result<InstallPath, Box<dyn std::error::Error>> { paths: vec![PathBuf::from(local_app_data) .join("MetaCall") .join("metacall")], - names: vec!["metacall.dll"], + names: vec!["metacall.lib"], }) } else if cfg!(target_os = "macos") { Ok(InstallPath { @@ -100,8 +100,8 @@ fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { "libmetacalld.so", "libmetacall.dylib", "libmetacalld.dylib", - "metacall.dll", - "metacalld.dll", + "metacall.lib", + "metacalld.lib", ], }); } From 301d17ba86cbeb26ae916f5f3f8f8754bf9d034d Mon Sep 17 00:00:00 2001 From: Fahd Ashour <fahd.fady212@gmail.com> Date: Mon, 8 Sep 2025 23:26:20 +0300 Subject: [PATCH 325/364] remove usage of metacall::switch and some edits in Rust docs (#573) * remove usage of metacall::switch and some edits in Rust docs * edit rs_port readme to metacall 4.4 Signed-off-by: fahdfady <fahd.fady212@gmail.com> --------- Signed-off-by: fahdfady <fahd.fady212@gmail.com> --- source/ports/rs_port/README.md | 4 ++-- source/ports/rs_port/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index 06f77ab060..8b9a5531c1 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -26,11 +26,11 @@ export function sum(a: number, b: number): number { `main.rs` ``` rust -use metacall::{switch, metacall, loaders}; +use metacall::{initialize, metacall, load}; fn main() { // Initialize MetaCall at the top - let _metacall = switch::initialize().unwrap(); + let _metacall = initialize().unwrap(); // Load the file load::from_single_file("ts", "sum.ts").unwrap(); diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index 328236d574..3cfb34485b 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -41,11 +41,11 @@ //! Now let's jump into Rust: //! //! ``` -//! use metacall::{switch, metacall, loaders}; +//! use metacall::{initialize, metacall, load}; //! //! fn main() { //! // Initialize MetaCall at the top -//! let _metacall = switch::initialize().unwrap(); +//! let _metacall = initialize().unwrap(); //! //! // Load the file (Checkout the loaders module for loading multiple files //! // or loading from string) From 6caae7aa6e4816bf7966331be0b40d5d5322cc6a Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Mon, 8 Sep 2025 22:35:01 +0200 Subject: [PATCH 326/364] Upgrade rs_port version. --- source/ports/rs_port/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index 4779e08f0e..c0ce796a1e 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.4.4" +version = "0.5.0" [lib] crate-type = ["lib"] From 59eaec0c6b222d4ae0fa6ceef61474487723fa19 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Mon, 8 Sep 2025 23:00:36 +0200 Subject: [PATCH 327/364] Remove windows from rust ci. --- .github/workflows/release-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 6d2f0897fb..c06c473b80 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] # TODO: , windows-latest] steps: - name: Check out the repo uses: actions/checkout@v4 From fbb721bfced23ce137f64f943f61bfba43899d52 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Mon, 8 Sep 2025 23:05:31 +0200 Subject: [PATCH 328/364] Update rust ci. --- .github/workflows/release-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index c06c473b80..528eda6b75 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -49,7 +49,7 @@ jobs: name: Release Rust Port runs-on: ubuntu-latest needs: test - if: ${{ github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' }} steps: - name: Check out the repo uses: actions/checkout@v4 From 9073c1c3f62f4db8a470abdb185ae052562dd810 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 9 Sep 2025 21:53:35 +0200 Subject: [PATCH 329/364] Improved portability of rs port. --- source/ports/rs_port/build.rs | 41 +- source/ports/rs_port/src/bindings.rs | 1439 +++++++++++++++++++++++++- 2 files changed, 1470 insertions(+), 10 deletions(-) diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 3ad13b15d9..98e2596bfd 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -173,6 +173,21 @@ fn find_metacall_library() -> Result<LibraryPath, Box<dyn std::error::Error>> { .into()) } +fn define_library_search_path(env_var: &str, separator: &str, path: &PathBuf) -> String { + // Get the current value of the env var, if any + let existing = env::var(env_var).unwrap_or_default(); + let path_str: String = String::from(path.to_str().unwrap()); + + // Append to it + let combined = if existing.is_empty() { + path_str + } else { + format!("{}{}{}", existing, separator, path_str) + }; + + format!("{}={}", env_var, combined) +} + fn main() { // When running tests from CMake if let Ok(val) = env::var("PROJECT_OUTPUT_DIR") { @@ -203,19 +218,27 @@ fn main() { // Set the runtime environment variable for finding the library during tests #[cfg(target_os = "linux")] - println!( - "cargo:rustc-env=LD_LIBRARY_PATH={}", - lib_path.path.display() - ); + const ENV_VAR: &str = "LD_LIBRARY_PATH"; #[cfg(target_os = "macos")] - println!( - "cargo:rustc-env=DYLD_LIBRARY_PATH={}", - lib_path.path.display() - ); + const ENV_VAR: &str = "DYLD_LIBRARY_PATH"; #[cfg(target_os = "windows")] - println!("cargo:rustc-env=PATH={}", lib_path.path.display()); + const ENV_VAR: &str = "PATH"; + + #[cfg(target_os = "aix")] + const ENV_VAR: &str = "LIBPATH"; + + #[cfg(any(target_os = "linux", target_os = "macos", target_os = "aix"))] + const SEPARATOR: &str = ":"; + + #[cfg(target_os = "windows")] + const SEPARATOR: &str = ";"; + + println!( + "cargo:rustc-env={}", + define_library_search_path(ENV_VAR, SEPARATOR, &lib_path.path) + ); } Err(e) => { // Print the error diff --git a/source/ports/rs_port/src/bindings.rs b/source/ports/rs_port/src/bindings.rs index 7222ae7443..04c9be017c 100644 --- a/source/ports/rs_port/src/bindings.rs +++ b/source/ports/rs_port/src/bindings.rs @@ -1,3 +1,1440 @@ /* automatically generated by rust-bindgen 0.71.1 */ -pub type __pid_t = :: std :: os :: raw :: c_int ; pub type pid_t = __pid_t ; # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_allocator_id { METACALL_ALLOCATOR_STD = 0 , METACALL_ALLOCATOR_NGINX = 1 , } unsafe extern "C" { # [doc = " @brief\n Create an allocator instance\n\n @param[in] allocator_id\n Type of allocator to be created\n\n @param[in] ctx\n Context of the allocator\n\n @return\n Pointer to allocator if success, null otherwise"] pub fn metacall_allocator_create (allocator_id : metacall_allocator_id , ctx : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Reserve memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] size\n Size in bytes to be allocated\n\n @return\n Pointer to allocated data on success, null otherwise"] pub fn metacall_allocator_alloc (allocator : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Reallocate memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Original pointer to data\n\n @param[in] size\n Original size in bytes\n\n @param[in] new_size\n New size in bytes to be reallocated\n\n @return\n Pointer to new reallocated data on success, null otherwise"] pub fn metacall_allocator_realloc (allocator : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , size : usize , new_size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Free memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Pointer to data to be freed"] pub fn metacall_allocator_free (allocator : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = " @brief\n Destroy an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance"] pub fn metacall_allocator_destroy (allocator : * mut :: std :: os :: raw :: c_void) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_exception_type { pub message : * const :: std :: os :: raw :: c_char , pub label : * const :: std :: os :: raw :: c_char , pub code : i64 , pub stacktrace : * const :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_exception_type"] [:: std :: mem :: size_of :: < metacall_exception_type > () - 32usize] ; ["Alignment of metacall_exception_type"] [:: std :: mem :: align_of :: < metacall_exception_type > () - 8usize] ; ["Offset of field: metacall_exception_type::message"] [:: std :: mem :: offset_of ! (metacall_exception_type , message) - 0usize] ; ["Offset of field: metacall_exception_type::label"] [:: std :: mem :: offset_of ! (metacall_exception_type , label) - 8usize] ; ["Offset of field: metacall_exception_type::code"] [:: std :: mem :: offset_of ! (metacall_exception_type , code) - 16usize] ; ["Offset of field: metacall_exception_type::stacktrace"] [:: std :: mem :: offset_of ! (metacall_exception_type , stacktrace) - 24usize] ; } ; pub type metacall_exception = * mut metacall_exception_type ; unsafe extern "C" { # [doc = " @brief\n Create an throwable value from an exception with a simple API in a single instruction\n\n @param[in] label\n Label of the exception\n\n @param[in] code\n Error code of the exception\n\n @param[in] stacktrace\n Stack trace of the exception\n\n @param[in] message\n Message of the exception to be formatted with the variable arguments\n\n @param[in] va_args\n Arguments for formatting the message\n\n @return\n The value of type throwable containing the exception created"] pub fn metacall_error_throw (label : * const :: std :: os :: raw :: c_char , code : i64 , stacktrace : * const :: std :: os :: raw :: c_char , message : * const :: std :: os :: raw :: c_char , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Retrieve the exception from a value, it can be either a throwable value with an exception inside or an exception itself\n\n @param[in] v\n Value that represents the exception to be retrieved\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to @v\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_error_from_value (v : * mut :: std :: os :: raw :: c_void , ex : metacall_exception) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Retrieve last error that has happened after a call to any API from MetaCall\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to the internal MetaCall exception\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_error_last (ex : metacall_exception) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Clear last error that has happened after a call to any API from MetaCall"] pub fn metacall_error_clear () ; } unsafe extern "C" { # [doc = " @brief\n Initialize link detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_register (tag : * const :: std :: os :: raw :: c_char , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char , fn_ : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] loader\n Pointer to the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_register_loader (loader : * mut :: std :: os :: raw :: c_void , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char , fn_ : :: std :: option :: Option < unsafe extern "C" fn () >) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Remove the hook previously registered\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_link_unregister (tag : * const :: std :: os :: raw :: c_char , library : * const :: std :: os :: raw :: c_char , symbol : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Unregister link detours and destroy shared memory"] pub fn metacall_link_destroy () ; } # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_log_id { METACALL_LOG_STDIO = 0 , METACALL_LOG_FILE = 1 , METACALL_LOG_SOCKET = 2 , METACALL_LOG_SYSLOG = 3 , METACALL_LOG_NGINX = 4 , METACALL_LOG_CUSTOM = 5 , } unsafe extern "C" { # [doc = " @brief\n Create a log instance\n\n @param[in] log_id\n Type of log to be created\n\n @param[in] ctx\n Context of the log (a pointer to metacall_log_{stdio, file, socket, syslog, nginx, custom}_type)\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_log (log_id : metacall_log_id , ctx : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } # [repr (u32)] # [derive (Debug , Copy , Clone , Hash , PartialEq , Eq)] pub enum metacall_value_id { METACALL_BOOL = 0 , METACALL_CHAR = 1 , METACALL_SHORT = 2 , METACALL_INT = 3 , METACALL_LONG = 4 , METACALL_FLOAT = 5 , METACALL_DOUBLE = 6 , METACALL_STRING = 7 , METACALL_BUFFER = 8 , METACALL_ARRAY = 9 , METACALL_MAP = 10 , METACALL_PTR = 11 , METACALL_FUTURE = 12 , METACALL_FUNCTION = 13 , METACALL_NULL = 14 , METACALL_CLASS = 15 , METACALL_OBJECT = 16 , METACALL_EXCEPTION = 17 , METACALL_THROWABLE = 18 , METACALL_SIZE = 19 , METACALL_INVALID = 20 , } unsafe extern "C" { # [doc = " @brief\n Create a value from boolean @b\n\n @param[in] b\n Boolean will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_bool (b : :: std :: os :: raw :: c_uchar) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from char @c\n\n @param[in] c\n Character will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_char (c : :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from short @s\n\n @param[in] s\n Short will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_short (s : :: std :: os :: raw :: c_short) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from integer @i\n\n @param[in] i\n Integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_int (i : :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from long @l\n\n @param[in] l\n Long integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_long (l : :: std :: os :: raw :: c_long) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from single precision floating point number @f\n\n @param[in] f\n Float will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_float (f : f32) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from double precision floating point number @d\n\n @param[in] d\n Double will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_double (d : f64) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from a C string @str\n\n @param[in] str\n Constant string will be copied into value (needs to be null terminated)\n\n @param[in] length\n Length of the constant string\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_string (str_ : * const :: std :: os :: raw :: c_char , length : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value buffer from array @buffer\n\n @param[in] buffer\n Constant memory block will be copied into value array\n\n @param[in] size\n Size in bytes of data contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_buffer (buffer : * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value array from array of values @values\n\n @param[in] values\n Constant array of values will be copied into value list\n\n @param[in] size\n Number of elements contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_array (values : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value map from array of tuples @map\n\n @param[in] tuples\n Constant array of tuples will be copied into value map\n\n @param[in] size\n Number of elements contained in the map\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_map (tuples : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from pointer @ptr\n\n @param[in] ptr\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_ptr (ptr : * const :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from future @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_future (f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from function @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_function (f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from function @f binding a closure @c to it\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @param[in] c\n Pointer to closure that will be binded into function @f\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_function_closure (f : * mut :: std :: os :: raw :: c_void , c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value of type null\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_null () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from class @c\n\n @param[in] c\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_class (c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from object @o\n\n @param[in] o\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_object (o : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from exception @ex\n\n @param[in] ex\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_exception (ex : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a value from throwable @th\n\n @param[in] th\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] pub fn metacall_value_create_throwable (th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Returns the size of the value\n\n @param[in] v\n Reference to the value\n\n @return\n Size in bytes of the value"] pub fn metacall_value_size (v : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Returns the amount of values this value contains\n\n @param[in] v\n Reference to the value\n\n @return\n Number of values @v represents"] pub fn metacall_value_count (v : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Provide type id of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return type id assigned to value"] pub fn metacall_value_id (v : * mut :: std :: os :: raw :: c_void) -> metacall_value_id ; } unsafe extern "C" { # [doc = " @brief\n Provide type id in a readable form (as string) of a type id\n\n @param[in] id\n Value type identifier\n\n @return\n Return string related to the type id"] pub fn metacall_value_id_name (id : metacall_value_id) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide type id in a readable form (as string) of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return string related to the type id assigned to value"] pub fn metacall_value_type_name (v : * mut :: std :: os :: raw :: c_void) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Deep copies the value @v, the result copy resets\n the reference counter and ownership, including the finalizer\n\n @param[in] v\n Reference to the value to be copied\n\n @return\n Copy of the value @v on success, null otherwhise"] pub fn metacall_value_copy (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Creates a new pointer value, with a reference to the\n data contained inside the value @v. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n\n In this case, void *ptr is a value equivalent to int*,\n and it points directly to the integer contained in void *v.\n Note that if we destroy the value @v, the reference will\n point to already freed memory, causing use-after-free when used.\n\n @param[in] v\n Reference to the value to be referenced\n\n @return\n A new value of type pointer, pointing to the @v data"] pub fn metacall_value_reference (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n If you pass a reference previously created (i.e a value of\n type pointer, pointing to another value), it returns the\n original value. It does not modify the memory of the values\n neither allocates anything. If the value @v is pointing to\n has been deleted, it will cause an use-after-free. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n void *w = metacall_value_dereference(ptr);\n assert(v == w); // Both are the same value\n\n @param[in] v\n Reference to the value to be dereferenced\n\n @return\n The value containing the data which ptr is pointing to"] pub fn metacall_value_dereference (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Copies the ownership from @src to @dst, including the finalizer,\n and resets the owner and finalizer of @src\n\n @param[in] src\n Source value which will lose the ownership\n\n @param[in] dst\n Destination value which will recieve the ownership"] pub fn metacall_value_move (src : * mut :: std :: os :: raw :: c_void , dest : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to boolean\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to boolean"] pub fn metacall_value_to_bool (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uchar ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to char\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to char"] pub fn metacall_value_to_char (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to short\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to short"] pub fn metacall_value_to_short (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_short ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to integer"] pub fn metacall_value_to_int (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to long integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to long integer"] pub fn metacall_value_to_long (v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_long ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to single precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to float"] pub fn metacall_value_to_float (v : * mut :: std :: os :: raw :: c_void) -> f32 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to double precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to dobule"] pub fn metacall_value_to_double (v : * mut :: std :: os :: raw :: c_void) -> f64 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to string\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to C string (null terminated)"] pub fn metacall_value_to_string (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to buffer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to memory block"] pub fn metacall_value_to_buffer (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to array of values\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to array of values"] pub fn metacall_value_to_array (v : * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to map\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to map (array of tuples (array of values))"] pub fn metacall_value_to_map (v : * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to pointer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to pointer"] pub fn metacall_value_to_ptr (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to future\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to future"] pub fn metacall_value_to_future (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to function\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to function"] pub fn metacall_value_to_function (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to null\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to null"] pub fn metacall_value_to_null (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to class\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to class"] pub fn metacall_value_to_class (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to object\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to object"] pub fn metacall_value_to_object (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to exception\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to exception"] pub fn metacall_value_to_exception (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v to throwable\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to throwable"] pub fn metacall_value_to_throwable (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign boolean @b to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] b\n Boolean to be assigned to value @v\n\n @return\n Value with boolean @b assigned to it"] pub fn metacall_value_from_bool (v : * mut :: std :: os :: raw :: c_void , b : :: std :: os :: raw :: c_uchar) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign character @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Character to be assigned to value @v\n\n @return\n Value with char @c assigned to it"] pub fn metacall_value_from_char (v : * mut :: std :: os :: raw :: c_void , c : :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign short @s to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] s\n Short to be assigned to value @v\n\n @return\n Value with short @s assigned to it"] pub fn metacall_value_from_short (v : * mut :: std :: os :: raw :: c_void , s : :: std :: os :: raw :: c_short) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign integer @i to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] i\n Integer to be assigned to value @v\n\n @return\n Value with integer @i assigned to it"] pub fn metacall_value_from_int (v : * mut :: std :: os :: raw :: c_void , i : :: std :: os :: raw :: c_int) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign long integer @l to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] l\n Long integer to be assigned to value @v\n\n @return\n Value with long @l assigned to it"] pub fn metacall_value_from_long (v : * mut :: std :: os :: raw :: c_void , l : :: std :: os :: raw :: c_long) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign single precision floating point @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Float to be assigned to value @v\n\n @return\n Value with float @f assigned to it"] pub fn metacall_value_from_float (v : * mut :: std :: os :: raw :: c_void , f : f32) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign double precision floating point @d to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] d\n Double to be assigned to value @v\n\n @return\n Value with double @d assigned to it"] pub fn metacall_value_from_double (v : * mut :: std :: os :: raw :: c_void , d : f64) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign string @str to value @v, truncates to @v size if it is smaller\n than @length + 1. It does not add null terminator if truncated.\n\n @param[in] v\n Reference to the value\n\n @param[in] str\n Constant string to be assigned to value @v (it needs to be null terminated)\n\n @param[in] length\n Length of the constant string @str\n\n @return\n Value with string @str assigned to it"] pub fn metacall_value_from_string (v : * mut :: std :: os :: raw :: c_void , str_ : * const :: std :: os :: raw :: c_char , length : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array @buffer to value buffer @v\n\n @param[in] v\n Reference to the value\n\n @param[in] buffer\n Constant array to be assigned to value @v\n\n @param[in] size\n Number of elements contained in @buffer\n\n @return\n Value with array @buffer assigned to it"] pub fn metacall_value_from_buffer (v : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array of values @values to value array @v\n\n @param[in] v\n Reference to the value\n\n @param[in] values\n Constant array of values to be assigned to value array @v\n\n @param[in] size\n Number of values contained in constant array @values\n\n @return\n Value with array of values @values assigned to it"] pub fn metacall_value_from_array (v : * mut :: std :: os :: raw :: c_void , values : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign array of values @values to value map @v\n\n @param[in] v\n Reference to the value\n\n @param[in] tuples\n Constant array of tuples to be assigned to value map @v\n\n @param[in] size\n Number of values contained in constant array @tuples\n\n @return\n Value with array of tuples @tuples assigned to it"] pub fn metacall_value_from_map (v : * mut :: std :: os :: raw :: c_void , tuples : * mut * const :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign pointer reference @ptr to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ptr\n Pointer to be assigned to value @v\n\n @return\n Value with pointer @ptr assigned to it"] pub fn metacall_value_from_ptr (v : * mut :: std :: os :: raw :: c_void , ptr : * const :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign future @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Future to be assigned to value @v\n\n @return\n Value with future @f assigned to it"] pub fn metacall_value_from_future (v : * mut :: std :: os :: raw :: c_void , f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign function @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Function to be assigned to value @v\n\n @return\n Value with function @f assigned to it"] pub fn metacall_value_from_function (v : * mut :: std :: os :: raw :: c_void , f : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign null to value @v\n\n @param[in] v\n Reference to the value\n\n @return\n Value with null assigned to it"] pub fn metacall_value_from_null (v : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign class @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Class to be assigned to value @v\n\n @return\n Value with class @c assigned to it"] pub fn metacall_value_from_class (v : * mut :: std :: os :: raw :: c_void , c : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign object @o to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] o\n Object to be assigned to value @v\n\n @return\n Value with object @o assigned to it"] pub fn metacall_value_from_object (v : * mut :: std :: os :: raw :: c_void , o : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign exception @ex to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ex\n Exception to be assigned to value @v\n\n @return\n Value with exception @ex assigned to it"] pub fn metacall_value_from_exception (v : * mut :: std :: os :: raw :: c_void , ex : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Assign throwable @th to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] th\n Throwable to be assigned to value @v\n\n @return\n Value with throwable @th assigned to it"] pub fn metacall_value_from_throwable (v : * mut :: std :: os :: raw :: c_void , th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Casts a value to a new type @id\n\n @param[in] v\n Reference to the value\n\n @param[in] id\n New type id of value to be casted\n\n @return\n Casted value or reference to @v if casting is between equivalent types"] pub fn metacall_value_cast (v : * mut :: std :: os :: raw :: c_void , id : metacall_value_id) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to boolean\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to boolean"] pub fn metacall_value_cast_bool (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uchar ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to char\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to char"] pub fn metacall_value_cast_char (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to short\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to short"] pub fn metacall_value_cast_short (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_short ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to int\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to int"] pub fn metacall_value_cast_int (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to long\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to long"] pub fn metacall_value_cast_long (v : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_long ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to float\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to float"] pub fn metacall_value_cast_float (v : * mut * mut :: std :: os :: raw :: c_void) -> f32 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to double\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to double"] pub fn metacall_value_cast_double (v : * mut * mut :: std :: os :: raw :: c_void) -> f64 ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to string\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to a C string (null terminated)"] pub fn metacall_value_cast_string (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to buffer\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to buffer"] pub fn metacall_value_cast_buffer (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to array\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to array of values"] pub fn metacall_value_cast_array (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to map\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to map"] pub fn metacall_value_cast_map (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to ptr\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to ptr"] pub fn metacall_value_cast_ptr (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to future\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to future"] pub fn metacall_value_cast_future (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to function\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to function"] pub fn metacall_value_cast_function (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to null\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to null"] pub fn metacall_value_cast_null (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to class\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to class"] pub fn metacall_value_cast_class (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to object\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to object"] pub fn metacall_value_cast_object (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to exception\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to exception"] pub fn metacall_value_cast_exception (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert value @v implicitly to throwable\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to throwable"] pub fn metacall_value_cast_throwable (v : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Destroy a value from scope stack\n\n @param[in] v\n Reference to the value"] pub fn metacall_value_destroy (v : * mut :: std :: os :: raw :: c_void) ; } pub type metacall_pid = pid_t ; pub type metacall_pre_fork_callback_ptr = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; pub type metacall_post_fork_callback_ptr = :: std :: option :: Option < unsafe extern "C" fn (arg1 : metacall_pid , arg2 : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; unsafe extern "C" { # [doc = " @brief\n Initialize fork detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_fork_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Set fork hook callback\n\n @param[in] pre_callback\n Callback to be called before fork detour is executed\n\n @param[in] post_callback\n Callback to be called after fork detour is executed"] pub fn metacall_fork (pre_callback : metacall_pre_fork_callback_ptr , post_callback : metacall_post_fork_callback_ptr) ; } unsafe extern "C" { # [doc = " @brief\n Unregister fork detours and destroy shared memory"] pub fn metacall_fork_destroy () ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_initialize_configuration_type { pub tag : * const :: std :: os :: raw :: c_char , pub options : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_initialize_configuration_type"] [:: std :: mem :: size_of :: < metacall_initialize_configuration_type > () - 16usize] ; ["Alignment of metacall_initialize_configuration_type"] [:: std :: mem :: align_of :: < metacall_initialize_configuration_type > () - 8usize] ; ["Offset of field: metacall_initialize_configuration_type::tag"] [:: std :: mem :: offset_of ! (metacall_initialize_configuration_type , tag) - 0usize] ; ["Offset of field: metacall_initialize_configuration_type::options"] [:: std :: mem :: offset_of ! (metacall_initialize_configuration_type , options) - 8usize] ; } ; pub type metacall_await_callback = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_await_callbacks_type { pub resolve : metacall_await_callback , pub reject : metacall_await_callback , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_await_callbacks_type"] [:: std :: mem :: size_of :: < metacall_await_callbacks_type > () - 16usize] ; ["Alignment of metacall_await_callbacks_type"] [:: std :: mem :: align_of :: < metacall_await_callbacks_type > () - 8usize] ; ["Offset of field: metacall_await_callbacks_type::resolve"] [:: std :: mem :: offset_of ! (metacall_await_callbacks_type , resolve) - 0usize] ; ["Offset of field: metacall_await_callbacks_type::reject"] [:: std :: mem :: offset_of ! (metacall_await_callbacks_type , reject) - 8usize] ; } ; pub type metacall_await_callbacks = metacall_await_callbacks_type ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct metacall_version_type { pub major : :: std :: os :: raw :: c_uint , pub minor : :: std :: os :: raw :: c_uint , pub patch : :: std :: os :: raw :: c_uint , pub revision : * const :: std :: os :: raw :: c_char , pub str_ : * const :: std :: os :: raw :: c_char , pub name : * const :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of metacall_version_type"] [:: std :: mem :: size_of :: < metacall_version_type > () - 40usize] ; ["Alignment of metacall_version_type"] [:: std :: mem :: align_of :: < metacall_version_type > () - 8usize] ; ["Offset of field: metacall_version_type::major"] [:: std :: mem :: offset_of ! (metacall_version_type , major) - 0usize] ; ["Offset of field: metacall_version_type::minor"] [:: std :: mem :: offset_of ! (metacall_version_type , minor) - 4usize] ; ["Offset of field: metacall_version_type::patch"] [:: std :: mem :: offset_of ! (metacall_version_type , patch) - 8usize] ; ["Offset of field: metacall_version_type::revision"] [:: std :: mem :: offset_of ! (metacall_version_type , revision) - 16usize] ; ["Offset of field: metacall_version_type::str_"] [:: std :: mem :: offset_of ! (metacall_version_type , str_) - 24usize] ; ["Offset of field: metacall_version_type::name"] [:: std :: mem :: offset_of ! (metacall_version_type , name) - 32usize] ; } ; unsafe extern "C" { # [doc = " @brief\n Returns default serializer used by MetaCall\n\n @return\n Name of the serializer to be used with serialization methods"] pub fn metacall_serial () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Returns default detour used by MetaCall\n\n @return\n Name of the detour to be used with detouring methods"] pub fn metacall_detour () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Disables MetaCall logs, must be called before @metacall_initialize.\n\n When initializing MetaCall, it initializes a default logs to stdout\n if none was defined. If you want to benchmark or simply disable this\n default logs, you can call to this function before @metacall_initialize."] pub fn metacall_log_null () ; } unsafe extern "C" { # [doc = " @brief\n Flags to be set in MetaCall library\n\n @param[in] flags\n Combination of flags referring to definitions METACALL_FLAGS_*"] pub fn metacall_flags (flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall library\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_initialize () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall library with configuration arguments\n\n @param[in] initialize_config\n Extension of the script to be loaded in memory with data to be injected\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_initialize_ex (initialize_config : * mut metacall_initialize_configuration_type) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Initialize MetaCall application arguments\n\n @param[in] argc\n Number of additional parameters to be passed to the runtime when initializing\n\n @param[in] argv\n Additional parameters to be passed to the runtime when initializing (when using MetaCall as an application)"] pub fn metacall_initialize_args (argc : :: std :: os :: raw :: c_int , argv : * mut * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = " @brief\n Get the number of arguments in which MetaCall was initialized\n\n @return\n An integer equal or greater than zero"] pub fn metacall_argc () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the arguments in which MetaCall was initialized\n\n @return\n A pointer to an array of strings with the additional arguments"] pub fn metacall_argv () -> * mut * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Check if script context is loaded by @tag\n\n @param[in] tag\n Extension of the script (if tag is NULL, it returns the status of the whole MetaCall instance)\n\n @return\n Zero if context is initialized, different from zero otherwise"] pub fn metacall_is_initialized (tag : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Amount of function call arguments supported by MetaCall\n\n @return\n Number of arguments suported"] pub fn metacall_args_size () -> usize ; } unsafe extern "C" { # [doc = " @brief\n Set a execution path defined by @path to the extension script @tag\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path to be loaded\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_execution_path (tag : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Set a execution path defined by @path to the extension script @tag with length\n\n @param[in] tag\n Extension of the script\n\n @param[in] tag_length\n Length of the extension of the tag\n\n @param[in] path\n Path to be loaded\n\n @param[in] path_length\n Length of the path\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_execution_path_s (tag : * const :: std :: os :: raw :: c_char , tag_length : usize , path : * const :: std :: os :: raw :: c_char , path_length : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a script from file specified by @path\n\n @param[in] tag\n Extension of the script\n\n @param[in] paths\n Path array of files\n\n @param[in] size\n Size of the array @paths\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_file (tag : * const :: std :: os :: raw :: c_char , paths : * mut * const :: std :: os :: raw :: c_char , size : usize , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a script from memory\n\n @param[in] tag\n Extension of the script\n\n @param[in] buffer\n Memory block representing the string of the script\n\n @param[in] size\n Memory block representing the string of the script\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_memory (tag : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_char , size : usize , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a package of scrips from file specified by @path into loader defined by @extension\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path of the package\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_package (tag : * const :: std :: os :: raw :: c_char , path : * const :: std :: os :: raw :: c_char , handle : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Loads a a list of scrips from configuration specified by @path into loader\n with the following format:\n {\n \"language_id\": \"<tag>\",\n \"path\": \"<path>\",\n \"scripts\": [ \"<script0>\", \"<script1>\", ..., \"<scriptN>\" ]\n }\n\n @param[in] path\n Path of the configuration\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @param[in] allocator\n Pointer to allocator will allocate the configuration\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_load_from_configuration (path : * const :: std :: os :: raw :: c_char , handle : * mut * mut :: std :: os :: raw :: c_void , allocator : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_s (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallhv (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n Includes @size in order to allow variadic arguments or safe calls\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallhv_s (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall (name : * const :: std :: os :: raw :: c_char , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt (name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_s (name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , size : usize , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallht_s (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ids : * const metacall_value_id , size : usize , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the function by @name\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] pub fn metacall_function (name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create an empty handler into a loader with name @name\n\n @param[in] loader\n Pointer to the loader which the handle belongs to\n\n @param[in] name\n Name of the handle\n\n @param[out] handle_ptr\n On success, returns the pointer to the handle created, otherwise NULL\n\n @return\n Return zero on success, different from zero on error"] pub fn metacall_handle_initialize (loader : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , handle_ptr : * mut * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Populate the objects of @handle_src into @handle_dest\n\n @param[inout] handle_dest\n Handle where the objects from @handle_src will be stored\n\n @param[in] handle_src\n Handle from where the objects will be copied\n\n @return\n Return zero on success, different from zero on error"] pub fn metacall_handle_populate (handle_dest : * mut :: std :: os :: raw :: c_void , handle_src : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the function by @name from @handle\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] pub fn metacall_handle_function (handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the function parameter type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n @param[in] parameter\n The index of the parameter to be retrieved\n\n @param[out] id\n The parameter type id that will be returned\n\n @return\n Return 0 if the @parameter index exists and @func is valid, 1 otherwhise"] pub fn metacall_function_parameter_type (func : * mut :: std :: os :: raw :: c_void , parameter : usize , id : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the function return type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n\n @param[out] id\n The value id of the return type of the function @func\n\n @return\n Return 0 if the @func is valid, 1 otherwhise"] pub fn metacall_function_return_type (func : * mut :: std :: os :: raw :: c_void , id : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get minimun mumber of arguments accepted by function @func\n\n @param[in] func\n Function reference\n\n @return\n Return mumber of arguments"] pub fn metacall_function_size (func : * mut :: std :: os :: raw :: c_void) -> usize ; } unsafe extern "C" { # [doc = " @brief\n Check if the function @func is asynchronous or synchronous\n\n @param[in] func\n Function reference\n\n @return\n Return 0 if it is syncrhonous, 1 if it is asynchronous and -1 if the function is NULL"] pub fn metacall_function_async (func : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the handle by @name\n\n @param[in] tag\n Extension of the script\n\n @param[in] name\n Name of the handle\n\n @return\n Handle reference, null if the function does not exist"] pub fn metacall_handle (tag : * const :: std :: os :: raw :: c_char , name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get name of a @handle\n\n @param[in] handle\n Pointer to the handle to be retrieved\n\n @return\n String that references the handle"] pub fn metacall_handle_id (handle : * mut :: std :: os :: raw :: c_void) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Return a value representing the handle as a map of functions (or values)\n\n @param[in] handle\n Reference to the handle to be described\n\n @return\n A value of type map on success, null otherwise"] pub fn metacall_handle_export (handle : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfv (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of function arguments\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfv_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by variable arguments @va_args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallf (func : * mut :: std :: os :: raw :: c_void , ...) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfs (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfmv (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallfms (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @va_args\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] va_args\n Varidic function parameter types\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall_register (name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , func : * mut * mut :: std :: os :: raw :: c_void , return_type : metacall_value_id , size : usize , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Pointer to value containing the result of the call"] pub fn metacall_registerv (name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , func : * mut * mut :: std :: os :: raw :: c_void , return_type : metacall_value_id , size : usize , types : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Obtain the loader instance by @tag\n\n @param[in] tag\n Tag in which the loader is identified, normally it is the extension of the script\n\n @return\n Pointer the loader by @tag"] pub fn metacall_loader (tag : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] loader\n Opaque pointer to the loader in which you want to register the function (this allows to register the function into a different loader than the host)\n\n @param[in] handle\n Opaque pointer to the handle in which you want to register the function (if it is NULL, it will be defined on the global scope of the loader)\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Zero if the function was registered properly, distinct from zero otherwise"] pub fn metacall_register_loaderv (loader : * mut :: std :: os :: raw :: c_void , handle : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , invoke : :: std :: option :: Option < unsafe extern "C" fn (arg1 : usize , arg2 : * mut * mut :: std :: os :: raw :: c_void , arg3 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , return_type : metacall_value_id , size : usize , types : * mut metacall_value_id) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Awaits for a promise and registers a callback to be executed when a future is resolved\n\n @param[in] f\n The pointer to the future\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await_future (f : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacall_await_s (name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func (offered without function pointers for languages without support to function pointers)\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] cb\n Pointer to struct containing the function pointers to reject and resolve that will be executed when task completion or error\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfv_await_struct_s (func : * mut :: std :: os :: raw :: c_void , args : * mut * mut :: std :: os :: raw :: c_void , size : usize , cb : metacall_await_callbacks , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] size\n Number of elements of the arrays @keys and @values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfmv_await (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfmv_await_s (func : * mut :: std :: os :: raw :: c_void , keys : * mut * mut :: std :: os :: raw :: c_void , values : * mut * mut :: std :: os :: raw :: c_void , size : usize , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfs_await (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] pub fn metacallfms_await (func : * mut :: std :: os :: raw :: c_void , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void , resolve_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , reject_callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the class by @name\n\n @param[in] name\n Name of the class\n\n @return\n Class reference, null if the class does not exist"] pub fn metacall_class (name : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a class method anonymously by value array @args (this procedure assumes there's no overloaded methods and does type conversion on values)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_class (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a class method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_class (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ret : metacall_value_id , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Create a new object instance from @cls by value array @args\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the new object\n\n @param[in] args\n Array of pointers constructor parameters\n\n @param[in] size\n Number of elements of constructor parameters\n\n @return\n Pointer to the new object value instance"] pub fn metacall_class_new (cls : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get an attribute from @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the class attribute value or NULL if an error occurred"] pub fn metacall_class_static_get (cls : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Set an attribute to @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] pub fn metacall_class_static_set (cls : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Call an object method anonymously by value array @args\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallv_object (obj : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Call a object method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] pub fn metacallt_object (obj : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char , ret : metacall_value_id , args : * mut * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get an attribute from @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the object attribute value or NULL if an error occurred"] pub fn metacall_object_get (obj : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Set an attribute to @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] pub fn metacall_object_set (obj : * mut :: std :: os :: raw :: c_void , key : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the value contained by throwable object @th\n\n @param[in] th\n Pointer to the throwable object\n\n @return\n Pointer to the value inside of the throwable or NULL in case of error"] pub fn metacall_throwable_value (th : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Provide information about all loaded objects\n\n @param[out] size\n Size in bytes of return buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n String containing introspection information"] pub fn metacall_inspect (size : * mut usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide information about all loaded objects as a value\n\n @return\n Value containing introspection information"] pub fn metacall_inspect_value () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Convert the value @v to serialized string\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] v\n Reference to the value\n\n @param[out] size\n Size of new allocated string\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n New allocated string containing stringified value"] pub fn metacall_serialize (name : * const :: std :: os :: raw :: c_char , v : * mut :: std :: os :: raw :: c_void , size : * mut usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Convert the string @buffer to value\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] buffer\n String to be deserialized\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n New allocated value representing the string (must be freed)"] pub fn metacall_deserialize (name : * const :: std :: os :: raw :: c_char , buffer : * const :: std :: os :: raw :: c_char , size : usize , allocator : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Clear handle from memory and unload related resources\n\n @param[in] handle\n Reference to the handle to be unloaded\n\n @return\n Zero if success, different from zero otherwise"] pub fn metacall_clear (handle : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @brief\n Get the plugin extension handle to be used for loading plugins\n\n @return\n Pointer to the extension handle, or null if it failed to load"] pub fn metacall_plugin_extension () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the handle containing all the functionality of the plugins from core\n\n @return\n Pointer to the core plugin handle, or null if it failed to load"] pub fn metacall_plugin_core () -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = " @brief\n Get the plugin extension path to be used for accessing the plugins folder\n\n @return\n String containing the core plugin path, or null if it failed to load the plugin extension"] pub fn metacall_plugin_path () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Destroy MetaCall library"] pub fn metacall_destroy () ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version struct\n\n @return\n Static struct containing unpacked version"] pub fn metacall_version () -> * const metacall_version_type ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is @major,\n I is @minor and P is @patch\n\n @param[in] major\n Unsigned integer representing major version\n\n @param[in] minor\n Unsigned integer representing minor version\n\n @param[in] patch\n Unsigned integer representing patch version\n\n @return\n Hexadecimal integer containing packed version"] pub fn metacall_version_hex_make (major : :: std :: os :: raw :: c_uint , minor : :: std :: os :: raw :: c_uint , patch : :: std :: os :: raw :: c_uint) -> u32 ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is major,\n I is minor and P is patch\n\n @return\n Hexadecimal integer containing packed version"] pub fn metacall_version_hex () -> u32 ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version string\n\n @return\n Static string containing module version"] pub fn metacall_version_str () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version revision string\n\n @return\n Static string containing module version revision"] pub fn metacall_version_revision () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module version name\n\n @return\n Static string containing module version name"] pub fn metacall_version_name () -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = " @brief\n Provide the module information\n\n @return\n Static string containing module information"] pub fn metacall_print_info () -> * const :: std :: os :: raw :: c_char ; } \ No newline at end of file +pub type __pid_t = ::std::os::raw::c_int; +pub type pid_t = __pid_t; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum metacall_allocator_id { + METACALL_ALLOCATOR_STD = 0, + METACALL_ALLOCATOR_NGINX = 1, +} +unsafe extern "C" { + #[doc = " @brief\n Create an allocator instance\n\n @param[in] allocator_id\n Type of allocator to be created\n\n @param[in] ctx\n Context of the allocator\n\n @return\n Pointer to allocator if success, null otherwise"] + pub fn metacall_allocator_create( + allocator_id: metacall_allocator_id, + ctx: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Reserve memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] size\n Size in bytes to be allocated\n\n @return\n Pointer to allocated data on success, null otherwise"] + pub fn metacall_allocator_alloc( + allocator: *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Reallocate memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Original pointer to data\n\n @param[in] size\n Original size in bytes\n\n @param[in] new_size\n New size in bytes to be reallocated\n\n @return\n Pointer to new reallocated data on success, null otherwise"] + pub fn metacall_allocator_realloc( + allocator: *mut ::std::os::raw::c_void, + data: *mut ::std::os::raw::c_void, + size: usize, + new_size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Free memory from an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance\n\n @param[in] data\n Pointer to data to be freed"] + pub fn metacall_allocator_free( + allocator: *mut ::std::os::raw::c_void, + data: *mut ::std::os::raw::c_void, + ); +} +unsafe extern "C" { + #[doc = " @brief\n Destroy an allocator instance\n\n @param[in] allocator\n Pointer to allocator instance"] + pub fn metacall_allocator_destroy(allocator: *mut ::std::os::raw::c_void); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct metacall_exception_type { + pub message: *const ::std::os::raw::c_char, + pub label: *const ::std::os::raw::c_char, + pub code: i64, + pub stacktrace: *const ::std::os::raw::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of metacall_exception_type"][::std::mem::size_of::<metacall_exception_type>() - 32usize]; + ["Alignment of metacall_exception_type"] + [::std::mem::align_of::<metacall_exception_type>() - 8usize]; + ["Offset of field: metacall_exception_type::message"] + [::std::mem::offset_of!(metacall_exception_type, message) - 0usize]; + ["Offset of field: metacall_exception_type::label"] + [::std::mem::offset_of!(metacall_exception_type, label) - 8usize]; + ["Offset of field: metacall_exception_type::code"] + [::std::mem::offset_of!(metacall_exception_type, code) - 16usize]; + ["Offset of field: metacall_exception_type::stacktrace"] + [::std::mem::offset_of!(metacall_exception_type, stacktrace) - 24usize]; +}; +pub type metacall_exception = *mut metacall_exception_type; +unsafe extern "C" { + #[doc = " @brief\n Create an throwable value from an exception with a simple API in a single instruction\n\n @param[in] label\n Label of the exception\n\n @param[in] code\n Error code of the exception\n\n @param[in] stacktrace\n Stack trace of the exception\n\n @param[in] message\n Message of the exception to be formatted with the variable arguments\n\n @param[in] va_args\n Arguments for formatting the message\n\n @return\n The value of type throwable containing the exception created"] + pub fn metacall_error_throw( + label: *const ::std::os::raw::c_char, + code: i64, + stacktrace: *const ::std::os::raw::c_char, + message: *const ::std::os::raw::c_char, + ... + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Retrieve the exception from a value, it can be either a throwable value with an exception inside or an exception itself\n\n @param[in] v\n Value that represents the exception to be retrieved\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to @v\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_error_from_value( + v: *mut ::std::os::raw::c_void, + ex: metacall_exception, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Retrieve last error that has happened after a call to any API from MetaCall\n\n @param[out] ex\n Exception that will be used as out parameter, the lifetime of the struct fields is attached to the internal MetaCall exception\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_error_last(ex: metacall_exception) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Clear last error that has happened after a call to any API from MetaCall"] + pub fn metacall_error_clear(); +} +unsafe extern "C" { + #[doc = " @brief\n Initialize link detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_initialize() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_register( + tag: *const ::std::os::raw::c_char, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + fn_: ::std::option::Option<unsafe extern "C" fn()>, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function pointer in order to allow function\n interposition when loading a library, if you register a\n function @symbol called 'foo', when you try to dlsym (or the equivalent\n on every platform), you will get the pointer to @fn, even if\n the symbol does not exist in the library, it will work.\n Function interposition is required in order to hook into runtimes\n and dynamically interpose our functions.\n\n @param[in] loader\n Pointer to the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @param[in] fn\n Function pointer that will be returned by dlsym (or equivalent) when accessing to @symbol\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_register_loader( + loader: *mut ::std::os::raw::c_void, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + fn_: ::std::option::Option<unsafe extern "C" fn()>, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Remove the hook previously registered\n\n @param[in] tag\n Name of the loader which the @library belongs to\n\n @param[in] library\n Name of the library that is going to be hooked\n\n @param[in] symbol\n Name of the function to be interposed\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_link_unregister( + tag: *const ::std::os::raw::c_char, + library: *const ::std::os::raw::c_char, + symbol: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Unregister link detours and destroy shared memory"] + pub fn metacall_link_destroy(); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum metacall_log_id { + METACALL_LOG_STDIO = 0, + METACALL_LOG_FILE = 1, + METACALL_LOG_SOCKET = 2, + METACALL_LOG_SYSLOG = 3, + METACALL_LOG_NGINX = 4, + METACALL_LOG_CUSTOM = 5, +} +unsafe extern "C" { + #[doc = " @brief\n Create a log instance\n\n @param[in] log_id\n Type of log to be created\n\n @param[in] ctx\n Context of the log (a pointer to metacall_log_{stdio, file, socket, syslog, nginx, custom}_type)\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_log( + log_id: metacall_log_id, + ctx: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum metacall_value_id { + METACALL_BOOL = 0, + METACALL_CHAR = 1, + METACALL_SHORT = 2, + METACALL_INT = 3, + METACALL_LONG = 4, + METACALL_FLOAT = 5, + METACALL_DOUBLE = 6, + METACALL_STRING = 7, + METACALL_BUFFER = 8, + METACALL_ARRAY = 9, + METACALL_MAP = 10, + METACALL_PTR = 11, + METACALL_FUTURE = 12, + METACALL_FUNCTION = 13, + METACALL_NULL = 14, + METACALL_CLASS = 15, + METACALL_OBJECT = 16, + METACALL_EXCEPTION = 17, + METACALL_THROWABLE = 18, + METACALL_SIZE = 19, + METACALL_INVALID = 20, +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from boolean @b\n\n @param[in] b\n Boolean will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_bool(b: ::std::os::raw::c_uchar) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from char @c\n\n @param[in] c\n Character will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_char(c: ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from short @s\n\n @param[in] s\n Short will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_short(s: ::std::os::raw::c_short) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from integer @i\n\n @param[in] i\n Integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_int(i: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from long @l\n\n @param[in] l\n Long integer will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_long(l: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from single precision floating point number @f\n\n @param[in] f\n Float will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_float(f: f32) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from double precision floating point number @d\n\n @param[in] d\n Double will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_double(d: f64) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from a C string @str\n\n @param[in] str\n Constant string will be copied into value (needs to be null terminated)\n\n @param[in] length\n Length of the constant string\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_string( + str_: *const ::std::os::raw::c_char, + length: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value buffer from array @buffer\n\n @param[in] buffer\n Constant memory block will be copied into value array\n\n @param[in] size\n Size in bytes of data contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_buffer( + buffer: *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value array from array of values @values\n\n @param[in] values\n Constant array of values will be copied into value list\n\n @param[in] size\n Number of elements contained in the array\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_array( + values: *mut *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value map from array of tuples @map\n\n @param[in] tuples\n Constant array of tuples will be copied into value map\n\n @param[in] size\n Number of elements contained in the map\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_map( + tuples: *mut *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from pointer @ptr\n\n @param[in] ptr\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_ptr( + ptr: *const ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from future @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_future( + f: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from function @f\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_function( + f: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from function @f binding a closure @c to it\n\n @param[in] f\n Pointer to constant data will be copied into value\n\n @param[in] c\n Pointer to closure that will be binded into function @f\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_function_closure( + f: *mut ::std::os::raw::c_void, + c: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value of type null\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_null() -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from class @c\n\n @param[in] c\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_class( + c: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from object @o\n\n @param[in] o\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_object( + o: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from exception @ex\n\n @param[in] ex\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_exception( + ex: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a value from throwable @th\n\n @param[in] th\n Pointer to constant data will be copied into value\n\n @return\n Pointer to value if success, null otherwhise"] + pub fn metacall_value_create_throwable( + th: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Returns the size of the value\n\n @param[in] v\n Reference to the value\n\n @return\n Size in bytes of the value"] + pub fn metacall_value_size(v: *mut ::std::os::raw::c_void) -> usize; +} +unsafe extern "C" { + #[doc = " @brief\n Returns the amount of values this value contains\n\n @param[in] v\n Reference to the value\n\n @return\n Number of values @v represents"] + pub fn metacall_value_count(v: *mut ::std::os::raw::c_void) -> usize; +} +unsafe extern "C" { + #[doc = " @brief\n Provide type id of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return type id assigned to value"] + pub fn metacall_value_id(v: *mut ::std::os::raw::c_void) -> metacall_value_id; +} +unsafe extern "C" { + #[doc = " @brief\n Provide type id in a readable form (as string) of a type id\n\n @param[in] id\n Value type identifier\n\n @return\n Return string related to the type id"] + pub fn metacall_value_id_name(id: metacall_value_id) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Provide type id in a readable form (as string) of value\n\n @param[in] v\n Reference to the value\n\n @return\n Return string related to the type id assigned to value"] + pub fn metacall_value_type_name( + v: *mut ::std::os::raw::c_void, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Deep copies the value @v, the result copy resets\n the reference counter and ownership, including the finalizer\n\n @param[in] v\n Reference to the value to be copied\n\n @return\n Copy of the value @v on success, null otherwhise"] + pub fn metacall_value_copy(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Creates a new pointer value, with a reference to the\n data contained inside the value @v. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n\n In this case, void *ptr is a value equivalent to int*,\n and it points directly to the integer contained in void *v.\n Note that if we destroy the value @v, the reference will\n point to already freed memory, causing use-after-free when used.\n\n @param[in] v\n Reference to the value to be referenced\n\n @return\n A new value of type pointer, pointing to the @v data"] + pub fn metacall_value_reference(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n If you pass a reference previously created (i.e a value of\n type pointer, pointing to another value), it returns the\n original value. It does not modify the memory of the values\n neither allocates anything. If the value @v is pointing to\n has been deleted, it will cause an use-after-free. For example:\n\n void *v = metacall_value_create_int(20);\n void *ptr = metacall_value_reference(v);\n void *w = metacall_value_dereference(ptr);\n assert(v == w); // Both are the same value\n\n @param[in] v\n Reference to the value to be dereferenced\n\n @return\n The value containing the data which ptr is pointing to"] + pub fn metacall_value_dereference( + v: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Copies the ownership from @src to @dst, including the finalizer,\n and resets the owner and finalizer of @src\n\n @param[in] src\n Source value which will lose the ownership\n\n @param[in] dst\n Destination value which will recieve the ownership"] + pub fn metacall_value_move(src: *mut ::std::os::raw::c_void, dest: *mut ::std::os::raw::c_void); +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to boolean\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to boolean"] + pub fn metacall_value_to_bool(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uchar; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to char\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to char"] + pub fn metacall_value_to_char(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to short\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to short"] + pub fn metacall_value_to_short(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_short; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to integer"] + pub fn metacall_value_to_int(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to long integer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to long integer"] + pub fn metacall_value_to_long(v: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to single precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to float"] + pub fn metacall_value_to_float(v: *mut ::std::os::raw::c_void) -> f32; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to double precision floating point\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to dobule"] + pub fn metacall_value_to_double(v: *mut ::std::os::raw::c_void) -> f64; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to string\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to C string (null terminated)"] + pub fn metacall_value_to_string(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to buffer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to memory block"] + pub fn metacall_value_to_buffer(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to array of values\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to array of values"] + pub fn metacall_value_to_array( + v: *mut ::std::os::raw::c_void, + ) -> *mut *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to map\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to map (array of tuples (array of values))"] + pub fn metacall_value_to_map( + v: *mut ::std::os::raw::c_void, + ) -> *mut *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to pointer\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to pointer"] + pub fn metacall_value_to_ptr(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to future\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to future"] + pub fn metacall_value_to_future(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to function\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to function"] + pub fn metacall_value_to_function( + v: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to null\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to null"] + pub fn metacall_value_to_null(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to class\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to class"] + pub fn metacall_value_to_class(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to object\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to object"] + pub fn metacall_value_to_object(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to exception\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to exception"] + pub fn metacall_value_to_exception( + v: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v to throwable\n\n @param[in] v\n Reference to the value\n\n @return\n Value converted to throwable"] + pub fn metacall_value_to_throwable( + v: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign boolean @b to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] b\n Boolean to be assigned to value @v\n\n @return\n Value with boolean @b assigned to it"] + pub fn metacall_value_from_bool( + v: *mut ::std::os::raw::c_void, + b: ::std::os::raw::c_uchar, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign character @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Character to be assigned to value @v\n\n @return\n Value with char @c assigned to it"] + pub fn metacall_value_from_char( + v: *mut ::std::os::raw::c_void, + c: ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign short @s to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] s\n Short to be assigned to value @v\n\n @return\n Value with short @s assigned to it"] + pub fn metacall_value_from_short( + v: *mut ::std::os::raw::c_void, + s: ::std::os::raw::c_short, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign integer @i to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] i\n Integer to be assigned to value @v\n\n @return\n Value with integer @i assigned to it"] + pub fn metacall_value_from_int( + v: *mut ::std::os::raw::c_void, + i: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign long integer @l to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] l\n Long integer to be assigned to value @v\n\n @return\n Value with long @l assigned to it"] + pub fn metacall_value_from_long( + v: *mut ::std::os::raw::c_void, + l: ::std::os::raw::c_long, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign single precision floating point @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Float to be assigned to value @v\n\n @return\n Value with float @f assigned to it"] + pub fn metacall_value_from_float( + v: *mut ::std::os::raw::c_void, + f: f32, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign double precision floating point @d to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] d\n Double to be assigned to value @v\n\n @return\n Value with double @d assigned to it"] + pub fn metacall_value_from_double( + v: *mut ::std::os::raw::c_void, + d: f64, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign string @str to value @v, truncates to @v size if it is smaller\n than @length + 1. It does not add null terminator if truncated.\n\n @param[in] v\n Reference to the value\n\n @param[in] str\n Constant string to be assigned to value @v (it needs to be null terminated)\n\n @param[in] length\n Length of the constant string @str\n\n @return\n Value with string @str assigned to it"] + pub fn metacall_value_from_string( + v: *mut ::std::os::raw::c_void, + str_: *const ::std::os::raw::c_char, + length: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign array @buffer to value buffer @v\n\n @param[in] v\n Reference to the value\n\n @param[in] buffer\n Constant array to be assigned to value @v\n\n @param[in] size\n Number of elements contained in @buffer\n\n @return\n Value with array @buffer assigned to it"] + pub fn metacall_value_from_buffer( + v: *mut ::std::os::raw::c_void, + buffer: *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign array of values @values to value array @v\n\n @param[in] v\n Reference to the value\n\n @param[in] values\n Constant array of values to be assigned to value array @v\n\n @param[in] size\n Number of values contained in constant array @values\n\n @return\n Value with array of values @values assigned to it"] + pub fn metacall_value_from_array( + v: *mut ::std::os::raw::c_void, + values: *mut *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign array of values @values to value map @v\n\n @param[in] v\n Reference to the value\n\n @param[in] tuples\n Constant array of tuples to be assigned to value map @v\n\n @param[in] size\n Number of values contained in constant array @tuples\n\n @return\n Value with array of tuples @tuples assigned to it"] + pub fn metacall_value_from_map( + v: *mut ::std::os::raw::c_void, + tuples: *mut *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign pointer reference @ptr to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ptr\n Pointer to be assigned to value @v\n\n @return\n Value with pointer @ptr assigned to it"] + pub fn metacall_value_from_ptr( + v: *mut ::std::os::raw::c_void, + ptr: *const ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign future @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Future to be assigned to value @v\n\n @return\n Value with future @f assigned to it"] + pub fn metacall_value_from_future( + v: *mut ::std::os::raw::c_void, + f: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign function @f to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] f\n Function to be assigned to value @v\n\n @return\n Value with function @f assigned to it"] + pub fn metacall_value_from_function( + v: *mut ::std::os::raw::c_void, + f: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign null to value @v\n\n @param[in] v\n Reference to the value\n\n @return\n Value with null assigned to it"] + pub fn metacall_value_from_null(v: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign class @c to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] c\n Class to be assigned to value @v\n\n @return\n Value with class @c assigned to it"] + pub fn metacall_value_from_class( + v: *mut ::std::os::raw::c_void, + c: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign object @o to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] o\n Object to be assigned to value @v\n\n @return\n Value with object @o assigned to it"] + pub fn metacall_value_from_object( + v: *mut ::std::os::raw::c_void, + o: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign exception @ex to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] ex\n Exception to be assigned to value @v\n\n @return\n Value with exception @ex assigned to it"] + pub fn metacall_value_from_exception( + v: *mut ::std::os::raw::c_void, + ex: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Assign throwable @th to value @v\n\n @param[in] v\n Reference to the value\n\n @param[in] th\n Throwable to be assigned to value @v\n\n @return\n Value with throwable @th assigned to it"] + pub fn metacall_value_from_throwable( + v: *mut ::std::os::raw::c_void, + th: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Casts a value to a new type @id\n\n @param[in] v\n Reference to the value\n\n @param[in] id\n New type id of value to be casted\n\n @return\n Casted value or reference to @v if casting is between equivalent types"] + pub fn metacall_value_cast( + v: *mut ::std::os::raw::c_void, + id: metacall_value_id, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to boolean\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to boolean"] + pub fn metacall_value_cast_bool(v: *mut *mut ::std::os::raw::c_void) + -> ::std::os::raw::c_uchar; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to char\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to char"] + pub fn metacall_value_cast_char(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to short\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to short"] + pub fn metacall_value_cast_short( + v: *mut *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_short; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to int\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to int"] + pub fn metacall_value_cast_int(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to long\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to long"] + pub fn metacall_value_cast_long(v: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to float\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to float"] + pub fn metacall_value_cast_float(v: *mut *mut ::std::os::raw::c_void) -> f32; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to double\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to double"] + pub fn metacall_value_cast_double(v: *mut *mut ::std::os::raw::c_void) -> f64; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to string\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to a C string (null terminated)"] + pub fn metacall_value_cast_string( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to buffer\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to buffer"] + pub fn metacall_value_cast_buffer( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to array\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to array of values"] + pub fn metacall_value_cast_array( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to map\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to map"] + pub fn metacall_value_cast_map( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to ptr\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to ptr"] + pub fn metacall_value_cast_ptr( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to future\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to future"] + pub fn metacall_value_cast_future( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to function\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to function"] + pub fn metacall_value_cast_function( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to null\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to null"] + pub fn metacall_value_cast_null( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to class\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to class"] + pub fn metacall_value_cast_class( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to object\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to object"] + pub fn metacall_value_cast_object( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to exception\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to exception"] + pub fn metacall_value_cast_exception( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert value @v implicitly to throwable\n\n @param[in] v\n Reference to the reference of the value\n\n @return\n Value converted to throwable"] + pub fn metacall_value_cast_throwable( + v: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Destroy a value from scope stack\n\n @param[in] v\n Reference to the value"] + pub fn metacall_value_destroy(v: *mut ::std::os::raw::c_void); +} +pub type metacall_pid = pid_t; +pub type metacall_pre_fork_callback_ptr = ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, +>; +pub type metacall_post_fork_callback_ptr = ::std::option::Option< + unsafe extern "C" fn( + arg1: metacall_pid, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +unsafe extern "C" { + #[doc = " @brief\n Initialize fork detours and allocate shared memory\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_fork_initialize() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Set fork hook callback\n\n @param[in] pre_callback\n Callback to be called before fork detour is executed\n\n @param[in] post_callback\n Callback to be called after fork detour is executed"] + pub fn metacall_fork( + pre_callback: metacall_pre_fork_callback_ptr, + post_callback: metacall_post_fork_callback_ptr, + ); +} +unsafe extern "C" { + #[doc = " @brief\n Unregister fork detours and destroy shared memory"] + pub fn metacall_fork_destroy(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct metacall_initialize_configuration_type { + pub tag: *const ::std::os::raw::c_char, + pub options: *mut ::std::os::raw::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of metacall_initialize_configuration_type"] + [::std::mem::size_of::<metacall_initialize_configuration_type>() - 16usize]; + ["Alignment of metacall_initialize_configuration_type"] + [::std::mem::align_of::<metacall_initialize_configuration_type>() - 8usize]; + ["Offset of field: metacall_initialize_configuration_type::tag"] + [::std::mem::offset_of!(metacall_initialize_configuration_type, tag) - 0usize]; + ["Offset of field: metacall_initialize_configuration_type::options"] + [::std::mem::offset_of!(metacall_initialize_configuration_type, options) - 8usize]; +}; +pub type metacall_await_callback = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct metacall_await_callbacks_type { + pub resolve: metacall_await_callback, + pub reject: metacall_await_callback, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of metacall_await_callbacks_type"] + [::std::mem::size_of::<metacall_await_callbacks_type>() - 16usize]; + ["Alignment of metacall_await_callbacks_type"] + [::std::mem::align_of::<metacall_await_callbacks_type>() - 8usize]; + ["Offset of field: metacall_await_callbacks_type::resolve"] + [::std::mem::offset_of!(metacall_await_callbacks_type, resolve) - 0usize]; + ["Offset of field: metacall_await_callbacks_type::reject"] + [::std::mem::offset_of!(metacall_await_callbacks_type, reject) - 8usize]; +}; +pub type metacall_await_callbacks = metacall_await_callbacks_type; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct metacall_version_type { + pub major: ::std::os::raw::c_uint, + pub minor: ::std::os::raw::c_uint, + pub patch: ::std::os::raw::c_uint, + pub revision: *const ::std::os::raw::c_char, + pub str_: *const ::std::os::raw::c_char, + pub name: *const ::std::os::raw::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of metacall_version_type"][::std::mem::size_of::<metacall_version_type>() - 40usize]; + ["Alignment of metacall_version_type"] + [::std::mem::align_of::<metacall_version_type>() - 8usize]; + ["Offset of field: metacall_version_type::major"] + [::std::mem::offset_of!(metacall_version_type, major) - 0usize]; + ["Offset of field: metacall_version_type::minor"] + [::std::mem::offset_of!(metacall_version_type, minor) - 4usize]; + ["Offset of field: metacall_version_type::patch"] + [::std::mem::offset_of!(metacall_version_type, patch) - 8usize]; + ["Offset of field: metacall_version_type::revision"] + [::std::mem::offset_of!(metacall_version_type, revision) - 16usize]; + ["Offset of field: metacall_version_type::str_"] + [::std::mem::offset_of!(metacall_version_type, str_) - 24usize]; + ["Offset of field: metacall_version_type::name"] + [::std::mem::offset_of!(metacall_version_type, name) - 32usize]; +}; +unsafe extern "C" { + #[doc = " @brief\n Returns default serializer used by MetaCall\n\n @return\n Name of the serializer to be used with serialization methods"] + pub fn metacall_serial() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Returns default detour used by MetaCall\n\n @return\n Name of the detour to be used with detouring methods"] + pub fn metacall_detour() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Disables MetaCall logs, must be called before @metacall_initialize.\n\n When initializing MetaCall, it initializes a default logs to stdout\n if none was defined. If you want to benchmark or simply disable this\n default logs, you can call to this function before @metacall_initialize."] + pub fn metacall_log_null(); +} +unsafe extern "C" { + #[doc = " @brief\n Flags to be set in MetaCall library\n\n @param[in] flags\n Combination of flags referring to definitions METACALL_FLAGS_*"] + pub fn metacall_flags(flags: ::std::os::raw::c_int); +} +unsafe extern "C" { + #[doc = " @brief\n Initialize MetaCall library\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_initialize() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Initialize MetaCall library with configuration arguments\n\n @param[in] initialize_config\n Extension of the script to be loaded in memory with data to be injected\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_initialize_ex( + initialize_config: *mut metacall_initialize_configuration_type, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Initialize MetaCall application arguments\n\n @param[in] argc\n Number of additional parameters to be passed to the runtime when initializing\n\n @param[in] argv\n Additional parameters to be passed to the runtime when initializing (when using MetaCall as an application)"] + pub fn metacall_initialize_args( + argc: ::std::os::raw::c_int, + argv: *mut *mut ::std::os::raw::c_char, + ); +} +unsafe extern "C" { + #[doc = " @brief\n Get the number of arguments in which MetaCall was initialized\n\n @return\n An integer equal or greater than zero"] + pub fn metacall_argc() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the arguments in which MetaCall was initialized\n\n @return\n A pointer to an array of strings with the additional arguments"] + pub fn metacall_argv() -> *mut *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Check if script context is loaded by @tag\n\n @param[in] tag\n Extension of the script (if tag is NULL, it returns the status of the whole MetaCall instance)\n\n @return\n Zero if context is initialized, different from zero otherwise"] + pub fn metacall_is_initialized(tag: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Amount of function call arguments supported by MetaCall\n\n @return\n Number of arguments suported"] + pub fn metacall_args_size() -> usize; +} +unsafe extern "C" { + #[doc = " @brief\n Set a execution path defined by @path to the extension script @tag\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path to be loaded\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_execution_path( + tag: *const ::std::os::raw::c_char, + path: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Set a execution path defined by @path to the extension script @tag with length\n\n @param[in] tag\n Extension of the script\n\n @param[in] tag_length\n Length of the extension of the tag\n\n @param[in] path\n Path to be loaded\n\n @param[in] path_length\n Length of the path\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_execution_path_s( + tag: *const ::std::os::raw::c_char, + tag_length: usize, + path: *const ::std::os::raw::c_char, + path_length: usize, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Loads a script from file specified by @path\n\n @param[in] tag\n Extension of the script\n\n @param[in] paths\n Path array of files\n\n @param[in] size\n Size of the array @paths\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_load_from_file( + tag: *const ::std::os::raw::c_char, + paths: *mut *const ::std::os::raw::c_char, + size: usize, + handle: *mut *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Loads a script from memory\n\n @param[in] tag\n Extension of the script\n\n @param[in] buffer\n Memory block representing the string of the script\n\n @param[in] size\n Memory block representing the string of the script\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_load_from_memory( + tag: *const ::std::os::raw::c_char, + buffer: *const ::std::os::raw::c_char, + size: usize, + handle: *mut *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Loads a package of scrips from file specified by @path into loader defined by @extension\n\n @param[in] tag\n Extension of the script\n\n @param[in] path\n Path of the package\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_load_from_package( + tag: *const ::std::os::raw::c_char, + path: *const ::std::os::raw::c_char, + handle: *mut *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Loads a a list of scrips from configuration specified by @path into loader\n with the following format:\n {\n \"language_id\": \"<tag>\",\n \"path\": \"<path>\",\n \"scripts\": [ \"<script0>\", \"<script1>\", ..., \"<scriptN>\" ]\n }\n\n @param[in] path\n Path of the configuration\n\n @param[inout] handle\n Optional pointer to reference of loaded handle. If the parameter is NULL, the symbols loaded are\n propagated to the loader scope (i.e they will share the scope between all previously loaded files and they can collide).\n Otherwise, if we pass a void* pointer set to NULL, it will behave as output parameter, obtaining the reference to the\n created handle, which can be later on used for calling to functions of that handle. The symbols will not be propagated\n to the loader scope and they will be private (this prevents collisions). The last case is if we pass an already allocated\n handle (i.e a void* pointer pointing to an previously loaded handle), then in this case, the symbols loaded will be propagated\n to the previously allocated handle, and it will behave as a in parameter.\n\n @param[in] allocator\n Pointer to allocator will allocate the configuration\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_load_from_configuration( + path: *const ::std::os::raw::c_char, + handle: *mut *mut ::std::os::raw::c_void, + allocator: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallv( + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by value array @args\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallv_s( + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallhv( + handle: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by handle @handle value array @args\n This function allows to avoid name collisions when calling functions by name\n Includes @size in order to allow variadic arguments or safe calls\n\n @param[in] handle\n Handle where the function belongs\n\n @param[in] name\n Name of the function\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of the call\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallhv_s( + handle: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacall(name: *const ::std::os::raw::c_char, ...) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallt( + name: *const ::std::os::raw::c_char, + ids: *const metacall_value_id, + ... + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallt_s( + name: *const ::std::os::raw::c_char, + ids: *const metacall_value_id, + size: usize, + ... + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by type array @ids and variable arguments @va_args\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @param[in] ids\n Array of types refered to @va_args\n\n @param[in] size\n Number of elements of the call\n\n @param[in] va_args\n Varidic function parameters\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallht_s( + handle: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ids: *const metacall_value_id, + size: usize, + ... + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get the function by @name\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] + pub fn metacall_function(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create an empty handler into a loader with name @name\n\n @param[in] loader\n Pointer to the loader which the handle belongs to\n\n @param[in] name\n Name of the handle\n\n @param[out] handle_ptr\n On success, returns the pointer to the handle created, otherwise NULL\n\n @return\n Return zero on success, different from zero on error"] + pub fn metacall_handle_initialize( + loader: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + handle_ptr: *mut *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Populate the objects of @handle_src into @handle_dest\n\n @param[inout] handle_dest\n Handle where the objects from @handle_src will be stored\n\n @param[in] handle_src\n Handle from where the objects will be copied\n\n @return\n Return zero on success, different from zero on error"] + pub fn metacall_handle_populate( + handle_dest: *mut ::std::os::raw::c_void, + handle_src: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the function by @name from @handle\n\n @param[in] handle\n Pointer to the handle returned by metacall_load_from_{file, memory, package}\n\n @param[in] name\n Name of the function\n\n @return\n Function reference, null if the function does not exist"] + pub fn metacall_handle_function( + handle: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get the function parameter type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n @param[in] parameter\n The index of the parameter to be retrieved\n\n @param[out] id\n The parameter type id that will be returned\n\n @return\n Return 0 if the @parameter index exists and @func is valid, 1 otherwhise"] + pub fn metacall_function_parameter_type( + func: *mut ::std::os::raw::c_void, + parameter: usize, + id: *mut metacall_value_id, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the function return type id\n\n @param[in] func\n The pointer to the function obtained from metacall_function\n\n\n @param[out] id\n The value id of the return type of the function @func\n\n @return\n Return 0 if the @func is valid, 1 otherwhise"] + pub fn metacall_function_return_type( + func: *mut ::std::os::raw::c_void, + id: *mut metacall_value_id, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get minimun mumber of arguments accepted by function @func\n\n @param[in] func\n Function reference\n\n @return\n Return mumber of arguments"] + pub fn metacall_function_size(func: *mut ::std::os::raw::c_void) -> usize; +} +unsafe extern "C" { + #[doc = " @brief\n Check if the function @func is asynchronous or synchronous\n\n @param[in] func\n Function reference\n\n @return\n Return 0 if it is syncrhonous, 1 if it is asynchronous and -1 if the function is NULL"] + pub fn metacall_function_async(func: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the handle by @name\n\n @param[in] tag\n Extension of the script\n\n @param[in] name\n Name of the handle\n\n @return\n Handle reference, null if the function does not exist"] + pub fn metacall_handle( + tag: *const ::std::os::raw::c_char, + name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get name of a @handle\n\n @param[in] handle\n Pointer to the handle to be retrieved\n\n @return\n String that references the handle"] + pub fn metacall_handle_id(handle: *mut ::std::os::raw::c_void) + -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Return a value representing the handle as a map of functions (or values)\n\n @param[in] handle\n Reference to the handle to be described\n\n @return\n A value of type map on success, null otherwise"] + pub fn metacall_handle_export( + handle: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallfv( + func: *mut ::std::os::raw::c_void, + args: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of function arguments\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallfv_s( + func: *mut ::std::os::raw::c_void, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by variable arguments @va_args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallf(func: *mut ::std::os::raw::c_void, ...) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallfs( + func: *mut ::std::os::raw::c_void, + buffer: *const ::std::os::raw::c_char, + size: usize, + allocator: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallfmv( + func: *mut ::std::os::raw::c_void, + keys: *mut *mut ::std::os::raw::c_void, + values: *mut *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallfms( + func: *mut ::std::os::raw::c_void, + buffer: *const ::std::os::raw::c_char, + size: usize, + allocator: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function by name @name and arguments @va_args\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] va_args\n Varidic function parameter types\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacall_register( + name: *const ::std::os::raw::c_char, + invoke: ::std::option::Option< + unsafe extern "C" fn( + arg1: usize, + arg2: *mut *mut ::std::os::raw::c_void, + arg3: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + func: *mut *mut ::std::os::raw::c_void, + return_type: metacall_value_id, + size: usize, + ... + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[out] func\n Will set the pointer to the function if the parameter is not null\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacall_registerv( + name: *const ::std::os::raw::c_char, + invoke: ::std::option::Option< + unsafe extern "C" fn( + arg1: usize, + arg2: *mut *mut ::std::os::raw::c_void, + arg3: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + func: *mut *mut ::std::os::raw::c_void, + return_type: metacall_value_id, + size: usize, + types: *mut metacall_value_id, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Obtain the loader instance by @tag\n\n @param[in] tag\n Tag in which the loader is identified, normally it is the extension of the script\n\n @return\n Pointer the loader by @tag"] + pub fn metacall_loader(tag: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Register a function by name @name and arguments @types\n\n @param[in] loader\n Opaque pointer to the loader in which you want to register the function (this allows to register the function into a different loader than the host)\n\n @param[in] handle\n Opaque pointer to the handle in which you want to register the function (if it is NULL, it will be defined on the global scope of the loader)\n\n @param[in] name\n Name of the function (if it is NULL, function is not registered into host scope)\n\n @param[in] invoke\n Pointer to function invoke interface (argc, argv, data)\n\n @param[in] return_type\n Type of return value\n\n @param[in] size\n Number of function arguments\n\n @param[in] types\n List of parameter types\n\n @return\n Zero if the function was registered properly, distinct from zero otherwise"] + pub fn metacall_register_loaderv( + loader: *mut ::std::os::raw::c_void, + handle: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + invoke: ::std::option::Option< + unsafe extern "C" fn( + arg1: usize, + arg2: *mut *mut ::std::os::raw::c_void, + arg3: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + return_type: metacall_value_id, + size: usize, + types: *mut metacall_value_id, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacall_await( + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Awaits for a promise and registers a callback to be executed when a future is resolved\n\n @param[in] f\n The pointer to the future\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacall_await_future( + f: *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Executes an asynchronous call to the function and registers a callback to be executed when a future is resolved (it does block)\n\n @param[in] name\n The name of the function to be called asynchronously\n\n @param[in] args\n Array of pointers to the values to be passed to the function\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacall_await_s( + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfv_await( + func: *mut ::std::os::raw::c_void, + args: *mut *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfv_await_s( + func: *mut ::std::os::raw::c_void, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by value array @args and function @func (offered without function pointers for languages without support to function pointers)\n\n @param[in] func\n Reference to function to be called\n\n @param[in] args\n Array of pointers to values\n\n @param[in] size\n Number of elements of the array @args\n\n @param[in] cb\n Pointer to struct containing the function pointers to reject and resolve that will be executed when task completion or error\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfv_await_struct_s( + func: *mut ::std::os::raw::c_void, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + cb: metacall_await_callbacks, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] size\n Number of elements of the arrays @keys and @values\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfmv_await( + func: *mut ::std::os::raw::c_void, + keys: *mut *mut ::std::os::raw::c_void, + values: *mut *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by value map (@keys -> @values) and function @func\n\n @param[in] func\n Reference to function to be called\n\n @param[in] keys\n Array of values representing argument keys\n\n @param[in] values\n Array of values representing argument values data\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfmv_await_s( + func: *mut ::std::os::raw::c_void, + keys: *mut *mut ::std::os::raw::c_void, + values: *mut *mut ::std::os::raw::c_void, + size: usize, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing an array to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfs_await( + func: *mut ::std::os::raw::c_void, + buffer: *const ::std::os::raw::c_char, + size: usize, + allocator: *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call an asynchronous function anonymously by function @func and serial @buffer of size @size\n\n @param[in] func\n Reference to function to be called\n\n @param[in] buffer\n String representing a map to be deserialized into arguments of the function\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @param[in] resolve_callback\n Pointer to function that will be executed when task completion\n @param[in] void *\n Value representing the result of the future resolution\n @param[in] void *\n A reference to @data that will be used as a closure for the chain\n @return\n Value containing the result of the operation,\n it will be wrapped into a future later on to be returned by the function\n\n @param[in] reject_callback\n Pointer to function that will be executed when task error (signature is identical as resolve_callback)\n\n @param[in] data\n Pointer to a context that will act as a closure for the chain\n\n @return\n Pointer to value containing the result of the call returned by @resolve_callback or @reject_callback wrapped in a future"] + pub fn metacallfms_await( + func: *mut ::std::os::raw::c_void, + buffer: *const ::std::os::raw::c_char, + size: usize, + allocator: *mut ::std::os::raw::c_void, + resolve_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + reject_callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void, + >, + data: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get the class by @name\n\n @param[in] name\n Name of the class\n\n @return\n Class reference, null if the class does not exist"] + pub fn metacall_class(name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a class method anonymously by value array @args (this procedure assumes there's no overloaded methods and does type conversion on values)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallv_class( + cls: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a class method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallt_class( + cls: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ret: metacall_value_id, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Create a new object instance from @cls by value array @args\n\n @param[in] cls\n Pointer to the class\n\n @param[in] name\n Name of the new object\n\n @param[in] args\n Array of pointers constructor parameters\n\n @param[in] size\n Number of elements of constructor parameters\n\n @return\n Pointer to the new object value instance"] + pub fn metacall_class_new( + cls: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get an attribute from @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the class attribute value or NULL if an error occurred"] + pub fn metacall_class_static_get( + cls: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Set an attribute to @cls by @key name\n\n @param[in] cls\n Pointer to the class\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] + pub fn metacall_class_static_set( + cls: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Call an object method anonymously by value array @args\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallv_object( + obj: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Call a object method anonymously by value array @args and return value type @ret (helps to resolve overloading methods)\n\n @param[in] obj\n Pointer to the object\n\n @param[in] name\n Name of the method\n\n @param[in] ret\n Type of the return value of the method\n\n @param[in] args\n Array of pointers to data\n\n @param[in] size\n Number of elements of args array\n\n @return\n Pointer to value containing the result of the call"] + pub fn metacallt_object( + obj: *mut ::std::os::raw::c_void, + name: *const ::std::os::raw::c_char, + ret: metacall_value_id, + args: *mut *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get an attribute from @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to get\n\n @return\n Pointer to the object attribute value or NULL if an error occurred"] + pub fn metacall_object_get( + obj: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Set an attribute to @obj by @key name\n\n @param[in] obj\n Pointer to the object\n\n @param[in] key\n Name of the attribute to set\n\n @param[in] value\n Value to set\n\n @return\n Non-zero integer if an error ocurred"] + pub fn metacall_object_set( + obj: *mut ::std::os::raw::c_void, + key: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the value contained by throwable object @th\n\n @param[in] th\n Pointer to the throwable object\n\n @return\n Pointer to the value inside of the throwable or NULL in case of error"] + pub fn metacall_throwable_value(th: *mut ::std::os::raw::c_void) + -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Provide information about all loaded objects\n\n @param[out] size\n Size in bytes of return buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n String containing introspection information"] + pub fn metacall_inspect( + size: *mut usize, + allocator: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Provide information about all loaded objects as a value\n\n @return\n Value containing introspection information"] + pub fn metacall_inspect_value() -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Convert the value @v to serialized string\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] v\n Reference to the value\n\n @param[out] size\n Size of new allocated string\n\n @param[in] allocator\n Pointer to allocator will allocate the string\n\n @return\n New allocated string containing stringified value"] + pub fn metacall_serialize( + name: *const ::std::os::raw::c_char, + v: *mut ::std::os::raw::c_void, + size: *mut usize, + allocator: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Convert the string @buffer to value\n\n @param[in] name\n Name of the serial to be used\n\n @param[in] buffer\n String to be deserialized\n\n @param[in] size\n Size of string @buffer\n\n @param[in] allocator\n Pointer to allocator will allocate the value\n\n @return\n New allocated value representing the string (must be freed)"] + pub fn metacall_deserialize( + name: *const ::std::os::raw::c_char, + buffer: *const ::std::os::raw::c_char, + size: usize, + allocator: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Clear handle from memory and unload related resources\n\n @param[in] handle\n Reference to the handle to be unloaded\n\n @return\n Zero if success, different from zero otherwise"] + pub fn metacall_clear(handle: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + #[doc = " @brief\n Get the plugin extension handle to be used for loading plugins\n\n @return\n Pointer to the extension handle, or null if it failed to load"] + pub fn metacall_plugin_extension() -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get the handle containing all the functionality of the plugins from core\n\n @return\n Pointer to the core plugin handle, or null if it failed to load"] + pub fn metacall_plugin_core() -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + #[doc = " @brief\n Get the plugin extension path to be used for accessing the plugins folder\n\n @return\n String containing the core plugin path, or null if it failed to load the plugin extension"] + pub fn metacall_plugin_path() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Destroy MetaCall library"] + pub fn metacall_destroy(); +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version struct\n\n @return\n Static struct containing unpacked version"] + pub fn metacall_version() -> *const metacall_version_type; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is @major,\n I is @minor and P is @patch\n\n @param[in] major\n Unsigned integer representing major version\n\n @param[in] minor\n Unsigned integer representing minor version\n\n @param[in] patch\n Unsigned integer representing patch version\n\n @return\n Hexadecimal integer containing packed version"] + pub fn metacall_version_hex_make( + major: ::std::os::raw::c_uint, + minor: ::std::os::raw::c_uint, + patch: ::std::os::raw::c_uint, + ) -> u32; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version hexadecimal value\n with format 0xMMIIPPPP where M is major,\n I is minor and P is patch\n\n @return\n Hexadecimal integer containing packed version"] + pub fn metacall_version_hex() -> u32; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version string\n\n @return\n Static string containing module version"] + pub fn metacall_version_str() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version revision string\n\n @return\n Static string containing module version revision"] + pub fn metacall_version_revision() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module version name\n\n @return\n Static string containing module version name"] + pub fn metacall_version_name() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + #[doc = " @brief\n Provide the module information\n\n @return\n Static string containing module information"] + pub fn metacall_print_info() -> *const ::std::os::raw::c_char; +} From 8dd3f55cc6209831e933c85615f30fb9d392f878 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 9 Sep 2025 21:55:09 +0200 Subject: [PATCH 330/364] Improved rs port. --- source/ports/rs_port/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 98e2596bfd..30c840a644 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -173,7 +173,7 @@ fn find_metacall_library() -> Result<LibraryPath, Box<dyn std::error::Error>> { .into()) } -fn define_library_search_path(env_var: &str, separator: &str, path: &PathBuf) -> String { +fn define_library_search_path(env_var: &str, separator: &str, path: &Path) -> String { // Get the current value of the env var, if any let existing = env::var(env_var).unwrap_or_default(); let path_str: String = String::from(path.to_str().unwrap()); From 9070d7fc4d5de02202d29384728dfe97f747cc19 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 9 Sep 2025 22:32:14 +0200 Subject: [PATCH 331/364] Exposed the rs port find method for metacall library. --- source/ports/rs_port/Cargo.toml | 5 +- source/ports/rs_port/README.md | 18 ++ source/ports/rs_port/build.rs | 255 +--------------------------- source/ports/rs_port/sys/Cargo.toml | 7 + source/ports/rs_port/sys/src/lib.rs | 255 ++++++++++++++++++++++++++++ source/ports/rs_port/upload.sh | 2 + 6 files changed, 288 insertions(+), 254 deletions(-) create mode 100644 source/ports/rs_port/sys/Cargo.toml create mode 100644 source/ports/rs_port/sys/src/lib.rs diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index c0ce796a1e..781bafb191 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.5.0" +version = "0.5.1" [lib] crate-type = ["lib"] @@ -18,3 +18,6 @@ path = "src/lib.rs" [dependencies] metacall-inline = { path = "./inline", version = "0.2.0" } + +[build-dependencies] +metacall-sys = { path = "./sys", version = "0.1.0" } diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index 8b9a5531c1..a29580a552 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -15,6 +15,24 @@ MetaCall is a C plugin based library. This crate wraps the C library into Rust, curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh ``` +# Linking + +If your project uses MetaCall in a folder that is not in the system path, we encourage to use `metacall-sys` crate as a `build-dependecy`. By this way you will be able to locate and link MetaCall directly in your build system. For example: + +`Cargo.toml`: +```toml +[build-dependencies] +metacall-sys = { path = "./sys", version = "0.1.0" } +``` + +`build.rs`: +```rust +fn main() { + // Find MetaCall library + metacall_sys::build(); +} +``` + # Example `sum.ts` diff --git a/source/ports/rs_port/build.rs b/source/ports/rs_port/build.rs index 30c840a644..efb09e8f68 100644 --- a/source/ports/rs_port/build.rs +++ b/source/ports/rs_port/build.rs @@ -1,255 +1,4 @@ -use std::{ - env, fs, - path::{Path, PathBuf}, - vec, -}; - -// Search for MetaCall libraries in platform-specific locations -// Handle custom installation paths via environment variables -// Find configuration files recursively -// Provide helpful error messages when things aren't found - -/// Represents the install paths for a platform -struct InstallPath { - paths: Vec<PathBuf>, - names: Vec<&'static str>, -} - -/// Represents the match of a library when it's found -struct LibraryPath { - path: PathBuf, - library: String, -} - -/// Find files recursively in a directory matching a pattern -fn find_files_recursively<P: AsRef<Path>>( - root_dir: P, - filename: &str, - max_depth: Option<usize>, -) -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> { - let mut matches = Vec::new(); - let mut stack = vec![(root_dir.as_ref().to_path_buf(), 0)]; - - while let Some((current_dir, depth)) = stack.pop() { - if let Some(max) = max_depth { - if depth > max { - continue; - } - } - - if let Ok(entries) = fs::read_dir(¤t_dir) { - for entry in entries.flatten() { - let path = entry.path(); - - if path.is_file() { - // Simple filename comparison instead of regex - if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { - if file_name == filename { - matches.push(path); - } - } - } else if path.is_dir() { - stack.push((path, depth + 1)); - } - } - } - } - - Ok(matches) -} - -fn platform_install_paths() -> Result<InstallPath, Box<dyn std::error::Error>> { - if cfg!(target_os = "windows") { - // Defaults to path: C:\Users\Default\AppData\Local - let local_app_data = env::var("LOCALAPPDATA") - .unwrap_or_else(|_| String::from("C:\\Users\\Default\\AppData\\Local")); - - Ok(InstallPath { - paths: vec![PathBuf::from(local_app_data) - .join("MetaCall") - .join("metacall")], - names: vec!["metacall.lib"], - }) - } else if cfg!(target_os = "macos") { - Ok(InstallPath { - paths: vec![ - PathBuf::from("/opt/homebrew/lib/"), - PathBuf::from("/usr/local/lib/"), - ], - names: vec!["libmetacall.dylib"], - }) - } else if cfg!(target_os = "linux") { - Ok(InstallPath { - paths: vec![PathBuf::from("/usr/local/lib/"), PathBuf::from("/gnu/lib/")], - names: vec!["libmetacall.so"], - }) - } else { - Err(format!("Platform {} not supported", env::consts::OS).into()) - } -} - -/// Get search paths, checking for custom installation path first -fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { - // First, check if user specified a custom path - if let Ok(custom_path) = env::var("METACALL_INSTALL_PATH") { - // For custom paths, we need to search for any metacall library variant - return Ok(InstallPath { - paths: vec![PathBuf::from(custom_path)], - names: vec![ - "libmetacall.so", - "libmetacalld.so", - "libmetacall.dylib", - "libmetacalld.dylib", - "metacall.lib", - "metacalld.lib", - ], - }); - } - - // Fall back to platform-specific paths - platform_install_paths() -} - -/// Get the parent path and library name -fn get_parent_and_library(path: &Path) -> Option<(PathBuf, String)> { - let parent = path.parent()?.to_path_buf(); - - // Get the file stem (filename without extension) - let stem = path.file_stem()?.to_str()?; - - // Remove "lib" prefix if present - let cleaned_stem = stem.strip_prefix("lib").unwrap_or(stem).to_string(); - - Some((parent, cleaned_stem)) -} - -/// Find the MetaCall library -/// This orchestrates the search process -fn find_metacall_library() -> Result<LibraryPath, Box<dyn std::error::Error>> { - let search_config = get_search_config()?; - - // Search in each configured path - for search_path in &search_config.paths { - for name in &search_config.names { - // Search with no limit in depth - match find_files_recursively(search_path, name, None) { - Ok(files) if !files.is_empty() => { - let found_lib = fs::canonicalize(&files[0])?; - - match get_parent_and_library(&found_lib) { - Some((parent, name)) => { - return Ok(LibraryPath { - path: parent, - library: name, - }) - } - None => continue, - }; - } - Ok(_) => { - // No files found in this path, continue searching - continue; - } - Err(e) => { - eprintln!("Error searching in {}: {}", search_path.display(), e); - continue; - } - } - } - } - - // If we get here, library wasn't found - let search_paths: Vec<String> = search_config - .paths - .iter() - .map(|p| p.display().to_string()) - .collect(); - - Err(format!( - "MetaCall library not found. Searched in: {}. \ - If you have it installed elsewhere, set METACALL_INSTALL_PATH environment variable.", - search_paths.join(", ") - ) - .into()) -} - -fn define_library_search_path(env_var: &str, separator: &str, path: &Path) -> String { - // Get the current value of the env var, if any - let existing = env::var(env_var).unwrap_or_default(); - let path_str: String = String::from(path.to_str().unwrap()); - - // Append to it - let combined = if existing.is_empty() { - path_str - } else { - format!("{}{}{}", existing, separator, path_str) - }; - - format!("{}={}", env_var, combined) -} - fn main() { - // When running tests from CMake - if let Ok(val) = env::var("PROJECT_OUTPUT_DIR") { - // Link search path to build folder - println!("cargo:rustc-link-search=native={val}"); - - // Link against correct version of metacall - match env::var("CMAKE_BUILD_TYPE") { - Ok(val) => { - if val == "Debug" { - // Try to link the debug version when running tests - println!("cargo:rustc-link-lib=dylib=metacalld"); - } else { - println!("cargo:rustc-link-lib=dylib=metacall"); - } - } - Err(_) => { - println!("cargo:rustc-link-lib=dylib=metacall"); - } - } - } else { - // When building from Cargo, try to find MetaCall - match find_metacall_library() { - Ok(lib_path) => { - // Define linker flags - println!("cargo:rustc-link-search=native={}", lib_path.path.display()); - println!("cargo:rustc-link-lib=dylib={}", lib_path.library); - - // Set the runtime environment variable for finding the library during tests - #[cfg(target_os = "linux")] - const ENV_VAR: &str = "LD_LIBRARY_PATH"; - - #[cfg(target_os = "macos")] - const ENV_VAR: &str = "DYLD_LIBRARY_PATH"; - - #[cfg(target_os = "windows")] - const ENV_VAR: &str = "PATH"; - - #[cfg(target_os = "aix")] - const ENV_VAR: &str = "LIBPATH"; - - #[cfg(any(target_os = "linux", target_os = "macos", target_os = "aix"))] - const SEPARATOR: &str = ":"; - - #[cfg(target_os = "windows")] - const SEPARATOR: &str = ";"; - - println!( - "cargo:rustc-env={}", - define_library_search_path(ENV_VAR, SEPARATOR, &lib_path.path) - ); - } - Err(e) => { - // Print the error - eprintln!( - "Failed to find MetaCall library with: {e} \ - Still trying to link in case the library is in system paths" - ); - - // Still try to link in case the library is in system paths - println!("cargo:rustc-link-lib=dylib=metacall") - } - } - } + // Find MetaCall library + metacall_sys::build(); } diff --git a/source/ports/rs_port/sys/Cargo.toml b/source/ports/rs_port/sys/Cargo.toml new file mode 100644 index 0000000000..4e4b15ffa6 --- /dev/null +++ b/source/ports/rs_port/sys/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "metacall-sys" +version = "0.1.0" +repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" +edition = "2021" +license = "Apache-2.0" +description = "Crate for finding metacall library in the system." diff --git a/source/ports/rs_port/sys/src/lib.rs b/source/ports/rs_port/sys/src/lib.rs new file mode 100644 index 0000000000..02814c5323 --- /dev/null +++ b/source/ports/rs_port/sys/src/lib.rs @@ -0,0 +1,255 @@ +use std::{ + env, fs, + path::{Path, PathBuf}, + vec, +}; + +// Search for MetaCall libraries in platform-specific locations +// Handle custom installation paths via environment variables +// Find configuration files recursively +// Provide helpful error messages when things aren't found + +/// Represents the install paths for a platform +struct InstallPath { + paths: Vec<PathBuf>, + names: Vec<&'static str>, +} + +/// Represents the match of a library when it's found +struct LibraryPath { + path: PathBuf, + library: String, +} + +/// Find files recursively in a directory matching a pattern +fn find_files_recursively<P: AsRef<Path>>( + root_dir: P, + filename: &str, + max_depth: Option<usize>, +) -> Result<Vec<PathBuf>, Box<dyn std::error::Error>> { + let mut matches = Vec::new(); + let mut stack = vec![(root_dir.as_ref().to_path_buf(), 0)]; + + while let Some((current_dir, depth)) = stack.pop() { + if let Some(max) = max_depth { + if depth > max { + continue; + } + } + + if let Ok(entries) = fs::read_dir(¤t_dir) { + for entry in entries.flatten() { + let path = entry.path(); + + if path.is_file() { + // Simple filename comparison instead of regex + if let Some(file_name) = path.file_name().and_then(|n| n.to_str()) { + if file_name == filename { + matches.push(path); + } + } + } else if path.is_dir() { + stack.push((path, depth + 1)); + } + } + } + } + + Ok(matches) +} + +fn platform_install_paths() -> Result<InstallPath, Box<dyn std::error::Error>> { + if cfg!(target_os = "windows") { + // Defaults to path: C:\Users\Default\AppData\Local + let local_app_data = env::var("LOCALAPPDATA") + .unwrap_or_else(|_| String::from("C:\\Users\\Default\\AppData\\Local")); + + Ok(InstallPath { + paths: vec![PathBuf::from(local_app_data) + .join("MetaCall") + .join("metacall")], + names: vec!["metacall.lib"], + }) + } else if cfg!(target_os = "macos") { + Ok(InstallPath { + paths: vec![ + PathBuf::from("/opt/homebrew/lib/"), + PathBuf::from("/usr/local/lib/"), + ], + names: vec!["libmetacall.dylib"], + }) + } else if cfg!(target_os = "linux") { + Ok(InstallPath { + paths: vec![PathBuf::from("/usr/local/lib/"), PathBuf::from("/gnu/lib/")], + names: vec!["libmetacall.so"], + }) + } else { + Err(format!("Platform {} not supported", env::consts::OS).into()) + } +} + +/// Get search paths, checking for custom installation path first +fn get_search_config() -> Result<InstallPath, Box<dyn std::error::Error>> { + // First, check if user specified a custom path + if let Ok(custom_path) = env::var("METACALL_INSTALL_PATH") { + // For custom paths, we need to search for any metacall library variant + return Ok(InstallPath { + paths: vec![PathBuf::from(custom_path)], + names: vec![ + "libmetacall.so", + "libmetacalld.so", + "libmetacall.dylib", + "libmetacalld.dylib", + "metacall.lib", + "metacalld.lib", + ], + }); + } + + // Fall back to platform-specific paths + platform_install_paths() +} + +/// Get the parent path and library name +fn get_parent_and_library(path: &Path) -> Option<(PathBuf, String)> { + let parent = path.parent()?.to_path_buf(); + + // Get the file stem (filename without extension) + let stem = path.file_stem()?.to_str()?; + + // Remove "lib" prefix if present + let cleaned_stem = stem.strip_prefix("lib").unwrap_or(stem).to_string(); + + Some((parent, cleaned_stem)) +} + +/// Find the MetaCall library +/// This orchestrates the search process +fn find_metacall_library() -> Result<LibraryPath, Box<dyn std::error::Error>> { + let search_config = get_search_config()?; + + // Search in each configured path + for search_path in &search_config.paths { + for name in &search_config.names { + // Search with no limit in depth + match find_files_recursively(search_path, name, None) { + Ok(files) if !files.is_empty() => { + let found_lib = fs::canonicalize(&files[0])?; + + match get_parent_and_library(&found_lib) { + Some((parent, name)) => { + return Ok(LibraryPath { + path: parent, + library: name, + }) + } + None => continue, + }; + } + Ok(_) => { + // No files found in this path, continue searching + continue; + } + Err(e) => { + eprintln!("Error searching in {}: {}", search_path.display(), e); + continue; + } + } + } + } + + // If we get here, library wasn't found + let search_paths: Vec<String> = search_config + .paths + .iter() + .map(|p| p.display().to_string()) + .collect(); + + Err(format!( + "MetaCall library not found. Searched in: {}. \ + If you have it installed elsewhere, set METACALL_INSTALL_PATH environment variable.", + search_paths.join(", ") + ) + .into()) +} + +fn define_library_search_path(env_var: &str, separator: &str, path: &Path) -> String { + // Get the current value of the env var, if any + let existing = env::var(env_var).unwrap_or_default(); + let path_str: String = String::from(path.to_str().unwrap()); + + // Append to it + let combined = if existing.is_empty() { + path_str + } else { + format!("{}{}{}", existing, separator, path_str) + }; + + format!("{}={}", env_var, combined) +} + +pub fn build() { + // When running tests from CMake + if let Ok(val) = env::var("PROJECT_OUTPUT_DIR") { + // Link search path to build folder + println!("cargo:rustc-link-search=native={val}"); + + // Link against correct version of metacall + match env::var("CMAKE_BUILD_TYPE") { + Ok(val) => { + if val == "Debug" { + // Try to link the debug version when running tests + println!("cargo:rustc-link-lib=dylib=metacalld"); + } else { + println!("cargo:rustc-link-lib=dylib=metacall"); + } + } + Err(_) => { + println!("cargo:rustc-link-lib=dylib=metacall"); + } + } + } else { + // When building from Cargo, try to find MetaCall + match find_metacall_library() { + Ok(lib_path) => { + // Define linker flags + println!("cargo:rustc-link-search=native={}", lib_path.path.display()); + println!("cargo:rustc-link-lib=dylib={}", lib_path.library); + + // Set the runtime environment variable for finding the library during tests + #[cfg(target_os = "linux")] + const ENV_VAR: &str = "LD_LIBRARY_PATH"; + + #[cfg(target_os = "macos")] + const ENV_VAR: &str = "DYLD_LIBRARY_PATH"; + + #[cfg(target_os = "windows")] + const ENV_VAR: &str = "PATH"; + + #[cfg(target_os = "aix")] + const ENV_VAR: &str = "LIBPATH"; + + #[cfg(any(target_os = "linux", target_os = "macos", target_os = "aix"))] + const SEPARATOR: &str = ":"; + + #[cfg(target_os = "windows")] + const SEPARATOR: &str = ";"; + + println!( + "cargo:rustc-env={}", + define_library_search_path(ENV_VAR, SEPARATOR, &lib_path.path) + ); + } + Err(e) => { + // Print the error + eprintln!( + "Failed to find MetaCall library with: {e} \ + Still trying to link in case the library is in system paths" + ); + + // Still try to link in case the library is in system paths + println!("cargo:rustc-link-lib=dylib=metacall") + } + } + } +} diff --git a/source/ports/rs_port/upload.sh b/source/ports/rs_port/upload.sh index c85fac1475..4156acb04c 100644 --- a/source/ports/rs_port/upload.sh +++ b/source/ports/rs_port/upload.sh @@ -31,6 +31,8 @@ function publish() { } # Publish +cd sys +publish metacall-sys cd inline publish metacall-inline cd .. From 51884008ff573bfab69e5f2601e4dc105f0cfcda Mon Sep 17 00:00:00 2001 From: Fahd Ashour <fahd.fady212@gmail.com> Date: Tue, 16 Sep 2025 22:03:54 +0300 Subject: [PATCH 332/364] edit rs port readme and providing relatable links (#575) * edit rs port readme and providing relatable links * Update README.md --------- Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- source/ports/rs_port/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index a29580a552..d8cc3e2562 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -17,12 +17,12 @@ curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | # Linking -If your project uses MetaCall in a folder that is not in the system path, we encourage to use `metacall-sys` crate as a `build-dependecy`. By this way you will be able to locate and link MetaCall directly in your build system. For example: +If your project uses MetaCall in a folder that is not in the system path, we encourage to use [`metacall-sys`](https://crates.io/crates/metacall-sys) crate as a [`build-dependecy`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#build-dependencies). By this way you will be able to locate and link MetaCall directly in your build system. For example: `Cargo.toml`: ```toml [build-dependencies] -metacall-sys = { path = "./sys", version = "0.1.0" } +metacall-sys = "0.1.1" ``` `build.rs`: From 37fe7cfa563b343a2524582f4bf98e775c5f63db Mon Sep 17 00:00:00 2001 From: Fahd Ashour <fahd.fady212@gmail.com> Date: Tue, 16 Sep 2025 22:17:20 +0300 Subject: [PATCH 333/364] rust metacall-sys crate: enhance searching with RPATH handling for C Libs discovery across platforms (binary) and improve metacall-sys cargo (#576) * feat(rs metacall-sys): enhance searching with RPATH handling for library discovery across platforms (binary) * Update Cargo.toml * Update Cargo.toml * Update lib.rs --------- Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- source/ports/rs_port/sys/Cargo.toml | 12 +++++++-- source/ports/rs_port/sys/src/lib.rs | 42 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/sys/Cargo.toml b/source/ports/rs_port/sys/Cargo.toml index 4e4b15ffa6..99378eac46 100644 --- a/source/ports/rs_port/sys/Cargo.toml +++ b/source/ports/rs_port/sys/Cargo.toml @@ -1,7 +1,15 @@ [package] name = "metacall-sys" -version = "0.1.0" -repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" +version = "0.1.1" +repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port/sys" +keywords = ["ffi", "bindings", "metacall"] edition = "2021" license = "Apache-2.0" description = "Crate for finding metacall library in the system." + +[lib] +crate-type = ["lib"] +doctest = false +edition = "2021" +name = "metacall_sys" +path = "src/lib.rs" diff --git a/source/ports/rs_port/sys/src/lib.rs b/source/ports/rs_port/sys/src/lib.rs index 02814c5323..f33176aafc 100644 --- a/source/ports/rs_port/sys/src/lib.rs +++ b/source/ports/rs_port/sys/src/lib.rs @@ -188,6 +188,45 @@ fn define_library_search_path(env_var: &str, separator: &str, path: &Path) -> St format!("{}={}", env_var, combined) } +/// Set RPATH for runtime library discovery +/// This binaries work outside cargo +fn set_rpath(lib_path: &Path) { + let path_str = lib_path.to_str().unwrap(); + + #[cfg(target_os = "linux")] + { + // On Linux, use RPATH with $ORIGIN for relocatable binaries + println!("cargo:rustc-link-arg=-Wl,-rpath,{}", path_str); + // Also set a backup rpath relative to the executable location + println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN"); + println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/../lib"); + } + + #[cfg(target_os = "macos")] + { + // On macOS, use @rpath and @loader_path + println!("cargo:rustc-link-arg=-Wl,-rpath,{}", path_str); + // Also set loader-relative paths for relocatable binaries + println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path"); + println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/../lib"); + } + + #[cfg(target_os = "aix")] + { + // Add default system library paths to avoid breaking standard lookup + println!("cargo:rustc-link-arg=-Wl,-blibpath:{}:/usr/lib:/lib", path_str); + } + + #[cfg(target_os = "windows")] + { + // Windows doesn't use RPATH, but we can inform the user + println!( + "cargo:warning=On Windows, make sure {} is in your PATH or next to your executable", + path_str + ); + } +} + pub fn build() { // When running tests from CMake if let Ok(val) = env::var("PROJECT_OUTPUT_DIR") { @@ -216,6 +255,9 @@ pub fn build() { println!("cargo:rustc-link-search=native={}", lib_path.path.display()); println!("cargo:rustc-link-lib=dylib={}", lib_path.library); + // Set RPATH so the binary can find libraries at runtime + set_rpath(&lib_path.path); + // Set the runtime environment variable for finding the library during tests #[cfg(target_os = "linux")] const ENV_VAR: &str = "LD_LIBRARY_PATH"; From b50d11ca47001d738cd5587d7d9551d6ed779d61 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 16 Sep 2025 21:43:41 +0200 Subject: [PATCH 334/364] Trying windows rust test again. --- .github/workflows/release-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 528eda6b75..ff564a74e6 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # TODO: , windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Check out the repo uses: actions/checkout@v4 From b77ae9488e498f4749bf3c5cf00cdc05c7dc4cc7 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 16 Sep 2025 21:45:37 +0200 Subject: [PATCH 335/364] Improve rust ci. --- .github/workflows/release-rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index ff564a74e6..fcfd917dc0 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -6,6 +6,7 @@ on: push: branches: [ master, develop ] paths: + - '.github/workflows/release-rust.yml' - 'source/ports/rs_port/**' concurrency: From 3f1c5d05962ab93bd29edf3a01c3ae979e050915 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 16 Sep 2025 21:59:15 +0200 Subject: [PATCH 336/364] Remove windows. --- .github/workflows/release-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index fcfd917dc0..9ef5e2ec1c 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] # TODO: , windows-latest] steps: - name: Check out the repo uses: actions/checkout@v4 From 4d095b291b9caa5d7000acb29854f313ceb918c8 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 17 Sep 2025 21:36:24 +0200 Subject: [PATCH 337/364] Corrected versions of rs_port. --- source/ports/rs_port/Cargo.toml | 4 ++-- source/ports/rs_port/README.md | 2 +- source/ports/rs_port/sys/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index 781bafb191..c0e51713a2 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.5.1" +version = "0.5.2" [lib] crate-type = ["lib"] @@ -20,4 +20,4 @@ path = "src/lib.rs" metacall-inline = { path = "./inline", version = "0.2.0" } [build-dependencies] -metacall-sys = { path = "./sys", version = "0.1.0" } +metacall-sys = { path = "./sys", version = "0.1.2" } diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index d8cc3e2562..53edd0936d 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -22,7 +22,7 @@ If your project uses MetaCall in a folder that is not in the system path, we enc `Cargo.toml`: ```toml [build-dependencies] -metacall-sys = "0.1.1" +metacall-sys = "0.1.2" ``` `build.rs`: diff --git a/source/ports/rs_port/sys/Cargo.toml b/source/ports/rs_port/sys/Cargo.toml index 99378eac46..398dcaf52d 100644 --- a/source/ports/rs_port/sys/Cargo.toml +++ b/source/ports/rs_port/sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "metacall-sys" -version = "0.1.1" +version = "0.1.2" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port/sys" keywords = ["ffi", "bindings", "metacall"] edition = "2021" From c769cc88f24fd10b56ef5dd64b020a8e0c487a32 Mon Sep 17 00:00:00 2001 From: Thomas <thomas.gummerson@piql.com> Date: Thu, 18 Sep 2025 20:15:11 +0200 Subject: [PATCH 338/364] Replace relevant EXPECT_EQ / ASSERT_EQ with EXPECT_STREQ / ASSERT_STREQ (#579) --- .../tests/adt_trie_test/source/adt_trie_test.cpp | 4 ++-- source/tests/detour_test/source/detour_test.cpp | 2 +- .../tests/dynlink_test/source/dynlink_test.cpp | 6 +++--- .../environment_test/source/environment_test.cpp | 12 ++++++------ source/tests/log_test/source/log_test.cpp | 2 +- .../metacall_configuration_exec_path_test.cpp | 2 +- ...all_configuration_exec_relative_path_test.cpp | 2 +- .../metacall_cs_test/source/metacall_cs_test.cpp | 2 +- .../source/metacall_distributable_test.cpp | 10 +++++----- .../source/metacall_ducktype_test.cpp | 8 ++++---- .../source/metacall_function_test.cpp | 2 +- .../source/metacall_handle_get_test.cpp | 4 ++-- .../source/metacall_java_test.cpp | 4 ++-- .../source/metacall_load_configuration_test.cpp | 6 +++--- .../source/metacall_map_await_test.cpp | 2 +- .../source/metacall_map_test.cpp | 2 +- .../source/metacall_node_exception_test.cpp | 4 ++-- .../source/metacall_node_extension_test.cpp | 2 +- .../source/metacall_node_port_test.cpp | 2 +- .../source/metacall_python_dict_test.cpp | 6 +++--- .../source/metacall_python_exception_test.cpp | 8 ++++---- .../source/metacall_python_loader_port_test.cpp | 4 ++-- .../source/metacall_python_open_test.cpp | 4 ++-- .../source/metacall_python_port_test.cpp | 2 +- .../source/metacall_return_monad_test.cpp | 2 +- .../metacall_ruby_parser_integration_test.cpp | 2 +- .../metacall_rust_load_from_package_dep_test.cpp | 2 +- .../metacall_rust_load_from_package_test.cpp | 2 +- .../source/metacall_rust_test.cpp | 4 ++-- .../tests/metacall_test/source/metacall_test.cpp | 12 ++++++------ .../metacall_test/source/metacall_test_split.cpp | 10 +++++----- .../source/metacall_typescript_tsx_test.cpp | 2 +- .../source/metacall_version_test.cpp | 2 +- .../source/reflect_object_class_test.cpp | 4 ++-- source/tests/serial_test/source/serial_test.cpp | 16 ++++++++-------- 35 files changed, 80 insertions(+), 80 deletions(-) diff --git a/source/tests/adt_trie_test/source/adt_trie_test.cpp b/source/tests/adt_trie_test/source/adt_trie_test.cpp index cb1edbf28c..1d9541dc03 100644 --- a/source/tests/adt_trie_test/source/adt_trie_test.cpp +++ b/source/tests/adt_trie_test/source/adt_trie_test.cpp @@ -123,7 +123,7 @@ TEST_F(adt_trie_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "%" PRIuS " -> %s", iterator, value_str); - EXPECT_EQ((int)0, (int)strcmp(values_str[keys_size - iterator - 1], value_str)); + EXPECT_STREQ(values_str[keys_size - iterator - 1], value_str); vector_pop_back(keys_copy); } @@ -144,7 +144,7 @@ TEST_F(adt_trie_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "%s/", key_str); - EXPECT_EQ((int)0, (int)strcmp(keys_str[iterator], key_str)); + EXPECT_STREQ(keys_str[iterator], key_str); } vector_pop_back(keys); diff --git a/source/tests/detour_test/source/detour_test.cpp b/source/tests/detour_test/source/detour_test.cpp index 15b56ec588..4882867e83 100644 --- a/source/tests/detour_test/source/detour_test.cpp +++ b/source/tests/detour_test/source/detour_test.cpp @@ -111,7 +111,7 @@ TEST_F(detour_test, DefaultConstructor) ASSERT_NE((detour)NULL, (detour)d); - EXPECT_EQ((int)0, (int)strcmp(name, detour_name(d))); + EXPECT_STREQ(name, detour_name(d)); /* Load detour of detour library */ handle = detour_load_file(d, NULL); diff --git a/source/tests/dynlink_test/source/dynlink_test.cpp b/source/tests/dynlink_test/source/dynlink_test.cpp index 8bebf45267..0119510cab 100644 --- a/source/tests/dynlink_test/source/dynlink_test.cpp +++ b/source/tests/dynlink_test/source/dynlink_test.cpp @@ -101,7 +101,7 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_path(handle)); - EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + EXPECT_STREQ(library_name, dynlink_get_name(handle)); if (handle != NULL) { @@ -146,8 +146,8 @@ TEST_F(dynlink_test, DefaultConstructor) log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file name: %s", dynlink_get_path(handle)); log_write("metacall", LOG_LEVEL_DEBUG, "Dynamic linked shared object file: %s", dynlink_get_name(handle)); - EXPECT_EQ((int)0, (int)strcmp(absolute_path, dynlink_get_path(handle))); - EXPECT_EQ((int)0, (int)strcmp(library_name, dynlink_get_name(handle))); + EXPECT_STREQ(absolute_path, dynlink_get_path(handle)); + EXPECT_STREQ(library_name, dynlink_get_name(handle)); if (handle != NULL) { diff --git a/source/tests/environment_test/source/environment_test.cpp b/source/tests/environment_test/source/environment_test.cpp index dee6341416..576dfb28aa 100644 --- a/source/tests/environment_test/source/environment_test.cpp +++ b/source/tests/environment_test/source/environment_test.cpp @@ -39,7 +39,7 @@ TEST_F(environment_test, variable_text) ASSERT_NE((const char *)NULL, (const char *)variable_text); - EXPECT_EQ((int)0, (int)strcmp(variable_text, "abcd")); + EXPECT_STREQ(variable_text, "abcd"); environment_variable_destroy(variable_text); } @@ -52,7 +52,7 @@ TEST_F(environment_test, variable_text_default) ASSERT_NE((const char *)NULL, (const char *)variable_text); - EXPECT_EQ((int)0, (int)strcmp(variable_text, "default")); + EXPECT_STREQ(variable_text, "default"); environment_variable_destroy(variable_text); } @@ -63,7 +63,7 @@ TEST_F(environment_test, variable_static) const char *variable_text_static = environment_variable_get(variable_text_name, "default"); - EXPECT_EQ((int)0, (int)strcmp(variable_text_static, "abcd")); + EXPECT_STREQ(variable_text_static, "abcd"); } TEST_F(environment_test, variable_path) @@ -74,7 +74,7 @@ TEST_F(environment_test, variable_path) ASSERT_NE((const char *)NULL, (const char *)variable_path); - EXPECT_EQ((int)0, (int)strcmp(variable_path, "abcd" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR)); + EXPECT_STREQ(variable_path, "abcd" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR); environment_variable_path_destroy(variable_path); } @@ -87,7 +87,7 @@ TEST_F(environment_test, variable_path_default) ASSERT_NE((const char *)NULL, (const char *)variable_path); - EXPECT_EQ((int)0, (int)strcmp(variable_path, "default_path" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR)); + EXPECT_STREQ(variable_path, "default_path" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR); environment_variable_path_destroy(variable_path); } @@ -100,7 +100,7 @@ TEST_F(environment_test, variable_path_sanitized) ASSERT_NE((const char *)NULL, (const char *)variable_path); - EXPECT_EQ((int)0, (int)strcmp(variable_path, "abcd" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR)); + EXPECT_STREQ(variable_path, "abcd" ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR); environment_variable_path_destroy(variable_path); } diff --git a/source/tests/log_test/source/log_test.cpp b/source/tests/log_test/source/log_test.cpp index 2a1505e715..3e1121bc7a 100644 --- a/source/tests/log_test/source/log_test.cpp +++ b/source/tests/log_test/source/log_test.cpp @@ -85,7 +85,7 @@ TEST_F(log_test, DefaultConstructor) unsigned int value = *((unsigned int *)value_ptr); - EXPECT_EQ((int)0, (int)strcmp(log_name_list[value].name, key)); + EXPECT_STREQ(log_name_list[value].name, key); } EXPECT_EQ((int)log_map_destroy(map), (int)0); diff --git a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp index 7458311c05..0219e58aaf 100644 --- a/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp +++ b/source/tests/metacall_configuration_exec_path_test/source/metacall_configuration_exec_path_test.cpp @@ -49,7 +49,7 @@ TEST_F(metacall_configuration_exec_path_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Python hello_world: test")); + EXPECT_STREQ(metacall_value_to_string(ret), "Python hello_world: test"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp b/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp index 9257ec9187..cd56aa446e 100644 --- a/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp +++ b/source/tests/metacall_configuration_exec_relative_path_test/source/metacall_configuration_exec_relative_path_test.cpp @@ -49,7 +49,7 @@ TEST_F(metacall_configuration_exec_relative_path_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Python hello_world: test")); + EXPECT_STREQ(metacall_value_to_string(ret), "Python hello_world: test"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_cs_test/source/metacall_cs_test.cpp b/source/tests/metacall_cs_test/source/metacall_cs_test.cpp index 769382b155..799b24ec00 100644 --- a/source/tests/metacall_cs_test/source/metacall_cs_test.cpp +++ b/source/tests/metacall_cs_test/source/metacall_cs_test.cpp @@ -81,7 +81,7 @@ TEST_F(metacall_cs_test, Concat) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp((const char *)metacall_value_to_string(ret), "Hello World")); + EXPECT_STREQ((const char *)metacall_value_to_string(ret), "Hello World"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp index 59138c84e6..30b2033cb5 100644 --- a/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp +++ b/source/tests/metacall_distributable_test/source/metacall_distributable_test.cpp @@ -106,7 +106,7 @@ TEST_F(metacall_distributable_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello Universe")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello Universe"); metacall_value_destroy(ret); } @@ -143,7 +143,7 @@ TEST_F(metacall_distributable_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello meta-programmer!")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello meta-programmer!"); metacall_value_destroy(ret); @@ -193,7 +193,7 @@ TEST_F(metacall_distributable_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "abcdef")); + EXPECT_STREQ(metacall_value_to_string(ret), "abcdef"); metacall_value_destroy(ret); @@ -201,7 +201,7 @@ TEST_F(metacall_distributable_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "efg")); + EXPECT_STREQ(metacall_value_to_string(ret), "efg"); metacall_value_destroy(ret); } @@ -246,7 +246,7 @@ TEST_F(metacall_distributable_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello World")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello World"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp index b9555204a8..0b8e2e2e84 100644 --- a/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp +++ b/source/tests/metacall_ducktype_test/source/metacall_ducktype_test.cpp @@ -123,7 +123,7 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_cast_string(&ret), "Hello Universe")); + EXPECT_STREQ(metacall_value_cast_string(&ret), "Hello Universe"); metacall_value_destroy(ret); @@ -209,7 +209,7 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_cast_string(&ret), "PepicoWalas")); + EXPECT_STREQ(metacall_value_cast_string(&ret), "PepicoWalas"); metacall_value_destroy(ret); metacall_value_destroy(args[0]); @@ -260,7 +260,7 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_cast_string(&ret), "Hello meta-programmer!")); + EXPECT_STREQ(metacall_value_cast_string(&ret), "Hello meta-programmer!"); metacall_value_destroy(ret); @@ -344,7 +344,7 @@ TEST_F(metacall_ducktype_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_cast_string(&ret), "abcdef")); + EXPECT_STREQ(metacall_value_cast_string(&ret), "abcdef"); metacall_value_destroy(ret); diff --git a/source/tests/metacall_function_test/source/metacall_function_test.cpp b/source/tests/metacall_function_test/source/metacall_function_test.cpp index 950bf6b1a5..8b837151a1 100644 --- a/source/tests/metacall_function_test/source/metacall_function_test.cpp +++ b/source/tests/metacall_function_test/source/metacall_function_test.cpp @@ -221,7 +221,7 @@ TEST_F(metacall_function_test, DefaultConstructor) EXPECT_EQ((enum metacall_value_id)METACALL_STRING, (enum metacall_value_id)metacall_value_id(ret)); - EXPECT_EQ((int)0, (int)strcmp("hello world", metacall_value_to_string(ret))); + EXPECT_STREQ("hello world", metacall_value_to_string(ret)); metacall_value_destroy(ret); diff --git a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp index fff68579bc..2e80130384 100644 --- a/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp +++ b/source/tests/metacall_handle_get_test/source/metacall_handle_get_test.cpp @@ -113,7 +113,7 @@ TEST_F(metacall_handle_get_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello from s1")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello from s1"); metacall_value_destroy(ret); @@ -135,7 +135,7 @@ TEST_F(metacall_handle_get_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello from s2")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello from s2"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_java_test/source/metacall_java_test.cpp b/source/tests/metacall_java_test/source/metacall_java_test.cpp index 996ff70cad..5eb6141cc5 100644 --- a/source/tests/metacall_java_test/source/metacall_java_test.cpp +++ b/source/tests/metacall_java_test/source/metacall_java_test.cpp @@ -102,8 +102,8 @@ TEST_F(metacall_java_test, DefaultConstructor) { //GET ARRAYS void *str_test = metacall_class_static_get(myclass, "STRING_TEST_Arr"); void **str_test_arr = metacall_value_to_array(str_test); - ASSERT_EQ((int)0, (int)strcmp(metacall_value_to_string(str_test_arr[0]), "Hello")); - ASSERT_EQ((int)0, (int)strcmp(metacall_value_to_string(str_test_arr[1]), "world")); + ASSERT_STREQ(metacall_value_to_string(str_test_arr[0]), "Hello"); + ASSERT_STREQ(metacall_value_to_string(str_test_arr[1]), "world"); metacall_value_destroy(str_test); void *class_test = metacall_class_static_get(myclass, "CLASS_TEST_Arr"); diff --git a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp index 5562783fad..21657b9c8e 100644 --- a/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp +++ b/source/tests/metacall_load_configuration_test/source/metacall_load_configuration_test.cpp @@ -108,7 +108,7 @@ TEST_F(metacall_load_configuration_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello Universe")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello Universe"); metacall_value_destroy(ret); @@ -192,7 +192,7 @@ TEST_F(metacall_load_configuration_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello Universe")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello Universe"); metacall_value_destroy(ret); } @@ -225,7 +225,7 @@ TEST_F(metacall_load_configuration_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello meta-programmer!")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello meta-programmer!"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp index 7c68df2298..d3f1d4eb76 100644 --- a/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp +++ b/source/tests/metacall_map_await_test/source/metacall_map_await_test.cpp @@ -96,7 +96,7 @@ static void *hello_world_await_ok(void *result, void *data) fflush(stdout); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(result), "Hello World")); + EXPECT_STREQ(metacall_value_to_string(result), "Hello World"); ++success_callbacks; diff --git a/source/tests/metacall_map_test/source/metacall_map_test.cpp b/source/tests/metacall_map_test/source/metacall_map_test.cpp index 5f98a5a5f2..84d641f4d0 100644 --- a/source/tests/metacall_map_test/source/metacall_map_test.cpp +++ b/source/tests/metacall_map_test/source/metacall_map_test.cpp @@ -201,7 +201,7 @@ TEST_F(metacall_map_test, DefaultConstructor) ASSERT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "ACK: OK!")); + EXPECT_STREQ(metacall_value_to_string(ret), "ACK: OK!"); metacall_value_destroy(ret); */ diff --git a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp index 9de8102772..fd1c3b2e26 100644 --- a/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp +++ b/source/tests/metacall_node_exception_test/source/metacall_node_exception_test.cpp @@ -53,7 +53,7 @@ TEST_F(metacall_node_exception_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_error_from_value(ret, &ex)); - EXPECT_EQ((int)0, (int)strcmp("Yeet", ex.message)); + EXPECT_STREQ("Yeet", ex.message); metacall_value_destroy(ret); @@ -61,7 +61,7 @@ TEST_F(metacall_node_exception_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_error_from_value(ret, &ex)); - EXPECT_EQ((int)0, (int)strcmp("YeetThrown", ex.message)); + EXPECT_STREQ("YeetThrown", ex.message); metacall_value_destroy(ret); diff --git a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp index 4e09864856..ef5fd6caf7 100644 --- a/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp +++ b/source/tests/metacall_node_extension_test/source/metacall_node_extension_test.cpp @@ -52,7 +52,7 @@ TEST_F(metacall_node_extension_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp("world", metacall_value_to_string(ret))); + EXPECT_STREQ("world", metacall_value_to_string(ret)); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp index 081bf83375..ab1d6df112 100644 --- a/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp +++ b/source/tests/metacall_node_port_test/source/metacall_node_port_test.cpp @@ -59,7 +59,7 @@ TEST_F(metacall_node_port_test, DefaultConstructor) struct await_data_type *await_data = static_cast<struct await_data_type *>(data); std::unique_lock<std::mutex> lock(await_data->m); const char *str = metacall_value_to_string(v); - EXPECT_EQ((int)0, (int)strcmp(str, "Tests passed without errors")); + EXPECT_STREQ(str, "Tests passed without errors"); await_data->c.notify_one(); return NULL; }; diff --git a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp index cab84c549b..f5db7671ce 100644 --- a/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp +++ b/source/tests/metacall_python_dict_test/source/metacall_python_dict_test.cpp @@ -61,7 +61,7 @@ TEST_F(metacall_python_dict_test, DefaultConstructor) } else if (strcmp(key, "hello") == 0) { - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(array[1]), "world")); + EXPECT_STREQ(metacall_value_to_string(array[1]), "world"); } else if (strcmp(key, "efg") == 0) { @@ -134,14 +134,14 @@ TEST_F(metacall_python_dict_test, DefaultConstructor) char *ret_key0 = metacall_value_to_string(ret_pair0[0]); long ret_value0 = metacall_value_to_long(ret_pair0[1]); - EXPECT_EQ((int)0, (int)strcmp(ret_key0, "new")); + EXPECT_STREQ(ret_key0, "new"); EXPECT_EQ((long)5, (long)ret_value0); void **ret_pair1 = metacall_value_to_array(ret_map[1]); char *ret_key1 = metacall_value_to_string(ret_pair1[0]); long ret_value1 = metacall_value_to_long(ret_pair1[1]); - EXPECT_EQ((int)0, (int)strcmp(ret_key1, "whatever")); + EXPECT_STREQ(ret_key1, "whatever"); EXPECT_EQ((long)7, (long)ret_value1); metacall_value_destroy(ret); diff --git a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp index 8d902ced59..14ec35d757 100644 --- a/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp +++ b/source/tests/metacall_python_exception_test/source/metacall_python_exception_test.cpp @@ -54,9 +54,9 @@ TEST_F(metacall_python_exception_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_error_from_value(ret, &ex)); - EXPECT_EQ((int)0, (int)strcmp("yeet", ex.message)); + EXPECT_STREQ("yeet", ex.message); - EXPECT_EQ((int)0, (int)strcmp("TypeError", ex.label)); + EXPECT_STREQ("TypeError", ex.label); metacall_value_destroy(ret); @@ -64,9 +64,9 @@ TEST_F(metacall_python_exception_test, DefaultConstructor) EXPECT_EQ((int)0, (int)metacall_error_from_value(ret, &ex)); - EXPECT_EQ((int)0, (int)strcmp("asdf", ex.message)); + EXPECT_STREQ("asdf", ex.message); - EXPECT_EQ((int)0, (int)strcmp("BaseException", ex.label)); + EXPECT_STREQ("BaseException", ex.label); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp index 106797f36e..ffa9043263 100644 --- a/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp +++ b/source/tests/metacall_python_loader_port_test/source/metacall_python_loader_port_test.cpp @@ -37,7 +37,7 @@ void *callback_host(size_t argc, void *args[], void *data) printf("Host callback: %s\n", str); - EXPECT_EQ((int)0, (int)strcmp(str, "some text")); + EXPECT_STREQ(str, "some text"); return metacall_value_create_int(25); } @@ -86,7 +86,7 @@ TEST_F(metacall_python_loader_port_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_cast_string(&ret), "Hello meta-programmer!")); + EXPECT_STREQ(metacall_value_cast_string(&ret), "Hello meta-programmer!"); metacall_value_destroy(ret); diff --git a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp index 3eda60fe5c..0174eb61f5 100644 --- a/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp +++ b/source/tests/metacall_python_open_test/source/metacall_python_open_test.cpp @@ -49,7 +49,7 @@ TEST_F(metacall_python_open_test, DefaultConstructor) const char *result = metacall_value_to_string(ret); - EXPECT_NE((int)0, (int)strcmp(result, "<html><head></head><body>Error</body></html>")); + EXPECT_STRNE(result, "<html><head></head><body>Error</body></html>"); metacall_value_destroy(ret); @@ -65,7 +65,7 @@ TEST_F(metacall_python_open_test, DefaultConstructor) const char *token = metacall_value_to_string(ret); - EXPECT_EQ((int)0, (int)strcmp(token, "eyJhbGciOiJIUzI1NiJ9.SGVsbG8gV29ybGQ.Iyc6PWVbK538giVdaInTeIO3jvvC1Vuy_czZUzoRRec")); + EXPECT_STREQ(token, "eyJhbGciOiJIUzI1NiJ9.SGVsbG8gV29ybGQ.Iyc6PWVbK538giVdaInTeIO3jvvC1Vuy_czZUzoRRec"); metacall_value_destroy(args[0]); diff --git a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp index a86f7f111a..7ebb7c236e 100644 --- a/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp +++ b/source/tests/metacall_python_port_test/source/metacall_python_port_test.cpp @@ -46,7 +46,7 @@ TEST_F(metacall_python_port_test, DefaultConstructor) void *ret = metacallv("main", metacall_null_args); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Tests passed without errors")); + EXPECT_STREQ(metacall_value_to_string(ret), "Tests passed without errors"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp index dfcf6e70ca..5194d3ab86 100644 --- a/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp +++ b/source/tests/metacall_return_monad_test/source/metacall_return_monad_test.cpp @@ -78,7 +78,7 @@ TEST_F(metacall_return_monad_test, DefaultConstructor) EXPECT_EQ((enum metacall_value_id)METACALL_STRING, (enum metacall_value_id)metacall_value_id(ret)); - EXPECT_EQ((int)0, (int)strcmp("asd", metacall_value_to_string(ret))); + EXPECT_STREQ("asd", metacall_value_to_string(ret)); value_str = metacall_serialize(metacall_serial(), ret, &size, allocator); diff --git a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp index b269fd9c21..0e38e65ac9 100644 --- a/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp +++ b/source/tests/metacall_ruby_parser_integration_test/source/metacall_ruby_parser_integration_test.cpp @@ -74,7 +74,7 @@ TEST_F(metacall_ruby_parser_integration_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "call")); + EXPECT_STREQ(metacall_value_to_string(ret), "call"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp index bc2d7930c8..565883bc28 100644 --- a/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp +++ b/source/tests/metacall_rust_load_from_package_dep_test/source/metacall_rust_load_from_package_dep_test.cpp @@ -40,7 +40,7 @@ TEST_F(metacall_rust_load_from_package_dep_test, DefaultConstructor) const char *text = "{\"name\": \"John Doe\"}"; void *ret = metacall("compile", text); ASSERT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "\"John Doe\"")); + EXPECT_STREQ(metacall_value_to_string(ret), "\"John Doe\""); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp index 37f6394bbb..cfb3b49957 100644 --- a/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp +++ b/source/tests/metacall_rust_load_from_package_test/source/metacall_rust_load_from_package_test.cpp @@ -93,7 +93,7 @@ TEST_F(metacall_rust_load_from_mem_test, DefaultConstructor) // void *ret = metacall("string_len", "Test String"); // EXPECT_EQ((long)11, (long)metacall_value_to_long(ret)); // ret = metacall("new_string", 123); - // EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "get number 123")); + // EXPECT_STREQ(metacall_value_to_string(ret), "get number 123"); // metacall_value_destroy(ret); // } diff --git a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp index 85b9253da9..55736c73e2 100644 --- a/source/tests/metacall_rust_test/source/metacall_rust_test.cpp +++ b/source/tests/metacall_rust_test/source/metacall_rust_test.cpp @@ -94,13 +94,13 @@ TEST_F(metacall_rust_test, DefaultConstructor) // void *ret = metacall("string_len", "Test String"); // EXPECT_EQ((long)11, (long)metacall_value_to_long(ret)); // ret = metacall("new_string", 123); - // EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "get number 123")); + // EXPECT_STREQ(metacall_value_to_string(ret), "get number 123"); // metacall_value_destroy(ret); // } { void *ret = metacall("str_slice", "hellow"); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "hel")); + EXPECT_STREQ(metacall_value_to_string(ret), "hel"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_test/source/metacall_test.cpp b/source/tests/metacall_test/source/metacall_test.cpp index 3f250b3cd3..ddbf10c03b 100644 --- a/source/tests/metacall_test/source/metacall_test.cpp +++ b/source/tests/metacall_test/source/metacall_test.cpp @@ -216,7 +216,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello Universe")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello Universe"); metacall_value_destroy(ret); @@ -276,7 +276,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), web_content)); + EXPECT_STREQ(metacall_value_to_string(ret), web_content); metacall_value_destroy(ret); @@ -353,7 +353,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello meta-programmer!")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello meta-programmer!"); metacall_value_destroy(ret); @@ -420,7 +420,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "abcdef")); + EXPECT_STREQ(metacall_value_to_string(ret), "abcdef"); metacall_value_destroy(ret); @@ -428,7 +428,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "efg")); + EXPECT_STREQ(metacall_value_to_string(ret), "efg"); metacall_value_destroy(ret); } @@ -473,7 +473,7 @@ TEST_F(metacall_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "Hello World")); + EXPECT_STREQ(metacall_value_to_string(ret), "Hello World"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_test/source/metacall_test_split.cpp b/source/tests/metacall_test/source/metacall_test_split.cpp index 49d0fc8f18..0a19bce6a1 100644 --- a/source/tests/metacall_test/source/metacall_test_split.cpp +++ b/source/tests/metacall_test/source/metacall_test_split.cpp @@ -131,7 +131,7 @@ TEST_F(metacall_loader_test, Python) EXPECT_NE((value)NULL, (value)ret); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello Universe")); + EXPECT_STREQ(value_to_string(ret), "Hello Universe"); value_destroy(ret); } @@ -167,7 +167,7 @@ TEST_F(metacall_loader_test, Ruby) EXPECT_NE((value)NULL, (value)ret); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello meta-programmer!")); + EXPECT_STREQ(value_to_string(ret), "Hello meta-programmer!"); value_destroy(ret); } @@ -207,7 +207,7 @@ TEST_F(metacall_loader_test, JavascriptV8) EXPECT_NE((value)NULL, (value)ret); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(ret), "abcdef")); + EXPECT_STREQ(value_to_string(ret), "abcdef"); value_destroy(ret); } @@ -251,7 +251,7 @@ TEST_F(metacall_loader_test, Mock) EXPECT_NE((value)NULL, (value)ret); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello World")); + EXPECT_STREQ(value_to_string(ret), "Hello World"); value_destroy(ret); @@ -259,7 +259,7 @@ TEST_F(metacall_loader_test, Mock) EXPECT_NE((value)NULL, (value)ret); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello World")); + EXPECT_STREQ(value_to_string(ret), "Hello World"); value_destroy(ret); } diff --git a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp index 16404c17da..52a406737c 100644 --- a/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp +++ b/source/tests/metacall_typescript_tsx_test/source/metacall_typescript_tsx_test.cpp @@ -52,7 +52,7 @@ TEST_F(metacall_tsx_test, DefaultConstructor) EXPECT_NE((void *)NULL, (void *)ret); - EXPECT_EQ((int)0, (int)strcmp(metacall_value_to_string(ret), "<h1 data-reactroot=\"\">Hello metaprogrammer</h1>")); + EXPECT_STREQ(metacall_value_to_string(ret), "<h1 data-reactroot=\"\">Hello metaprogrammer</h1>"); metacall_value_destroy(ret); } diff --git a/source/tests/metacall_version_test/source/metacall_version_test.cpp b/source/tests/metacall_version_test/source/metacall_version_test.cpp index b7023840b0..ef703c79a3 100644 --- a/source/tests/metacall_version_test/source/metacall_version_test.cpp +++ b/source/tests/metacall_version_test/source/metacall_version_test.cpp @@ -31,7 +31,7 @@ TEST_F(metacall_version_test, DefaultConstructor) { metacall_print_info(); - ASSERT_EQ((int)0, (int)strcmp(METACALL_VERSION, metacall_version_str())); + ASSERT_STREQ(METACALL_VERSION, metacall_version_str()); /* TODO: Test other version functions */ } diff --git a/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp b/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp index a0d7e0cc24..1abd68347d 100644 --- a/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp +++ b/source/tests/reflect_object_class_test/source/reflect_object_class_test.cpp @@ -500,7 +500,7 @@ TEST_F(reflect_object_class_test, DefaultConstructor) ASSERT_NE((value)NULL, (value)ret); - ASSERT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello World")); + ASSERT_STREQ(value_to_string(ret), "Hello World"); value_type_destroy(ret); @@ -557,7 +557,7 @@ TEST_F(reflect_object_class_test, DefaultConstructor) ASSERT_NE((value)NULL, (value)ret); - ASSERT_EQ((int)0, (int)strcmp(value_to_string(ret), "Hello World")); + ASSERT_STREQ(value_to_string(ret), "Hello World"); value_type_destroy(ret); diff --git a/source/tests/serial_test/source/serial_test.cpp b/source/tests/serial_test/source/serial_test.cpp index 921a417bb3..bf2d158acb 100644 --- a/source/tests/serial_test/source/serial_test.cpp +++ b/source/tests/serial_test/source/serial_test.cpp @@ -35,9 +35,9 @@ class serial_test : public testing::Test ASSERT_NE((serial)NULL, (serial)s); - EXPECT_EQ((int)0, (int)strcmp(name, serial_name(s))); + EXPECT_STREQ(name, serial_name(s)); - EXPECT_EQ((int)0, (int)strcmp(extension, serial_extension(s))); + EXPECT_STREQ(extension, serial_extension(s)); } const char *rapid_json_name() @@ -140,7 +140,7 @@ TEST_F(serial_test, DefaultConstructor) EXPECT_EQ((size_t)sizeof(value_list_str), (size_t)serialize_size); EXPECT_NE((char *)NULL, (char *)buffer); - EXPECT_EQ((int)0, (int)strcmp(buffer, value_list_str)); + EXPECT_STREQ(buffer, value_list_str); value_destroy(v); @@ -161,7 +161,7 @@ TEST_F(serial_test, DefaultConstructor) EXPECT_EQ((size_t)sizeof(value_map_str), (size_t)serialize_size); EXPECT_NE((value)NULL, (value)v); - EXPECT_EQ((int)0, (int)strcmp(buffer, value_map_str)); + EXPECT_STREQ(buffer, value_map_str); value *v_map = value_to_map(v); @@ -189,7 +189,7 @@ TEST_F(serial_test, DefaultConstructor) EXPECT_EQ((size_t)sizeof(json_empty_array), (size_t)serialize_size); EXPECT_NE((value)NULL, (value)v); - EXPECT_EQ((int)0, (int)strcmp(buffer, json_empty_array)); + EXPECT_STREQ(buffer, json_empty_array); value_destroy(v); @@ -206,7 +206,7 @@ TEST_F(serial_test, DefaultConstructor) EXPECT_NE((value *)NULL, (value *)v_array); EXPECT_EQ((type_id)TYPE_STRING, (type_id)value_type_id(v_array[0])); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(v_array[0]), "asdf")); + EXPECT_STREQ(value_to_string(v_array[0]), "asdf"); EXPECT_EQ((type_id)TYPE_INT, (type_id)value_type_id(v_array[1])); EXPECT_EQ((int)443, (int)value_to_int(v_array[1])); @@ -237,7 +237,7 @@ TEST_F(serial_test, DefaultConstructor) value *tupla = value_to_array(v_map[0]); EXPECT_EQ((type_id)TYPE_STRING, (type_id)value_type_id(tupla[0])); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(tupla[0]), "abc")); + EXPECT_STREQ(value_to_string(tupla[0]), "abc"); EXPECT_EQ((type_id)TYPE_FLOAT, (type_id)value_type_id(tupla[1])); EXPECT_EQ((float)9.9f, (float)value_to_float(tupla[1])); @@ -250,7 +250,7 @@ TEST_F(serial_test, DefaultConstructor) tupla = value_to_array(v_map[1]); EXPECT_EQ((type_id)TYPE_STRING, (type_id)value_type_id(tupla[0])); - EXPECT_EQ((int)0, (int)strcmp(value_to_string(tupla[0]), "cde")); + EXPECT_STREQ(value_to_string(tupla[0]), "cde"); EXPECT_EQ((type_id)TYPE_FLOAT, (type_id)value_type_id(tupla[1])); EXPECT_EQ((float)1.5f, (float)value_to_float(tupla[1])); From 7f59fe8db76b658ae143630347b16d428c495fd3 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Sat, 20 Sep 2025 17:12:03 +0200 Subject: [PATCH 339/364] Add base for cxx port. --- source/ports/CMakeLists.txt | 2 +- source/ports/cxx_port/CMakeLists.txt | 111 ++--- .../cxx_port/include/metacall/metacall.hpp | 414 +++++++++++++++++- .../cxx_port/inline/metacall/metacall.inl | 2 +- source/tests/CMakeLists.txt | 1 + .../metacall_cxx_port_test/CMakeLists.txt | 151 +++++++ .../metacall_cxx_port_test/source/main.cpp | 28 ++ .../source/metacall_cxx_port_test.cpp | 96 ++++ 8 files changed, 722 insertions(+), 83 deletions(-) create mode 100644 source/tests/metacall_cxx_port_test/CMakeLists.txt create mode 100644 source/tests/metacall_cxx_port_test/source/main.cpp create mode 100644 source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp diff --git a/source/ports/CMakeLists.txt b/source/ports/CMakeLists.txt index cc73de928d..e70bb151db 100644 --- a/source/ports/CMakeLists.txt +++ b/source/ports/CMakeLists.txt @@ -28,7 +28,7 @@ endif() # Project options option(OPTION_BUILD_PORTS_CS "Build C# port." OFF) -option(OPTION_BUILD_PORTS_CXX "Build C++ port." OFF) +option(OPTION_BUILD_PORTS_CXX "Build C++ port." ON) option(OPTION_BUILD_PORTS_D "Build D port." OFF) option(OPTION_BUILD_PORTS_GO "Build Go port." OFF) option(OPTION_BUILD_PORTS_JAVA "Build Java port." OFF) diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index bc450a0689..88ce404609 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -9,17 +9,14 @@ endif() # Target name set(target cxx_port) -string(TOLOWER ${META_PROJECT_NAME} target_name) - -set(target_export "${META_PROJECT_NAME}-cxx") # Exit here if required dependencies are not met message(STATUS "Port ${target}") # Set API export file and macro -string(TOUPPER ${target_name} target_name_upper) -set(export_file "include/${target_name}/${target_name}_api.hpp") -set(export_macro "${target_name_upper}_API") +string(TOUPPER ${target} target_upper) +set(export_file "include/${target}/${target}_api.h") +set(export_macro "${target_upper}_API") # # Compiler warnings @@ -37,8 +34,8 @@ include(SecurityFlags) # Sources # -set(inline_path "${CMAKE_CURRENT_SOURCE_DIR}/inline/${target_name}") -set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target_name}") +set(inline_path "${CMAKE_CURRENT_SOURCE_DIR}/inline/metacall") +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/metacall") set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") set(inlines @@ -79,7 +76,7 @@ add_library(${target} add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) # Export library for downstream projects -export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target_name}/${target_export}-export.cmake) +export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) # Create API export header generate_export_header(${target} @@ -100,12 +97,16 @@ set_target_properties(${target} # # Include directories # + target_include_directories(${target} PRIVATE ${PROJECT_BINARY_DIR}/source/include ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include + + ${PROJECT_BINARY_DIR}/source/inline ${CMAKE_CURRENT_SOURCE_DIR}/inline + ${CMAKE_CURRENT_BINARY_DIR}/inline PUBLIC ${DEFAULT_INCLUDE_DIRECTORIES} @@ -114,6 +115,26 @@ target_include_directories(${target} $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> + + + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inline> + $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/inline> + $<INSTALL_INTERFACE:inline> +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${META_PROJECT_NAME}::metacall + + PUBLIC + ${DEFAULT_LIBRARIES} + + INTERFACE + ${META_PROJECT_NAME}::metacall ) # @@ -122,9 +143,10 @@ target_include_directories(${target} target_compile_definitions(${target} PRIVATE + ${target_upper}_EXPORTS # Export API PUBLIC - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:${target_name_upper}_STATIC_DEFINE> + $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:${target_upper}_STATIC_DEFINE> ${DEFAULT_COMPILE_DEFINITIONS} INTERFACE @@ -155,72 +177,3 @@ target_link_options(${target} INTERFACE ) - -# -# Deployment -# - -# Library -install(TARGETS ${target} - EXPORT "${target_export}-export" COMPONENT dev - RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime - LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime - ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev -) - -# Inline files -install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/inline/${target_name} DESTINATION ${INSTALL_INCLUDE} - COMPONENT dev -) - -# Header files -install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/include/${target_name} DESTINATION ${INSTALL_INCLUDE} - COMPONENT dev -) - -# Generated header files -install(DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/include/${target_name} DESTINATION ${INSTALL_INCLUDE} - COMPONENT dev -) - -# CMake config -install(EXPORT ${target_export}-export - NAMESPACE ${META_PROJECT_NAME}:: - DESTINATION ${INSTALL_CMAKE}/${target_name} - COMPONENT dev -) - -# TODO - -# # -# # Configure test -# # - -# set(metacall_cxx_test "${target}_test") -# set(metacall_cxx_test_path "${CMAKE_CURRENT_BINARY_DIR}/${metacall_cxx_test}.cpp") - -# # -# # Define test -# # - -# add_test(NAME ${metacall_cxx_test} -# COMMAND $<TARGET_FILE:${metacall_cxx_test}> -# ) - -# # -# # Define test labels -# # - -# set_property(TEST ${metacall_cxx_test} -# PROPERTY LABELS ${metacall_cxx_test} -# ) - -# include(TestEnvironmentVariables) - -# test_environment_variables(${metacall_cxx_test} -# "" -# ${TESTS_ENVIRONMENT_VARIABLES} -# ) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 7995efa3e6..83540d66ec 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -23,17 +23,427 @@ /* -- Headers -- */ -#include <metacall/metacall_api.hpp> - +#include <cstring> +#include <memory> +#include <stdexcept> #include <string> +#include <unordered_map> +#include <vector> namespace metacall { +#include <metacall/metacall.h> + +class value_base +{ +public: + // Non-copyable, but movable + value_base(const value_base &) = delete; + value_base &operator=(const value_base &) = delete; + + value_base(value_base &&) noexcept = default; + value_base &operator=(value_base &&) noexcept = default; + + // Access the raw value + void *to_raw() const + { + return value_ptr.get(); + } + +protected: + std::unique_ptr<void, void (*)(void *)> value_ptr; + + explicit value_base(void *value_ptr, void (*destructor)(void *) = &noop_destructor) : + // TODO: &metacall_value_destroy + value_ptr(value_ptr, destructor) + { + } + + static void noop_destructor(void *) {} +}; + +template <typename T> +class METACALL_API value : public value_base +{ +public: + explicit value(const T &v) : + value_base(create(v)) + { + if (value_ptr == nullptr) + { + throw std::runtime_error("Failed to create MetaCall value"); + } + } + + explicit value(void *value_ptr) : + value_base(value_ptr, &value_base::noop_destructor) + { + if (metacall_value_id(value_ptr) != id()) + { + throw std::runtime_error("Failed to create MetaCall value, the received MetaCall value type does not match with the value class type"); + } + } + + T to_value() const + { + throw std::runtime_error("Unsupported MetaCall value"); + } + +private: + // Type-specific creation (calls specialized version below) + static void *create(const T &v); + + // Type-specific type id + static enum metacall_value_id id(); +}; + +template <> +inline void *value<bool>::create(const bool &v) +{ + return metacall_value_create_bool(v); +} + +template <> +inline enum metacall_value_id value<bool>::id() +{ + return METACALL_BOOL; +} + +template <> +inline bool value<bool>::to_value() const +{ + return metacall_value_to_bool(value_ptr.get()); +} + +template <> +inline void *value<char>::create(const char &v) +{ + return metacall_value_create_char(v); +} + +template <> +inline enum metacall_value_id value<char>::id() +{ + return METACALL_CHAR; +} + +template <> +inline char value<char>::to_value() const +{ + return metacall_value_to_char(value_ptr.get()); +} + +template <> +inline void *value<short>::create(const short &v) +{ + return metacall_value_create_short(v); +} + +template <> +inline enum metacall_value_id value<short>::id() +{ + return METACALL_SHORT; +} + +template <> +inline short value<short>::to_value() const +{ + return metacall_value_to_short(value_ptr.get()); +} + +template <> +inline void *value<int>::create(const int &v) +{ + return metacall_value_create_int(v); +} + +template <> +inline enum metacall_value_id value<int>::id() +{ + return METACALL_INT; +} + +template <> +inline int value<int>::to_value() const +{ + return metacall_value_to_int(value_ptr.get()); +} + +template <> +inline void *value<long>::create(const long &v) +{ + return metacall_value_create_long(v); +} + +template <> +inline enum metacall_value_id value<long>::id() +{ + return METACALL_LONG; +} + +template <> +inline long value<long>::to_value() const +{ + return metacall_value_to_long(value_ptr.get()); +} + +template <> +inline void *value<float>::create(const float &v) +{ + return metacall_value_create_float(v); +} + +template <> +inline enum metacall_value_id value<float>::id() +{ + return METACALL_FLOAT; +} + +template <> +inline float value<float>::to_value() const +{ + return metacall_value_to_float(value_ptr.get()); +} + +template <> +inline void *value<double>::create(const double &v) +{ + return metacall_value_create_double(v); +} + +template <> +inline enum metacall_value_id value<double>::id() +{ + return METACALL_DOUBLE; +} + +template <> +inline double value<double>::to_value() const +{ + return metacall_value_to_double(value_ptr.get()); +} + +template <> +inline void *value<std::string>::create(const std::string &v) +{ + return metacall_value_create_string(v.c_str(), v.size()); +} + +template <> +inline enum metacall_value_id value<std::string>::id() +{ + return METACALL_STRING; +} + +template <> +inline std::string value<std::string>::to_value() const +{ + return metacall_value_to_string(value_ptr.get()); +} + +template <> +inline void *value<const char *>::create(const char *const &v) +{ + return metacall_value_create_string(v, std::strlen(v)); +} + +template <> +inline enum metacall_value_id value<const char *>::id() +{ + return METACALL_STRING; +} + +template <> +inline const char *value<const char *>::to_value() const +{ + return metacall_value_to_string(value_ptr.get()); +} + +template <> +inline void *value<std::vector<char>>::create(const std::vector<char> &v) +{ + return metacall_value_create_buffer(v.data(), v.size()); +} + +template <> +inline enum metacall_value_id value<std::vector<char>>::id() +{ + return METACALL_BUFFER; +} + +template <> +inline std::vector<char> value<std::vector<char>>::to_value() const +{ + void *ptr = value_ptr.get(); + char *buffer = static_cast<char *>(metacall_value_to_buffer(ptr)); + std::vector<char> buffer_vector(buffer, buffer + metacall_value_count(ptr)); + + return buffer_vector; +} + +template <> +inline void *value<std::vector<unsigned char>>::create(const std::vector<unsigned char> &v) +{ + return metacall_value_create_buffer(v.data(), v.size()); +} + +template <> +inline enum metacall_value_id value<std::vector<unsigned char>>::id() +{ + return METACALL_BUFFER; +} + +template <> +inline std::vector<unsigned char> value<std::vector<unsigned char>>::to_value() const +{ + void *ptr = value_ptr.get(); + unsigned char *buffer = static_cast<unsigned char *>(metacall_value_to_buffer(ptr)); + std::vector<unsigned char> buffer_vector(buffer, buffer + metacall_value_count(ptr)); + + return buffer_vector; +} + +template <> +inline void *value<void *>::create(void *const &v) +{ + return metacall_value_create_ptr(v); +} + +template <> +inline enum metacall_value_id value<void *>::id() +{ + return METACALL_PTR; +} + +template <> +inline void *value<void *>::to_value() const +{ + return metacall_value_to_ptr(value_ptr.get()); +} + +template <> +inline void *value<std::nullptr_t>::create(const std::nullptr_t &) +{ + return metacall_value_create_null(); +} + +template <> +inline enum metacall_value_id value<std::nullptr_t>::id() +{ + return METACALL_NULL; +} + +template <> +inline std::nullptr_t value<std::nullptr_t>::to_value() const +{ + return nullptr; +} + +// TODO: Array, Map, Future, Function, Class, Object, Exception, Throwable... + +template <typename K, typename V> +class METACALL_API map : public value_base +{ +public: + using pair_type = std::pair<K, V>; + using pair_value_type = std::pair<value<K>, value<V>>; + + map(std::initializer_list<pair_type> list) : + value_base(metacall_value_create_map(NULL, list.size())) + { + if (value_ptr == nullptr) + { + throw std::runtime_error("Failed to create MetaCall map value"); + } + + void **map_array = metacall_value_to_map(value_ptr.get()); + size_t index = 0; + + for (const auto &pair : list) + { + void *tuple = metacall_value_create_array(nullptr, 2); + void **tuple_array = metacall_value_to_array(tuple); + + // Create the pair + auto value_pair = std::make_pair(value<K>(pair.first), value<V>(pair.second)); + + // Insert into metacall value map + tuple_array[0] = value_pair.first.to_raw(); + tuple_array[1] = value_pair.second.to_raw(); + + map_array[index++] = tuple; + + // Store into the map + m.emplace(pair.first, std::move(value_pair)); + } + } + + explicit map(void *value_ptr) : + value_base(value_ptr, &value_base::noop_destructor) + { + if (metacall_value_id(value_ptr) != METACALL_MAP) + { + throw std::runtime_error("MetaCall map initialized with a MetaCall value which is not of type map"); + } + + rehash(); + } + + void rehash() + { + void *ptr = value_ptr.get(); + void **map_array = metacall_value_to_map(ptr); + const size_t size = metacall_value_count(ptr); + + m.clear(); + + for (size_t index = 0; index < size; ++index) + { + void **tuple_array = metacall_value_to_array(map_array[index]); + + // Create the values + auto pair = std::make_pair(value<K>(tuple_array[0]), value<V>(tuple_array[1])); + + // Store into the map + m.emplace(pair.first.to_value(), std::move(pair)); + } + } + + V operator[](const K &key) const + { + return m.at(key).second.to_value(); + } + +private: + /* + // Case 1: value is value_base (e.g. nested metacall map value) + template <typename T> + static typename std::enable_if<std::is_base_of<value_base, T>::value, value<T>>::type + wrap_value(const T &v) + { + return const_cast<T &>(v); + } + + // Case 2: value is a plain type + template <typename T> + static typename std::enable_if<!std::is_base_of<value_base, T>::value, value<T>>::type + wrap_value(const T &v) + { + value<T> val(v); + return val; + } + */ + + std::unordered_map<K, pair_value_type> m; +}; + template <typename... Ts> METACALL_API int metacall(std::string name, Ts... ts); } /* namespace metacall */ +// TODO: Move everything to metacall.inl + #include <metacall/metacall.inl> #endif /* METACALL_HPP */ diff --git a/source/ports/cxx_port/inline/metacall/metacall.inl b/source/ports/cxx_port/inline/metacall/metacall.inl index 7789dff867..8223b5be08 100644 --- a/source/ports/cxx_port/inline/metacall/metacall.inl +++ b/source/ports/cxx_port/inline/metacall/metacall.inl @@ -23,7 +23,7 @@ /* -- Headers -- */ -#include <metacall/metacall_api.hpp> +#include <metacall/metacall_api.h> #include <string> diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index 6e6ad2ffc9..2f2e6bb890 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -246,3 +246,4 @@ add_subdirectory(metacall_cli_core_plugin_test) add_subdirectory(metacall_cli_core_plugin_await_test) add_subdirectory(metacall_backtrace_plugin_test) add_subdirectory(metacall_sandbox_plugin_test) +add_subdirectory(metacall_cxx_port_test) diff --git a/source/tests/metacall_cxx_port_test/CMakeLists.txt b/source/tests/metacall_cxx_port_test/CMakeLists.txt new file mode 100644 index 0000000000..1a4b07292f --- /dev/null +++ b/source/tests/metacall_cxx_port_test/CMakeLists.txt @@ -0,0 +1,151 @@ +# Check if this loader is enabled +if(NOT OPTION_BUILD_PORTS OR NOT OPTION_BUILD_PORTS_CXX) + return() +endif() + +# +# Executable name and options +# + +# Target name +set(target metacall-cxx-port-test) +message(STATUS "Test ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/main.cpp + ${source_path}/metacall_cxx_port_test.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GTest + + ${META_PROJECT_NAME}::cxx_port +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} + + LIBFFI_INCLUDE_DIR="${LIBFFI_INCLUDE_DIR}" + LIBFFI_LIBRARY="${LIBFFI_LIBRARY}" +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + +# +# Linker options +# + +target_link_options(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $<TARGET_FILE:${target}> +) + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} +) diff --git a/source/tests/metacall_cxx_port_test/source/main.cpp b/source/tests/metacall_cxx_port_test/source/main.cpp new file mode 100644 index 0000000000..37d4adc23f --- /dev/null +++ b/source/tests/metacall_cxx_port_test/source/main.cpp @@ -0,0 +1,28 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp new file mode 100644 index 0000000000..75f06a44ee --- /dev/null +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -0,0 +1,96 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +#include <metacall/metacall.hpp> + +using namespace metacall; + +class metacall_cxx_port_test : public testing::Test +{ +protected: +}; + +void *cxx_map_test(size_t argc, void *args[], void *data) +{ + map<std::string, float> m(args[0]); + + (void)argc; + (void)data; + + EXPECT_EQ((float)m["hello"], (float)3.0f); + EXPECT_EQ((float)m["world"], (float)4.0f); + + printf("hello => %f\n", m["hello"]); + printf("world => %f\n", m["world"]); + fflush(stdout); + + return metacall_value_create_null(); +} + +TEST_F(metacall_cxx_port_test, DefaultConstructor) +{ + ASSERT_EQ((int)0, (int)metacall_initialize()); + + { + map<std::string, float> m = { + { "hello", 3.0f }, + { "world", 4.0f } + }; + + void *args[] = { + m.to_raw() + }; + + metacall_register("cxx_map_test", cxx_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + + void *ret = metacallv_s("cxx_map_test", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + } + + /* Print inspect information */ + { + size_t size = 0; + + struct metacall_allocator_std_type std_ctx = { &std::malloc, &std::realloc, &std::free }; + + void *allocator = metacall_allocator_create(METACALL_ALLOCATOR_STD, (void *)&std_ctx); + + char *inspect_str = metacall_inspect(&size, allocator); + + EXPECT_NE((char *)NULL, (char *)inspect_str); + + EXPECT_GT((size_t)size, (size_t)0); + + std::cout << inspect_str << std::endl; + + metacall_allocator_free(allocator, inspect_str); + + metacall_allocator_destroy(allocator); + } + + metacall_destroy(); +} From 90f20b973e21342bc7a688b4564bfb0c99ae7143 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 24 Sep 2025 15:58:12 +0200 Subject: [PATCH 340/364] Solve issues with ownership in cxx port. --- source/ports/cxx_port/CMakeLists.txt | 16 ++++++++ .../cxx_port/include/metacall/metacall.hpp | 13 +++---- .../source/metacall_cxx_port_test.cpp | 39 +++++++++++++++++++ 3 files changed, 60 insertions(+), 8 deletions(-) diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index 88ce404609..22fbea19f2 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -177,3 +177,19 @@ target_link_options(${target} INTERFACE ) + +# +# Deployment +# + +# Header files +install(DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/include/${target} DESTINATION ${INSTALL_INCLUDE} + COMPONENT dev +) + +# Inline files +install(DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/inline/${target} DESTINATION ${INSTALL_INCLUDE} + COMPONENT dev +) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 83540d66ec..afecc0fa63 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -53,11 +53,8 @@ class value_base protected: std::unique_ptr<void, void (*)(void *)> value_ptr; - explicit value_base(void *value_ptr, void (*destructor)(void *) = &noop_destructor) : - // TODO: &metacall_value_destroy - value_ptr(value_ptr, destructor) - { - } + explicit value_base(void *value_ptr, void (*destructor)(void *) = &metacall_value_destroy) : + value_ptr(value_ptr, destructor) {} static void noop_destructor(void *) {} }; @@ -66,8 +63,8 @@ template <typename T> class METACALL_API value : public value_base { public: - explicit value(const T &v) : - value_base(create(v)) + explicit value(const T &v, void (*destructor)(void *) = &metacall_value_destroy) : + value_base(create(v), destructor) { if (value_ptr == nullptr) { @@ -365,7 +362,7 @@ class METACALL_API map : public value_base void **tuple_array = metacall_value_to_array(tuple); // Create the pair - auto value_pair = std::make_pair(value<K>(pair.first), value<V>(pair.second)); + auto value_pair = std::make_pair(value<K>(pair.first, &value_base::noop_destructor), value<V>(pair.second, &value_base::noop_destructor)); // Insert into metacall value map tuple_array[0] = value_pair.first.to_raw(); diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 75f06a44ee..72912ecf5b 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -46,6 +46,23 @@ void *cxx_map_test(size_t argc, void *args[], void *data) return metacall_value_create_null(); } +void *cxx_recursive_map_test(size_t argc, void *args[], void *data) +{ + map<std::string, float> m(args[0]); + + (void)argc; + (void)data; + + EXPECT_EQ((float)m["hello"], (float)3.0f); + EXPECT_EQ((float)m["world"], (float)4.0f); + + printf("hello => %f\n", m["hello"]); + printf("world => %f\n", m["world"]); + fflush(stdout); + + return metacall_value_create_null(); +} + TEST_F(metacall_cxx_port_test, DefaultConstructor) { ASSERT_EQ((int)0, (int)metacall_initialize()); @@ -71,6 +88,28 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) metacall_value_destroy(ret); } + /* + { + map<std::string, map<std::string, float>> m = { + { "hello", { "world", 4.0f } }, + }; + + void *args[] = { + m.to_raw() + }; + + metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + + void *ret = metacallv_s("cxx_recursive_map_test", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + } + */ + /* Print inspect information */ { size_t size = 0; From 182a757139b9084c404b06824357c581ecff56be Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 24 Sep 2025 18:32:57 +0200 Subject: [PATCH 341/364] Separated CI of rust into test and build. --- .github/workflows/release-rust.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 9ef5e2ec1c..bc58a5915c 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -35,16 +35,20 @@ jobs: - name: Install MetaCall Windows if: matrix.os == 'windows-latest' run: powershell -NoProfile -ExecutionPolicy Unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/metacall/install/master/install.ps1')))" + - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - - name: Build and Test the Rust Port + + - name: Build Test the Rust Port working-directory: source/ports/rs_port - run: | - cargo build --verbose - cargo test --verbose + run: cargo build --verbose + + - name: Test the Rust Port + working-directory: source/ports/rs_port + run: cargo test --verbose release: name: Release Rust Port From 680b6bf7a4e415df9a0d8452b83972b9d2966fbb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 24 Sep 2025 18:41:33 +0200 Subject: [PATCH 342/364] Remove version from rs_ports dependency. --- source/ports/rs_port/Cargo.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index c0e51713a2..4ed8cee593 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -17,7 +17,13 @@ name = "metacall" path = "src/lib.rs" [dependencies] -metacall-inline = { path = "./inline", version = "0.2.0" } +metacall-inline = { path = "./inline" } [build-dependencies] -metacall-sys = { path = "./sys", version = "0.1.2" } +metacall-sys = { path = "./sys" } + +[workspace] +members = [ + "inline", + "sys", +] From 5d7c589784e3363b8507b629052a3ff7645806c1 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Tue, 30 Sep 2025 22:27:29 +0200 Subject: [PATCH 343/364] Improve few issues in c++ port. --- .github/workflows/release-rust.yml | 2 +- source/ports/cxx_port/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index bc58a5915c..d2a0c31a43 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -42,7 +42,7 @@ jobs: toolchain: stable override: true - - name: Build Test the Rust Port + - name: Build the Rust Port working-directory: source/ports/rs_port run: cargo build --verbose diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index 22fbea19f2..e3e79398a4 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -184,12 +184,12 @@ target_link_options(${target} # Header files install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/include/${target} DESTINATION ${INSTALL_INCLUDE} + ${CMAKE_CURRENT_SOURCE_DIR}/include/metacall DESTINATION ${INSTALL_INCLUDE} COMPONENT dev ) # Inline files install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/inline/${target} DESTINATION ${INSTALL_INCLUDE} + ${CMAKE_CURRENT_SOURCE_DIR}/inline/metacall DESTINATION ${INSTALL_INCLUDE} COMPONENT dev ) From f3433115132cb9b2a8774c0ee5d3db5cc5c9b96c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 1 Oct 2025 19:02:20 +0200 Subject: [PATCH 344/364] Improve cxx port. --- .../cxx_port/include/metacall/metacall.hpp | 37 ++++++------------- .../source/metacall_cxx_port_test.cpp | 14 ++++--- 2 files changed, 20 insertions(+), 31 deletions(-) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index afecc0fa63..d92a81638a 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -336,7 +336,7 @@ inline std::nullptr_t value<std::nullptr_t>::to_value() const return nullptr; } -// TODO: Array, Map, Future, Function, Class, Object, Exception, Throwable... +// TODO: Future, Function, Class, Object, Exception, Throwable... template <typename K, typename V> class METACALL_API map : public value_base @@ -386,6 +386,17 @@ class METACALL_API map : public value_base rehash(); } + V operator[](const K &key) const + { + return m.at(key).second.to_value(); + } + + static enum metacall_value_id id() + { + return METACALL_MAP; + } + +protected: void rehash() { void *ptr = value_ptr.get(); @@ -406,31 +417,7 @@ class METACALL_API map : public value_base } } - V operator[](const K &key) const - { - return m.at(key).second.to_value(); - } - private: - /* - // Case 1: value is value_base (e.g. nested metacall map value) - template <typename T> - static typename std::enable_if<std::is_base_of<value_base, T>::value, value<T>>::type - wrap_value(const T &v) - { - return const_cast<T &>(v); - } - - // Case 2: value is a plain type - template <typename T> - static typename std::enable_if<!std::is_base_of<value_base, T>::value, value<T>>::type - wrap_value(const T &v) - { - value<T> val(v); - return val; - } - */ - std::unordered_map<K, pair_value_type> m; }; diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 72912ecf5b..6865b258f8 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -46,22 +46,23 @@ void *cxx_map_test(size_t argc, void *args[], void *data) return metacall_value_create_null(); } +// TODO: +/* void *cxx_recursive_map_test(size_t argc, void *args[], void *data) { - map<std::string, float> m(args[0]); + map<std::string, map<std::string, float>> m(args[0]); (void)argc; (void)data; - EXPECT_EQ((float)m["hello"], (float)3.0f); - EXPECT_EQ((float)m["world"], (float)4.0f); + EXPECT_EQ((float)m["hello"]["world"], (float)4.0f); - printf("hello => %f\n", m["hello"]); - printf("world => %f\n", m["world"]); + printf("hello => %f\n", m["hello"]["world"]); fflush(stdout); return metacall_value_create_null(); } +*/ TEST_F(metacall_cxx_port_test, DefaultConstructor) { @@ -88,10 +89,11 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) metacall_value_destroy(ret); } + // TODO: /* { map<std::string, map<std::string, float>> m = { - { "hello", { "world", 4.0f } }, + { "hello", { "world", 4.0f } } }; void *args[] = { From b4d673059147f11fbb917c2876ad8dd66fc071dd Mon Sep 17 00:00:00 2001 From: Thomas <thomas.gummerson@piql.com> Date: Wed, 1 Oct 2025 19:23:13 +0200 Subject: [PATCH 345/364] Reimplement and bugfix environment_variable_path_create, portability_path_get_name, portability_path_get_name_canonical (#580) - Get rid of some buffer overruns - make more functions return more sensible things on NULL arguments - properly DOCUMENT each function - Add const type qualifiers where applicable - Replace some string functions and loops with memcpy --- .../environment/environment_variable_path.h | 26 ++- .../source/environment_variable_path.c | 69 +++----- .../include/portability/portability_path.h | 50 +++++- source/portability/source/portability_path.c | 156 ++++++++---------- .../source/portability_path_test.cpp | 55 ++++++ 5 files changed, 213 insertions(+), 143 deletions(-) diff --git a/source/environment/include/environment/environment_variable_path.h b/source/environment/include/environment/environment_variable_path.h index d5492d8f6c..58b8c2047b 100644 --- a/source/environment/include/environment/environment_variable_path.h +++ b/source/environment/include/environment/environment_variable_path.h @@ -52,7 +52,31 @@ extern "C" { /* -- Methods -- */ -ENVIRONMENT_API char *environment_variable_path_create(const char *name, const char *default_path, size_t default_path_size, size_t *env_size); +/** + * @brief + * If the value of `name` exists as an environment variable, return a live string of its value, otherwise return a live value of `default_path` or "/". + * + * `name` should not be `NULL`. + * + * If `default_path` is not `NULL`, `default_path_size` must be set to <= the length (including 0-terminator) of the `default_path` string. + * + * If `env_size` is not `NULL`, the length (including 0-terminator) of the returned string will be set to it + * @param[in] name + * The environment variable name to look up. + * + * @param[in] default_path + * If the environment variable value is not found, the value to return instead. + * + * @param[in] default_path_size + * The length (including 0-terminator) of `default_path` in chars. + * + * @param[out] env_size + * Pointer to a size_t to write the length of the returned string to (optional). + * + * @return + * The allocated string containing the environment variable value or the default or "/". + */ +ENVIRONMENT_API char *environment_variable_path_create(const char *const name, const char *const default_path, const size_t default_path_size, size_t *const env_size); ENVIRONMENT_API void environment_variable_path_destroy(char *variable_path); diff --git a/source/environment/source/environment_variable_path.c b/source/environment/source/environment_variable_path.c index 53f492dc39..f36439a72a 100644 --- a/source/environment/source/environment_variable_path.c +++ b/source/environment/source/environment_variable_path.c @@ -43,61 +43,32 @@ /* -- Methods -- */ -char *environment_variable_path_create(const char *name, const char *default_path, size_t default_path_size, size_t *env_size) +char *environment_variable_path_create(const char *const name, const char *const default_path, const size_t default_path_size, size_t *const env_size) { - const char *path_ptr = getenv(name); - char *path; - size_t length, size, last, end; - - if (path_ptr == NULL) - { - if (default_path == NULL) - { - static const char empty_path[] = ""; - - default_path = empty_path; - default_path_size = sizeof(empty_path); - } - - path_ptr = default_path; - length = default_path_size - 1; - } - else - { - length = strlen(path_ptr); - } - - last = length - 1; - - if (ENVIRONMENT_VARIABLE_PATH_SEPARATOR(path_ptr[last])) + const char *value = getenv(name); + size_t size; + if (value) + size = strlen(value) + 1; + else if (default_path) { - end = length; - size = length + 1; + value = default_path; + size = default_path_size; } else { - last = length; - end = length + 1; - size = length + 2; + value = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR; + size = sizeof(ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR); } - - path = malloc(sizeof(char) * size); - - if (path == NULL) - { - return NULL; - } - - strncpy(path, path_ptr, length); - - path[last] = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_C; - path[end] = '\0'; - - if (env_size != NULL) - { - *env_size = size; - } - + size_t alloc_size = size; + if (size > 1) + alloc_size += !ENVIRONMENT_VARIABLE_PATH_SEPARATOR(value[size - 2]); + char *const path = malloc(sizeof(char) * alloc_size); + memcpy(path, value, sizeof(char) * size); + if (size > 1) + path[alloc_size - 2] = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_C; + path[alloc_size - 1] = '\0'; + if (env_size) + *env_size = alloc_size; return path; } diff --git a/source/portability/include/portability/portability_path.h b/source/portability/include/portability/portability_path.h index 79ff0761ba..100b129f1e 100644 --- a/source/portability/include/portability/portability_path.h +++ b/source/portability/include/portability/portability_path.h @@ -109,9 +109,55 @@ extern "C" { /* -- Methods -- */ -PORTABILITY_API size_t portability_path_get_name(const char *path, size_t path_size, char *name, size_t name_size); +/** + * @brief + * Get the file name portion out of a path and strip away the file extension if any. + * + * If `path` is NULL this will return an empty string. + * + * If `name` is NULL or `name_size is 0 this will return the size it requires in order to write `name`. + * + * If `path` or `name` are not NULL, then `path_size` or `name_size`, respectively, must be set to <= the length (including 0-terminator) of the memory regions pointed to by `path` and `name`. + * @param[in] path + * The full path to extract the name from. + * @param[in] path_size + * The length (including 0-terminator) of `path` in chars. + * @param[out] name + * The memory location to write the extracted name to. If `NULL` the size required will be returned instead of the size written. + * @param[in] name_size + * The size of the memory location pointed to by `name`. + * @return + * The size of the name. + */ +PORTABILITY_API size_t portability_path_get_name(const char *const path, const size_t path_size, char *const name, const size_t name_size); -PORTABILITY_API size_t portability_path_get_name_canonical(const char *path, size_t path_size, char *name, size_t name_size); +/** + * @brief + * Get the file name portion out of a path and strip away any amount of file extensions. + * + * When called with `"/foo/bar.baz.qux"`: + * + * - `portability_path_get_name` will produce the string `"bar.baz"` + * + * - `portability_path_get_name_canonical` will produce the string `"bar"` + * + * If `path` is NULL this will return an empty string. + * + * If `name` is NULL or `name_size is 0 this will return the size it requires in order to write `name`. + * + * If `path` or `name` are not NULL, then `path_size` or `name_size`, respectively, must be set to <= the length (including 0-terminator) of the memory regions pointed to by `path` and `name`. + * @param[in] path + * The full path to extract the name from. + * @param[in] path_size + * The length (including 0-terminator) of `path` in chars. + * @param[out] name + * The memory location to write the extracted name to. If `NULL` the size required will be returned instead of the size written. + * @param[in] name_size + * The size of the memory location pointed to by `name`. + * @return + * The size of the name. + */ +PORTABILITY_API size_t portability_path_get_name_canonical(const char *const path, const size_t path_size, char *const name, const size_t name_size); PORTABILITY_API size_t portability_path_get_fullname(const char *path, size_t path_size, char *name, size_t name_size); diff --git a/source/portability/source/portability_path.c b/source/portability/source/portability_path.c index 9606a7d690..096df995e5 100644 --- a/source/portability/source/portability_path.c +++ b/source/portability/source/portability_path.c @@ -25,107 +25,81 @@ /* Define separator checking for any platform */ #define PORTABILITY_PATH_SEPARATOR_ALL(chr) (chr == '\\' || chr == '/') -size_t portability_path_get_name(const char *path, size_t path_size, char *name, size_t name_size) +static size_t basename_offset(const char *const path, const size_t path_size) { - size_t i, count, last; - - if (path == NULL || name == NULL) - { - return 0; - } - - for (i = 0, count = 0, last = 0; path[i] != '\0' && i < path_size && count < name_size; ++i) - { - name[count++] = path[i]; - - if (PORTABILITY_PATH_SEPARATOR(path[i])) - { - count = 0; - } - else if (path[i] == '.') - { - if (i > 0 && path[i - 1] == '.') - { - last = 0; - count = 0; - } - else - { - if (count > 0) - { - last = count - 1; - } - else - { - last = 0; - } - } - } - } + size_t offset = path_size; + for (; offset != 0; offset--) + if (PORTABILITY_PATH_SEPARATOR(path[offset - 1])) + break; + return offset; +} - if ((last == 0 && count > 1) || last > count) +size_t portability_path_get_name(const char *const path, const size_t path_size, char *const name, const size_t name_size) +{ + if (path == NULL) { - last = count; + if (name == NULL || name_size == 0) + return 0; + name[0] = '\0'; + return 1; } - - name[last] = '\0'; - - return last + 1; + // find rightmost path separator + const size_t name_start = basename_offset(path, path_size); + // Find rightmost dot + size_t rightmost_dot = path_size; + for (; rightmost_dot != name_start; rightmost_dot--) + if (path[rightmost_dot - 1] == '.') + break; + // No dots found, or name starts with dot and is non-empty, use whole name + if (rightmost_dot == name_start || (rightmost_dot == name_start + 1 && rightmost_dot != path_size - 1)) + rightmost_dot = path_size - 1; + // remove all consecutive dots at the end + while (rightmost_dot != name_start && path[rightmost_dot - 1] == '.') + rightmost_dot--; + const size_t length = rightmost_dot - name_start; + const size_t size = length + 1; + // Return required size + if (name == NULL || size > name_size) + return size; + if (length) + memcpy(name, path + name_start, length); + name[length] = '\0'; + return size; } -size_t portability_path_get_name_canonical(const char *path, size_t path_size, char *name, size_t name_size) +size_t portability_path_get_name_canonical(const char *const path, const size_t path_size, char *const name, const size_t name_size) { - if (path == NULL || name == NULL) + if (path == NULL) { - return 0; + if (name == NULL || name_size == 0) + return 0; + name[0] = '\0'; + return 1; } - - size_t i, count, last; - - for (i = 0, count = 0, last = 0; path[i] != '\0' && i < path_size && count < name_size; ++i) - { - name[count++] = path[i]; - - if (PORTABILITY_PATH_SEPARATOR(path[i])) - { - count = 0; - } - else if (path[i] == '.') - { - if (i > 0 && path[i - 1] == '.') - { - last = 0; - count = 0; - } - else - { - if (count > 0) - { - last = count - 1; - } - else - { - last = 0; - } - - /* This function is the same as portability_path_get_name but - returns the name of the file without any extension, for example: - - portability_path_get_name of libnode.so.72 is libnode.so - - portability_path_get_name_canonical of libnode.so.72 is libnode - */ + // find rightmost path separator + const size_t name_start = basename_offset(path, path_size); + // find leftmost dot + size_t leftmost_dot = name_start; + for (; leftmost_dot < path_size; leftmost_dot++) + if (path[leftmost_dot] == '.') + break; + // No dots found, use whole name + if (leftmost_dot == path_size) + leftmost_dot--; + // name starts with dot, use the following dot instead + if (leftmost_dot == name_start) + for (leftmost_dot = name_start + 1; leftmost_dot < path_size; leftmost_dot++) + if (path[leftmost_dot] == '.') break; - } - } - } - - if (last == 0 && count > 1) - { - last = count; - } - - name[last] = '\0'; - - return last + 1; + const size_t length = leftmost_dot - name_start; + const size_t size = length + 1; + // Return required size + if (name == NULL || size > name_size) + return size; + if (length) + memcpy(name, path + name_start, length); + name[length] = '\0'; + return size; } size_t portability_path_get_fullname(const char *path, size_t path_size, char *name, size_t name_size) diff --git a/source/tests/portability_path_test/source/portability_path_test.cpp b/source/tests/portability_path_test/source/portability_path_test.cpp index 15534b235d..f4c638c2f0 100644 --- a/source/tests/portability_path_test/source/portability_path_test.cpp +++ b/source/tests/portability_path_test/source/portability_path_test.cpp @@ -68,6 +68,33 @@ TEST_F(portability_path_test, portability_path_test_path_get_module_name_with_ra EXPECT_EQ((char)'\0', (char)result[size - 1]); } +TEST_F(portability_path_test, portability_path_test_path_get_name_null) +{ + static const char result[] = ""; + + string_name name; + + size_t size = portability_path_get_name(NULL, 0, name, NAME_SIZE); + + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + +TEST_F(portability_path_test, portability_path_test_path_get_name_empty) +{ + static const char base[] = ""; + static const char result[] = ""; + + string_name name; + + size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); + + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + TEST_F(portability_path_test, portability_path_test_path_get_name) { static const char base[] = "/a/b/c/asd.txt"; @@ -110,6 +137,34 @@ TEST_F(portability_path_test, portability_path_test_path_get_name_without_dot) EXPECT_EQ((char)'\0', (char)result[size - 1]); } +TEST_F(portability_path_test, portability_path_test_path_get_name_dot_in_path) +{ + static const char base[] = "/a/b.c/d/asd"; + static const char result[] = "asd"; + + string_name name; + + size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); + + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + +TEST_F(portability_path_test, portability_path_test_path_get_name_dot_in_path_and_name) +{ + static const char base[] = "/a/b.c/d/asd.txt"; + static const char result[] = "asd"; + + string_name name; + + size_t size = portability_path_get_name(base, sizeof(base), name, NAME_SIZE); + + EXPECT_STREQ(name, result); + EXPECT_EQ((size_t)size, (size_t)sizeof(result)); + EXPECT_EQ((char)'\0', (char)result[size - 1]); +} + TEST_F(portability_path_test, portability_path_test_path_get_name_only_separator_dot) { static const char base[] = "/."; From 282887dcdc6e585398318c5761b69159ee10535e Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Sat, 4 Oct 2025 11:26:54 +0200 Subject: [PATCH 346/364] Review of Thomas PR. --- .../environment/environment_variable_path.h | 12 +- .../source/environment_variable_path.c | 43 ++++-- .../include/portability/portability_path.h | 37 +++--- source/portability/source/portability_path.c | 125 +++++++++++++----- 4 files changed, 148 insertions(+), 69 deletions(-) diff --git a/source/environment/include/environment/environment_variable_path.h b/source/environment/include/environment/environment_variable_path.h index 58b8c2047b..5f3a17ba44 100644 --- a/source/environment/include/environment/environment_variable_path.h +++ b/source/environment/include/environment/environment_variable_path.h @@ -54,13 +54,11 @@ extern "C" { /** * @brief - * If the value of `name` exists as an environment variable, return a live string of its value, otherwise return a live value of `default_path` or "/". + * If the value of @name exists as an environment variable, return a live string of its value, otherwise return a live value of @default_path or "/". + * @name should not be NULL. + * If @default_path is not NULL, @default_path_size must be set to <= the length (including null-terminator) of the @default_path string. + * If @env_size is not NULL, the length (including null-terminator) of the returned string will be set to it. * - * `name` should not be `NULL`. - * - * If `default_path` is not `NULL`, `default_path_size` must be set to <= the length (including 0-terminator) of the `default_path` string. - * - * If `env_size` is not `NULL`, the length (including 0-terminator) of the returned string will be set to it * @param[in] name * The environment variable name to look up. * @@ -68,7 +66,7 @@ extern "C" { * If the environment variable value is not found, the value to return instead. * * @param[in] default_path_size - * The length (including 0-terminator) of `default_path` in chars. + * The length (including null-terminator) of @default_path in chars. * * @param[out] env_size * Pointer to a size_t to write the length of the returned string to (optional). diff --git a/source/environment/source/environment_variable_path.c b/source/environment/source/environment_variable_path.c index f36439a72a..813112a807 100644 --- a/source/environment/source/environment_variable_path.c +++ b/source/environment/source/environment_variable_path.c @@ -45,30 +45,53 @@ char *environment_variable_path_create(const char *const name, const char *const default_path, const size_t default_path_size, size_t *const env_size) { - const char *value = getenv(name); - size_t size; - if (value) - size = strlen(value) + 1; + const char *env_variable = getenv(name); + char *path; + size_t size, alloc_size; + + if (env_variable) + { + size = strlen(env_variable) + 1; + } else if (default_path) { - value = default_path; + env_variable = default_path; size = default_path_size; } else { - value = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR; + env_variable = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR; size = sizeof(ENVIRONMENT_VARIABLE_PATH_SEPARATOR_STR); } - size_t alloc_size = size; + + alloc_size = size; + if (size > 1) - alloc_size += !ENVIRONMENT_VARIABLE_PATH_SEPARATOR(value[size - 2]); - char *const path = malloc(sizeof(char) * alloc_size); - memcpy(path, value, sizeof(char) * size); + { + alloc_size += !ENVIRONMENT_VARIABLE_PATH_SEPARATOR(env_variable[size - 2]); + } + + path = malloc(sizeof(char) * alloc_size); + + if (path == NULL) + { + return NULL; + } + + memcpy(path, env_variable, sizeof(char) * size); + if (size > 1) + { path[alloc_size - 2] = ENVIRONMENT_VARIABLE_PATH_SEPARATOR_C; + } + path[alloc_size - 1] = '\0'; + if (env_size) + { *env_size = alloc_size; + } + return path; } diff --git a/source/portability/include/portability/portability_path.h b/source/portability/include/portability/portability_path.h index 100b129f1e..38e743fbf4 100644 --- a/source/portability/include/portability/portability_path.h +++ b/source/portability/include/portability/portability_path.h @@ -112,20 +112,22 @@ extern "C" { /** * @brief * Get the file name portion out of a path and strip away the file extension if any. + * If @path is NULL this will return an empty string. + * If @name is NULL or @name_size is 0 this will return the size it requires in order to write @name. + * If @path or @name are not NULL, then @path_size or @name_size, respectively, must be set to <= the length (including null-terminator) of the memory regions pointed to by @path and @name. * - * If `path` is NULL this will return an empty string. - * - * If `name` is NULL or `name_size is 0 this will return the size it requires in order to write `name`. - * - * If `path` or `name` are not NULL, then `path_size` or `name_size`, respectively, must be set to <= the length (including 0-terminator) of the memory regions pointed to by `path` and `name`. * @param[in] path * The full path to extract the name from. + * * @param[in] path_size - * The length (including 0-terminator) of `path` in chars. + * The length (including null-terminator) of @path in chars. + * * @param[out] name - * The memory location to write the extracted name to. If `NULL` the size required will be returned instead of the size written. + * The memory location to write the extracted name to. If NULL the size required will be returned instead of the size written. + * * @param[in] name_size - * The size of the memory location pointed to by `name`. + * The size of the memory location pointed to by @name. + * * @return * The size of the name. */ @@ -134,26 +136,27 @@ PORTABILITY_API size_t portability_path_get_name(const char *const path, const s /** * @brief * Get the file name portion out of a path and strip away any amount of file extensions. - * * When called with `"/foo/bar.baz.qux"`: * * - `portability_path_get_name` will produce the string `"bar.baz"` - * * - `portability_path_get_name_canonical` will produce the string `"bar"` * - * If `path` is NULL this will return an empty string. - * - * If `name` is NULL or `name_size is 0 this will return the size it requires in order to write `name`. + * If @path is NULL this will return an empty string. + * If @name is NULL or @name_size is 0 this will return the size it requires in order to write @name. + * If @path or @name are not NULL, then @path_size or @name_size, respectively, must be set to <= the length (including null-terminator) of the memory regions pointed to by @path and @name. * - * If `path` or `name` are not NULL, then `path_size` or `name_size`, respectively, must be set to <= the length (including 0-terminator) of the memory regions pointed to by `path` and `name`. * @param[in] path * The full path to extract the name from. + * * @param[in] path_size - * The length (including 0-terminator) of `path` in chars. + * The length (including null-terminator) of @path in chars. + * * @param[out] name - * The memory location to write the extracted name to. If `NULL` the size required will be returned instead of the size written. + * The memory location to write the extracted name to. If NULL the size required will be returned instead of the size written. + * * @param[in] name_size - * The size of the memory location pointed to by `name`. + * The size of the memory location pointed to by @name. + * * @return * The size of the name. */ diff --git a/source/portability/source/portability_path.c b/source/portability/source/portability_path.c index 096df995e5..207a9cf29a 100644 --- a/source/portability/source/portability_path.c +++ b/source/portability/source/portability_path.c @@ -25,80 +25,135 @@ /* Define separator checking for any platform */ #define PORTABILITY_PATH_SEPARATOR_ALL(chr) (chr == '\\' || chr == '/') -static size_t basename_offset(const char *const path, const size_t path_size) +static size_t portability_path_basename_offset(const char *const path, const size_t path_size) { size_t offset = path_size; - for (; offset != 0; offset--) - if (PORTABILITY_PATH_SEPARATOR(path[offset - 1])) - break; + + while (offset > 0 && !PORTABILITY_PATH_SEPARATOR(path[offset - 1])) + { + --offset; + } + return offset; } size_t portability_path_get_name(const char *const path, const size_t path_size, char *const name, const size_t name_size) { + size_t name_start, rightmost_dot, length, size; + if (path == NULL) { if (name == NULL || name_size == 0) + { return 0; + } + name[0] = '\0'; + return 1; } - // find rightmost path separator - const size_t name_start = basename_offset(path, path_size); - // Find rightmost dot - size_t rightmost_dot = path_size; - for (; rightmost_dot != name_start; rightmost_dot--) - if (path[rightmost_dot - 1] == '.') - break; - // No dots found, or name starts with dot and is non-empty, use whole name + + /* Find rightmost path separator */ + name_start = portability_path_basename_offset(path, path_size); + + /* Find rightmost dot */ + rightmost_dot = path_size; + + while (rightmost_dot != name_start && path[rightmost_dot - 1] != '.') + { + --rightmost_dot; + } + + /* No dots found, or name starts with dot and is non-empty, use whole name */ if (rightmost_dot == name_start || (rightmost_dot == name_start + 1 && rightmost_dot != path_size - 1)) + { rightmost_dot = path_size - 1; - // remove all consecutive dots at the end + } + + /* Remove all consecutive dots at the end */ while (rightmost_dot != name_start && path[rightmost_dot - 1] == '.') - rightmost_dot--; - const size_t length = rightmost_dot - name_start; - const size_t size = length + 1; - // Return required size + { + --rightmost_dot; + } + + length = rightmost_dot - name_start; + size = length + 1; + + /* Return required size */ if (name == NULL || size > name_size) + { return size; - if (length) + } + + if (length > 0) + { memcpy(name, path + name_start, length); + } + name[length] = '\0'; + return size; } size_t portability_path_get_name_canonical(const char *const path, const size_t path_size, char *const name, const size_t name_size) { + size_t name_start, leftmost_dot, length, size; + if (path == NULL) { if (name == NULL || name_size == 0) + { return 0; + } + name[0] = '\0'; + return 1; } - // find rightmost path separator - const size_t name_start = basename_offset(path, path_size); - // find leftmost dot - size_t leftmost_dot = name_start; - for (; leftmost_dot < path_size; leftmost_dot++) - if (path[leftmost_dot] == '.') - break; - // No dots found, use whole name + + /* Find rightmost path separator */ + name_start = portability_path_basename_offset(path, path_size); + + /* Find leftmost dot */ + leftmost_dot = name_start; + + while (leftmost_dot < path_size && path[leftmost_dot] != '.') + { + ++leftmost_dot; + } + + /* No dots found, use whole name */ if (leftmost_dot == path_size) - leftmost_dot--; - // name starts with dot, use the following dot instead + { + --leftmost_dot; + } + + /* Name starts with dot, use the following dot instead */ if (leftmost_dot == name_start) - for (leftmost_dot = name_start + 1; leftmost_dot < path_size; leftmost_dot++) - if (path[leftmost_dot] == '.') - break; - const size_t length = leftmost_dot - name_start; - const size_t size = length + 1; - // Return required size + { + do + { + ++leftmost_dot; + + } while (leftmost_dot < path_size && path[leftmost_dot] != '.'); + } + + length = leftmost_dot - name_start; + size = length + 1; + + /* Return required size */ if (name == NULL || size > name_size) + { return size; - if (length) + } + + if (length > 0) + { memcpy(name, path + name_start, length); + } + name[length] = '\0'; + return size; } From 77e9ddb2312950dbf0fa5b291883a799eeb94326 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Sat, 4 Oct 2025 17:48:55 +0200 Subject: [PATCH 347/364] Improve cxx port. --- source/ports/cxx_port/CMakeLists.txt | 33 ++--- .../cxx_port/include/metacall/metacall.hpp | 127 +++++++++++++++++- .../cxx_port/inline/metacall/metacall.inl | 40 ------ .../source/metacall_cxx_port_test.cpp | 81 +++++++++++ 4 files changed, 211 insertions(+), 70 deletions(-) delete mode 100644 source/ports/cxx_port/inline/metacall/metacall.inl diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index e3e79398a4..c681dacd1c 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -34,14 +34,9 @@ include(SecurityFlags) # Sources # -set(inline_path "${CMAKE_CURRENT_SOURCE_DIR}/inline/metacall") set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/metacall") set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") -set(inlines - ${inline_path}/metacall.inl -) - set(headers ${include_path}/metacall.hpp ) @@ -51,11 +46,8 @@ set(sources ) # Group source files -set(inline_group "Inline Files") set(header_group "Header Files (API)") set(source_group "Source Files") -source_group_by_path(${inline_path} "\\\\.inl$" - ${inline_group} ${inlines}) source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" ${header_group} ${headers}) source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" @@ -67,7 +59,6 @@ source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" # Build library add_library(${target} - ${inlines} ${sources} ${headers} ) @@ -104,10 +95,6 @@ target_include_directories(${target} ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include - ${PROJECT_BINARY_DIR}/source/inline - ${CMAKE_CURRENT_SOURCE_DIR}/inline - ${CMAKE_CURRENT_BINARY_DIR}/inline - PUBLIC ${DEFAULT_INCLUDE_DIRECTORIES} @@ -115,11 +102,6 @@ target_include_directories(${target} $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> - - - $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inline> - $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/inline> - $<INSTALL_INTERFACE:inline> ) # @@ -165,6 +147,15 @@ target_compile_options(${target} INTERFACE ) +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + # # Linker options # @@ -187,9 +178,3 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/metacall DESTINATION ${INSTALL_INCLUDE} COMPONENT dev ) - -# Inline files -install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/inline/metacall DESTINATION ${INSTALL_INCLUDE} - COMPONENT dev -) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index d92a81638a..443e9dbd97 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -86,7 +86,6 @@ class METACALL_API value : public value_base throw std::runtime_error("Unsupported MetaCall value"); } -private: // Type-specific creation (calls specialized version below) static void *create(const T &v); @@ -338,6 +337,123 @@ inline std::nullptr_t value<std::nullptr_t>::to_value() const // TODO: Future, Function, Class, Object, Exception, Throwable... +class METACALL_API value_ref +{ +public: + explicit value_ref(void *ptr) : + ptr(ptr) {} + + template <typename T> + T as() const + { + return value<T>(ptr).to_value(); + } + +private: + void *ptr; +}; + +class METACALL_API array : public value_base +{ +public: + template <typename... Args> + explicit array(Args &&...args) : + value_base(create(std::forward<Args>(args)...), &metacall_value_destroy) + { + if (value_ptr == nullptr) + { + throw std::runtime_error("Failed to create MetaCall array"); + } + } + + explicit array(void *array_value) : + value_base(array_value, &value_base::noop_destructor) {} + + void **to_value() const + { + void **array_ptr = metacall_value_to_array(value_ptr.get()); + + if (array_ptr == NULL) + { + throw std::runtime_error("Invalid MetaCall array"); + } + + return array_ptr; + } + + template <typename T> + T get(std::size_t index) const + { + void **array_ptr = to_value(); + + return value<T>(array_ptr[index]).to_value(); + } + + value_ref operator[](std::size_t index) const + { + void **array_ptr = to_value(); + + return value_ref(array_ptr[index]); + } + + static enum metacall_value_id id() + { + return METACALL_ARRAY; + } + +private: + // Recursive function to create and fill the MetaCall array + template <typename... Args> + static void *create(Args &&...args) + { + constexpr std::size_t size = sizeof...(Args); + + // Create the array with null data initially + void *array_value = metacall_value_create_array(NULL, size); + + if (array_value == NULL) + { + throw std::runtime_error("Failed to create MetaCall value array"); + } + + // Get the internal C array + void **array_ptr = metacall_value_to_array(array_value); + + // Helper to unpack the args into array + create_array(array_ptr, 0, std::forward<Args>(args)...); + + return array_value; + } + + // Recursive unpacking using fold expression (C++17+) + template <typename... Args> + static void create_array(void **array_ptr, std::size_t index, Args &&...args) + { + // Use initializer list trick to expand the pack + (( + array_ptr[index++] = value<std::decay_t<Args>>::create(std::forward<Args>(args))), + ...); + } +}; + +template <> +inline void *value<array>::create(const array &v) +{ + return metacall_value_copy(v.to_raw()); +} + +template <> +inline enum metacall_value_id value<array>::id() +{ + return METACALL_ARRAY; +} + +template <> +inline array value<array>::to_value() const +{ + return array(to_raw()); +} + template <typename K, typename V> class METACALL_API map : public value_base { @@ -422,12 +538,11 @@ class METACALL_API map : public value_base }; template <typename... Ts> -METACALL_API int metacall(std::string name, Ts... ts); +METACALL_API int metacall(std::string name, Ts... ts) +{ + return 0; +} } /* namespace metacall */ -// TODO: Move everything to metacall.inl - -#include <metacall/metacall.inl> - #endif /* METACALL_HPP */ diff --git a/source/ports/cxx_port/inline/metacall/metacall.inl b/source/ports/cxx_port/inline/metacall/metacall.inl deleted file mode 100644 index 8223b5be08..0000000000 --- a/source/ports/cxx_port/inline/metacall/metacall.inl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Format Library by Parra Studios - * A cross-platform library for supporting formatted input / output. - * - * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef METACALL_INL -#define METACALL_INL 1 - -/* -- Headers -- */ - -#include <metacall/metacall_api.h> - -#include <string> - -namespace metacall -{ -template <typename... Ts> -METACALL_API int metacall(std::string name, Ts... ts) -{ - return 0; -} - -} /* namespace metacall */ - -#endif /* METACALL_INL */ diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 6865b258f8..516e1f27b7 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -46,6 +46,48 @@ void *cxx_map_test(size_t argc, void *args[], void *data) return metacall_value_create_null(); } +void *cxx_array_test(size_t argc, void *args[], void *data) +{ + array a(args[0]); + + (void)argc; + (void)data; + + EXPECT_EQ((float)a[0].as<int>(), (int)3); + EXPECT_EQ((float)a[1].as<float>(), (float)4.0f); + + EXPECT_EQ((float)a.get<int>(0), (int)3); + EXPECT_EQ((float)a.get<float>(1), (float)4.0f); + + printf("a[0] => %d\n", a[0].as<int>()); + printf("a[1] => %f\n", a[1].as<float>()); + fflush(stdout); + + return metacall_value_create_null(); +} + +void *cxx_map_array_test(size_t argc, void *args[], void *data) +{ + map<std::string, array> m(args[0]); + + (void)argc; + (void)data; + + EXPECT_STREQ(m["includes"][0].as<std::string>().c_str(), "/a/path"); + EXPECT_STREQ(m["includes"][1].as<std::string>().c_str(), "/another/path"); + + EXPECT_STREQ(m["libraries"][0].as<std::string>().c_str(), "/a/path"); + EXPECT_STREQ(m["libraries"][1].as<std::string>().c_str(), "/another/path"); + + printf("m['includes'][0] => %s\n", m["includes"][0].as<std::string>().c_str()); + printf("m['includes'][1] => %s\n", m["includes"][1].as<std::string>().c_str()); + + printf("m['libraries'][0] => %s\n", m["libraries"][0].as<std::string>().c_str()); + printf("m['libraries'][1] => %s\n", m["libraries"][1].as<std::string>().c_str()); + + return metacall_value_create_null(); +} + // TODO: /* void *cxx_recursive_map_test(size_t argc, void *args[], void *data) @@ -89,6 +131,45 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) metacall_value_destroy(ret); } + { + array a(3, 4.0f); + + void *args[] = { + a.to_raw() + }; + + metacall_register("cxx_array_test", cxx_array_test, NULL, METACALL_NULL, 1, METACALL_ARRAY); + + void *ret = metacallv_s("cxx_array_test", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + } + + { + map<std::string, array> m = { + { "includes", array("/a/path", "/another/path") }, + { "libraries", array("/a/path", "/another/path") } + }; + + void *args[] = { + m.to_raw() + }; + + metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, METACALL_NULL, 1, METACALL_MAP); + + void *ret = metacallv_s("cxx_map_array_test", args, 1); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + + metacall_value_destroy(ret); + } + // TODO: /* { From 057d988c43d798eb9c5494d2f372a279f4c2df9c Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 9 Oct 2025 17:12:41 +0200 Subject: [PATCH 348/364] Improve metacall cxx port. --- source/ports/cxx_port/CMakeLists.txt | 8 +++ .../cxx_port/include/metacall/metacall.hpp | 51 ++++++++++++-- .../cxx_port/include/metacall/metacall.inl | 31 +++++++++ .../source/metacall_cxx_port_test.cpp | 66 +++++++------------ 4 files changed, 108 insertions(+), 48 deletions(-) create mode 100644 source/ports/cxx_port/include/metacall/metacall.inl diff --git a/source/ports/cxx_port/CMakeLists.txt b/source/ports/cxx_port/CMakeLists.txt index c681dacd1c..13657ce943 100644 --- a/source/ports/cxx_port/CMakeLists.txt +++ b/source/ports/cxx_port/CMakeLists.txt @@ -41,15 +41,22 @@ set(headers ${include_path}/metacall.hpp ) +set(inline + ${include_path}/metacall.inl +) + set(sources ${source_path}/metacall.cpp ) # Group source files set(header_group "Header Files (API)") +set(inline_group "Inline Files") set(source_group "Source Files") source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" ${header_group} ${headers}) +source_group_by_path(${include_path} "\\\\.inl$" + ${inline_group} ${inlines}) source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" ${source_group} ${sources}) @@ -61,6 +68,7 @@ source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" add_library(${target} ${sources} ${headers} + ${inline} ) # Create namespaced alias diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 443e9dbd97..9092bbfe96 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -72,8 +72,8 @@ class METACALL_API value : public value_base } } - explicit value(void *value_ptr) : - value_base(value_ptr, &value_base::noop_destructor) + explicit value(void *value_ptr, void (*destructor)(void *) = &value_base::noop_destructor) : + value_base(value_ptr, destructor) { if (metacall_value_id(value_ptr) != id()) { @@ -537,12 +537,53 @@ class METACALL_API map : public value_base std::unordered_map<K, pair_value_type> m; }; -template <typename... Ts> -METACALL_API int metacall(std::string name, Ts... ts) +namespace detail +{ +template <typename T> +constexpr bool is_value_base = std::is_base_of_v<value_base, std::remove_cv_t<std::remove_reference_t<T>>>; + +template <typename T> +value_base to_value_base(T &&arg) { - return 0; + if constexpr (is_value_base<T>) + { + return std::move(arg); + } + else + { + return value<std::decay_t<T>>(std::forward<T>(arg)); + } +} + +} /* namespace detail */ + +template <typename Ret, typename... Args> +METACALL_API Ret metacall(std::string name, Args &&...args) +{ + constexpr std::size_t size = sizeof...(Args); + std::array<value_base, size> value_args = { { detail::to_value_base(std::forward<Args>(args))... } }; + void *raw_args[size]; + + for (std::size_t i = 0; i < size; ++i) + { + raw_args[i] = value_args[i].to_raw(); + } + + void *ret = metacallv_s(name.c_str(), raw_args, size); + + if (ret == NULL) + { + throw std::runtime_error("MetaCall invokation to '" + name + "' has failed by returning NULL"); + } + + value<Ret> result(ret, &metacall_value_destroy); + + return result.to_value(); } } /* namespace metacall */ +// TODO: Move implementations to metacall.inl +#include <metacall/metacall.inl> + #endif /* METACALL_HPP */ diff --git a/source/ports/cxx_port/include/metacall/metacall.inl b/source/ports/cxx_port/include/metacall/metacall.inl new file mode 100644 index 0000000000..81a48f839d --- /dev/null +++ b/source/ports/cxx_port/include/metacall/metacall.inl @@ -0,0 +1,31 @@ +/* + * Format Library by Parra Studios + * A cross-platform library for supporting formatted input / output. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef METACALL_INL +#define METACALL_INL 1 + +/* -- Headers -- */ + +namespace metacall +{ + +} /* namespace metacall */ + +#endif /* METACALL_INL */ diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 516e1f27b7..23998054e4 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -106,6 +106,20 @@ void *cxx_recursive_map_test(size_t argc, void *args[], void *data) } */ +void *cxx_float_int_int_test(size_t argc, void *args[], void *data) +{ + value<int> a0(args[0]); + value<int> a1(args[1]); + + (void)argc; + (void)data; + + EXPECT_EQ(a0.to_value(), 7); + EXPECT_EQ(a1.to_value(), 8); + + return metacall_value_create_float(3.0f); +} + TEST_F(metacall_cxx_port_test, DefaultConstructor) { ASSERT_EQ((int)0, (int)metacall_initialize()); @@ -116,37 +130,17 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "world", 4.0f } }; - void *args[] = { - m.to_raw() - }; - metacall_register("cxx_map_test", cxx_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); - void *ret = metacallv_s("cxx_map_test", args, 1); - - EXPECT_NE((void *)NULL, (void *)ret); - - EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); - - metacall_value_destroy(ret); + EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_test", m)); } { array a(3, 4.0f); - void *args[] = { - a.to_raw() - }; - metacall_register("cxx_array_test", cxx_array_test, NULL, METACALL_NULL, 1, METACALL_ARRAY); - void *ret = metacallv_s("cxx_array_test", args, 1); - - EXPECT_NE((void *)NULL, (void *)ret); - - EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); - - metacall_value_destroy(ret); + EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_array_test", a)); } { @@ -155,19 +149,9 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "libraries", array("/a/path", "/another/path") } }; - void *args[] = { - m.to_raw() - }; - metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, METACALL_NULL, 1, METACALL_MAP); - void *ret = metacallv_s("cxx_map_array_test", args, 1); - - EXPECT_NE((void *)NULL, (void *)ret); - - EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); - - metacall_value_destroy(ret); + EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_array_test", m)); } // TODO: @@ -177,21 +161,17 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "hello", { "world", 4.0f } } }; - void *args[] = { - m.to_raw() - }; - metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); - void *ret = metacallv_s("cxx_recursive_map_test", args, 1); - - EXPECT_NE((void *)NULL, (void *)ret); + EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_recursive_map_test", m)); + } + */ - EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_NULL); + { + metacall_register("cxx_float_int_int_test", cxx_float_int_int_test, NULL, METACALL_FLOAT, 2, METACALL_INT, METACALL_INT); - metacall_value_destroy(ret); + EXPECT_EQ(3.0f, metacall::metacall<float>("cxx_float_int_int_test", 7, 8)); } - */ /* Print inspect information */ { From ac2228f9b412fb89eac49e9717517f9a48c5fdf7 Mon Sep 17 00:00:00 2001 From: Abdelrahman Omar <128975938+abd0-omar@users.noreply.github.com> Date: Wed, 29 Oct 2025 15:26:39 +0300 Subject: [PATCH 349/364] replace string loader tags with `Tag` enum (#588) Use Tag enum instead of strings in `load::from_single_file`, `load::from_file` and `load::from_memory`. Prevents runtime errors from invalid tags like 'rust' instead of 'rs'. --- source/ports/rs_port/README.md | 2 +- source/ports/rs_port/inline/src/lib.rs | 16 ++++- source/ports/rs_port/src/lib.rs | 8 +-- source/ports/rs_port/src/load.rs | 72 ++++++++++++++++--- source/ports/rs_port/tests/inlines_test.rs | 15 ++-- .../rs_port/tests/invalid_loaders_test.rs | 15 ++-- source/ports/rs_port/tests/loaders_test.rs | 12 ++-- .../rs_port/tests/metacall_exception_test.rs | 7 +- source/ports/rs_port/tests/metacall_test.rs | 13 ++-- 9 files changed, 118 insertions(+), 42 deletions(-) diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index 53edd0936d..1cce7dd4b9 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -51,7 +51,7 @@ fn main() { let _metacall = initialize().unwrap(); // Load the file - load::from_single_file("ts", "sum.ts").unwrap(); + load::from_single_file(load::Tag::TypeScript, "sum.ts").unwrap(); // Call the sum function let sum = metacall::<f64>("sum", [1.0, 2.0]).unwrap(); diff --git a/source/ports/rs_port/inline/src/lib.rs b/source/ports/rs_port/inline/src/lib.rs index bb9358d5aa..1b0083a16d 100644 --- a/source/ports/rs_port/inline/src/lib.rs +++ b/source/ports/rs_port/inline/src/lib.rs @@ -2,7 +2,7 @@ use proc_macro::TokenStream; use quote::quote; macro_rules! gen_inline_macro { - ($($name:ident),*) => ( + ($($name:ident => $tag:ident),*) => ( $( #[proc_macro] pub fn $name(input: TokenStream) -> TokenStream { @@ -10,7 +10,7 @@ macro_rules! gen_inline_macro { let buffer = token_stream_input.to_string(); let result = quote! {{ - ::metacall::load::from_memory(stringify!($name), #buffer.to_string()).unwrap() + ::metacall::load::from_memory(::metacall::load::Tag::$tag, #buffer.to_string()).unwrap() }}; result.into() @@ -19,4 +19,14 @@ macro_rules! gen_inline_macro { ) } -gen_inline_macro!(py, node, ts, cs, rb, cob, rpc, java, wasm); +gen_inline_macro!( + py => Python, + node => NodeJS, + ts => TypeScript, + cs => CSharp, + rb => Ruby, + cob => Cobol, + rpc => RPC, + java => Java, + wasm => Wasm +); diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index 3cfb34485b..2aada3f72f 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -49,7 +49,7 @@ //! //! // Load the file (Checkout the loaders module for loading multiple files //! // or loading from string) -//! load::from_single_file("ts", "sum.ts").unwrap(); +//! load::from_single_file(load::Tag::TypeScript, "sum.ts").unwrap(); //! //! // Call the sum function (Also checkout other metacall functions) //! let sum = metacall::<f64>("sum", [1.0, 2.0]).unwrap(); @@ -66,14 +66,14 @@ pub(crate) use macros::private_macros::*; /// Contains MetaCall loaders from file and memory. Usage example: ... /// ``` /// // Loading a single file with Nodejs. -/// metacall::load::from_single_file("node", "index.js").unwrap(); +/// metacall::load::from_single_file(metacall::load::Tag::NodeJS, "index.js").unwrap(); /// /// // Loading multiple files with Nodejs. -/// metacall::load::from_file("node", ["index.js", "main.js"]).unwrap(); +/// metacall::load::from_file(metacall::load::Tag::NodeJS, ["index.js", "main.js"]).unwrap(); /// /// // Loading a string with Nodejs. /// let script = "function greet() { return 'hi there!' }; module.exports = { greet };"; -/// metacall::load::from_memory("node", script).unwrap(); +/// metacall::load::from_memory(metacall::load::Tag::NodeJS, script).unwrap(); /// ``` pub mod load; diff --git a/source/ports/rs_port/src/load.rs b/source/ports/rs_port/src/load.rs index 4c9f8cc55b..2e40af3f1c 100644 --- a/source/ports/rs_port/src/load.rs +++ b/source/ports/rs_port/src/load.rs @@ -5,28 +5,82 @@ use crate::{ }; use std::{ ffi::CString, + fmt, path::{Path, PathBuf}, ptr, }; +pub enum Tag { + C, + Cobol, + Crystal, + CSharp, + Dart, + Deno, + Extension, + File, + Java, + Julia, + JavaScript, + JSM, + Kind, + LLVM, + Lua, + Mock, + NodeJS, + Python, + Ruby, + RPC, + Rust, + TypeScript, + Wasm, +} + +impl fmt::Display for Tag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Tag::C => write!(f, "c"), + Tag::Cobol => write!(f, "cob"), + Tag::Crystal => write!(f, "cr"), + Tag::CSharp => write!(f, "cs"), + Tag::Dart => write!(f, "dart"), + Tag::Deno => write!(f, "deno"), + Tag::Extension => write!(f, "ext"), + Tag::File => write!(f, "file"), + Tag::Java => write!(f, "java"), + Tag::Julia => write!(f, "jl"), + Tag::JavaScript => write!(f, "js"), + Tag::JSM => write!(f, "jsm"), + Tag::Kind => write!(f, "kind"), + Tag::LLVM => write!(f, "llvm"), + Tag::Lua => write!(f, "lua"), + Tag::Mock => write!(f, "mock"), + Tag::NodeJS => write!(f, "node"), + Tag::Python => write!(f, "py"), + Tag::Ruby => write!(f, "rb"), + Tag::RPC => write!(f, "rpc"), + Tag::Rust => write!(f, "rs"), + Tag::TypeScript => write!(f, "ts"), + Tag::Wasm => write!(f, "wasm"), + } + } +} + /// Loads a script from a single file. Usage example: ... /// ``` /// // A Nodejs script -/// metacall::load::from_single_file("node", "index.js").unwrap(); +/// metacall::load::from_single_file(Tag::NodeJS, "index.js").unwrap(); /// ``` -pub fn from_single_file( - tag: impl ToString, - script: impl AsRef<Path>, -) -> Result<(), MetaCallLoaderError> { +pub fn from_single_file(tag: Tag, script: impl AsRef<Path>) -> Result<(), MetaCallLoaderError> { from_file(tag, [script]) } /// Loads a script from file. Usage example: ... /// ``` /// // A Nodejs script -/// metacall::load::from_file("node", ["index.js", "main.js"]).unwrap(); +/// metacall::load::from_file(Tag::NodeJS, ["index.js", "main.js"]).unwrap(); /// ``` pub fn from_file( - tag: impl ToString, + tag: Tag, scripts: impl IntoIterator<Item = impl AsRef<Path>>, ) -> Result<(), MetaCallLoaderError> { let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; @@ -71,9 +125,9 @@ pub fn from_file( /// let script = "function greet() { return 'hi there!' }; module.exports = { greet };"; /// /// // A Nodejs script -/// metacall::load::from_memory("node", script).unwrap(); +/// metacall::load::from_memory(Tag::NodeJS, script).unwrap(); /// ``` -pub fn from_memory(tag: impl ToString, script: impl ToString) -> Result<(), MetaCallLoaderError> { +pub fn from_memory(tag: Tag, script: impl ToString) -> Result<(), MetaCallLoaderError> { let script = script.to_string(); let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; let c_script = cstring_enum!(script, MetaCallLoaderError)?; diff --git a/source/ports/rs_port/tests/inlines_test.rs b/source/ports/rs_port/tests/inlines_test.rs index ff5f483089..adf06ee43b 100644 --- a/source/ports/rs_port/tests/inlines_test.rs +++ b/source/ports/rs_port/tests/inlines_test.rs @@ -1,7 +1,8 @@ use metacall::{ initialize, inline::{node, py, ts}, - is_initialized, load, + is_initialized, + load::{self, Tag}, }; #[test] @@ -10,30 +11,30 @@ fn inlines() { assert!(is_initialized()); - if load::from_memory("py", "").is_ok() { + if load::from_memory(Tag::Python, "").is_ok() { py! { print("hello world") } } - if load::from_memory("py", "").is_ok() { + if load::from_memory(Tag::Python, "").is_ok() { py! {print("hello world")} } - if load::from_memory("node", "").is_ok() { + if load::from_memory(Tag::NodeJS, "").is_ok() { node! { console.log("hello world"); } } - if load::from_memory("node", "").is_ok() { + if load::from_memory(Tag::NodeJS, "").is_ok() { node! {console.log("hello world")} } - if load::from_memory("ts", "").is_ok() { + if load::from_memory(Tag::TypeScript, "").is_ok() { ts! { console.log("hello world"); } } - if load::from_memory("ts", "").is_ok() { + if load::from_memory(Tag::TypeScript, "").is_ok() { ts! {console.log("hello world")} } } diff --git a/source/ports/rs_port/tests/invalid_loaders_test.rs b/source/ports/rs_port/tests/invalid_loaders_test.rs index ec58d0bcb0..559690aae4 100644 --- a/source/ports/rs_port/tests/invalid_loaders_test.rs +++ b/source/ports/rs_port/tests/invalid_loaders_test.rs @@ -1,4 +1,8 @@ -use metacall::{initialize, is_initialized, load, MetaCallLoaderError}; +use metacall::{ + initialize, is_initialized, + load::{self, Tag}, + MetaCallLoaderError, +}; use std::env; #[test] @@ -9,25 +13,24 @@ fn invalid_loaders() { let scripts_dir = env::current_dir().unwrap().join("tests/scripts"); let inavlid_file = scripts_dir.join("whatever.yeet"); - let valid_file = scripts_dir.join("script.js"); + let js_file = scripts_dir.join("script.js"); if let Err(MetaCallLoaderError::FileNotFound(_)) = - load::from_single_file("random", inavlid_file) + load::from_single_file(load::Tag::NodeJS, inavlid_file) { // Everything Ok } else { panic!("Expected the loader fail with `FileNotFound` error variant!"); } - if let Err(MetaCallLoaderError::FromFileFailure) = load::from_single_file("random", valid_file) - { + if let Err(MetaCallLoaderError::FromFileFailure) = load::from_single_file(Tag::Lua, js_file) { // Everything Ok } else { panic!("Expected the loader fail with `FromFileFailure` error variant!"); } if let Err(MetaCallLoaderError::FromMemoryFailure) = - load::from_memory("random", "Invalid code!") + load::from_memory(load::Tag::NodeJS, "Invalid code!") { // Everything Ok } else { diff --git a/source/ports/rs_port/tests/loaders_test.rs b/source/ports/rs_port/tests/loaders_test.rs index c45c4c17b9..00fab0751d 100644 --- a/source/ports/rs_port/tests/loaders_test.rs +++ b/source/ports/rs_port/tests/loaders_test.rs @@ -1,4 +1,8 @@ -use metacall::{initialize, is_initialized, load, metacall_no_arg}; +use metacall::{ + initialize, is_initialized, + load::{self, Tag}, + metacall_no_arg, +}; use std::{ env, fs::{self, File}, @@ -17,10 +21,10 @@ fn call_greet(test: &str, num: u32) { } fn load_from_memory_test() { - load::from_memory("node", SCRIPT1).unwrap(); + load::from_memory(Tag::NodeJS, SCRIPT1).unwrap(); call_greet("load_from_memory", 1); - load::from_memory("node", SCRIPT3).unwrap(); + load::from_memory(Tag::NodeJS, SCRIPT3).unwrap(); } fn load_from_file_test() { @@ -34,7 +38,7 @@ fn load_from_file_test() { temp_js.write_all(SCRIPT2.as_bytes()).unwrap(); temp_js.flush().unwrap(); - load::from_single_file("node", temp_js_path).unwrap(); + load::from_single_file(Tag::NodeJS, temp_js_path).unwrap(); call_greet("load_from_file", 2); diff --git a/source/ports/rs_port/tests/metacall_exception_test.rs b/source/ports/rs_port/tests/metacall_exception_test.rs index 780aba0562..ef8b269a49 100644 --- a/source/ports/rs_port/tests/metacall_exception_test.rs +++ b/source/ports/rs_port/tests/metacall_exception_test.rs @@ -1,4 +1,7 @@ -use metacall::{initialize, is_initialized, load}; +use metacall::{ + initialize, is_initialized, + load::{self, Tag}, +}; use std::env; #[test] @@ -10,7 +13,7 @@ fn inlines() { let tests_dir = env::current_dir().unwrap().join("tests/scripts"); let js_test_file = tests_dir.join("script.js"); - if load::from_single_file("node", js_test_file).is_ok() { + if load::from_single_file(Tag::NodeJS, js_test_file).is_ok() { // This should not generate a segmentation fault let val = metacall::metacall_no_arg::<metacall::MetaCallException>("test_exception").unwrap(); diff --git a/source/ports/rs_port/tests/metacall_test.rs b/source/ports/rs_port/tests/metacall_test.rs index d23e2e2ae3..7b842da59d 100644 --- a/source/ports/rs_port/tests/metacall_test.rs +++ b/source/ports/rs_port/tests/metacall_test.rs @@ -1,7 +1,8 @@ use metacall::{ - initialize, is_initialized, load, MetaCallClass, MetaCallException, MetaCallFunction, - MetaCallFuture, MetaCallNull, MetaCallObject, MetaCallPointer, MetaCallThrowable, - MetaCallValue, + initialize, is_initialized, + load::{self, Tag}, + MetaCallClass, MetaCallException, MetaCallFunction, MetaCallFuture, MetaCallNull, + MetaCallObject, MetaCallPointer, MetaCallThrowable, MetaCallValue, }; use std::{any::Any, collections::HashMap, env, fmt::Debug}; @@ -368,7 +369,7 @@ fn metacall() { let js_test_file = tests_dir.join("script.js"); let c_test_file = tests_dir.join("script.c"); let py_test_file = tests_dir.join("script.py"); - let py_loaded = load::from_single_file("py", py_test_file).is_ok(); + let py_loaded = load::from_single_file(Tag::Python, py_test_file).is_ok(); if py_loaded { test_buffer(); @@ -381,7 +382,7 @@ fn metacall() { test_string(); test_null(); } - if load::from_single_file("c", c_test_file).is_ok() { + if load::from_single_file(load::Tag::C, c_test_file).is_ok() { test_char(); test_double(); test_float(); @@ -390,7 +391,7 @@ fn metacall() { test_short(); test_mixed_numbers(); } - if load::from_single_file("node", js_test_file).is_ok() { + if load::from_single_file(load::Tag::NodeJS, js_test_file).is_ok() { test_exception(); test_throwable(); test_future(); From 9f3a6d53816d433b332120a58c23d98d82bd4580 Mon Sep 17 00:00:00 2001 From: Aly Abdelmoneim <148393799+AlyAbdelmoneim@users.noreply.github.com> Date: Wed, 29 Oct 2025 15:30:30 +0300 Subject: [PATCH 350/364] refactor: rename 'script' parameters to 'path' in file loading functions (#587) * refactor: rename 'script' parameters to 'path' in file loading functions * refactor: renaming rest of the variables from script and scripts to path and paths respectively * refactor: renaming rest of the variables from script and scripts to path and paths respectively * Update load.rs --------- Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> --- source/ports/rs_port/src/load.rs | 44 +++++++++++++++++--------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/source/ports/rs_port/src/load.rs b/source/ports/rs_port/src/load.rs index 2e40af3f1c..743e1f98d9 100644 --- a/source/ports/rs_port/src/load.rs +++ b/source/ports/rs_port/src/load.rs @@ -66,50 +66,54 @@ impl fmt::Display for Tag { } } -/// Loads a script from a single file. Usage example: ... +/// Loads a file from a single file. Usage example: ... /// ``` -/// // A Nodejs script -/// metacall::load::from_single_file(Tag::NodeJS, "index.js").unwrap(); +/// // A Nodejs path +/// metacall::load::from_single_file("node", "index.js").unwrap(); /// ``` -pub fn from_single_file(tag: Tag, script: impl AsRef<Path>) -> Result<(), MetaCallLoaderError> { - from_file(tag, [script]) +pub fn from_single_file( + tag: impl ToString, + path: impl AsRef<Path>, +) -> Result<(), MetaCallLoaderError> { + from_file(tag, [path]) } -/// Loads a script from file. Usage example: ... + +/// Loads a path from file. Usage example: ... /// ``` /// // A Nodejs script /// metacall::load::from_file(Tag::NodeJS, ["index.js", "main.js"]).unwrap(); /// ``` pub fn from_file( tag: Tag, - scripts: impl IntoIterator<Item = impl AsRef<Path>>, + paths: impl IntoIterator<Item = impl AsRef<Path>>, ) -> Result<(), MetaCallLoaderError> { let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; - let mut c_script: CString; + let mut c_path: CString; - let mut new_scripts: Vec<*const i8> = Vec::new(); - for script in scripts.into_iter() { - let script_as_pathbuf = PathBuf::from(script.as_ref()); - let script_as_str = script_as_pathbuf.to_str().unwrap(); + let mut new_paths: Vec<*const i8> = Vec::new(); + for path in paths.into_iter() { + let path_as_pathbuf = PathBuf::from(path.as_ref()); + let path_as_str = path_as_pathbuf.to_str().unwrap(); - if !script_as_pathbuf.exists() { - return Err(MetaCallLoaderError::FileNotFound(script_as_pathbuf)); + if !path_as_pathbuf.exists() { + return Err(MetaCallLoaderError::FileNotFound(path_as_pathbuf)); } - if !script_as_pathbuf.is_file() { + if !path_as_pathbuf.is_file() { return Err(MetaCallLoaderError::NotAFileOrPermissionDenied( - script_as_pathbuf, + path_as_pathbuf, )); } - c_script = cstring_enum!(script_as_str, MetaCallLoaderError)?; + c_path = cstring_enum!(path_as_str, MetaCallLoaderError)?; - new_scripts.push(c_script.as_ptr()); + new_paths.push(c_path.as_ptr()); } if unsafe { metacall_load_from_file( c_tag.as_ptr(), - new_scripts.as_mut_ptr(), - new_scripts.len(), + new_paths.as_mut_ptr(), + new_paths.len(), ptr::null_mut(), ) } != 0 From bcca0eebaad2b04d688a8724f2ca6417d34c3948 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 29 Oct 2025 13:40:34 +0100 Subject: [PATCH 351/364] Solve issues with rs_port. --- source/ports/rs_port/src/load.rs | 2 +- source/ports/rs_port/tests/invalid_loaders_test.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/ports/rs_port/src/load.rs b/source/ports/rs_port/src/load.rs index 743e1f98d9..2eac2898a7 100644 --- a/source/ports/rs_port/src/load.rs +++ b/source/ports/rs_port/src/load.rs @@ -72,7 +72,7 @@ impl fmt::Display for Tag { /// metacall::load::from_single_file("node", "index.js").unwrap(); /// ``` pub fn from_single_file( - tag: impl ToString, + tag: Tag, path: impl AsRef<Path>, ) -> Result<(), MetaCallLoaderError> { from_file(tag, [path]) diff --git a/source/ports/rs_port/tests/invalid_loaders_test.rs b/source/ports/rs_port/tests/invalid_loaders_test.rs index 559690aae4..a803c4cb48 100644 --- a/source/ports/rs_port/tests/invalid_loaders_test.rs +++ b/source/ports/rs_port/tests/invalid_loaders_test.rs @@ -13,7 +13,7 @@ fn invalid_loaders() { let scripts_dir = env::current_dir().unwrap().join("tests/scripts"); let inavlid_file = scripts_dir.join("whatever.yeet"); - let js_file = scripts_dir.join("script.js"); + let valid_file = scripts_dir.join("script.js"); if let Err(MetaCallLoaderError::FileNotFound(_)) = load::from_single_file(load::Tag::NodeJS, inavlid_file) @@ -23,7 +23,8 @@ fn invalid_loaders() { panic!("Expected the loader fail with `FileNotFound` error variant!"); } - if let Err(MetaCallLoaderError::FromFileFailure) = load::from_single_file(Tag::Lua, js_file) { + // We use JSM here because it is not implemented, it should fail + if let Err(MetaCallLoaderError::FromFileFailure) = load::from_single_file(Tag::JSM, valid_file) { // Everything Ok } else { panic!("Expected the loader fail with `FromFileFailure` error variant!"); From 25fedf1a5ef95723a8296805787b0d690f99db11 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 29 Oct 2025 13:42:01 +0100 Subject: [PATCH 352/364] Solve issues in windows with cxx port. --- source/ports/cxx_port/include/metacall/metacall.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 9092bbfe96..080013b26b 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -60,7 +60,7 @@ class value_base }; template <typename T> -class METACALL_API value : public value_base +class value : public value_base { public: explicit value(const T &v, void (*destructor)(void *) = &metacall_value_destroy) : @@ -337,7 +337,7 @@ inline std::nullptr_t value<std::nullptr_t>::to_value() const // TODO: Future, Function, Class, Object, Exception, Throwable... -class METACALL_API value_ref +class value_ref { public: explicit value_ref(void *ptr) : @@ -353,7 +353,7 @@ class METACALL_API value_ref void *ptr; }; -class METACALL_API array : public value_base +class array : public value_base { public: template <typename... Args> @@ -455,7 +455,7 @@ inline array value<array>::to_value() const } template <typename K, typename V> -class METACALL_API map : public value_base +class map : public value_base { public: using pair_type = std::pair<K, V>; @@ -558,7 +558,7 @@ value_base to_value_base(T &&arg) } /* namespace detail */ template <typename Ret, typename... Args> -METACALL_API Ret metacall(std::string name, Args &&...args) +Ret metacall(std::string name, Args &&...args) { constexpr std::size_t size = sizeof...(Args); std::array<value_base, size> value_args = { { detail::to_value_base(std::forward<Args>(args))... } }; From 8b773d46b8267bfa48128fdd401b8f06cb3092f5 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 29 Oct 2025 18:51:43 +0100 Subject: [PATCH 353/364] Add new async api in rs port. --- source/ports/rs_port/Cargo.toml | 2 +- .../rs_port/src/types/metacall_future.rs | 39 +++++++------------ source/ports/rs_port/tests/metacall_test.rs | 27 +++++++------ 3 files changed, 31 insertions(+), 37 deletions(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index 4ed8cee593..c238068d30 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.5.2" +version = "0.5.3" [lib] crate-type = ["lib"] diff --git a/source/ports/rs_port/src/types/metacall_future.rs b/source/ports/rs_port/src/types/metacall_future.rs index de051d0d55..6caa25d532 100644 --- a/source/ports/rs_port/src/types/metacall_future.rs +++ b/source/ports/rs_port/src/types/metacall_future.rs @@ -19,7 +19,8 @@ use std::{ /// and the second argument is the data that you may want to access when the function gets called. /// Checkout [MetaCallFuture resolve](MetaCallFuture#method.then) or /// [MetaCallFuture reject](MetaCallFuture#method.catch) for usage. -pub type MetaCallFutureHandler = fn(Box<dyn MetaCallValue>, Box<dyn Any>) -> Box<dyn MetaCallValue>; +pub type MetaCallFutureHandler = + fn(Box<dyn MetaCallValue>, Option<Box<dyn Any>>) -> Box<dyn MetaCallValue>; /// Represents MetaCallFuture. Keep in mind that it's not supported to pass a future as an argument. /// @@ -118,7 +119,12 @@ type MetaCallFutureFFIData = ( unsafe extern "C" fn resolver(resolve_data: *mut c_void, upper_data: *mut c_void) -> *mut c_void { let (resolve, _, data) = *Box::from_raw(upper_data as *mut MetaCallFutureFFIData); - let user_data = Box::from_raw(data); + + let user_data = if !data.is_null() { + Some(Box::from_raw(data)) + } else { + None + }; let result = (resolve.unwrap())( cast::raw_to_metacallobj_untyped_leak(resolve_data), @@ -133,7 +139,12 @@ unsafe extern "C" fn resolver(resolve_data: *mut c_void, upper_data: *mut c_void } unsafe extern "C" fn rejecter(reject_data: *mut c_void, upper_data: *mut c_void) -> *mut c_void { let (_, reject, data) = *Box::from_raw(upper_data as *mut MetaCallFutureFFIData); - let user_data = Box::from_raw(data); + + let user_data = if !data.is_null() { + Some(Box::from_raw(data)) + } else { + None + }; let result = (reject.unwrap())( cast::raw_to_metacallobj_untyped_leak(reject_data), @@ -273,28 +284,6 @@ impl MetaCallFuture { None }, if reject_is_some { Some(rejecter) } else { None }, - // TODO: Solve the memory leak that happens here - // For reproducing the error, use the following commands: - // cargo test --no-run - // valgrind --trace-children=yes --leak-check=full --tool=memcheck --suppressions=../../../source/tests/memcheck/valgrind-node.supp ./target/debug/deps/metacall_test-248af33824f71bd1 &> output - // ==20664== 60 (32 direct, 28 indirect) bytes in 1 blocks are definitely lost in loss record 11 of 35 - // ==20664== at 0x4842839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) - // ==20664== by 0x17B549: alloc (alloc.rs:93) - // ==20664== by 0x17B549: alloc::alloc::Global::alloc_impl (alloc.rs:175) - // ==20664== by 0x17B342: allocate (alloc.rs:235) - // ==20664== by 0x17B342: alloc::alloc::exchange_malloc (alloc.rs:324) - // ==20664== by 0x1873D0: new<(core::option::Option<fn(alloc::boxed::Box<dyn metacall::types::metacall_value::MetaCallValue, alloc::alloc::Global>, alloc::boxed::Box<dyn metacall::types::metacall_value::MetaCallValue, alloc::alloc::Global>)>, core::option::Option<fn(alloc::boxed::Box<dyn metacall::types::metacall_value::MetaCallValue, alloc::alloc::Global>, alloc::boxed::Box<dyn metacall::types::metacall_value::MetaCallValue, alloc::alloc::Global>)>, *mut dyn metacall::types::metacall_value::MetaCallValue)> (boxed.rs:217) - // ==20664== by 0x1873D0: metacall::types::metacall_future::MetaCallFuture::await_fut (metacall_future.rs:182) - // ==20664== by 0x1296E6: metacall_test::test_future::{{closure}} (metacall_test.rs:202) - // ==20664== by 0x1286A2: metacall_test::generate_test_custom_validation (metacall_test.rs:42) - // ==20664== by 0x12625A: metacall_test::test_future (metacall_test.rs:193) - // ==20664== by 0x126954: metacall_test::metacall (metacall_test.rs:368) - // ==20664== by 0x129736: metacall_test::metacall::{{closure}} (metacall_test.rs:337) - // ==20664== by 0x1256B4: core::ops::function::FnOnce::call_once (function.rs:250) - // ==20664== by 0x166EBE: call_once<fn() -> core::result::Result<(), alloc::string::String>, ()> (function.rs:250) - // ==20664== by 0x166EBE: test::__rust_begin_short_backtrace (lib.rs:655) - // ==20664== by 0x13456B: {closure#1} (lib.rs:646) - // ==20664== by 0x13456B: core::ops::function::FnOnce::call_once{{vtable-shim}} (function.rs:250) Box::into_raw(Box::new((self.resolve, self.reject, self.data))) as *mut c_void, )) }; diff --git a/source/ports/rs_port/tests/metacall_test.rs b/source/ports/rs_port/tests/metacall_test.rs index 7b842da59d..fc9ffe6ca5 100644 --- a/source/ports/rs_port/tests/metacall_test.rs +++ b/source/ports/rs_port/tests/metacall_test.rs @@ -172,16 +172,21 @@ fn test_pointer() { ); } fn test_future() { - fn validate(upper_result: Box<dyn MetaCallValue>, upper_data: Box<dyn Any>) { - match upper_data.downcast::<String>() { - Ok(ret) => { - if ret.as_str() != "data" { - invalid_return_value("data", ret) + fn validate(upper_result: Box<dyn MetaCallValue>, upper_data: Option<Box<dyn Any>>) { + match upper_data { + Some(data) => { + match data.downcast::<String>() { + Ok(ret) => { + if ret.as_str() != "data" { + invalid_return_value("data", ret) + } + } + Err(original) => { + invalid_return_type("'string' for the data", original); + } } - } - Err(original) => { - invalid_return_type("'string' for the data", original); - } + }, + None => println!("user_data is None."), } match upper_result.downcast::<String>() { @@ -203,7 +208,7 @@ fn test_future() { move |future| { fn resolve( result: Box<dyn MetaCallValue>, - data: Box<dyn Any>, + data: Option<Box<dyn Any>>, ) -> Box<dyn MetaCallValue> { validate(result.clone(), data); result.clone() @@ -219,7 +224,7 @@ fn test_future() { move |future| { fn reject( result: Box<dyn MetaCallValue>, - data: Box<dyn Any>, + data: Option<Box<dyn Any>>, ) -> Box<dyn MetaCallValue> { validate(result.clone(), data); result.clone() From 8ebedff5e6536e9dca5c1dbeab71d5f147977daa Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 29 Oct 2025 19:12:41 +0100 Subject: [PATCH 354/364] Solve issues with upload in rs port. --- source/ports/rs_port/upload.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source/ports/rs_port/upload.sh b/source/ports/rs_port/upload.sh index 4156acb04c..a072d2c657 100644 --- a/source/ports/rs_port/upload.sh +++ b/source/ports/rs_port/upload.sh @@ -21,7 +21,7 @@ function publish() { local crate_version=`cargo search --quiet $1 | grep "$1" | head -n 1 | awk '{ print $3 }'` - local project_version=`cargo metadata --format-version=1 --no-deps | jq '.packages[0].version'` + local project_version=`cargo metadata --format-version=1 --no-deps | jq ".packages[] | select(.name == \"$1\") | .version"` # Check if versions do not match, and if so, publish them if [ ! "${crate_version}" = "${project_version}" ]; then @@ -30,10 +30,15 @@ function publish() { fi } -# Publish -cd sys +# Publish sys crate +pushd sys publish metacall-sys -cd inline +popd + +# Publish inline crate +pushd inline publish metacall-inline -cd .. +popd + +# Publish metacall crate publish metacall From 4afb879397242e1420304c4de7b4ba0cf979b8ed Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Wed, 29 Oct 2025 19:21:34 +0100 Subject: [PATCH 355/364] Update versions rs port. --- source/ports/rs_port/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index c238068d30..c4ac8eaf69 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -17,10 +17,10 @@ name = "metacall" path = "src/lib.rs" [dependencies] -metacall-inline = { path = "./inline" } +metacall-inline = { version = "0.2.0", path = "./inline" } [build-dependencies] -metacall-sys = { path = "./sys" } +metacall-sys = { version = "0.1.2", path = "./sys" } [workspace] members = [ From b01d0e3e74b46c69114aa3d9988d224f0888d856 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 12:25:59 +0100 Subject: [PATCH 356/364] Add base for handle in rs_port. --- source/ports/rs_port/inline/src/lib.rs | 2 +- source/ports/rs_port/src/lib.rs | 2 +- source/ports/rs_port/src/load.rs | 74 +++++++++++++++++-- source/ports/rs_port/src/metacall.rs | 59 ++++++++++++++- source/ports/rs_port/tests/inlines_test.rs | 12 +-- .../rs_port/tests/invalid_loaders_test.rs | 8 +- source/ports/rs_port/tests/loaders_test.rs | 8 +- .../rs_port/tests/metacall_exception_test.rs | 4 +- .../rs_port/tests/metacall_handle_test.rs | 36 +++++++++ source/ports/rs_port/tests/metacall_test.rs | 22 +++--- 10 files changed, 192 insertions(+), 35 deletions(-) create mode 100644 source/ports/rs_port/tests/metacall_handle_test.rs diff --git a/source/ports/rs_port/inline/src/lib.rs b/source/ports/rs_port/inline/src/lib.rs index 1b0083a16d..0943868907 100644 --- a/source/ports/rs_port/inline/src/lib.rs +++ b/source/ports/rs_port/inline/src/lib.rs @@ -10,7 +10,7 @@ macro_rules! gen_inline_macro { let buffer = token_stream_input.to_string(); let result = quote! {{ - ::metacall::load::from_memory(::metacall::load::Tag::$tag, #buffer.to_string()).unwrap() + ::metacall::load::from_memory(::metacall::load::Tag::$tag, #buffer.to_string(), None).unwrap() }}; result.into() diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index 2aada3f72f..678ba3fbf1 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -73,7 +73,7 @@ pub(crate) use macros::private_macros::*; /// /// // Loading a string with Nodejs. /// let script = "function greet() { return 'hi there!' }; module.exports = { greet };"; -/// metacall::load::from_memory(metacall::load::Tag::NodeJS, script).unwrap(); +/// metacall::load::from_memory(metacall::load::Tag::NodeJS, script, None).unwrap(); /// ``` pub mod load; diff --git a/source/ports/rs_port/src/load.rs b/source/ports/rs_port/src/load.rs index 2eac2898a7..78b27cd99e 100644 --- a/source/ports/rs_port/src/load.rs +++ b/source/ports/rs_port/src/load.rs @@ -1,13 +1,14 @@ use crate::{ - bindings::{metacall_load_from_file, metacall_load_from_memory}, + bindings::{metacall_clear, metacall_load_from_file, metacall_load_from_memory}, cstring_enum, types::MetaCallLoaderError, }; use std::{ ffi::CString, fmt, + os::raw::c_void, path::{Path, PathBuf}, - ptr, + ptr::null_mut, }; pub enum Tag { @@ -66,6 +67,39 @@ impl fmt::Display for Tag { } } +pub struct Handle(*mut c_void); + +impl Handle { + pub fn new() -> Self { + Self(null_mut()) + } + + pub fn from_mut_raw_ptr(&mut self, ptr: *mut c_void) { + self.0 = ptr + } + + pub fn as_mut_raw_ptr(&mut self) -> *mut c_void { + self.0 + } +} + +impl Default for Handle { + fn default() -> Self { + Self::new() + } +} + +impl Drop for Handle { + fn drop(&mut self) { + let result = unsafe { metacall_clear(self.0) }; + + if result != 0 { + // Log or handle the error as needed + eprintln!("Error during cleanup, metacall_clear returned: {}", result); + } + } +} + /// Loads a file from a single file. Usage example: ... /// ``` /// // A Nodejs path @@ -74,8 +108,9 @@ impl fmt::Display for Tag { pub fn from_single_file( tag: Tag, path: impl AsRef<Path>, + handle: Option<&mut Handle>, ) -> Result<(), MetaCallLoaderError> { - from_file(tag, [path]) + from_file(tag, [path], handle) } /// Loads a path from file. Usage example: ... @@ -86,6 +121,7 @@ pub fn from_single_file( pub fn from_file( tag: Tag, paths: impl IntoIterator<Item = impl AsRef<Path>>, + handle: Option<&mut Handle>, ) -> Result<(), MetaCallLoaderError> { let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; let mut c_path: CString; @@ -109,18 +145,29 @@ pub fn from_file( new_paths.push(c_path.as_ptr()); } + let mut handle_ptr: *mut c_void = null_mut(); + + let handle_ref = match handle { + Some(_) => &mut handle_ptr, + None => null_mut(), + }; + if unsafe { metacall_load_from_file( c_tag.as_ptr(), new_paths.as_mut_ptr(), new_paths.len(), - ptr::null_mut(), + handle_ref, ) } != 0 { return Err(MetaCallLoaderError::FromFileFailure); } + if let Some(handle_ref) = handle { + handle_ref.from_mut_raw_ptr(handle_ptr); + } + Ok(()) } @@ -131,22 +178,37 @@ pub fn from_file( /// // A Nodejs script /// metacall::load::from_memory(Tag::NodeJS, script).unwrap(); /// ``` -pub fn from_memory(tag: Tag, script: impl ToString) -> Result<(), MetaCallLoaderError> { +pub fn from_memory( + tag: Tag, + script: impl ToString, + handle: Option<&mut Handle>, +) -> Result<(), MetaCallLoaderError> { let script = script.to_string(); let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; let c_script = cstring_enum!(script, MetaCallLoaderError)?; + let mut handle_ptr: *mut c_void = null_mut(); + + let handle_ref = match handle { + Some(_) => &mut handle_ptr, + None => null_mut(), + }; + if unsafe { metacall_load_from_memory( c_tag.as_ptr(), c_script.as_ptr(), script.len() + 1, - ptr::null_mut(), + handle_ref, ) } != 0 { return Err(MetaCallLoaderError::FromMemoryFailure); } + if let Some(handle_ref) = handle { + handle_ref.from_mut_raw_ptr(handle_ptr); + } + Ok(()) } diff --git a/source/ports/rs_port/src/metacall.rs b/source/ports/rs_port/src/metacall.rs index f6e75c3072..7fe38a8bc7 100644 --- a/source/ports/rs_port/src/metacall.rs +++ b/source/ports/rs_port/src/metacall.rs @@ -1,6 +1,7 @@ use crate::{ - bindings::{metacall_function, metacall_value_destroy, metacallfv_s}, + bindings::{metacall_function, metacall_value_destroy, metacallfv_s, metacallhv_s}, cast, cstring_enum, + load::Handle, types::{MetaCallError, MetaCallNull, MetaCallValue}, }; use std::ffi::c_void; @@ -31,6 +32,33 @@ fn metacall_inner( Ok(ret) } + +fn metacall_inner_handle( + handle: &mut Handle, + func: impl ToString, + args: impl IntoIterator<Item = impl MetaCallValue>, +) -> Result<*mut c_void, MetaCallError> { + let c_function = cstring_enum!(func, MetaCallError)?; + + let mut c_args = cast::metacallobj_to_raw_args(args); + let args_length = c_args.len(); + + let ret = unsafe { + metacallhv_s( + handle.as_mut_raw_ptr(), + c_function.as_ptr(), + c_args.as_mut_ptr(), + args_length, + ) + }; + + for c_arg in c_args { + unsafe { metacall_value_destroy(c_arg) }; + } + + Ok(ret) +} + /// Calls a function same as [metacall](metacall) but returns a trait object /// of [MetaCallValue](MetaCallValue). This is useful when you don't know the return /// type of that function or the function may return multiple types. Checkout @@ -70,6 +98,24 @@ pub fn metacall<T: MetaCallValue>( Err(original) => Err(MetaCallError::FailedCasting(original)), } } + +/// Calls a function with arguments. The generic parameter is the return type of the function +/// you're calling. Checkout [MetaCallValue](MetaCallValue) for possible types. +/// For example: ... +/// ``` +/// let sum = metacall::metacall_handle::<i32>(handle, "sum", [1, 2]).unwrap(); +/// ``` +pub fn metacall_handle<T: MetaCallValue>( + handle: &mut Handle, + func: impl ToString, + args: impl IntoIterator<Item = impl MetaCallValue>, +) -> Result<T, MetaCallError> { + match cast::raw_to_metacallobj::<T>(metacall_inner_handle(handle, func, args)?) { + Ok(ret) => Ok(ret), + Err(original) => Err(MetaCallError::FailedCasting(original)), + } +} + /// Calls a function same as [metacall](metacall) without passing any arguments. For example: ... /// ``` /// let greet = metacall::metacall_no_arg::<String>("greet").unwrap(); @@ -77,3 +123,14 @@ pub fn metacall<T: MetaCallValue>( pub fn metacall_no_arg<T: MetaCallValue>(func: impl ToString) -> Result<T, MetaCallError> { metacall::<T>(func, [] as [MetaCallNull; 0]) } + +/// Calls a function same as [metacall](metacall) without passing any arguments. For example: ... +/// ``` +/// let greet = metacall::metacall_no_arg::<String>("greet").unwrap(); +/// ``` +pub fn metacall_handle_no_arg<T: MetaCallValue>( + handle: &mut Handle, + func: impl ToString, +) -> Result<T, MetaCallError> { + metacall_handle::<T>(handle, func, [] as [MetaCallNull; 0]) +} diff --git a/source/ports/rs_port/tests/inlines_test.rs b/source/ports/rs_port/tests/inlines_test.rs index adf06ee43b..27861f2fb4 100644 --- a/source/ports/rs_port/tests/inlines_test.rs +++ b/source/ports/rs_port/tests/inlines_test.rs @@ -11,30 +11,30 @@ fn inlines() { assert!(is_initialized()); - if load::from_memory(Tag::Python, "").is_ok() { + if load::from_memory(Tag::Python, "", None).is_ok() { py! { print("hello world") } } - if load::from_memory(Tag::Python, "").is_ok() { + if load::from_memory(Tag::Python, "", None).is_ok() { py! {print("hello world")} } - if load::from_memory(Tag::NodeJS, "").is_ok() { + if load::from_memory(Tag::NodeJS, "", None).is_ok() { node! { console.log("hello world"); } } - if load::from_memory(Tag::NodeJS, "").is_ok() { + if load::from_memory(Tag::NodeJS, "", None).is_ok() { node! {console.log("hello world")} } - if load::from_memory(Tag::TypeScript, "").is_ok() { + if load::from_memory(Tag::TypeScript, "", None).is_ok() { ts! { console.log("hello world"); } } - if load::from_memory(Tag::TypeScript, "").is_ok() { + if load::from_memory(Tag::TypeScript, "", None).is_ok() { ts! {console.log("hello world")} } } diff --git a/source/ports/rs_port/tests/invalid_loaders_test.rs b/source/ports/rs_port/tests/invalid_loaders_test.rs index a803c4cb48..bd59e89a9b 100644 --- a/source/ports/rs_port/tests/invalid_loaders_test.rs +++ b/source/ports/rs_port/tests/invalid_loaders_test.rs @@ -16,7 +16,7 @@ fn invalid_loaders() { let valid_file = scripts_dir.join("script.js"); if let Err(MetaCallLoaderError::FileNotFound(_)) = - load::from_single_file(load::Tag::NodeJS, inavlid_file) + load::from_single_file(load::Tag::NodeJS, inavlid_file, None) { // Everything Ok } else { @@ -24,14 +24,16 @@ fn invalid_loaders() { } // We use JSM here because it is not implemented, it should fail - if let Err(MetaCallLoaderError::FromFileFailure) = load::from_single_file(Tag::JSM, valid_file) { + if let Err(MetaCallLoaderError::FromFileFailure) = + load::from_single_file(Tag::JSM, valid_file, None) + { // Everything Ok } else { panic!("Expected the loader fail with `FromFileFailure` error variant!"); } if let Err(MetaCallLoaderError::FromMemoryFailure) = - load::from_memory(load::Tag::NodeJS, "Invalid code!") + load::from_memory(load::Tag::NodeJS, "Invalid code!", None) { // Everything Ok } else { diff --git a/source/ports/rs_port/tests/loaders_test.rs b/source/ports/rs_port/tests/loaders_test.rs index 00fab0751d..abb274521a 100644 --- a/source/ports/rs_port/tests/loaders_test.rs +++ b/source/ports/rs_port/tests/loaders_test.rs @@ -15,16 +15,18 @@ use std::{ const SCRIPT1: &str = "function greet1() { return 'hi there!' } \nmodule.exports = { greet1 }"; const SCRIPT2: &str = "function greet2() { return 'hi there!' } \nmodule.exports = { greet2 };"; const SCRIPT3: &str = "console.log('Hello world')"; + fn call_greet(test: &str, num: u32) { let out = metacall_no_arg::<String>(format!("greet{}", num)).unwrap(); assert_eq!(out.as_str(), "hi there!", "Testing {}", test); } fn load_from_memory_test() { - load::from_memory(Tag::NodeJS, SCRIPT1).unwrap(); + load::from_memory(Tag::NodeJS, SCRIPT1, None).unwrap(); + call_greet("load_from_memory", 1); - load::from_memory(Tag::NodeJS, SCRIPT3).unwrap(); + load::from_memory(Tag::NodeJS, SCRIPT3, None).unwrap(); } fn load_from_file_test() { @@ -38,7 +40,7 @@ fn load_from_file_test() { temp_js.write_all(SCRIPT2.as_bytes()).unwrap(); temp_js.flush().unwrap(); - load::from_single_file(Tag::NodeJS, temp_js_path).unwrap(); + load::from_single_file(Tag::NodeJS, temp_js_path, None).unwrap(); call_greet("load_from_file", 2); diff --git a/source/ports/rs_port/tests/metacall_exception_test.rs b/source/ports/rs_port/tests/metacall_exception_test.rs index ef8b269a49..fe16caad70 100644 --- a/source/ports/rs_port/tests/metacall_exception_test.rs +++ b/source/ports/rs_port/tests/metacall_exception_test.rs @@ -5,7 +5,7 @@ use metacall::{ use std::env; #[test] -fn inlines() { +fn metacall_exception() { let _d = initialize().unwrap(); assert!(is_initialized()); @@ -13,7 +13,7 @@ fn inlines() { let tests_dir = env::current_dir().unwrap().join("tests/scripts"); let js_test_file = tests_dir.join("script.js"); - if load::from_single_file(Tag::NodeJS, js_test_file).is_ok() { + if load::from_single_file(Tag::NodeJS, js_test_file, None).is_ok() { // This should not generate a segmentation fault let val = metacall::metacall_no_arg::<metacall::MetaCallException>("test_exception").unwrap(); diff --git a/source/ports/rs_port/tests/metacall_handle_test.rs b/source/ports/rs_port/tests/metacall_handle_test.rs new file mode 100644 index 0000000000..01bb2e07e2 --- /dev/null +++ b/source/ports/rs_port/tests/metacall_handle_test.rs @@ -0,0 +1,36 @@ +use metacall::{ + initialize, is_initialized, + load::{self, Handle, Tag}, + metacall_handle_no_arg, +}; + +#[test] +fn metacall_handle() { + let _d = initialize().unwrap(); + + assert!(is_initialized()); + + const SCRIPT1: &str = "function greet() { return 1 } \nmodule.exports = { greet }"; + const SCRIPT2: &str = "function greet() { return 2 } \nmodule.exports = { greet }"; + + let mut handle1 = Handle::new(); + let mut handle2 = Handle::new(); + + let result1 = load::from_memory(Tag::NodeJS, SCRIPT1, Some(&mut handle1)); + let result2 = load::from_memory(Tag::NodeJS, SCRIPT2, Some(&mut handle2)); + + assert!(result1.is_ok()); + assert!(result2.is_ok()); + + // Load first handle + if result1.is_ok() { + let out = metacall_handle_no_arg::<f64>(&mut handle1, "greet").unwrap(); + assert_eq!(out, 1.0, "Testing greet 1"); + } + + // Load second handle + if result2.is_ok() { + let out = metacall_handle_no_arg::<f64>(&mut handle2, "greet").unwrap(); + assert_eq!(out, 2.0, "Testing greet 2"); + } +} diff --git a/source/ports/rs_port/tests/metacall_test.rs b/source/ports/rs_port/tests/metacall_test.rs index fc9ffe6ca5..81d73511a3 100644 --- a/source/ports/rs_port/tests/metacall_test.rs +++ b/source/ports/rs_port/tests/metacall_test.rs @@ -174,17 +174,15 @@ fn test_pointer() { fn test_future() { fn validate(upper_result: Box<dyn MetaCallValue>, upper_data: Option<Box<dyn Any>>) { match upper_data { - Some(data) => { - match data.downcast::<String>() { - Ok(ret) => { - if ret.as_str() != "data" { - invalid_return_value("data", ret) - } - } - Err(original) => { - invalid_return_type("'string' for the data", original); + Some(data) => match data.downcast::<String>() { + Ok(ret) => { + if ret.as_str() != "data" { + invalid_return_value("data", ret) } } + Err(original) => { + invalid_return_type("'string' for the data", original); + } }, None => println!("user_data is None."), } @@ -374,7 +372,7 @@ fn metacall() { let js_test_file = tests_dir.join("script.js"); let c_test_file = tests_dir.join("script.c"); let py_test_file = tests_dir.join("script.py"); - let py_loaded = load::from_single_file(Tag::Python, py_test_file).is_ok(); + let py_loaded = load::from_single_file(Tag::Python, py_test_file, None).is_ok(); if py_loaded { test_buffer(); @@ -387,7 +385,7 @@ fn metacall() { test_string(); test_null(); } - if load::from_single_file(load::Tag::C, c_test_file).is_ok() { + if load::from_single_file(load::Tag::C, c_test_file, None).is_ok() { test_char(); test_double(); test_float(); @@ -396,7 +394,7 @@ fn metacall() { test_short(); test_mixed_numbers(); } - if load::from_single_file(load::Tag::NodeJS, js_test_file).is_ok() { + if load::from_single_file(load::Tag::NodeJS, js_test_file, None).is_ok() { test_exception(); test_throwable(); test_future(); From f3cb69ea48a90b1c5503b39a268a1938d04944ef Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 12:46:21 +0100 Subject: [PATCH 357/364] Improved rs port handle api. --- source/ports/rs_port/.vscode/launch.json | 22 ++++++++++++++++++- source/ports/rs_port/Cargo.toml | 2 +- source/ports/rs_port/src/load.rs | 20 ++--------------- .../rs_port/tests/metacall_handle_test.rs | 20 +++++++++++++++++ 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/source/ports/rs_port/.vscode/launch.json b/source/ports/rs_port/.vscode/launch.json index 684cfc3471..838674c311 100644 --- a/source/ports/rs_port/.vscode/launch.json +++ b/source/ports/rs_port/.vscode/launch.json @@ -103,6 +103,26 @@ "args": [], "envFile": "${workspaceFolder}${/}.vscode${/}.env", "cwd": "${workspaceFolder}" - } + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'metacall_handle_test'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=metacall_handle_test", + "--package=metacall" + ], + "filter": { + "name": "metacall_handle_test", + "kind": "test" + } + }, + "args": [], + "envFile": "${workspaceFolder}${/}.vscode${/}.env", + "cwd": "${workspaceFolder}" + }, ] } \ No newline at end of file diff --git a/source/ports/rs_port/Cargo.toml b/source/ports/rs_port/Cargo.toml index c4ac8eaf69..51428b0339 100644 --- a/source/ports/rs_port/Cargo.toml +++ b/source/ports/rs_port/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "metacall" readme = "README.md" repository = "https://github.com/metacall/core/tree/develop/source/ports/rs_port" -version = "0.5.3" +version = "0.5.4" [lib] crate-type = ["lib"] diff --git a/source/ports/rs_port/src/load.rs b/source/ports/rs_port/src/load.rs index 78b27cd99e..290c7071d7 100644 --- a/source/ports/rs_port/src/load.rs +++ b/source/ports/rs_port/src/load.rs @@ -74,10 +74,6 @@ impl Handle { Self(null_mut()) } - pub fn from_mut_raw_ptr(&mut self, ptr: *mut c_void) { - self.0 = ptr - } - pub fn as_mut_raw_ptr(&mut self) -> *mut c_void { self.0 } @@ -145,10 +141,8 @@ pub fn from_file( new_paths.push(c_path.as_ptr()); } - let mut handle_ptr: *mut c_void = null_mut(); - let handle_ref = match handle { - Some(_) => &mut handle_ptr, + Some(handle_ptr) => &mut handle_ptr.0, None => null_mut(), }; @@ -164,10 +158,6 @@ pub fn from_file( return Err(MetaCallLoaderError::FromFileFailure); } - if let Some(handle_ref) = handle { - handle_ref.from_mut_raw_ptr(handle_ptr); - } - Ok(()) } @@ -187,10 +177,8 @@ pub fn from_memory( let c_tag = cstring_enum!(tag, MetaCallLoaderError)?; let c_script = cstring_enum!(script, MetaCallLoaderError)?; - let mut handle_ptr: *mut c_void = null_mut(); - let handle_ref = match handle { - Some(_) => &mut handle_ptr, + Some(handle_ptr) => &mut handle_ptr.0, None => null_mut(), }; @@ -206,9 +194,5 @@ pub fn from_memory( return Err(MetaCallLoaderError::FromMemoryFailure); } - if let Some(handle_ref) = handle { - handle_ref.from_mut_raw_ptr(handle_ptr); - } - Ok(()) } diff --git a/source/ports/rs_port/tests/metacall_handle_test.rs b/source/ports/rs_port/tests/metacall_handle_test.rs index 01bb2e07e2..207d0c24e5 100644 --- a/source/ports/rs_port/tests/metacall_handle_test.rs +++ b/source/ports/rs_port/tests/metacall_handle_test.rs @@ -33,4 +33,24 @@ fn metacall_handle() { let out = metacall_handle_no_arg::<f64>(&mut handle2, "greet").unwrap(); assert_eq!(out, 2.0, "Testing greet 2"); } + + // Now, testing loading again into an existing handle number 2 + // This should make the handle have greet (2) and yeet functions together + + // TODO: This has a bug in the core that must be reviewed + /* + const SCRIPT3: &str = "function yeet() { return 3 } \nmodule.exports = { yeet }"; + + let result3 = load::from_memory(Tag::NodeJS, SCRIPT3, Some(&mut handle2)); + + assert!(result3.is_ok()); + + if result3.is_ok() { + let out = metacall_handle_no_arg::<f64>(&mut handle2, "greet").unwrap(); + assert_eq!(out, 2.0, "Testing greet 2"); + + let out = metacall_handle_no_arg::<f64>(&mut handle2, "yeet").unwrap(); + assert_eq!(out, 3.0, "Testing yeet 2"); + } + */ } From 786580ec461b19bebc62b872033235a66fa5b122 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 14:42:49 +0100 Subject: [PATCH 358/364] Solve issue with metacall clear. --- source/loader/source/loader_impl.c | 111 ++++++++---- .../loaders/py_loader/source/py_loader_impl.c | 2 +- .../cxx_port/include/metacall/metacall.inl | 1 - .../metacall_c_metacall_test/CMakeLists.txt | 160 ++++++++++++++++++ .../metacall_c_metacall_test/source/main.cpp | 28 +++ .../source/metacall_c_metacall_test.cpp | 70 ++++++++ .../tests/metacall_clear_test/CMakeLists.txt | 3 +- .../source/metacall_clear_test.cpp | 46 +++++ 8 files changed, 385 insertions(+), 36 deletions(-) create mode 100644 source/tests/metacall_c_metacall_test/CMakeLists.txt create mode 100644 source/tests/metacall_c_metacall_test/source/main.cpp create mode 100644 source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp diff --git a/source/loader/source/loader_impl.c b/source/loader/source/loader_impl.c index 260a787af4..ac35595f53 100644 --- a/source/loader/source/loader_impl.c +++ b/source/loader/source/loader_impl.c @@ -1150,7 +1150,8 @@ int loader_impl_load_from_file(plugin_manager manager, plugin p, loader_impl imp { loader_handle handle; loader_path path; - size_t init_order; + size_t init_order = 0; + int init_order_not_initialized = !(handle_ptr != NULL && *handle_ptr != NULL); if (loader_impl_initialize(manager, p, impl) != 0) { @@ -1164,9 +1165,12 @@ int loader_impl_load_from_file(plugin_manager manager, plugin p, loader_impl imp return 1; } - init_order = vector_size(impl->handle_impl_init_order); + if (init_order_not_initialized) + { + init_order = vector_size(impl->handle_impl_init_order); - vector_push_back_empty(impl->handle_impl_init_order); + vector_push_back_empty(impl->handle_impl_init_order); + } handle = iface->load_from_file(impl, paths, size); @@ -1192,7 +1196,10 @@ int loader_impl_load_from_file(plugin_manager manager, plugin p, loader_impl imp { if (loader_impl_handle_register(manager, impl, path, handle_impl, handle_ptr) == 0) { - vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + if (init_order_not_initialized) + { + vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + } return 0; } @@ -1204,7 +1211,10 @@ int loader_impl_load_from_file(plugin_manager manager, plugin p, loader_impl imp set_remove(impl->handle_impl_path_map, handle_impl->path); } + if (init_order_not_initialized) { + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ size_t iterator; for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) @@ -1224,16 +1234,21 @@ int loader_impl_load_from_file(plugin_manager manager, plugin p, loader_impl imp } else { - size_t iterator; - - for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + if (init_order_not_initialized) { - loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ + size_t iterator; - loader_impl_destroy_handle(iterator_handle_impl); - } + for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + { + loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); + + loader_impl_destroy_handle(iterator_handle_impl); + } - vector_pop_back(impl->handle_impl_init_order); + vector_pop_back(impl->handle_impl_init_order); + } } } } @@ -1276,7 +1291,8 @@ int loader_impl_load_from_memory(plugin_manager manager, plugin p, loader_impl i { loader_name name; loader_handle handle = NULL; - size_t init_order; + size_t init_order = 0; + int init_order_not_initialized = !(handle_ptr != NULL && *handle_ptr != NULL); if (loader_impl_initialize(manager, p, impl) != 0) { @@ -1297,9 +1313,12 @@ int loader_impl_load_from_memory(plugin_manager manager, plugin p, loader_impl i return 1; } - init_order = vector_size(impl->handle_impl_init_order); + if (init_order_not_initialized) + { + init_order = vector_size(impl->handle_impl_init_order); - vector_push_back_empty(impl->handle_impl_init_order); + vector_push_back_empty(impl->handle_impl_init_order); + } handle = iface->load_from_memory(impl, name, buffer, size); @@ -1322,7 +1341,10 @@ int loader_impl_load_from_memory(plugin_manager manager, plugin p, loader_impl i { if (loader_impl_handle_register(manager, impl, name, handle_impl, handle_ptr) == 0) { - vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + if (init_order_not_initialized) + { + vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + } return 0; } @@ -1334,7 +1356,10 @@ int loader_impl_load_from_memory(plugin_manager manager, plugin p, loader_impl i set_remove(impl->handle_impl_path_map, handle_impl->path); } + if (init_order_not_initialized) { + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ size_t iterator; for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) @@ -1354,16 +1379,21 @@ int loader_impl_load_from_memory(plugin_manager manager, plugin p, loader_impl i } else { - size_t iterator; - - for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + if (init_order_not_initialized) { - loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ + size_t iterator; - loader_impl_destroy_handle(iterator_handle_impl); - } + for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + { + loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); + + loader_impl_destroy_handle(iterator_handle_impl); + } - vector_pop_back(impl->handle_impl_init_order); + vector_pop_back(impl->handle_impl_init_order); + } } } } @@ -1377,7 +1407,8 @@ int loader_impl_load_from_package(plugin_manager manager, plugin p, loader_impl { loader_impl_interface iface = loader_iface(p); loader_path subpath; - size_t init_order; + size_t init_order = 0; + int init_order_not_initialized = !(handle_ptr != NULL && *handle_ptr != NULL); if (iface != NULL && loader_impl_handle_name(manager, path, subpath) > 1) { @@ -1395,9 +1426,12 @@ int loader_impl_load_from_package(plugin_manager manager, plugin p, loader_impl return 1; } - init_order = vector_size(impl->handle_impl_init_order); + if (init_order_not_initialized) + { + init_order = vector_size(impl->handle_impl_init_order); - vector_push_back_empty(impl->handle_impl_init_order); + vector_push_back_empty(impl->handle_impl_init_order); + } handle = iface->load_from_package(impl, path); @@ -1420,7 +1454,10 @@ int loader_impl_load_from_package(plugin_manager manager, plugin p, loader_impl { if (loader_impl_handle_register(manager, impl, subpath, handle_impl, handle_ptr) == 0) { - vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + if (init_order_not_initialized) + { + vector_set_var(impl->handle_impl_init_order, init_order, handle_impl); + } return 0; } @@ -1432,7 +1469,10 @@ int loader_impl_load_from_package(plugin_manager manager, plugin p, loader_impl set_remove(impl->handle_impl_path_map, handle_impl->path); } + if (init_order_not_initialized) { + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ size_t iterator; for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) @@ -1452,16 +1492,21 @@ int loader_impl_load_from_package(plugin_manager manager, plugin p, loader_impl } else { - size_t iterator; - - for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + if (init_order_not_initialized) { - loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); + /* Here we delete all the subsequent loaded scripts because this script can load others, + and once it is destroyed it must clear all of them */ + size_t iterator; - loader_impl_destroy_handle(iterator_handle_impl); - } + for (iterator = init_order + 1; iterator < vector_size(impl->handle_impl_init_order); ++iterator) + { + loader_handle_impl iterator_handle_impl = vector_at_type(impl->handle_impl_init_order, iterator, loader_handle_impl); - vector_pop_back(impl->handle_impl_init_order); + loader_impl_destroy_handle(iterator_handle_impl); + } + + vector_pop_back(impl->handle_impl_init_order); + } } } } diff --git a/source/loaders/py_loader/source/py_loader_impl.c b/source/loaders/py_loader/source/py_loader_impl.c index d5a11d618e..77fc87016a 100644 --- a/source/loaders/py_loader/source/py_loader_impl.c +++ b/source/loaders/py_loader/source/py_loader_impl.c @@ -58,7 +58,7 @@ * and threading flow for improving the debug of memory leaks and async bugs. * Set it to 0 in order to remove all the noise. */ -#define DEBUG_PRINT_ENABLED 1 +#define DEBUG_PRINT_ENABLED 0 typedef struct loader_impl_py_function_type { diff --git a/source/ports/cxx_port/include/metacall/metacall.inl b/source/ports/cxx_port/include/metacall/metacall.inl index 81a48f839d..9a36cec3ab 100644 --- a/source/ports/cxx_port/include/metacall/metacall.inl +++ b/source/ports/cxx_port/include/metacall/metacall.inl @@ -25,7 +25,6 @@ namespace metacall { - } /* namespace metacall */ #endif /* METACALL_INL */ diff --git a/source/tests/metacall_c_metacall_test/CMakeLists.txt b/source/tests/metacall_c_metacall_test/CMakeLists.txt new file mode 100644 index 0000000000..00d36ad944 --- /dev/null +++ b/source/tests/metacall_c_metacall_test/CMakeLists.txt @@ -0,0 +1,160 @@ +# Check if this loader is enabled +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_C OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_C) + return() +endif() + +# +# Executable name and options +# + +# Target name +set(target metacall-c-metacall-test) +message(STATUS "Test ${target}") + +# +# Compiler warnings +# + +include(Warnings) + +# +# Compiler security +# + +include(SecurityFlags) + +# +# Sources +# + +set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}") +set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source") + +set(sources + ${source_path}/main.cpp + ${source_path}/metacall_c_metacall_test.cpp +) + +# Group source files +set(header_group "Header Files (API)") +set(source_group "Source Files") +source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$" + ${header_group} ${headers}) +source_group_by_path(${source_path} "\\\\.cpp$|\\\\.c$|\\\\.h$|\\\\.hpp$" + ${source_group} ${sources}) + +# +# Create executable +# + +# Build executable +add_executable(${target} + ${sources} +) + +# Create namespaced alias +add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target}) + +# +# Project options +# + +set_target_properties(${target} + PROPERTIES + ${DEFAULT_PROJECT_OPTIONS} + FOLDER "${IDE_FOLDER}" +) + +# +# Include directories +# + +target_include_directories(${target} + PRIVATE + ${DEFAULT_INCLUDE_DIRECTORIES} + ${PROJECT_BINARY_DIR}/source/include +) + +# +# Libraries +# + +target_link_libraries(${target} + PRIVATE + ${DEFAULT_LIBRARIES} + + GTest + + ${META_PROJECT_NAME}::metacall +) + +# +# Compile definitions +# + +target_compile_definitions(${target} + PRIVATE + ${DEFAULT_COMPILE_DEFINITIONS} + + METACALL_INCLUDE_DIR="${CMAKE_SOURCE_DIR}/source/metacall/include" + METACALL_API_INCLUDE_DIR="${CMAKE_BINARY_DIR}/source/metacall/include" + METACALL_LIBRARY="${PROJECT_OUTPUT_DIR}" +) + +# +# Compile options +# + +target_compile_options(${target} + PRIVATE + ${DEFAULT_COMPILE_OPTIONS} +) + +# +# Compile features +# + +target_compile_features(${target} + PRIVATE + cxx_std_17 +) + +# +# Linker options +# + +target_link_options(${target} + PRIVATE + ${DEFAULT_LINKER_OPTIONS} +) + +# +# Define test +# + +add_test(NAME ${target} + COMMAND $<TARGET_FILE:${target}> +) + +# +# Define dependencies +# + +add_dependencies(${target} + c_loader +) + +# +# Define test properties +# + +set_property(TEST ${target} + PROPERTY LABELS ${target} +) + +include(TestEnvironmentVariables) + +test_environment_variables(${target} + "" + ${TESTS_ENVIRONMENT_VARIABLES} +) diff --git a/source/tests/metacall_c_metacall_test/source/main.cpp b/source/tests/metacall_c_metacall_test/source/main.cpp new file mode 100644 index 0000000000..37d4adc23f --- /dev/null +++ b/source/tests/metacall_c_metacall_test/source/main.cpp @@ -0,0 +1,28 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +int main(int argc, char *argv[]) +{ + ::testing::InitGoogleTest(&argc, argv); + + return RUN_ALL_TESTS(); +} diff --git a/source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp b/source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp new file mode 100644 index 0000000000..f26e1471b3 --- /dev/null +++ b/source/tests/metacall_c_metacall_test/source/metacall_c_metacall_test.cpp @@ -0,0 +1,70 @@ +/* + * Loader Library by Parra Studios + * A plugin for loading ruby code at run-time into a process. + * + * Copyright (C) 2016 - 2025 Vicente Eduardo Ferrer Garcia <vic798@gmail.com> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include <gtest/gtest.h> + +#include <metacall/metacall.h> + +class metacall_c_metacall_test : public testing::Test +{ +protected: +}; + +TEST_F(metacall_c_metacall_test, DefaultConstructor) +{ + ASSERT_EQ((int)0, (int)metacall_initialize()); + + ASSERT_EQ((int)0, metacall_execution_path("c", METACALL_INCLUDE_DIR)); + ASSERT_EQ((int)0, metacall_execution_path("c", METACALL_API_INCLUDE_DIR)); + ASSERT_EQ((int)0, metacall_execution_path("c", METACALL_LIBRARY)); + + ASSERT_EQ((int)0, (int)metacall_load_from_package("c", "metacall", NULL)); + + void *ret = metacall("metacall_print_info"); + + ASSERT_EQ((void *)NULL, (void *)ret); + + EXPECT_EQ((enum metacall_value_id)metacall_value_id(ret), (enum metacall_value_id)METACALL_STRING); + + EXPECT_EQ((int)0, strncmp(metacall_value_to_string(ret), "MetaCall", 8)); + + /* Print inspect information */ + { + size_t size = 0; + + struct metacall_allocator_std_type std_ctx = { &std::malloc, &std::realloc, &std::free }; + + void *allocator = metacall_allocator_create(METACALL_ALLOCATOR_STD, (void *)&std_ctx); + + char *inspect_str = metacall_inspect(&size, allocator); + + EXPECT_NE((char *)NULL, (char *)inspect_str); + + EXPECT_GT((size_t)size, (size_t)0); + + std::cout << inspect_str << std::endl; + + metacall_allocator_free(allocator, inspect_str); + + metacall_allocator_destroy(allocator); + } + + metacall_destroy(); +} diff --git a/source/tests/metacall_clear_test/CMakeLists.txt b/source/tests/metacall_clear_test/CMakeLists.txt index 859807d95c..6698be908a 100644 --- a/source/tests/metacall_clear_test/CMakeLists.txt +++ b/source/tests/metacall_clear_test/CMakeLists.txt @@ -1,5 +1,5 @@ # Check if this loader is enabled -if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY) +if(NOT OPTION_BUILD_LOADERS OR NOT OPTION_BUILD_LOADERS_PY OR NOT OPTION_BUILD_LOADERS_NODE OR NOT OPTION_BUILD_SCRIPTS OR NOT OPTION_BUILD_SCRIPTS_PY OR NOT OPTION_BUILD_SCRIPTS_NODE) return() endif() @@ -146,6 +146,7 @@ add_test(NAME ${target} add_dependencies(${target} py_loader + node_loader ) # diff --git a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp index f6dbc7fcb1..3eab668359 100644 --- a/source/tests/metacall_clear_test/source/metacall_clear_test.cpp +++ b/source/tests/metacall_clear_test/source/metacall_clear_test.cpp @@ -76,5 +76,51 @@ TEST_F(metacall_clear_test, DefaultConstructor) } #endif /* OPTION_BUILD_LOADERS_PY */ +/* NodeJS */ +#if defined(OPTION_BUILD_LOADERS_NODE) + { + static const char script1[] = "function greet() { return 1 }\nmodule.exports = { greet }"; + static const char script2[] = "function greet() { return 2 }\nmodule.exports = { greet }"; + static const char script3[] = "function yeet() { return 3 }\nmodule.exports = { yeet }"; + + void *handle1 = NULL; + void *handle2 = NULL; + + void *ret; + + ASSERT_EQ((int)0, (int)metacall_load_from_memory("node", script1, sizeof(script1), &handle1)); + + ret = metacallhv(handle1, "greet", metacall_null_args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((double)1.0, (double)metacall_value_to_double(ret)); + + ASSERT_EQ((int)0, (int)metacall_load_from_memory("node", script2, sizeof(script2), &handle2)); + + ret = metacallhv(handle2, "greet", metacall_null_args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((double)2.0, (double)metacall_value_to_double(ret)); + + metacall_value_destroy(ret); + + // Now load script number 3 into handle number 2 + ASSERT_EQ((int)0, (int)metacall_load_from_memory("node", script3, sizeof(script3), &handle2)); + + ret = metacallhv(handle2, "yeet", metacall_null_args); + + EXPECT_NE((void *)NULL, (void *)ret); + + EXPECT_EQ((double)3.0, (double)metacall_value_to_double(ret)); + + metacall_value_destroy(ret); + + EXPECT_EQ((int)0, (int)metacall_clear(handle1)); + EXPECT_EQ((int)0, (int)metacall_clear(handle2)); + } +#endif /* OPTION_BUILD_LOADERS_NODE */ + metacall_destroy(); } From f22fd15dde98a6c10492e1504d90c82fd0726fbb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 15:16:42 +0100 Subject: [PATCH 359/364] Solve issues in metacall cxx port test. --- .../source/metacall_cxx_port_test.cpp | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 23998054e4..3d55099ff6 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -22,8 +22,6 @@ #include <metacall/metacall.hpp> -using namespace metacall; - class metacall_cxx_port_test : public testing::Test { protected: @@ -31,7 +29,7 @@ class metacall_cxx_port_test : public testing::Test void *cxx_map_test(size_t argc, void *args[], void *data) { - map<std::string, float> m(args[0]); + metacall::map<std::string, float> m(args[0]); (void)argc; (void)data; @@ -43,12 +41,12 @@ void *cxx_map_test(size_t argc, void *args[], void *data) printf("world => %f\n", m["world"]); fflush(stdout); - return metacall_value_create_null(); + return metacall::metacall_value_create_null(); } void *cxx_array_test(size_t argc, void *args[], void *data) { - array a(args[0]); + metacall::array a(args[0]); (void)argc; (void)data; @@ -63,12 +61,12 @@ void *cxx_array_test(size_t argc, void *args[], void *data) printf("a[1] => %f\n", a[1].as<float>()); fflush(stdout); - return metacall_value_create_null(); + return metacall::metacall_value_create_null(); } void *cxx_map_array_test(size_t argc, void *args[], void *data) { - map<std::string, array> m(args[0]); + metacall::map<std::string, metacall::array> m(args[0]); (void)argc; (void)data; @@ -85,14 +83,14 @@ void *cxx_map_array_test(size_t argc, void *args[], void *data) printf("m['libraries'][0] => %s\n", m["libraries"][0].as<std::string>().c_str()); printf("m['libraries'][1] => %s\n", m["libraries"][1].as<std::string>().c_str()); - return metacall_value_create_null(); + return metacall::metacall_value_create_null(); } // TODO: /* void *cxx_recursive_map_test(size_t argc, void *args[], void *data) { - map<std::string, map<std::string, float>> m(args[0]); + metacall::map<std::string, metacall::map<std::string, float>> m(args[0]); (void)argc; (void)data; @@ -108,8 +106,8 @@ void *cxx_recursive_map_test(size_t argc, void *args[], void *data) void *cxx_float_int_int_test(size_t argc, void *args[], void *data) { - value<int> a0(args[0]); - value<int> a1(args[1]); + metacall::value<int> a0(args[0]); + metacall::value<int> a1(args[1]); (void)argc; (void)data; @@ -117,39 +115,39 @@ void *cxx_float_int_int_test(size_t argc, void *args[], void *data) EXPECT_EQ(a0.to_value(), 7); EXPECT_EQ(a1.to_value(), 8); - return metacall_value_create_float(3.0f); + return metacall::metacall_value_create_float(3.0f); } TEST_F(metacall_cxx_port_test, DefaultConstructor) { - ASSERT_EQ((int)0, (int)metacall_initialize()); + ASSERT_EQ((int)0, (int)metacall::metacall_initialize()); { - map<std::string, float> m = { + metacall::map<std::string, float> m = { { "hello", 3.0f }, { "world", 4.0f } }; - metacall_register("cxx_map_test", cxx_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_map_test", cxx_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_test", m)); } { - array a(3, 4.0f); + metacall::array a(3, 4.0f); - metacall_register("cxx_array_test", cxx_array_test, NULL, METACALL_NULL, 1, METACALL_ARRAY); + metacall::metacall_register("cxx_array_test", cxx_array_test, NULL, METACALL_NULL, 1, METACALL_ARRAY); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_array_test", a)); } { - map<std::string, array> m = { - { "includes", array("/a/path", "/another/path") }, - { "libraries", array("/a/path", "/another/path") } + metacall::map<std::string, metacall::array> m = { + { "includes", metacall::array("/a/path", "/another/path") }, + { "libraries", metacall::array("/a/path", "/another/path") } }; - metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, METACALL_NULL, 1, METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_array_test", m)); } @@ -157,18 +155,18 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) // TODO: /* { - map<std::string, map<std::string, float>> m = { + metacall::map<std::string, metacall::map<std::string, float>> m = { { "hello", { "world", 4.0f } } }; - metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_recursive_map_test", m)); } */ { - metacall_register("cxx_float_int_int_test", cxx_float_int_int_test, NULL, METACALL_FLOAT, 2, METACALL_INT, METACALL_INT); + metacall::metacall_register("cxx_float_int_int_test", cxx_float_int_int_test, NULL, METACALL_FLOAT, 2, METACALL_INT, METACALL_INT); EXPECT_EQ(3.0f, metacall::metacall<float>("cxx_float_int_int_test", 7, 8)); } @@ -177,11 +175,11 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { size_t size = 0; - struct metacall_allocator_std_type std_ctx = { &std::malloc, &std::realloc, &std::free }; + metacall::metacall_allocator_std_type std_ctx = { &std::malloc, &std::realloc, &std::free }; - void *allocator = metacall_allocator_create(METACALL_ALLOCATOR_STD, (void *)&std_ctx); + void *allocator = metacall_allocator_create(metacall::METACALL_ALLOCATOR_STD, (void *)&std_ctx); - char *inspect_str = metacall_inspect(&size, allocator); + char *inspect_str = metacall::metacall_inspect(&size, allocator); EXPECT_NE((char *)NULL, (char *)inspect_str); @@ -189,10 +187,10 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) std::cout << inspect_str << std::endl; - metacall_allocator_free(allocator, inspect_str); + metacall::metacall_allocator_free(allocator, inspect_str); - metacall_allocator_destroy(allocator); + metacall::metacall_allocator_destroy(allocator); } - metacall_destroy(); + metacall::metacall_destroy(); } From f60eff60c104f16a8275a7f81b6cacc0cf5993d2 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 15:26:27 +0100 Subject: [PATCH 360/364] Solve issues cxx port. --- .../source/metacall_cxx_port_test.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp index 3d55099ff6..90e987e0af 100644 --- a/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp +++ b/source/tests/metacall_cxx_port_test/source/metacall_cxx_port_test.cpp @@ -128,7 +128,7 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "world", 4.0f } }; - metacall::metacall_register("cxx_map_test", cxx_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_map_test", cxx_map_test, NULL, metacall::METACALL_NULL, 1, metacall::METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_test", m)); } @@ -136,7 +136,7 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { metacall::array a(3, 4.0f); - metacall::metacall_register("cxx_array_test", cxx_array_test, NULL, METACALL_NULL, 1, METACALL_ARRAY); + metacall::metacall_register("cxx_array_test", cxx_array_test, NULL, metacall::METACALL_NULL, 1, metacall::METACALL_ARRAY); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_array_test", a)); } @@ -147,7 +147,7 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "libraries", metacall::array("/a/path", "/another/path") } }; - metacall::metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_map_array_test", cxx_map_array_test, NULL, metacall::METACALL_NULL, 1, metacall::METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_map_array_test", m)); } @@ -159,14 +159,14 @@ TEST_F(metacall_cxx_port_test, DefaultConstructor) { "hello", { "world", 4.0f } } }; - metacall::metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, METACALL_NULL, 1, METACALL_MAP); + metacall::metacall_register("cxx_recursive_map_test", cxx_recursive_map_test, NULL, metacall::METACALL_NULL, 1, metacall::METACALL_MAP); EXPECT_EQ(nullptr, metacall::metacall<std::nullptr_t>("cxx_recursive_map_test", m)); } */ { - metacall::metacall_register("cxx_float_int_int_test", cxx_float_int_int_test, NULL, METACALL_FLOAT, 2, METACALL_INT, METACALL_INT); + metacall::metacall_register("cxx_float_int_int_test", cxx_float_int_int_test, NULL, metacall::METACALL_FLOAT, 2, metacall::METACALL_INT, metacall::METACALL_INT); EXPECT_EQ(3.0f, metacall::metacall<float>("cxx_float_int_int_test", 7, 8)); } From f33842924dc13d0fa1aebef7d9f471f7e9805bbe Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 15:39:00 +0100 Subject: [PATCH 361/364] Solve more issues in metacall. --- source/ports/cxx_port/include/metacall/metacall.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ports/cxx_port/include/metacall/metacall.hpp b/source/ports/cxx_port/include/metacall/metacall.hpp index 080013b26b..593b472ea7 100644 --- a/source/ports/cxx_port/include/metacall/metacall.hpp +++ b/source/ports/cxx_port/include/metacall/metacall.hpp @@ -23,6 +23,7 @@ /* -- Headers -- */ +#include <array> #include <cstring> #include <memory> #include <stdexcept> From 89266f6c65b1e146856fab42515518803ea1f831 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 15:54:03 +0100 Subject: [PATCH 362/364] Disable cxx port. --- source/ports/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ports/CMakeLists.txt b/source/ports/CMakeLists.txt index e70bb151db..cc73de928d 100644 --- a/source/ports/CMakeLists.txt +++ b/source/ports/CMakeLists.txt @@ -28,7 +28,7 @@ endif() # Project options option(OPTION_BUILD_PORTS_CS "Build C# port." OFF) -option(OPTION_BUILD_PORTS_CXX "Build C++ port." ON) +option(OPTION_BUILD_PORTS_CXX "Build C++ port." OFF) option(OPTION_BUILD_PORTS_D "Build D port." OFF) option(OPTION_BUILD_PORTS_GO "Build Go port." OFF) option(OPTION_BUILD_PORTS_JAVA "Build Java port." OFF) From 2b9bad084515a267b3d093af5e20ab1e2bbe95b0 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 16:06:59 +0100 Subject: [PATCH 363/364] Update version to v0.9.15. --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 69010fa5be..6f16bd3257 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.14 \ No newline at end of file +0.9.15 \ No newline at end of file From fd5375b5fc61be67b781163f943f59a4030c0829 Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <vic798@gmail.com> Date: Thu, 30 Oct 2025 16:09:01 +0100 Subject: [PATCH 364/364] Solve issues with rs port and core. --- source/ports/rs_port/tests/metacall_handle_test.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/ports/rs_port/tests/metacall_handle_test.rs b/source/ports/rs_port/tests/metacall_handle_test.rs index 207d0c24e5..516d5b52f0 100644 --- a/source/ports/rs_port/tests/metacall_handle_test.rs +++ b/source/ports/rs_port/tests/metacall_handle_test.rs @@ -36,9 +36,6 @@ fn metacall_handle() { // Now, testing loading again into an existing handle number 2 // This should make the handle have greet (2) and yeet functions together - - // TODO: This has a bug in the core that must be reviewed - /* const SCRIPT3: &str = "function yeet() { return 3 } \nmodule.exports = { yeet }"; let result3 = load::from_memory(Tag::NodeJS, SCRIPT3, Some(&mut handle2)); @@ -52,5 +49,4 @@ fn metacall_handle() { let out = metacall_handle_no_arg::<f64>(&mut handle2, "yeet").unwrap(); assert_eq!(out, 3.0, "Testing yeet 2"); } - */ }