From da4cd0ffa48293877d936bcf1202e3cb4b2b3110 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Mon, 25 Nov 2024 10:50:42 -0800 Subject: [PATCH 01/28] Require version 3.12.7 or higher --- .../main/java/org/lflang/generator/python/PythonGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index f486c64a47..2587fb4f49 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -647,7 +647,7 @@ private static String setUpMainTarget( add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.10.0...<3.11.0 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3.12.7...<3.13.0 REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE From 4ee2c4f5ad37da850da0442ed6dbc34e3f570c6a Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Mon, 25 Nov 2024 10:51:22 -0800 Subject: [PATCH 02/28] Remove call to Py_FinalizeEx() that causes memory problems --- .../java/org/lflang/generator/python/PythonPortGenerator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java index d8ece7d206..b32d7b8a1d 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java @@ -177,7 +177,6 @@ public static String generatePythonListForContainedBank( " }", " /* Release the thread. No Python API allowed beyond this point. */", " PyGILState_Release(gstate);", - " Py_FinalizeEx();", " exit(1);", "}", "for (int i = 0; i < " + generateWidthVariable(reactorName) + "; i++) {", From 1c3967fb142dbb8f0cfc0f40d7b7c3567be6fdb1 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Mon, 25 Nov 2024 11:53:10 -0800 Subject: [PATCH 03/28] Pull in changes from PR #1902 --- .github/workflows/py-tests.yml | 3 ++- .../main/java/org/lflang/generator/python/PythonGenerator.java | 3 --- .../java/org/lflang/generator/python/PythonPortGenerator.java | 1 - .../org/lflang/generator/python/PythonPreambleGenerator.java | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 3a6bb1485e..658e192b0a 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -22,6 +22,7 @@ jobs: strategy: matrix: platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} + python-version: ${{ (inputs.all-platforms && fromJSON('["3.10", "3.11", "3.12"]')) || fromJSON('["3.12"]') }} runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository @@ -36,7 +37,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} - name: Install dependencies OS X run: | brew install coreutils diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 2587fb4f49..a004da6642 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -486,9 +486,6 @@ protected void generateUserPreamblesForReactor(Reactor reactor, CodeBuilder src) @Override protected void generateReactorClassHeaders( TypeParameterizedReactor tpr, String headerName, CodeBuilder header, CodeBuilder src) { - header.pr( - PythonPreambleGenerator.generateCIncludeStatements( - targetConfig, targetLanguageIsCpp(), hasModalReactors)); super.generateReactorClassHeaders(tpr, headerName, header, src); } diff --git a/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java index b32d7b8a1d..aa1e9a21c3 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonPortGenerator.java @@ -192,7 +192,6 @@ public static String generatePythonListForContainedBank( " }", " /* Release the thread. No Python API allowed beyond this point. */", " PyGILState_Release(gstate);", - " Py_FinalizeEx();", " exit(1);", " }", "}"); diff --git a/core/src/main/java/org/lflang/generator/python/PythonPreambleGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonPreambleGenerator.java index 8194f78c63..692bf3d747 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonPreambleGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonPreambleGenerator.java @@ -44,8 +44,8 @@ public static String generateCDefineDirectives( public static String generateCIncludeStatements( TargetConfig targetConfig, boolean CCppMode, boolean hasModalReactors) { CodeBuilder code = new CodeBuilder(); - code.pr(CPreambleGenerator.generateIncludeStatements(targetConfig, CCppMode)); code.pr("#include \"pythontarget.h\""); + code.pr(CPreambleGenerator.generateIncludeStatements(targetConfig, CCppMode)); if (hasModalReactors) { code.pr("#include \"include/modal_models/definitions.h\""); } From 6cc855b9d039fabec19a2589f655a60108b9e3a9 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 29 Nov 2024 14:01:22 -0800 Subject: [PATCH 04/28] Use exact match for Python version and define CMAKE_INSTALL_BINDIR --- .../lflang/generator/python/PythonGenerator.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index a004da6642..5c59c5375b 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -186,6 +186,7 @@ public String generatePythonCode(String pyModuleName) { "\n", "import os", "import sys", + "print(\"******* Using Python version: %s.%s.%s\" % sys.version_info[:3])", "sys.path.append(os.path.dirname(__file__))", "# List imported names, but do not use pylint's --extension-pkg-allow-list option", "# so that these names will be assumed present without having to compile and install.", @@ -638,13 +639,22 @@ protected void additionalPostProcessingForModes() { private static String setUpMainTarget( boolean hasMain, String executableName, Stream cSources) { + // According to https://cmake.org/cmake/help/latest/module/FindPython.html#hints, the following + // should work to select the version of Python given in your virtual environment: + // set(LF_MAIN_TARGET ) + // set(Python_FIND_VIRTUALENV FIRST) + // set(Python_FIND_STRATEGY LOCATION) + // set(Python_FIND_FRAMEWORK LAST) + // find_package(Python 3.10.0...<3.13.0 REQUIRED COMPONENTS Interpreter Development) + // However, this does not work for me (macOS Sequoia 15.0.1). + // Hence, we use the command line here to find the Python version in the PATH and specify that version. return (""" set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_compile_definitions(_PYTHON_TARGET_ENABLED) add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.12.7...<3.13.0 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3.12.7 EXACT REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE @@ -674,6 +684,9 @@ private static String generateCmakeInstall(FileConfig fileConfig) { // need to replace '\' with '\\' on Windwos for proper escaping in cmake final var pyMainName = pyMainPath.toString().replace("\\", "\\\\"); return """ + if (NOT DEFINED CMAKE_INSTALL_BINDIR) + set(CMAKE_INSTALL_BINDIR "bin") + endif() if(WIN32) file(GENERATE OUTPUT .bat CONTENT "@echo off From 404ff9c584d86476b9ce7418c825fd0972da3ed8 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 29 Nov 2024 15:24:04 -0800 Subject: [PATCH 05/28] Temporarily set Python to version 3.10 to see if any tests break --- .../main/java/org/lflang/generator/python/PythonGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 5c59c5375b..4e538fe80e 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -654,7 +654,7 @@ private static String setUpMainTarget( add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.12.7 EXACT REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3.10.0...<3.11.0 REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE From bda61208b13da98680b4e9b4a63ad61dc0589fbf Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 29 Nov 2024 15:24:13 -0800 Subject: [PATCH 06/28] Align reactor-c --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 3d7715c39f..76bcf3282d 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 +Subproject commit 76bcf3282d4c8d58178da56a32720736379895f6 From c6f1a2309df91f99647f4116d7ea4b333f49ccec Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 29 Nov 2024 18:00:07 -0800 Subject: [PATCH 07/28] Hopefully restored Docker capability --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 76bcf3282d..eecb56c428 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 76bcf3282d4c8d58178da56a32720736379895f6 +Subproject commit eecb56c428f0d3e757c13ea4e34619f9be047dc7 From 8aa2296283caf1f974b77ea02fa71d24ed0ba7aa Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 29 Nov 2024 18:01:35 -0800 Subject: [PATCH 08/28] Spotless --- .../main/java/org/lflang/generator/python/PythonGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 4e538fe80e..ef98f4aa15 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -647,7 +647,8 @@ private static String setUpMainTarget( // set(Python_FIND_FRAMEWORK LAST) // find_package(Python 3.10.0...<3.13.0 REQUIRED COMPONENTS Interpreter Development) // However, this does not work for me (macOS Sequoia 15.0.1). - // Hence, we use the command line here to find the Python version in the PATH and specify that version. + // Hence, we use the command line here to find the Python version in the PATH and specify that + // version. return (""" set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_compile_definitions(_PYTHON_TARGET_ENABLED) From 6057a85059470a969beddb0781a6c6596b18b469 Mon Sep 17 00:00:00 2001 From: MoezBHH Date: Tue, 3 Dec 2024 16:01:31 +0100 Subject: [PATCH 09/28] back to Head --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index eecb56c428..3d7715c39f 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit eecb56c428f0d3e757c13ea4e34619f9be047dc7 +Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 From f4cb0564d528f3a0f88b40d97ee2bf1f71c3ff0b Mon Sep 17 00:00:00 2001 From: MoezBHH Date: Thu, 5 Dec 2024 23:43:22 +0100 Subject: [PATCH 10/28] Fix segmentation error on Python > 3.10 --- .../java/org/lflang/generator/python/PythonGenerator.java | 2 +- .../org/lflang/generator/python/PythonReactionGenerator.java | 4 +++- core/src/main/resources/lib/c/reactor-c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index ef98f4aa15..7aee1825cf 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -655,7 +655,7 @@ private static String setUpMainTarget( add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.10.0...<3.11.0 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3.10.0 REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE diff --git a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java index d0a1bffac7..6b839a55ec 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java @@ -102,10 +102,12 @@ private static String generateCPythonFunctionCaller( + "." + pythonFunctionName + "\");", + "PyObject *arglist = Py_BuildValue(\"(" + "O".repeat(pyObjects.size()) + ")\"" + pyObjectsJoined + ");", "PyObject *rValue = PyObject_CallObject(", " self->" + cpythonFunctionName + ", ", - " Py_BuildValue(\"(" + "O".repeat(pyObjects.size()) + ")\"" + pyObjectsJoined + ")", + " arglist", ");", + "Py_DECREF(arglist);", "if (rValue == NULL) {", " lf_print_error(\"FATAL: Calling reaction " + reactorDeclName diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 3d7715c39f..7360079176 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 +Subproject commit 7360079176a270b491ff2fa5276402e6054f9913 From db3dbcfbc6464ebf5db633a829598aeb91f81a29 Mon Sep 17 00:00:00 2001 From: MoezBHH Date: Fri, 6 Dec 2024 08:37:04 +0100 Subject: [PATCH 11/28] Fix segmentation error on Python > 3.10 --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 7360079176..3d7715c39f 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 7360079176a270b491ff2fa5276402e6054f9913 +Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 From 3271089624f0f65ada79377527ffada27ba6bc2d Mon Sep 17 00:00:00 2001 From: MoezBHH Date: Fri, 6 Dec 2024 09:40:52 +0100 Subject: [PATCH 12/28] fix file formatting --- .../lflang/generator/python/PythonReactionGenerator.java | 6 +++++- core/src/main/resources/lib/c/reactor-c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java index 6b839a55ec..c44475f5f8 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonReactionGenerator.java @@ -102,7 +102,11 @@ private static String generateCPythonFunctionCaller( + "." + pythonFunctionName + "\");", - "PyObject *arglist = Py_BuildValue(\"(" + "O".repeat(pyObjects.size()) + ")\"" + pyObjectsJoined + ");", + "PyObject *arglist = Py_BuildValue(\"(" + + "O".repeat(pyObjects.size()) + + ")\"" + + pyObjectsJoined + + ");", "PyObject *rValue = PyObject_CallObject(", " self->" + cpythonFunctionName + ", ", " arglist", diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 3d7715c39f..f5052600d2 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 +Subproject commit f5052600d29d8d749802cb0c81da0216c4e79606 From 3381032b6d8b1457c2cb3f3b995da0a51eec132d Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Fri, 6 Dec 2024 06:55:37 -0800 Subject: [PATCH 13/28] Align reactor-c --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index f5052600d2..303b24fcb1 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit f5052600d29d8d749802cb0c81da0216c4e79606 +Subproject commit 303b24fcb12da8960637ffe841fddea6c8218468 From 9758873ffeaa0ee5ad8a7398a1bfa45be73c140a Mon Sep 17 00:00:00 2001 From: Martin Schoeberl Date: Fri, 6 Dec 2024 15:32:46 -0800 Subject: [PATCH 14/28] Patmos: better compiler flags --- .../main/java/org/lflang/generator/c/CCmakeGenerator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java index 152435bca9..2f2e6d3e7d 100644 --- a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java @@ -228,10 +228,15 @@ CodeBuilder generateCMakeCode( break; case PATMOS: cMakeCode.newLine(); + cMakeCode.pr("SET(CMAKE_SYSTEM_NAME patmos)"); + cMakeCode.pr("SET(CMAKE_SYSTEM_PROCESSOR patmos)"); cMakeCode.pr("# Include toolchain file and set project"); cMakeCode.pr( "find_program(CLANG_EXECUTABLE NAMES patmos-clang REQUIRED DOC \"Path to the clang" + " front-end.\")"); + cMakeCode.pr("set(CMAKE_C_FLAGS_INIT \"-O2 -DNDEBUG\")"); + + cMakeCode.pr("set(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})"); cMakeCode.pr( "set(CMAKE_C_FLAGS_RELEASE \"-O2 -DNDEBUG\")"); // patmos-clang cannot compiler -O3 From 530166b833ba64483ede65045891c341d902635c Mon Sep 17 00:00:00 2001 From: Martin Schoeberl Date: Fri, 6 Dec 2024 15:47:39 -0800 Subject: [PATCH 15/28] Patmos: disable CI til the compiler is fixed --- .github/workflows/c-embedded.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-embedded.yml b/.github/workflows/c-embedded.yml index ea9b2acf25..bc5c3e217a 100644 --- a/.github/workflows/c-embedded.yml +++ b/.github/workflows/c-embedded.yml @@ -25,5 +25,5 @@ jobs: # uses: ./.github/workflows/c-flexpret-tests.yml # Run the C Patmos integration tests. - patmos: - uses: ./.github/workflows/c-patmos-tests.yml +# patmos: +# uses: ./.github/workflows/c-patmos-tests.yml From 4fba6b1c70b33f7642483ca450ff0a7240a9eced Mon Sep 17 00:00:00 2001 From: erlingrj Date: Fri, 6 Dec 2024 16:11:09 -0800 Subject: [PATCH 16/28] Bump reactor-c --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 3d7715c39f..f5052600d2 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 3d7715c39fc40ad3c4c29918e724dc5b96738ca5 +Subproject commit f5052600d29d8d749802cb0c81da0216c4e79606 From 2f01d095a2efbc7b15493715aa9bc8c840495cab Mon Sep 17 00:00:00 2001 From: erlingrj Date: Fri, 6 Dec 2024 17:32:15 -0800 Subject: [PATCH 17/28] Spotless --- core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java index 2f2e6d3e7d..cfb64a0a65 100644 --- a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java @@ -235,7 +235,6 @@ CodeBuilder generateCMakeCode( "find_program(CLANG_EXECUTABLE NAMES patmos-clang REQUIRED DOC \"Path to the clang" + " front-end.\")"); cMakeCode.pr("set(CMAKE_C_FLAGS_INIT \"-O2 -DNDEBUG\")"); - cMakeCode.pr("set(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})"); cMakeCode.pr( From 928267d0b0fa642595af67ff84908a63c7785c07 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 07:13:49 -0800 Subject: [PATCH 18/28] Fix warning about serialized type --- .../org/lflang/federated/extensions/PythonExtension.java | 5 +++++ .../java/org/lflang/generator/python/PythonGenerator.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/federated/extensions/PythonExtension.java b/core/src/main/java/org/lflang/federated/extensions/PythonExtension.java index 13c6a46fa2..2b6571d4dd 100644 --- a/core/src/main/java/org/lflang/federated/extensions/PythonExtension.java +++ b/core/src/main/java/org/lflang/federated/extensions/PythonExtension.java @@ -85,6 +85,11 @@ protected String generateSerializationIncludes( return code.getCode(); } + @Override + public String getNetworkBufferType() { + return "PyObject*"; + } + @Override public String generateNetworkSenderBody( VarRef sendingPort, diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 7aee1825cf..ef98f4aa15 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -655,7 +655,7 @@ private static String setUpMainTarget( add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.10.0 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3.10.0...<3.11.0 REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE From 252a2ae9a397cbf939baaf365e86d757decdc718 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 10:16:12 -0800 Subject: [PATCH 19/28] Generate preambles only once in Python file --- .../org/lflang/generator/python/PythonGenerator.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index ef98f4aa15..3ec19239e9 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -90,6 +90,9 @@ public class PythonGenerator extends CGenerator { // Used to add module requirements to setup.py (delimited with ,) private final List pythonRequiredModules = new ArrayList<>(); + /** Indicator that we have already generated top-level preambles. */ + private Set generatedTopLevelPreambles = new HashSet(); + private final PythonTypes types; public PythonGenerator(LFGeneratorContext context) { @@ -271,7 +274,12 @@ protected String generateTopLevelPreambles(Reactor ignored) { models.add((Model) ASTUtils.toDefinition(this.mainDef.getReactorClass()).eContainer()); } for (Model m : models) { - pythonPreamble.pr(PythonPreambleGenerator.generatePythonPreambles(m.getPreambles())); + // In the generated Python code, unlike C, all reactors go into the same file. + // Therefore, we do not need to generate this if it has already been generated. + if (!generatedTopLevelPreambles.contains(m)) { + generatedTopLevelPreambles.add(m); + pythonPreamble.pr(PythonPreambleGenerator.generatePythonPreambles(m.getPreambles())); + } } return PythonPreambleGenerator.generateCIncludeStatements( targetConfig, targetLanguageIsCpp(), hasModalReactors); From 20f1703fc5f3ecda2699438d61a5437d4c9c7671 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 10:16:35 -0800 Subject: [PATCH 20/28] Import pickle_serializer --- test/Python/src/serialization/CustomSerializer.lf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Python/src/serialization/CustomSerializer.lf b/test/Python/src/serialization/CustomSerializer.lf index adcec6a350..ee1f112ed1 100644 --- a/test/Python/src/serialization/CustomSerializer.lf +++ b/test/Python/src/serialization/CustomSerializer.lf @@ -5,7 +5,10 @@ target Python { } preamble {= + # Note that both federates will try to install the pickle_serializer package. One will likely fail, + # but the other will succeed. os.system("pip install ./src/serialization/pickle_serializer/ --user") + import pickle_serializer =} reactor Client { @@ -66,5 +69,5 @@ federated reactor { client = new Client() server = new Server() server.server_message -> client.server_message after 100 ms serializer "pickle_serializer" - client.client_message -> server.client_message serializer "pickle_serializer" + client.client_message -> server.client_message after 100 ms serializer "pickle_serializer" } From a9b6d788b187667f589d8af0256806843b0fd3e8 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 10:55:13 -0800 Subject: [PATCH 21/28] Update to allow Python versions bigger than 3.10 --- .../lflang/generator/python/PythonGenerator.java | 15 ++++++--------- core/src/main/resources/lib/c/reactor-c | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 3ec19239e9..44ba4eb4ee 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -648,22 +648,19 @@ protected void additionalPostProcessingForModes() { private static String setUpMainTarget( boolean hasMain, String executableName, Stream cSources) { // According to https://cmake.org/cmake/help/latest/module/FindPython.html#hints, the following - // should work to select the version of Python given in your virtual environment: - // set(LF_MAIN_TARGET ) - // set(Python_FIND_VIRTUALENV FIRST) - // set(Python_FIND_STRATEGY LOCATION) - // set(Python_FIND_FRAMEWORK LAST) - // find_package(Python 3.10.0...<3.13.0 REQUIRED COMPONENTS Interpreter Development) + // should work to select the version of Python given in your virtual environment. // However, this does not work for me (macOS Sequoia 15.0.1). - // Hence, we use the command line here to find the Python version in the PATH and specify that - // version. + // FIXME: Define a target parameter to specify the exact Python version. return (""" set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_compile_definitions(_PYTHON_TARGET_ENABLED) add_subdirectory(core) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}) set(LF_MAIN_TARGET ) - find_package(Python 3.10.0...<3.11.0 REQUIRED COMPONENTS Interpreter Development) + set(Python_FIND_VIRTUALENV FIRST) + set(Python_FIND_STRATEGY LOCATION) + set(Python_FIND_FRAMEWORK LAST) + find_package(Python 3.10.0 REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 303b24fcb1..fe1ee790b3 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 303b24fcb12da8960637ffe841fddea6c8218468 +Subproject commit fe1ee790b313c4ee0ced0e80e7b58319d5a8090a From 23b59229475322fc9af38d0159acda302819c662 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 12:17:01 -0800 Subject: [PATCH 22/28] Added target property for Python version --- .../lflang/generator/c/CCmakeGenerator.java | 10 +++++- .../org/lflang/generator/c/CGenerator.java | 2 +- .../generator/python/PythonGenerator.java | 19 ++++++---- .../main/java/org/lflang/target/Target.java | 35 ++----------------- 4 files changed, 25 insertions(+), 41 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java index cfb64a0a65..ddceb36e54 100644 --- a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java @@ -69,7 +69,7 @@ public class CCmakeGenerator { private final FileConfig fileConfig; private final List additionalSources; - private final SetUpMainTarget setUpMainTarget; + private SetUpMainTarget setUpMainTarget; private final String installCode; public CCmakeGenerator(FileConfig fileConfig, List additionalSources) { @@ -90,6 +90,14 @@ public CCmakeGenerator( this.installCode = installCode; } + /** + * Set the code generator for the CMake main target. + * @param setUpMainTarget + */ + public void setCmakeGenerator(SetUpMainTarget setUpMainTarget) { + this.setUpMainTarget = setUpMainTarget; + } + /** * Generate the contents of a CMakeLists.txt that builds the provided LF C 'sources'. Any error * will be reported in the 'errorReporter'. diff --git a/core/src/main/java/org/lflang/generator/c/CGenerator.java b/core/src/main/java/org/lflang/generator/c/CGenerator.java index 8adaa02eeb..2c21ae7b7f 100644 --- a/core/src/main/java/org/lflang/generator/c/CGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CGenerator.java @@ -319,7 +319,7 @@ public class CGenerator extends GeneratorBase { private final CTypes types; - private final CCmakeGenerator cmakeGenerator; + protected CCmakeGenerator cmakeGenerator; protected CGenerator( LFGeneratorContext context, diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 44ba4eb4ee..76fa02d3ac 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -65,6 +65,7 @@ import org.lflang.target.Target; import org.lflang.target.property.DockerProperty; import org.lflang.target.property.ProtobufsProperty; +import org.lflang.target.property.PythonVersionProperty; import org.lflang.util.FileUtil; import org.lflang.util.LFCommand; @@ -82,7 +83,7 @@ * * @author Soroush Bateni */ -public class PythonGenerator extends CGenerator { +public class PythonGenerator extends CGenerator implements CCmakeGenerator.SetUpMainTarget { // Used to add statements that come before reactor classes and user code private final CodeBuilder pythonPreamble = new CodeBuilder(); @@ -107,8 +108,9 @@ public PythonGenerator(LFGeneratorContext context) { "lib/python_tag.c", "lib/python_time.c", "lib/pythontarget.c"), - PythonGenerator::setUpMainTarget, + null, // Temporarily, because can't pass this. generateCmakeInstall(context.getFileConfig()))); + cmakeGenerator.setCmakeGenerator(this); } private PythonGenerator( @@ -645,12 +647,16 @@ protected void additionalPostProcessingForModes() { PythonModeGenerator.generateResetReactionsIfNeeded(reactors); } - private static String setUpMainTarget( + public String getCmakeCode( boolean hasMain, String executableName, Stream cSources) { // According to https://cmake.org/cmake/help/latest/module/FindPython.html#hints, the following // should work to select the version of Python given in your virtual environment. // However, this does not work for me (macOS Sequoia 15.0.1). - // FIXME: Define a target parameter to specify the exact Python version. + // As a consequence, the python-version target property can be used to specify the exact Python version. + var pythonVersion = "3.10.0"; // Allows 3.10 or later. Change to "3.10.0...<3.11.0" to require 3.10 by default. + if (targetConfig.isSet(PythonVersionProperty.INSTANCE)) { + pythonVersion = targetConfig.get(PythonVersionProperty.INSTANCE) + " EXACT"; + } return (""" set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_compile_definitions(_PYTHON_TARGET_ENABLED) @@ -660,7 +666,7 @@ private static String setUpMainTarget( set(Python_FIND_VIRTUALENV FIRST) set(Python_FIND_STRATEGY LOCATION) set(Python_FIND_FRAMEWORK LAST) - find_package(Python 3.10.0 REQUIRED COMPONENTS Interpreter Development) + find_package(Python REQUIRED COMPONENTS Interpreter Development) Python_add_library( ${LF_MAIN_TARGET} MODULE @@ -680,7 +686,8 @@ private static String setUpMainTarget( target_link_libraries(${LF_MAIN_TARGET} PRIVATE ${Python_LIBRARIES}) target_compile_definitions(${LF_MAIN_TARGET} PUBLIC MODULE_NAME=) """) - .replace("", generatePythonModuleName(executableName)); + .replace("", generatePythonModuleName(executableName)) + .replace("", pythonVersion); // The use of fileConfig.name will break federated execution, but that's fine } diff --git a/core/src/main/java/org/lflang/target/Target.java b/core/src/main/java/org/lflang/target/Target.java index c99ed4a0d3..81adb25d3f 100644 --- a/core/src/main/java/org/lflang/target/Target.java +++ b/core/src/main/java/org/lflang/target/Target.java @@ -26,39 +26,7 @@ import java.util.Set; import net.jcip.annotations.Immutable; import org.lflang.lf.TargetDecl; -import org.lflang.target.property.AuthProperty; -import org.lflang.target.property.BuildCommandsProperty; -import org.lflang.target.property.BuildTypeProperty; -import org.lflang.target.property.CargoDependenciesProperty; -import org.lflang.target.property.CargoFeaturesProperty; -import org.lflang.target.property.ClockSyncModeProperty; -import org.lflang.target.property.ClockSyncOptionsProperty; -import org.lflang.target.property.CmakeIncludeProperty; -import org.lflang.target.property.CompileDefinitionsProperty; -import org.lflang.target.property.CompilerProperty; -import org.lflang.target.property.CoordinationOptionsProperty; -import org.lflang.target.property.CoordinationProperty; -import org.lflang.target.property.DockerProperty; -import org.lflang.target.property.ExportDependencyGraphProperty; -import org.lflang.target.property.ExternalRuntimePathProperty; -import org.lflang.target.property.FilesProperty; -import org.lflang.target.property.KeepaliveProperty; -import org.lflang.target.property.NoRuntimeValidationProperty; -import org.lflang.target.property.NoSourceMappingProperty; -import org.lflang.target.property.PlatformProperty; -import org.lflang.target.property.PrintStatisticsProperty; -import org.lflang.target.property.ProtobufsProperty; -import org.lflang.target.property.Ros2DependenciesProperty; -import org.lflang.target.property.Ros2Property; -import org.lflang.target.property.RuntimeVersionProperty; -import org.lflang.target.property.RustIncludeProperty; -import org.lflang.target.property.SchedulerProperty; -import org.lflang.target.property.SingleFileProjectProperty; -import org.lflang.target.property.SingleThreadedProperty; -import org.lflang.target.property.TracePluginProperty; -import org.lflang.target.property.TracingProperty; -import org.lflang.target.property.VerifyProperty; -import org.lflang.target.property.WorkersProperty; +import org.lflang.target.property.*; /** * Enumeration of targets and their associated properties. @@ -634,6 +602,7 @@ public void initialize(TargetConfig config) { KeepaliveProperty.INSTANCE, NoSourceMappingProperty.INSTANCE, ProtobufsProperty.INSTANCE, + PythonVersionProperty.INSTANCE, SchedulerProperty.INSTANCE, SingleThreadedProperty.INSTANCE, TracingProperty.INSTANCE, From 7a3a789298633c81a79ffdba10e155abe395ea39 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 12:28:07 -0800 Subject: [PATCH 23/28] Added missing file --- .../target/property/PythonVersionProperty.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 core/src/main/java/org/lflang/target/property/PythonVersionProperty.java diff --git a/core/src/main/java/org/lflang/target/property/PythonVersionProperty.java b/core/src/main/java/org/lflang/target/property/PythonVersionProperty.java new file mode 100644 index 0000000000..af8d0f2104 --- /dev/null +++ b/core/src/main/java/org/lflang/target/property/PythonVersionProperty.java @@ -0,0 +1,17 @@ +package org.lflang.target.property; + +/** A specific Python version to use. */ +public final class PythonVersionProperty extends StringProperty { + + /** Singleton target property instance. */ + public static final PythonVersionProperty INSTANCE = new PythonVersionProperty(); + + private PythonVersionProperty() { + super(); + } + + @Override + public String name() { + return "python-version"; + } +} From f51aa71455fc6d928fed4cc11cdda50c369085ae Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 13:19:49 -0800 Subject: [PATCH 24/28] Format --- .../java/org/lflang/generator/c/CCmakeGenerator.java | 1 + .../org/lflang/generator/python/PythonGenerator.java | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java index ddceb36e54..d187dc98f5 100644 --- a/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java +++ b/core/src/main/java/org/lflang/generator/c/CCmakeGenerator.java @@ -92,6 +92,7 @@ public CCmakeGenerator( /** * Set the code generator for the CMake main target. + * * @param setUpMainTarget */ public void setCmakeGenerator(SetUpMainTarget setUpMainTarget) { diff --git a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java index 76fa02d3ac..71138ec187 100644 --- a/core/src/main/java/org/lflang/generator/python/PythonGenerator.java +++ b/core/src/main/java/org/lflang/generator/python/PythonGenerator.java @@ -647,13 +647,14 @@ protected void additionalPostProcessingForModes() { PythonModeGenerator.generateResetReactionsIfNeeded(reactors); } - public String getCmakeCode( - boolean hasMain, String executableName, Stream cSources) { + public String getCmakeCode(boolean hasMain, String executableName, Stream cSources) { // According to https://cmake.org/cmake/help/latest/module/FindPython.html#hints, the following // should work to select the version of Python given in your virtual environment. // However, this does not work for me (macOS Sequoia 15.0.1). - // As a consequence, the python-version target property can be used to specify the exact Python version. - var pythonVersion = "3.10.0"; // Allows 3.10 or later. Change to "3.10.0...<3.11.0" to require 3.10 by default. + // As a consequence, the python-version target property can be used to specify the exact Python + // version. + var pythonVersion = + "3.10.0"; // Allows 3.10 or later. Change to "3.10.0...<3.11.0" to require 3.10 by default. if (targetConfig.isSet(PythonVersionProperty.INSTANCE)) { pythonVersion = targetConfig.get(PythonVersionProperty.INSTANCE) + " EXACT"; } From 8c8e4ef58b4451ac2b3461c6583351ea35354cab Mon Sep 17 00:00:00 2001 From: erlingrj Date: Sat, 7 Dec 2024 10:17:17 -0800 Subject: [PATCH 25/28] Fix FlexPRET CI --- .github/workflows/c-flexpret-tests.yml | 2 +- core/src/main/resources/lib/c/reactor-c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-flexpret-tests.yml b/.github/workflows/c-flexpret-tests.yml index d6c4eb9ad4..fb045be8e1 100644 --- a/.github/workflows/c-flexpret-tests.yml +++ b/.github/workflows/c-flexpret-tests.yml @@ -45,7 +45,7 @@ jobs: if: ${{ inputs.runtime-ref }} - name: Run FlexPRET smoke tests run: | - cd "$FP_DIR" && source env.bash && cd - + source $FP_DIR/env.bash ./gradlew core:integrationTest \ --tests org.lflang.tests.runtime.CFlexPRETTest.* \ core:integrationTestCodeCoverageReport diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index f5052600d2..862e0b9617 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit f5052600d29d8d749802cb0c81da0216c4e79606 +Subproject commit 862e0b9617ca55b4fe5f0b2248c63846a8630d3d From 16389a35e08f13410c7fe86f025af383b33cd88f Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Sat, 7 Dec 2024 21:50:30 -0800 Subject: [PATCH 26/28] Align reactor-c --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 862e0b9617..7acd2f9618 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 862e0b9617ca55b4fe5f0b2248c63846a8630d3d +Subproject commit 7acd2f9618d2e983749cdcf66e990c993372d5b8 From 33cc86236b42ae35c8b9a95b40479a0097e5fd9a Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Mon, 9 Dec 2024 08:04:38 -0800 Subject: [PATCH 27/28] Fix Python version to 3.12 --- .github/workflows/lsp-tests.yml | 2 +- .github/workflows/py-tests.yml | 3 +-- core/src/main/resources/lib/c/reactor-c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lsp-tests.yml b/.github/workflows/lsp-tests.yml index a724ed42e1..115924d686 100644 --- a/.github/workflows/lsp-tests.yml +++ b/.github/workflows/lsp-tests.yml @@ -69,7 +69,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.12" - name: Run language server Python tests without PyLint run: ./gradlew core:integrationTest --tests org.lflang.tests.lsp.LspTests.pythonValidationTestSyntaxOnly core:integrationTestCodeCoverageReport - name: Install pylint diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 658e192b0a..8a29a886bb 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -22,7 +22,6 @@ jobs: strategy: matrix: platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }} - python-version: ${{ (inputs.all-platforms && fromJSON('["3.10", "3.11", "3.12"]')) || fromJSON('["3.12"]') }} runs-on: ${{ matrix.platform }} steps: - name: Check out lingua-franca repository @@ -37,7 +36,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.12' - name: Install dependencies OS X run: | brew install coreutils diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 7acd2f9618..782d4927ad 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 7acd2f9618d2e983749cdcf66e990c993372d5b8 +Subproject commit 782d4927add68fad4671522a3e2f266f3cb8b07b From 4b20770533fba744243a1579a5b7794731ca79e8 Mon Sep 17 00:00:00 2001 From: "Edward A. Lee" Date: Mon, 9 Dec 2024 08:15:30 -0800 Subject: [PATCH 28/28] Align reactor-c --- core/src/main/resources/lib/c/reactor-c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/resources/lib/c/reactor-c b/core/src/main/resources/lib/c/reactor-c index 782d4927ad..7acd2f9618 160000 --- a/core/src/main/resources/lib/c/reactor-c +++ b/core/src/main/resources/lib/c/reactor-c @@ -1 +1 @@ -Subproject commit 782d4927add68fad4671522a3e2f266f3cb8b07b +Subproject commit 7acd2f9618d2e983749cdcf66e990c993372d5b8